:root {
  --bg: #eef3f4;
  --surface: #ffffff;
  --surface-soft: #f7fafb;
  --surface-tint: #f2f8f7;
  --ink: #102431;
  --ink-2: #314b5b;
  --muted: #7b8e9a;
  --line: #dde8eb;
  --line-strong: #c9d9de;
  --brand: #0f766e;
  --brand-strong: #095d57;
  --brand-soft: #ddf4ee;
  --nav: #091721;
  --nav-2: #0d2230;
  --amber: #a5660b;
  --amber-soft: #fff4df;
  --red: #ad3732;
  --red-soft: #fdebe8;
  --blue: #2f649b;
  --blue-soft: #e9f1fb;
  --green: #0a7351;
  --green-soft: #def5ea;
  --shadow: 0 18px 50px rgba(16, 48, 58, .07);
  --shadow-soft: 0 8px 22px rgba(16, 48, 58, .045);
  --radius: 20px;
  --radius-sm: 12px;
  --font: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 5% 0%, rgba(20, 184, 166, .13), transparent 30rem),
    radial-gradient(ellipse at 100% 0%, rgba(54, 111, 160, .1), transparent 28rem),
    linear-gradient(145deg, #f1f8f7 0%, #eef3f5 55%, #e9f0f3 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
code, pre, .mono { font-family: var(--mono); }

.app-shell { display: flex; min-height: 100vh; }

/* ------------------------------------------------------------------ sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 264px;
  padding: 24px 16px 18px;
  overflow-y: auto;
  border-right: 1px solid rgba(156, 211, 204, .11);
  background:
    radial-gradient(circle at 15% 0%, rgba(45, 212, 191, .17), transparent 22rem),
    radial-gradient(circle at 100% 80%, rgba(56, 105, 148, .17), transparent 22rem),
    linear-gradient(180deg, #0a1a25 0%, #07131d 100%);
  color: #dcebf0;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 7px 25px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(126, 240, 224, .24);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(20, 184, 166, .3), rgba(10, 82, 91, .4));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 10px 24px rgba(3, 97, 89, .18);
  color: #83f4e2;
}
.brand-mark svg { width: 27px; height: 27px; }
.brand-mark.small { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; }
.brand-mark.small svg { width: 22px; height: 22px; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { color: #f3fffd; font-size: 15px; font-weight: 740; letter-spacing: .01em; }
.brand-copy span { color: #84a6b3; font-size: 10px; letter-spacing: .1em; }
.side-nav { display: grid; gap: 4px; }
.side-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #9db8c4;
  text-align: left;
  font-size: 12px;
  font-weight: 560;
  transition: background .16s ease, color .16s ease;
}
.side-link svg { width: 18px; height: 18px; flex: 0 0 18px; color: #7fa3b0; }
.side-link:hover { background: rgba(255, 255, 255, .055); color: #f1fffb; }
.side-link:hover svg { color: #6de8d6; }
.side-link.is-active {
  background: linear-gradient(90deg, rgba(45, 212, 191, .17), rgba(45, 212, 191, .035));
  color: #f3fffc;
  box-shadow: inset 0 0 0 1px rgba(94, 234, 212, .1);
}
.side-link.is-active svg { color: #6de8d6; }
.side-link.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 19px;
  border-radius: 0 4px 4px 0;
  background: #5eead4;
  box-shadow: 0 0 14px rgba(94, 234, 212, .7);
}
.side-section { margin-top: 27px; padding: 0 7px; }
.section-label { margin-bottom: 8px; color: #678694; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.quick-list { display: grid; gap: 2px; }
.quick-empty { padding: 7px 4px; color: #66828f; font-size: 10.5px; }
.quick-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8ba8b4;
  font-size: 10.5px;
  text-align: left;
}
.quick-link:hover { background: rgba(255, 255, 255, .05); color: #ddf8f3; }
.quick-link svg { width: 14px; height: 14px; flex: 0 0 14px; color: #5f9e99; }
.quick-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-bottom { display: grid; gap: 10px; margin-top: auto; padding: 24px 0 0; }
.connection-card {
  padding: 13px 13px 12px;
  border: 1px solid rgba(148, 184, 209, .13);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(45, 212, 191, .055), rgba(255, 255, 255, .018));
}
.connection-head { display: flex; align-items: center; gap: 7px; }
.connection-head strong { color: #d8f5ef; font-size: 10.5px; font-weight: 650; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #2dd4bf; box-shadow: 0 0 0 4px rgba(45, 212, 191, .12); }
.status-dot.is-bad { background: #fb7185; box-shadow: 0 0 0 4px rgba(251, 113, 133, .12); }
.connection-card p { margin: 7px 0 9px; color: #7995a1; font-size: 9.5px; line-height: 1.55; word-break: break-all; }
.connection-link { padding: 0; border: 0; background: transparent; color: #6bd7c7; font-size: 9.5px; }
.connection-link span { color: #8caeba; }
.connection-link:hover { color: #a7fff1; }
.user-card { display: flex; align-items: center; gap: 8px; padding: 5px 6px; }
.user-avatar {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  border-radius: 9px;
  background: linear-gradient(145deg, #0f766e, #164e63);
  color: #effffb;
  font-size: 10px;
  font-weight: 750;
}
.user-copy { display: grid; gap: 0; min-width: 0; line-height: 1.25; }
.user-copy strong { color: #d6e9ee; font-size: 10.5px; font-weight: 650; }
.user-copy small { color: #708c99; font-size: 9px; }
.user-card .icon-button { margin-left: auto; }

/* --------------------------------------------------------------------- main */
.main {
  width: calc(100% - 264px);
  max-width: 1560px;
  min-height: 100vh;
  margin-left: 264px;
  padding: 25px 30px 24px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 17px;
}
.menu-button { display: none; }
.page-heading { min-width: 0; flex: 1 1 auto; }
.breadcrumb { display: flex; align-items: center; gap: 5px; min-height: 28px; flex-wrap: wrap; }
.crumb {
  padding: 3px 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #7b919c;
  font-size: 11px;
  font-weight: 570;
  letter-spacing: .01em;
}
button.crumb:hover { background: #e9f4f1; color: var(--brand); }
.crumb.is-current { color: #173746; font-weight: 720; font-size: 14px; letter-spacing: -.015em; }
.crumb-separator { color: #a7bac1; font-size: 12px; }
.page-sub { margin-top: 3px; color: #81949e; font-size: 10.5px; }
.top-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  width: min(250px, 25vw);
  min-height: 37px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .7);
  color: #8397a1;
}
.search-box:focus-within { border-color: #76c6ba; background: #fff; box-shadow: 0 0 0 3px rgba(15, 118, 110, .075); }
.search-box svg { width: 16px; height: 16px; flex: 0 0 16px; }
.search-box input { width: 100%; min-width: 0; padding: 8px 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 11.5px; }
.search-box input::placeholder { color: #9aabb3; }
.search-clear { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: #edf3f4; color: #6e858f; font-size: 13px; line-height: 1; }
.search-clear:hover { background: #e1eeea; color: var(--brand); }

.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 37px;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 640;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.primary-button {
  border: 1px solid #0d6e66;
  background: linear-gradient(160deg, #16978d 0%, #0f766e 58%, #0b6962 100%);
  color: #fff;
  box-shadow: 0 7px 17px rgba(15, 118, 110, .17), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.primary-button:hover { background: linear-gradient(160deg, #11877e, #0a655f); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(15, 118, 110, .21); }
.primary-button:disabled, .secondary-button:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.primary-button svg, .secondary-button svg { width: 16px; height: 16px; }
.secondary-button { border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .75); color: #446171; }
.secondary-button:hover { border-color: #a9c8c2; background: #fbfffe; color: var(--brand); }
.icon-button {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .7);
  color: #486979;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.icon-button:hover { border-color: #a4c9c3; background: #fff; color: var(--brand); }
.icon-button.subtle { width: 30px; height: 30px; flex-basis: 30px; border-color: transparent; background: transparent; color: #74909b; }
.icon-button.subtle:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.full-width { width: 100%; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--brand); font-size: 10.5px; }
.text-button:hover { text-decoration: underline; }
.muted { color: var(--muted); font-size: 11px; }
.text-link { color: var(--brand); font-size: 10.5px; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.warning-stack { display: grid; gap: 7px; margin-bottom: 13px; }
.warning-banner { display: flex; gap: 9px; padding: 10px 12px; border: 1px solid #edd9ad; border-radius: 10px; background: linear-gradient(90deg, #fff9e9, #fffdf7); color: #7d560d; font-size: 10.5px; line-height: 1.55; }
.warning-banner strong { flex: 0 0 auto; white-space: nowrap; }

/* ---------------------------------------------------------------- workspace */
.workspace {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 151px);
  padding: 0;
  border: 1px solid rgba(210, 225, 230, .94);
  border-radius: 21px;
  background: rgba(255, 255, 255, .79);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.workspace-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 61px;
  padding: 12px 20px;
  border-bottom: 1px solid #e8f0f1;
}
.workspace-title { display: grid; gap: 2px; min-width: 0; }
.workspace-kicker { color: #7f959e; font-size: 8.5px; font-weight: 720; letter-spacing: .16em; }
.workspace-title strong { overflow: hidden; color: #183845; font-size: 13px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.workspace-tools { display: flex; align-items: center; gap: 10px; }
.selection-hint { color: #8397a0; font-size: 10px; }
.view-switch { display: flex; gap: 2px; padding: 2px; border: 1px solid #e0eaec; border-radius: 9px; background: #f4f9f8; }
.view-button { display: grid; place-items: center; width: 31px; height: 29px; border: 0; border-radius: 7px; background: transparent; color: #8ca1a9; }
.view-button:hover { color: #3e726d; }
.view-button.is-active { background: #fff; color: #126d66; box-shadow: 0 2px 7px rgba(17, 80, 74, .09); }
.view-button svg { width: 15px; height: 15px; }

.file-area {
  flex: 1;
  min-height: 390px;
  padding: 18px 20px 24px;
}
.file-area[data-view="grid"] { display: grid; grid-template-columns: repeat(auto-fill, minmax(154px, 1fr)); align-content: start; gap: 10px; }
.file-area[data-view="list"] { display: block; padding-top: 11px; }
.file-list-head {
  display: grid;
  grid-template-columns: minmax(220px, 1.55fr) minmax(100px, .55fr) minmax(120px, .7fr) 130px;
  gap: 12px;
  padding: 0 10px 8px;
  color: #8da0a7;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* grid cards */
.file-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 154px;
  padding: 13px 13px 11px;
  border: 1px solid #e1ebed;
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.file-card:hover { border-color: #b5d8d1; background: #fff; transform: translateY(-2px); box-shadow: 0 9px 22px rgba(16, 77, 72, .07); }
.file-card-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: #eef7f5;
  color: #368e84;
}
.file-card-icon svg { width: 24px; height: 24px; }
.file-card.folder .file-card-icon { background: #fff4dd; color: #b97b19; }
.file-card.kind-image .file-card-icon { background: #eef4fc; color: #477fb3; }
.file-card.kind-video .file-card-icon { background: #f7edf7; color: #9b5a9c; }
.file-card.kind-audio .file-card-icon { background: #fdf0ee; color: #b45d56; }
.file-card.kind-archive .file-card-icon { background: #f4f0e8; color: #8e7440; }
.file-card.kind-code .file-card-icon { background: #eef6ef; color: #4d865c; }
.file-card-name { overflow: hidden; color: #1a3542; font-size: 11.5px; font-weight: 630; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.file-card-meta { margin-top: 4px; color: #8a9ca4; font-size: 9.5px; }
.file-card-actions { display: flex; gap: 2px; margin-top: auto; padding-top: 9px; opacity: 0; transition: opacity .15s ease; }
.file-card:hover .file-card-actions, .file-card:focus-within .file-card-actions { opacity: 1; }
.mini-button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 25px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #7c959e;
}
.mini-button:hover { background: #edf7f4; color: var(--brand); }
.mini-button.danger:hover { background: #fff0ee; color: var(--red); }
.mini-button svg { width: 14px; height: 14px; }

/* list rows */
.file-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.55fr) minmax(100px, .55fr) minmax(120px, .7fr) 130px;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 7px 10px;
  border-bottom: 1px solid #edf3f4;
  border-radius: 8px;
  color: var(--ink-2);
  cursor: pointer;
}
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: #f7fbfa; }
.file-name-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.file-row-icon { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 29px; border-radius: 9px; background: #eef7f5; color: #368e84; }
.file-row-icon svg { width: 17px; height: 17px; }
.file-row.folder .file-row-icon { background: #fff4dd; color: #b97b19; }
.file-row.kind-image .file-row-icon { background: #eef4fc; color: #477fb3; }
.file-row.kind-video .file-row-icon { background: #f7edf7; color: #9b5a9c; }
.file-row.kind-audio .file-row-icon { background: #fdf0ee; color: #b45d56; }
.file-row.kind-archive .file-row-icon { background: #f4f0e8; color: #8e7440; }
.file-row.kind-code .file-row-icon { background: #eef6ef; color: #4d865c; }
.file-row-name { overflow: hidden; font-size: 11.5px; font-weight: 590; color: #244553; text-overflow: ellipsis; white-space: nowrap; }
.file-row-sub { color: #8ba0a7; font-size: 9px; }
.file-row-meta { color: #7c929b; font-size: 10px; white-space: nowrap; }
.file-row-actions { display: flex; justify-content: flex-end; gap: 1px; }
.file-row-actions .mini-button { width: 27px; height: 26px; }

.empty-state { display: grid; flex: 1; place-items: center; justify-items: center; padding: 52px 20px 56px; text-align: center; }
.empty-illustration { margin-bottom: 8px; opacity: .9; }
.empty-illustration svg { width: 94px; height: 70px; }
.empty-state h2 { margin: 4px 0 4px; color: #234653; font-size: 14px; font-weight: 690; }
.empty-state p { margin: 0 0 15px; color: #8498a1; font-size: 10.5px; }
.empty-actions { display: flex; gap: 7px; }

.statusbar { display: flex; align-items: center; gap: 8px; min-height: 39px; padding: 9px 20px; border-top: 1px solid #e8f0f1; color: #8a9da5; font-size: 9.5px; }
.status-divider { width: 1px; height: 10px; background: #d7e4e6; }
.status-spacer { flex: 1; }
.status-bucket { max-width: 220px; overflow: hidden; color: #8da0a7; font-family: var(--mono); text-overflow: ellipsis; white-space: nowrap; }

/* drag & drop */
.drop-hint {
  position: absolute;
  inset: 10px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 2px dashed #61c2b3;
  border-radius: 18px;
  background: rgba(237, 252, 247, .94);
  color: var(--brand-strong);
  text-align: center;
  backdrop-filter: blur(4px);
}
.drop-hint-icon { font-size: 28px; color: #16978d; }
.drop-hint strong { font-size: 14px; }
.drop-hint span { color: #6e8f8b; font-size: 10.5px; }
.workspace { position: relative; }

/* ---------------------------------------------------------------- upload dock */
.upload-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: min(380px, calc(100vw - 28px));
  max-height: min(480px, calc(100vh - 40px));
  overflow: hidden;
  border: 1px solid #d8e7e4;
  border-radius: 17px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 25px 65px rgba(7, 32, 38, .2);
  backdrop-filter: blur(18px);
}
.upload-dock-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 13px 14px 10px; border-bottom: 1px solid #edf3f2; }
.upload-dock-kicker { display: block; color: #8b9fa5; font-size: 8px; font-weight: 720; letter-spacing: .16em; }
.upload-dock-head strong { display: block; margin-top: 2px; color: #1e3e4a; font-size: 12.5px; font-weight: 690; }
.upload-dock-head .icon-button { width: 27px; height: 27px; flex-basis: 27px; border: 0; background: #f3f8f7; color: #6e8a93; font-size: 17px; line-height: 1; }
.upload-list { max-height: 340px; padding: 5px 12px 8px; overflow-y: auto; }
.upload-item { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 1px; border-bottom: 1px solid #f0f4f4; }
.upload-item:last-child { border-bottom: 0; }
.upload-item-icon { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; background: #eef7f5; color: #3f9288; font-size: 11px; }
.upload-item-copy { display: grid; gap: 3px; min-width: 0; }
.upload-item-name { overflow: hidden; color: #2b4855; font-size: 10.5px; font-weight: 580; text-overflow: ellipsis; white-space: nowrap; }
.upload-item-status { color: #8a9da4; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item-status.is-error { color: var(--red); }
.upload-item-status.is-done { color: var(--green); }
.upload-item-percent { color: #7c929b; font-family: var(--mono); font-size: 9px; }
.upload-track { grid-column: 2 / 4; height: 3px; overflow: hidden; border-radius: 99px; background: #e8f1ef; }
.upload-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2dd4bf, #0f766e); transition: width .15s ease; }
.upload-dock-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px 11px; border-top: 1px solid #edf3f2; color: #8498a1; font-size: 9.5px; }
.upload-dock-foot .text-button { color: var(--brand); }

/* --------------------------------------------------------------------- modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 20, 28, .58);
  backdrop-filter: blur(7px);
}
.modal {
  position: relative;
  width: min(430px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 25px;
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, .07), transparent 16rem),
    #fff;
  box-shadow: 0 32px 90px rgba(3, 20, 28, .33);
}
.modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 27px;
  right: 27px;
  height: 2px;
  border-radius: 0 0 99px 99px;
  background: linear-gradient(90deg, transparent, #2dd4bf, transparent);
  opacity: .65;
}
.modal.wide { width: min(700px, 100%); }
.modal.compact { width: min(410px, 100%); }
.modal-close { position: absolute; top: 13px; right: 15px; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px; background: #f2f7f6; color: #6d8790; font-size: 19px; line-height: 1; }
.modal-close:hover { background: #e8f2ef; color: var(--brand); }
.modal-heading { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 15px; padding-right: 20px; }
.modal-icon { display: grid; place-items: center; width: 33px; height: 33px; flex: 0 0 33px; border: 1px solid #d4eae4; border-radius: 10px; background: #edfaf6; color: #168b80; font-size: 15px; }
.modal-heading h2 { margin: 0; color: #173340; font-size: 17px; font-weight: 730; letter-spacing: -.02em; }
.modal-heading p { margin: 3px 0 0; color: #8498a0; font-size: 10.5px; }
.modal-form { display: grid; gap: 13px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 3px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { color: #496572; font-size: 10.5px; font-weight: 620; }
.field input { width: 100%; }
input, select { min-height: 36px; padding: 8px 10px; border: 1px solid #dce8e8; border-radius: 9px; outline: none; background: #f8fbfa; color: var(--ink); font-size: 11.5px; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
input:focus, select:focus { border-color: #72c5b8; background: #fff; box-shadow: 0 0 0 3px rgba(15, 118, 110, .075); }
input::placeholder { color: #9bacb3; }
.form-error { padding: 8px 10px; border-radius: 7px; background: var(--red-soft); color: var(--red); font-size: 10.5px; line-height: 1.5; }
.link-block { padding: 12px; margin-top: 9px; border: 1px solid #e1ebeb; border-radius: 11px; background: #fbfefd; }
.link-block > label { display: block; margin-bottom: 6px; color: #496572; font-size: 10px; font-weight: 650; }
.link-block input { width: 100%; min-width: 0; padding: 7px 8px; font-family: var(--mono); font-size: 9.5px; }
.link-block .copy-row { display: flex; gap: 6px; align-items: center; }
.link-block .copy-row input { flex: 1; }
.link-block .secondary-button { min-height: 34px; padding: 6px 10px; font-size: 10px; }
.link-block .text-link { display: inline-block; margin-top: 7px; }
.modal-note { margin-top: 12px !important; padding: 9px 11px !important; border-radius: 8px !important; background: #f1faf7 !important; color: #55746f !important; font-size: 9.5px !important; line-height: 1.55 !important; }
.modal-heading + .field, .modal-heading + .link-block { margin-top: 0; }
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.settings-card { padding: 11px 12px; border: 1px solid #e1ebeb; border-radius: 10px; background: #fbfefd; }
.settings-card .k { color: #8499a0; font-size: 8.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.settings-card .v { margin-top: 4px; color: #244551; font-size: 11.5px; font-weight: 650; word-break: break-word; }
.settings-card .s { margin-top: 2px; color: #8fa1a7; font-size: 8.5px; }

/* ------------------------------------------------------------------- auth */
.auth-card {
  display: grid;
  grid-template-columns: minmax(260px, .84fr) minmax(330px, 1.16fr);
  width: min(820px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 35px 100px rgba(3, 20, 28, .38);
}
.auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 470px;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(45, 212, 191, .23), transparent 18rem),
    radial-gradient(circle at 100% 100%, rgba(45, 105, 150, .24), transparent 18rem),
    linear-gradient(160deg, #0a1d28, #07131d);
  color: #eafffb;
}
.auth-aside::after { content: ""; position: absolute; right: -60px; bottom: -70px; width: 220px; height: 220px; border: 1px solid rgba(94, 234, 212, .13); border-radius: 50%; }
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-brand strong { display: block; color: #f2fffc; font-size: 12px; font-weight: 700; }
.auth-brand span { display: block; color: #7e9faa; font-size: 9.5px; }
.auth-aside-copy { position: relative; z-index: 1; margin-top: auto; padding-bottom: 22px; }
.auth-kicker { color: #5ddfcf; font-size: 8px; font-weight: 720; letter-spacing: .18em; }
.auth-aside-copy h1 { margin: 9px 0 10px; color: #f3fffc; font-size: 24px; font-weight: 730; line-height: 1.33; letter-spacing: -.035em; }
.auth-aside-copy p { margin: 0; color: #88a8b3; font-size: 10.5px; line-height: 1.65; }
.auth-points { position: relative; z-index: 1; display: grid; gap: 7px; padding-top: 13px; border-top: 1px solid rgba(151, 207, 201, .13); }
.auth-points span { display: flex; align-items: center; gap: 7px; color: #92b3bd; font-size: 9.5px; }
.auth-points i { width: 5px; height: 5px; border-radius: 50%; background: #2dd4bf; }
.auth-main { align-self: center; padding: 34px 34px 30px; }
.auth-step { animation: step-in .2s ease; }
@keyframes step-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.auth-step-mark { margin-bottom: 7px; color: #2e9b8f; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.auth-step h2 { margin: 0 0 6px; color: #152f3c; font-size: 22px; font-weight: 760; letter-spacing: -.035em; }
.auth-step > p { margin: 0 0 19px; color: #7e929b; font-size: 10.5px; line-height: 1.65; }
.auth-form { display: grid; gap: 12px; }
.auth-form .primary-button { min-height: 41px; margin-top: 2px; font-size: 11.5px; }
.auth-help { margin-top: 16px; padding-top: 13px; border-top: 1px solid #e8efef; color: #8a9da4; font-size: 9.5px; line-height: 1.65; }
.auth-help code { padding: 1px 4px; border-radius: 4px; background: #eef5f3; color: #42656b; font-size: 9px; }
.otp-input { height: 49px; font-family: var(--mono); font-size: 21px; letter-spacing: .35em; text-align: center; }
.qr-wrap { display: grid; place-items: center; padding: 11px; margin: 2px 0 9px; border: 1px solid #e0ebea; border-radius: 11px; background: #fff; }
.qr-wrap img { width: 178px; height: 178px; image-rendering: pixelated; }
.secret-details { margin-bottom: 11px; color: #81959c; font-size: 9.5px; }
.secret-details summary { cursor: pointer; color: var(--brand); }
.secret-details code { display: block; margin-top: 6px; padding: 7px 8px; border-radius: 6px; background: #f3f8f7; color: #34565f; font-size: 9.5px; word-break: break-all; }
.recovery-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; margin: 2px 0 10px; border: 1px solid #eedcb5; border-radius: 9px; background: #fffaf0; }
.recovery-codes code { padding: 6px; border: 1px solid #f0e2c4; border-radius: 5px; background: #fff; color: #5d420d; font-size: 10px; text-align: center; }
.recovery-actions { display: flex; gap: 6px; margin-bottom: 10px; }
.recovery-actions .secondary-button { flex: 1; }
.auth-main .text-button { display: block; margin: 11px auto 0; font-size: 9.5px; }

/* ------------------------------------------------------------------- toast */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: grid; gap: 7px; width: min(370px, calc(100vw - 40px)); }
.toast { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid #dce8e7; border-radius: 10px; background: #fff; box-shadow: 0 15px 38px rgba(5, 26, 33, .16); color: #34515e; font-size: 10.5px; line-height: 1.5; animation: toast-in .18s ease; }
.toast::before { content: ""; width: 3px; align-self: stretch; border-radius: 99px; background: var(--brand); }
.toast.is-error::before { background: var(--red); }
.toast.is-warn::before { background: #d68b1f; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .main { padding: 22px 22px; }
  .top-actions .secondary-button { display: none; }
  .search-box { width: min(220px, 24vw); }
}

@media (max-width: 980px) {
  .sidebar {
    width: 250px;
    transform: translateX(-102%);
    transition: transform .22s ease;
    box-shadow: 20px 0 55px rgba(5, 20, 28, .2);
  }
  .sidebar.is-open { transform: translateX(0); }
  .mobile-scrim { position: fixed; inset: 0; z-index: 25; background: rgba(4, 18, 27, .35); backdrop-filter: blur(2px); }
  .main { width: 100%; margin-left: 0; padding: 18px 18px; }
  .menu-button { display: grid; }
  .topbar { gap: 9px; }
  .search-box { width: min(210px, 31vw); }
  .workspace { min-height: calc(100vh - 150px); }
}

@media (max-width: 760px) {
  .main { padding: 13px 11px; }
  .page-sub { display: none; }
  .top-actions { gap: 4px; }
  .search-box { width: min(165px, 37vw); min-height: 36px; padding: 0 8px; }
  .search-box input { position: static; width: 100%; opacity: 1; pointer-events: auto; font-size: 10.5px; }
  .search-clear { display: grid; }
  .top-actions .primary-button { padding: 8px 10px; }
  .top-actions .primary-button svg { width: 16px; height: 16px; }
  .top-actions .icon-button { display: none; }
  .workspace-bar { min-height: 55px; padding: 10px 13px; }
  .selection-hint { display: none; }
  .file-area { padding: 12px 12px 18px; }
  .file-area[data-view="grid"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .file-card { min-height: 139px; padding: 11px; }
  .file-card-icon { width: 38px; height: 38px; margin-bottom: 10px; }
  .file-card-icon svg { width: 22px; height: 22px; }
  .file-card-actions { opacity: 1; }
  .file-area[data-view="list"] { overflow-x: auto; }
  .file-list-head { min-width: 650px; }
  .file-row { min-width: 650px; grid-template-columns: minmax(230px, 1fr) 90px 110px 90px; }
  .statusbar { padding: 8px 13px; }
  .status-bucket { max-width: 110px; }
  .auth-card { grid-template-columns: 1fr; width: min(430px, 100%); }
  .auth-aside { display: none; }
  .auth-main { padding: 28px 22px; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .upload-dock { right: 10px; bottom: 10px; width: calc(100vw - 20px); }
  .modal { padding: 22px 18px; }
}

@media (max-width: 460px) {
  .top-actions .primary-button { width: 38px; padding: 8px; }
  .top-actions .primary-button { font-size: 0; gap: 0; }
  .top-actions .primary-button svg { width: 18px; height: 18px; }
  .crumb.is-current { font-size: 13px; }
  .file-card-name { font-size: 10.5px; }
  .settings-grid { grid-template-columns: 1fr; }
  .status-bucket { display: none; }
  .statusbar { gap: 6px; }
}
