/* Evolynex Connect — "Aurora" design system (own CSS, no frameworks, no Tailwind)
   Floating glass navigation, soft aurora backdrop, gradient accents, 3D loaders. */
:root {
  color-scheme: light;
  /* brand */
  --ink: #0d1330;
  --indigo: #5b5bf7;
  --violet: #8b5cf6;
  --cyan: #22c3ee;
  --mint: #2dd4a7;
  --grad: linear-gradient(135deg, #5b5bf7 0%, #7c5cf6 45%, #22c3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(91, 91, 247, .12), rgba(34, 195, 238, .12));
  /* legacy names used by views (kept, re-tuned) */
  --navy-900: #0d1330;
  --navy-800: #161d45;
  --navy-700: #232b5e;
  --navy-600: #333c78;
  --blue-600: #5b5bf7;
  --blue-500: #6d6cf9;
  --blue-100: #ecebff;
  --grey-50: #f7f8fc;
  --grey-100: #eff1f8;
  --grey-200: #e3e6f1;
  --grey-300: #cdd2e3;
  --grey-500: #7b82a0;
  --grey-700: #474e6b;
  --text: #151a36;
  --white: #ffffff;
  --green: #0fa37f;
  --green-bg: #e2f8f1;
  --orange: #e0891d;
  --orange-bg: #fff3e2;
  --red: #e5484d;
  --red-bg: #ffecec;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 1px 2px rgba(21, 26, 54, .04), 0 8px 24px -12px rgba(21, 26, 54, .14);
  --shadow-lg: 0 30px 80px -24px rgba(13, 19, 48, .35), 0 10px 30px -12px rgba(13, 19, 48, .2);
  --ring: 0 0 0 4px rgba(91, 91, 247, .16);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Inter", "Segoe UI", system-ui, sans-serif;
  /* theme surfaces (light) */
  --bg: #f4f5fb;
  --surface: rgba(255, 255, 255, .92);
  --border-soft: rgba(227, 230, 241, .9);
  --glass: rgba(244, 245, 251, .72);
  --glass-strong: rgba(255, 255, 255, .8);
  --scrim: rgba(244, 245, 251, .5);
  --hover: #f7f7ff;
  --selected: #f3f3ff;
  --soft-hover: #e0dfff;
  --info-bg: linear-gradient(135deg, #f2f1ff, #eefbff);
  --danger-border: #f6c9cb;
  --mono: "Cascadia Mono", "JetBrains Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { font: 14px/1.55 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
body::before { /* aurora backdrop */
  content: ""; position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40vmax 30vmax at 85% 0%, rgba(124, 92, 246, .16), transparent 60%),
    radial-gradient(36vmax 28vmax at 10% 10%, rgba(34, 195, 238, .12), transparent 60%),
    radial-gradient(40vmax 30vmax at 60% 110%, rgba(45, 212, 167, .10), transparent 60%);
  filter: saturate(115%);
}
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; font-family: var(--display); }
h3 { font-size: 15px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
button { font: inherit; }
::selection { background: rgba(91, 91, 247, .2); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 272px 1fr; min-height: 100vh; }
.sidebar {
  margin: 12px 0 12px 12px; border-radius: 22px; position: sticky; top: 12px; height: calc(100vh - 24px); overflow-y: auto;
  display: flex; flex-direction: column; color: #c3c8ec;
  background: radial-gradient(120% 60% at 0% 0%, rgba(124, 92, 246, .35), transparent 60%), radial-gradient(100% 50% at 100% 100%, rgba(34, 195, 238, .22), transparent 60%), linear-gradient(180deg, #121842, #0b1030);
  box-shadow: var(--shadow-lg); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent;
}
.brand { padding: 20px 20px 14px; display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; flex: none; position: relative; background: var(--grad); box-shadow: 0 8px 22px -6px rgba(91, 91, 247, .8), inset 0 1px 0 rgba(255, 255, 255, .35); transform: perspective(200px) rotateX(10deg) rotateY(-14deg); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; }
/* orbit + core + satellite: data connected across every place */
.brand-mark::before { left: 14%; top: 31%; width: 72%; height: 38%; border: 2.5px solid rgba(255, 255, 255, .95); border-radius: 50%; transform: rotate(-28deg); box-sizing: border-box; }
.brand-mark::after { left: 40%; top: 40%; width: 20%; height: 20%; border-radius: 50%; background: #fff; box-shadow: 9px -6px 0 -1px #a7f3d0; }
.brand__name { color: #fff; font-size: 16.5px; white-space: nowrap; font-weight: 700; letter-spacing: -.01em; font-family: var(--display); }
.brand__by { font-size: 11px; color: #9097cf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand > div { min-width: 0; }
.tenant-switch { margin: 4px 16px 6px; }
.tenant-switch select { width: 100%; background: rgba(255, 255, 255, .07); color: #fff; border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; padding: 9px 10px; }
.tenant-switch select option { color: var(--text); }
.nav { list-style: none; margin: 6px 0; padding: 0 10px; }
.nav__link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px; color: #c3c8ec; cursor: pointer; font-size: 13.5px; position: relative; transition: background .18s, color .18s, transform .18s; }
.nav__link:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; transform: translateX(2px); }
.nav__link--active { background: linear-gradient(135deg, rgba(91, 91, 247, .95), rgba(124, 92, 246, .85)); color: #fff; box-shadow: 0 10px 24px -10px rgba(91, 91, 247, .9), inset 0 1px 0 rgba(255, 255, 255, .2); }
.nav__link--active:hover { transform: none; background: linear-gradient(135deg, rgba(91, 91, 247, .95), rgba(124, 92, 246, .85)); }
.nav__icon { width: 18px; height: 18px; flex: none; opacity: .95; }
.nav__group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #7a80b8; padding: 16px 12px 6px; font-weight: 600; }
.nav__badge { margin-left: auto; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--red); color: #fff; }
.sidebar__foot { margin-top: auto; padding: 14px 16px 16px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12px; }
.me { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: var(--grad); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 28px; height: 28px; border-radius: 9px; font-size: 11px; }
.sidebar__user { color: #fff; font-weight: 600; font-size: 13px; }
.me__text { min-width: 0; }
.me__role { color: #9097cf; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__foot .btn { margin-top: 10px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 68px; display: flex; align-items: center; padding: 0 28px; gap: 14px; position: sticky; top: 0; z-index: 5; background: var(--glass); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--border-soft); }
.topbar__title { font-size: 17px; font-weight: 650; font-family: var(--display); letter-spacing: -.01em; }
.topbar__spacer { flex: 1; }
.cmdk-btn { display: flex; align-items: center; gap: 10px; min-width: 240px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--grey-200); background: var(--glass-strong); color: var(--grey-500); cursor: pointer; font-size: 13px; }
.cmdk-btn:hover { border-color: var(--grey-300); color: var(--grey-700); }
.cmdk-btn kbd, kbd { margin-left: auto; font: 11px var(--mono); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--grey-200); background: var(--grey-50); color: var(--grey-500); }
.live { font-size: 12px; color: var(--grey-500); display: flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--grey-200); }
.live__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grey-300); }
.live--on .live__dot { background: var(--green); box-shadow: 0 0 0 0 rgba(15, 163, 127, .5); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(15, 163, 127, .45); } 70% { box-shadow: 0 0 0 8px rgba(15, 163, 127, 0); } 100% { box-shadow: 0 0 0 0 rgba(15, 163, 127, 0); } }
.content { padding: 26px 28px 48px; max-width: 1440px; width: 100%; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* subscription banner */
.sub-banner { margin: 14px 28px 0; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; border: 1px solid; font-size: 13px; }
.sub-banner b { font-weight: 650; }
.sub-banner .btn { margin-left: auto; }
.sub-banner--trial { background: var(--info-bg); border-color: #d9d8ff; color: #2b2f7a; }
.sub-banner--grace { background: var(--orange-bg); border-color: #f5d6ad; color: #7a4a13; }
.sub-banner--expired { background: var(--red-bg); border-color: #f6c2c4; color: #7d1e22; }

/* ---------- building blocks ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; letter-spacing: -.02em; }
.page-head__sub { color: var(--grey-500); margin-top: 4px; max-width: 820px; }
.card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(6px); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--grey-100); }
.card__title { font-size: 15px; font-weight: 650; font-family: var(--display); }
.card__body { padding: 18px; }
.stack > * + * { margin-top: 18px; }
.grid > * + *, .feature-pair > * + * { margin-top: 0; }
.grid { display: grid; gap: 18px; }
.grid--widgets { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.widget { padding: 18px; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.widget:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.widget::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--grad-soft); }
.widget__label { color: var(--grey-500); font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; font-weight: 600; }
.widget__value { font-size: 30px; font-weight: 700; margin-top: 6px; font-family: var(--display); letter-spacing: -.02em; }
.widget__hint { font-size: 12px; color: var(--grey-500); margin-top: 2px; }
.widget--alert .widget__value { color: var(--red); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--grey-200); background: var(--white); color: var(--text); padding: 8px 15px; border-radius: 12px; cursor: pointer; font-size: 13px; font-weight: 550; white-space: nowrap; transition: transform .12s, box-shadow .2s, background .2s, border-color .2s; box-shadow: 0 1px 1px rgba(21, 26, 54, .04); }
.btn:hover { background: var(--grey-50); border-color: var(--grey-300); text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 10px 22px -10px rgba(91, 91, 247, .85), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn--primary:hover { background: var(--grad); filter: brightness(1.06) saturate(1.05); border-color: transparent; box-shadow: 0 14px 28px -10px rgba(91, 91, 247, .9), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn--danger { color: var(--red); border-color: var(--danger-border); background: var(--white); }
.btn--danger:hover { background: var(--red-bg); border-color: #f0aeb1; }
.btn--ghost { border-color: transparent; background: transparent; color: #c3c8ec; padding: 4px 0; box-shadow: none; }
.btn--ghost:hover { background: transparent; color: #fff; border-color: transparent; }
.btn--soft { background: var(--blue-100); color: var(--indigo); border-color: transparent; }
.btn--soft:hover { background: var(--soft-hover); border-color: transparent; }
.btn--sm { padding: 5px 11px; font-size: 12.5px; border-radius: 10px; }
.btn--lg { padding: 12px 20px; font-size: 14.5px; border-radius: 14px; }
.btn--block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px 16px; border-radius: 14px; border: 1px solid var(--grey-200); background: var(--white); color: var(--text); font-weight: 600; cursor: pointer; transition: box-shadow .2s, transform .12s; text-decoration: none; }
.btn-google:hover { box-shadow: var(--shadow); text-decoration: none; }
.btn-google svg { width: 18px; height: 18px; }
.btn-google[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th { text-align: left; font-weight: 600; color: var(--grey-500); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; padding: 10px 14px; border-bottom: 1px solid var(--grey-200); white-space: nowrap; background: transparent; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--grey-100); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-clickable { cursor: pointer; }
.table tr.is-clickable:hover td { background: var(--hover); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--grey-500); }
.small { font-size: 12px; }
.empty { padding: 40px 16px; text-align: center; color: var(--grey-500); }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: var(--grey-100); color: var(--grey-700); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.badge--ok { background: var(--green-bg); color: var(--green); }
.badge--sync { background: var(--orange-bg); color: var(--orange); }
.badge--err { background: var(--red-bg); color: var(--red); }
.badge--info { background: var(--blue-100); color: var(--indigo); }
.badge--off { background: var(--grey-100); color: var(--grey-500); }
.badge--grad { background: var(--grad); color: #fff; }
.badge--grad::before { display: none; }
.tag { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 7px; background: var(--grey-100); color: var(--grey-700); }

.progress { height: 6px; background: var(--grey-100); border-radius: 3px; overflow: hidden; min-width: 120px; }
.progress__bar { height: 100%; background: var(--orange); transition: width .4s; }
.progress--blue .progress__bar { background: var(--grad); }
.progress--red .progress__bar { background: var(--red); }

.feature-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.feature { border: 1px solid var(--grey-200); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--white); }
.feature__title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--grey-500); font-weight: 650; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 7px 14px; font-size: 13px; margin: 0; }
.kv dt { color: var(--grey-500); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.notice { border-radius: 14px; padding: 12px 15px; font-size: 13px; border: 1px solid; }
.notice--warn { background: var(--orange-bg); border-color: #f5d6ad; color: #7a4a13; }
.notice--info { background: var(--info-bg); border-color: #dcdcff; color: #2b2f7a; }
.notice--err { background: var(--red-bg); border-color: #f6c2c4; color: #7d1e22; }
.notice--ok { background: var(--green-bg); border-color: #bfeedd; color: #0b5e49; }
.notice b { font-weight: 650; }
.notice ul { margin: 6px 0 0 18px; padding: 0; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.segmented { display: inline-flex; padding: 4px; border-radius: 13px; background: var(--grey-100); gap: 2px; }
.segmented button { border: 0; background: transparent; padding: 6px 13px; border-radius: 10px; cursor: pointer; color: var(--grey-700); font-weight: 550; font-size: 13px; }
.segmented button.is-on { background: var(--white); color: var(--text); box-shadow: 0 2px 8px -2px rgba(21, 26, 54, .18); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--grey-700); }
.field__hint { font-size: 12px; color: var(--grey-500); }
.input, select.input, textarea.input { border: 1px solid var(--grey-200); border-radius: 12px; padding: 9px 12px; font: inherit; background: var(--white); color: var(--text); min-width: 0; transition: border-color .15s, box-shadow .15s; }
textarea.input { resize: vertical; line-height: 1.5; }
.input:hover { border-color: var(--grey-300); }
.input:focus { outline: none; border-color: var(--indigo); box-shadow: var(--ring); }
.input--inline { width: auto; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row--3 { grid-template-columns: 1fr 1fr 1fr; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--indigo); }
.form-error { color: var(--red); font-size: 12.5px; margin: 4px 0 10px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--grey-300); position: relative; cursor: pointer; transition: background .2s; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked { background: var(--indigo); }
.switch input:checked::after { transform: translateX(16px); }

/* ---------- modal / toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(13, 19, 48, .42); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; animation: fade .18s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--white); border-radius: 22px; width: 100%; max-width: 580px; box-shadow: var(--shadow-lg); animation: pop .22s cubic-bezier(.2, .9, .3, 1.2) both; border: 1px solid var(--border-soft); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal--wide { max-width: 880px; }
.modal--xl { max-width: 1180px; }
.modal__head { padding: 18px 22px; border-bottom: 1px solid var(--grey-100); display: flex; justify-content: space-between; align-items: center; }
.modal__title { font-size: 17px; font-weight: 650; font-family: var(--display); }
.modal__body { padding: 20px 22px; }
.modal__foot { padding: 14px 22px; border-top: 1px solid var(--grey-100); display: flex; justify-content: flex-end; gap: 8px; background: var(--grey-50); border-radius: 0 0 22px 22px; }
.x { border: 0; background: var(--grey-100); width: 32px; height: 32px; border-radius: 10px; font-size: 18px; line-height: 1; cursor: pointer; color: var(--grey-500); }
.x:hover { background: var(--grey-200); color: var(--text); }
.toasts { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { background: rgba(13, 19, 48, .94); color: #fff; padding: 11px 15px; border-radius: 14px; box-shadow: var(--shadow-lg); max-width: 440px; font-size: 13px; animation: pop .25s ease both; backdrop-filter: blur(8px); border-left: 3px solid var(--cyan); }
.toast--err { background: #b4232a; border-left-color: #ffb4b7; }
.secret-box { font-family: var(--mono); background: var(--grey-50); border: 1px dashed var(--grey-300); padding: 12px; border-radius: 12px; word-break: break-all; user-select: all; }

/* ---------- 3D loader ---------- */
.loader3d { --s: 34px; width: var(--s); height: var(--s); position: relative; transform-style: preserve-3d; perspective: 400px; display: inline-block; }
.loader3d__cube { position: absolute; inset: 0; transform-style: preserve-3d; animation: cube 2.4s cubic-bezier(.6, .1, .4, .9) infinite; }
.loader3d__cube span { position: absolute; inset: 0; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .55); background: linear-gradient(135deg, rgba(91, 91, 247, .92), rgba(34, 195, 238, .85)); box-shadow: inset 0 0 12px rgba(255, 255, 255, .25); }
.loader3d__cube span:nth-child(1) { transform: translateZ(calc(var(--s) / 2)); }
.loader3d__cube span:nth-child(2) { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.loader3d__cube span:nth-child(3) { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); background: linear-gradient(135deg, rgba(124, 92, 246, .92), rgba(91, 91, 247, .85)); }
.loader3d__cube span:nth-child(4) { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); background: linear-gradient(135deg, rgba(124, 92, 246, .92), rgba(91, 91, 247, .85)); }
.loader3d__cube span:nth-child(5) { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); background: linear-gradient(135deg, rgba(34, 195, 238, .92), rgba(45, 212, 167, .85)); }
.loader3d__cube span:nth-child(6) { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); background: linear-gradient(135deg, rgba(34, 195, 238, .92), rgba(45, 212, 167, .85)); }
.loader3d__ring { position: absolute; inset: calc(var(--s) * -0.55); border-radius: 50%; border: 2px solid transparent; border-top-color: rgba(91, 91, 247, .55); border-right-color: rgba(34, 195, 238, .35); animation: ring 1.4s linear infinite; transform: rotateX(68deg); }
.loader3d__shadow { position: absolute; left: 10%; right: 10%; bottom: calc(var(--s) * -0.9); height: 8px; border-radius: 50%; background: radial-gradient(closest-side, rgba(13, 19, 48, .25), transparent); animation: shadow 2.4s ease-in-out infinite; }
@keyframes cube { 0% { transform: rotateX(-25deg) rotateY(0) translateY(0); } 50% { transform: rotateX(-25deg) rotateY(180deg) translateY(-6px); } 100% { transform: rotateX(-25deg) rotateY(360deg) translateY(0); } }
@keyframes ring { to { transform: rotateX(68deg) rotateZ(360deg); } }
@keyframes shadow { 50% { transform: scaleX(.7); opacity: .6; } }
.loader3d--lg { --s: 54px; }
.loader3d--sm { --s: 16px; }
.page-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; padding: 90px 16px; color: var(--grey-500); font-size: 13px; }
/* action loader: shown on top of everything while a change is being saved */
.busy { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--scrim); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.busy__card { display: flex; flex-direction: column; align-items: center; gap: 30px; padding: 34px 40px 24px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-lg); border: 1px solid var(--border-soft); min-width: 220px; }
.busy__text { font-size: 13px; color: var(--grey-700); font-weight: 550; }
@media (prefers-reduced-motion: reduce) { .loader3d__cube, .loader3d__ring, .loader3d__shadow, .live--on .live__dot { animation-duration: 6s; } .content, .modal, .overlay { animation: none; } }

/* ---------- command palette ---------- */
.cmdk { max-width: 620px; }
.cmdk__input { width: 100%; border: 0; background: var(--white); color: var(--text); border-bottom: 1px solid var(--grey-100); padding: 18px 22px; font-size: 16px; outline: none; border-radius: 22px 22px 0 0; }
.cmdk__list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.cmdk__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.cmdk__item svg { width: 18px; height: 18px; color: var(--indigo); }
.cmdk__item.is-on, .cmdk__item:hover { background: var(--blue-100); }
.cmdk__item small { margin-left: auto; color: var(--grey-500); }

/* ---------- charts ---------- */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 8px; }
.bars__bar { flex: 1; background: var(--grad); border-radius: 4px 4px 0 0; min-height: 2px; }
.meter { height: 10px; border-radius: 999px; background: var(--grey-100); overflow: hidden; }
.meter__fill { height: 100%; background: var(--grad); border-radius: 999px; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.meter__fill--warn { background: linear-gradient(90deg, #f5a524, #e0891d); }
.meter__fill--crit { background: linear-gradient(90deg, #ff7a7e, #e5484d); }

/* ---------- login / sign-up ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; background: #0b1030; position: relative; overflow: hidden; }
.auth__art { position: relative; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; overflow: hidden; }
.auth__art::before { content: ""; position: absolute; inset: -30%; background:
    radial-gradient(35% 35% at 20% 25%, rgba(124, 92, 246, .55), transparent 70%),
    radial-gradient(30% 30% at 80% 20%, rgba(34, 195, 238, .45), transparent 70%),
    radial-gradient(35% 35% at 60% 85%, rgba(45, 212, 167, .32), transparent 70%);
  animation: aurora 18s ease-in-out infinite alternate; filter: blur(10px); }
@keyframes aurora { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(-4%, 3%) rotate(8deg); } 100% { transform: translate(3%, -2%) rotate(-6deg); } }
.auth__art > * { position: relative; }
.auth__brand { display: flex; align-items: center; gap: 12px; }
.auth__brand .brand__name { font-size: 20px; }
.auth__hero h1 { font-size: clamp(30px, 3.3vw, 46px); line-height: 1.08; letter-spacing: -.03em; max-width: 620px; }
.auth__hero h1 em { font-style: normal; background: linear-gradient(90deg, #a5b4ff, #67e8f9 60%, #6ee7b7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth__hero p { color: #b9bfe8; max-width: 520px; font-size: 15px; margin-top: 14px; }
.auth__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.auth__chip::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: linear-gradient(135deg, #a5b4ff, #67e8f9); box-shadow: 0 0 8px rgba(103, 232, 249, .8); }
.auth__chip { padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); font-size: 12.5px; color: #dfe3ff; backdrop-filter: blur(6px); }
.auth__foot { font-size: 12px; color: #8d93c9; display: flex; gap: 16px; flex-wrap: wrap; }
.auth__foot a { color: #b9bfe8; }
/* floating 3D stack of glass tiles */
.stack3d { position: relative; height: 250px; perspective: 1100px; margin: 26px 0 8px; }
.stack3d__scene { position: absolute; left: 4%; top: 6px; width: 420px; height: 230px; transform-style: preserve-3d; transform: rotateX(56deg) rotateZ(-34deg); animation: float 7s ease-in-out infinite; }
.stack3d__tile { position: absolute; inset: 0; border-radius: 26px; border: 1px solid rgba(255, 255, 255, .25); background: linear-gradient(135deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04)); box-shadow: 0 40px 60px -20px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .25); backdrop-filter: blur(4px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 20px; }
.stack3d__tile:nth-child(1) { transform: translateZ(0); }
.stack3d__tile:nth-child(2) { transform: translateZ(44px); background: linear-gradient(135deg, rgba(124, 92, 246, .35), rgba(91, 91, 247, .12)); }
.stack3d__tile:nth-child(3) { transform: translateZ(88px); background: linear-gradient(135deg, rgba(34, 195, 238, .38), rgba(45, 212, 167, .14)); }
.stack3d__tile i { display: block; border-radius: 10px; background: rgba(255, 255, 255, .18); }
.stack3d__tile:nth-child(3) i:nth-child(2) { background: rgba(255, 255, 255, .55); }
.stack3d__tile:nth-child(3) i:nth-child(7) { background: rgba(110, 231, 183, .8); }
@keyframes float { 50% { transform: rotateX(56deg) rotateZ(-30deg) translateZ(18px); } }
.auth__panel { display: flex; align-items: center; justify-content: center; padding: 32px; background: var(--bg); border-radius: 34px 0 0 34px; position: relative; z-index: 1; }
.auth__card { width: 100%; max-width: 420px; }
.auth__card h2 { font-size: 26px; letter-spacing: -.02em; }
.auth__tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--grey-100); margin: 20px 0 22px; }
.auth__tabs button { border: 0; background: transparent; padding: 9px; border-radius: 11px; font-weight: 600; color: var(--grey-700); cursor: pointer; }
.auth__tabs button.is-on { background: var(--white); color: var(--text); box-shadow: 0 2px 10px -3px rgba(21, 26, 54, .2); }
.auth__or { display: flex; align-items: center; gap: 12px; color: var(--grey-500); font-size: 12px; margin: 18px 0; }
.auth__or::before, .auth__or::after { content: ""; flex: 1; height: 1px; background: var(--grey-200); }
.auth__card .btn--primary { width: 100%; padding: 12px; margin-top: 4px; border-radius: 14px; font-size: 14px; }
.auth__terms { font-size: 12.5px; color: var(--grey-700); align-items: flex-start; margin: 14px 0; }
.auth__terms input { margin-top: 2px; }
.plan-mini { display: grid; gap: 8px; margin: 4px 0 6px; }
.plan-mini label { display: flex; gap: 10px; align-items: center; padding: 11px 13px; border: 1px solid var(--grey-200); border-radius: 14px; cursor: pointer; background: var(--white); transition: border-color .15s, box-shadow .15s; }
.plan-mini label:has(input:checked) { border-color: var(--indigo); box-shadow: var(--ring); }
.plan-mini input { accent-color: var(--indigo); }
.plan-mini b { font-size: 13.5px; }
.plan-mini small { display: block; color: var(--grey-500); }
.plan-mini .price { margin-left: auto; text-align: right; font-weight: 650; white-space: nowrap; }
.login-alert { margin-bottom: 14px; }
.powered { font-size: 12px; color: #8d93c9; }

/* ---------- plans / pricing ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.plan-card { position: relative; padding: 22px; border-radius: 20px; background: var(--white); border: 1px solid var(--grey-200); display: flex; flex-direction: column; gap: 12px; transition: transform .2s, box-shadow .2s, border-color .2s; cursor: pointer; }
.plan-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.plan-card.is-on { border-color: transparent; box-shadow: 0 0 0 2px var(--indigo), var(--shadow-lg); }
.plan-card.is-current::before { content: "Current plan"; position: absolute; top: -10px; left: 18px; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--grad); color: #fff; }
.plan-card__name { font-size: 18px; font-weight: 700; font-family: var(--display); }
.plan-card__price { font-size: 30px; font-weight: 750; letter-spacing: -.02em; font-family: var(--display); }
.plan-card__price small { font-size: 13px; color: var(--grey-500); font-weight: 500; }
.plan-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--grey-700); }
.plan-card li::before { content: "✓"; color: var(--green); font-weight: 700; margin-right: 8px; }
.plan-card li.off { color: var(--grey-500); }
.plan-card li.off::before { content: "–"; color: var(--grey-300); }
.summary { border-radius: 18px; padding: 18px; background: linear-gradient(160deg, #11163f, #1b2160); color: #e7e9ff; }
.summary .kv dt { color: #9da3d6; }
.summary .kv dd { color: #fff; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(255, 255, 255, .2); font-size: 15px; }
.summary__total b { font-size: 28px; font-family: var(--display); letter-spacing: -.02em; }
.pay-qr { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.pay-qr__code { padding: 14px; border-radius: 20px; background: #fff; border: 1px solid var(--grey-200); box-shadow: var(--shadow); position: relative; }
.pay-qr__code img { width: 100%; display: block; }
.pay-amount { font-size: 34px; font-weight: 750; font-family: var(--display); letter-spacing: -.02em; }
.steps { display: grid; gap: 10px; counter-reset: step; margin: 14px 0; padding: 0; list-style: none; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 13px; }
.steps li::before { content: counter(step); flex: none; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--blue-100); color: var(--indigo); font-weight: 700; font-size: 12px; }
.state-hero { display: flex; gap: 22px; align-items: center; padding: 22px; border-radius: 20px; color: #fff; background: radial-gradient(80% 120% at 100% 0%, rgba(34, 195, 238, .45), transparent 60%), radial-gradient(80% 120% at 0% 100%, rgba(124, 92, 246, .55), transparent 60%), #12173f; box-shadow: var(--shadow-lg); flex-wrap: wrap; }
.state-hero__ring { --p: 50; width: 92px; height: 92px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(#67e8f9 calc(var(--p) * 1%), rgba(255, 255, 255, .12) 0); position: relative; }
.state-hero__ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #12173f; }
.state-hero__ring span { position: relative; font-weight: 750; font-size: 20px; line-height: 1; text-align: center; }
.state-hero__ring small { display: block; font-size: 10px; font-weight: 500; color: #a7adde; margin-top: 2px; }
.state-hero h2 { font-size: 22px; }
.state-hero p { margin: 4px 0 0; color: #c3c8ec; }
.state-hero .btn-row { margin-left: auto; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat { padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border-soft); box-shadow: var(--shadow); }
.stat__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--grey-500); font-weight: 600; }
.stat__value { font-size: 26px; font-weight: 750; font-family: var(--display); letter-spacing: -.02em; margin-top: 4px; }
.stat__hint { font-size: 12px; color: var(--grey-500); }
.stat--accent { background: var(--grad); color: #fff; border-color: transparent; }
.stat--accent .stat__label, .stat--accent .stat__hint { color: var(--glass-strong); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--grey-200); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; font-weight: 600; color: var(--grey-500); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.is-on { color: var(--indigo); border-bottom-color: var(--indigo); }
.tabs button .nav__badge { margin-left: 6px; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.terms-box { max-height: 52vh; overflow-y: auto; padding: 4px 8px 4px 0; }

/* ---------- Terms page ---------- */
.doc-page { background: var(--bg); }
.doc-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 14px 28px; background: var(--glass); backdrop-filter: blur(12px); border-bottom: 1px solid var(--grey-200); z-index: 2; }
.doc-head .btn--ghost { color: var(--indigo); }
.doc-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); font-size: 16px; }
.doc-brand small { color: var(--grey-500); font-weight: 500; }
.doc-brand .brand-mark { width: 30px; height: 30px; border-radius: 10px; }
.doc-brand .brand-mark::after { box-shadow: 7px -5px 0 -1px #a7f3d0; }
.doc { max-width: 860px; margin: 32px auto; padding: 40px 48px; background: var(--white); border-radius: 24px; box-shadow: var(--shadow); border: 1px solid var(--grey-200); line-height: 1.7; }
.doc h1, .terms-box h1 { font-size: 28px; letter-spacing: -.02em; margin-bottom: 4px; }
.doc h2, .terms-box h2 { font-size: 17px; margin: 26px 0 8px; }
.doc p, .doc li, .terms-box p, .terms-box li { color: var(--grey-700); font-size: 14px; }
.doc ul, .terms-box ul { padding-left: 20px; }
.doc-foot { text-align: center; color: var(--grey-500); font-size: 12px; padding-bottom: 40px; }

@media (max-width: 1100px) { .pay-qr { grid-template-columns: 1fr; } .pay-qr__code { max-width: 260px; } }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; margin: 10px; }
  .feature-pair, .grid--2, .field-row, .field-row--3 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth__art { display: none; }
  .auth__panel { border-radius: 0; }
  .cmdk-btn { min-width: 0; }
  .doc { padding: 24px; margin: 16px; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 16px 40px; }
}

/* people picker (who may use a drive) */
.people-list { display: flex; flex-direction: column; gap: 7px; max-height: 230px; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--grey-200); border-radius: 14px; background: var(--white); }
.people-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.people-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--blue-100); color: var(--indigo); font-size: 12px; font-weight: 550; }

/* ---------- folder picker ---------- */
.picker { display: grid; grid-template-columns: 280px 1fr; gap: 16px; height: min(52vh, 560px); min-height: 320px; }
.picker__side, .picker__main { min-height: 0; }
.picker__side { border: 1px solid var(--grey-200); border-radius: 16px; overflow-y: auto; padding: 8px; background: var(--grey-50); }
.picker__main { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--grey-200); border-radius: 16px; overflow: hidden; background: var(--white); }
.picker__bar { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--grey-200); background: var(--white); flex-wrap: wrap; }
.picker__bar .input { flex: 1 1 240px; }
.picker__list { overflow-y: auto; flex: 1; }
.picker__count { font-size: 12px; color: var(--grey-700); white-space: nowrap; }
.pc-node { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--grey-500); padding: 12px 8px 4px; display: flex; align-items: center; gap: 6px; }
.folder-node { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 11px; background: transparent; text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.folder-node:hover { background: var(--grey-100); }
.folder-node.is-active { background: var(--blue-100); color: var(--navy-800); font-weight: 600; }
.folder-node__icon { width: 18px; height: 14px; border-radius: 2px 4px 3px 3px; background: linear-gradient(160deg, #ffd27a, #f2a93b); position: relative; flex: none; }
.folder-node__icon::before { content: ''; position: absolute; left: 0; top: -3px; width: 8px; height: 4px; border-radius: 2px 2px 0 0; background: #f2b84b; }
.folder-node__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-node__n { font-size: 11px; background: var(--white); border: 1px solid var(--grey-200); border-radius: 999px; padding: 0 7px; color: var(--grey-700); }
.folder-node__sel { font-size: 11px; background: var(--grad); color: #fff; border-radius: 999px; padding: 0 7px; }
.co-group__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--grey-50); border-bottom: 1px solid var(--grey-200); font-weight: 600; }
.co-group__path { font-family: var(--mono); font-size: 12px; color: var(--grey-700); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-row { display: grid; grid-template-columns: 26px 92px 1fr 150px; gap: 10px; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--grey-100); }
.co-row:hover { background: var(--grey-50); }
.co-row.is-on { background: var(--selected); }
.co-row__num { font-family: var(--mono); font-size: 13px; color: var(--navy-700); }
.co-row__meta { font-size: 11px; color: var(--grey-500); text-align: right; }
.co-row .input { height: 32px; padding: 4px 9px; border-radius: 9px; }
.co-row .input:disabled { background: transparent; border-color: transparent; color: var(--grey-700); }
.picker__empty { padding: 40px; text-align: center; color: var(--grey-500); }

/* ---------- Companies list grouped by source folder ---------- */
.co-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.co-toolbar .input { width: 340px; max-width: 100%; }
.co-section { border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.co-section > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: transparent; font-weight: 650; }
.co-section > summary:hover { background: var(--grey-50); }
.co-section > summary::-webkit-details-marker { display: none; }
.co-section > summary::after { content: '▸'; margin-left: auto; color: var(--grey-500); transition: transform .15s; }
.co-section[open] > summary::after { transform: rotate(90deg); }
.co-section[open] > summary { border-bottom: 1px solid var(--grey-100); }
.co-section .table-wrap, .co-section table { border-radius: 0; }

.kv-act { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Secure Network Drive: share a folder */
.share-opt { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border-bottom: 1px solid var(--grey-100); cursor: pointer; }
.share-opt:hover { background: var(--grey-50); }
.share-opt input { margin-top: 3px; flex: none; accent-color: var(--indigo); }
.share-opt.is-on { background: var(--selected); box-shadow: inset 3px 0 0 var(--indigo); }
.share-opt.is-off { cursor: not-allowed; opacity: .6; }
.share-opt__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.share-opt__title { font-weight: 600; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.share-opt__sub { font-size: 12px; color: var(--grey-700); }
.share-opt--whole { margin: 10px; border: 1px solid var(--grey-200); border-radius: 14px; background: var(--white); }
.share-opt--whole.is-on { border-color: var(--indigo); box-shadow: var(--ring); }
.share-picked { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border: 1px solid var(--grey-200); border-radius: 14px; background: var(--grey-50); flex-wrap: wrap; }
.net-group > summary { gap: 10px; }
.net-group__body { padding: 16px; background: var(--grey-50); }

/* connector browser sign-in */
.center-card { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.center-card .card { max-width: 460px; width: 100%; padding: 30px; text-align: center; }
.center-card .loader3d { margin: 18px auto 34px; }
.auth__note { margin-top: 12px; }

/* ================= Dark theme ================= */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090d24;
  --white: #131a3b;               /* solid surface (inputs, modals, buttons) */
  --surface: rgba(19, 26, 59, .88);
  --border-soft: rgba(58, 68, 120, .55);
  --glass: rgba(9, 13, 36, .72);
  --glass-strong: rgba(19, 26, 59, .85);
  --scrim: rgba(9, 13, 36, .55);
  --hover: #1a2150;
  --selected: #1d2360;
  --soft-hover: #2c2f7a;
  --info-bg: linear-gradient(135deg, rgba(91, 91, 247, .16), rgba(34, 195, 238, .1));
  --danger-border: rgba(255, 122, 126, .4);
  --grey-50: #0f1434;
  --grey-100: #181f47;
  --grey-200: #252c5a;
  --grey-300: #353e75;
  --grey-500: #8b92c0;
  --grey-700: #b8bde2;
  --text: #e8eaff;
  --indigo: #8f8fff;
  --blue-100: rgba(91, 91, 247, .2);
  --navy-800: #d0d3ff;
  --navy-700: #b3b8ff;
  --green: #3ddc9f;
  --green-bg: rgba(61, 220, 159, .13);
  --orange: #f6b44e;
  --orange-bg: rgba(246, 180, 78, .13);
  --red: #ff7d82;
  --red-bg: rgba(255, 125, 130, .13);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 80px -24px rgba(0, 0, 0, .7), 0 10px 30px -12px rgba(0, 0, 0, .5);
  --ring: 0 0 0 4px rgba(143, 143, 255, .25);
}
:root[data-theme="dark"] body::before {
  background:
    radial-gradient(40vmax 30vmax at 85% 0%, rgba(124, 92, 246, .22), transparent 60%),
    radial-gradient(36vmax 28vmax at 10% 10%, rgba(34, 195, 238, .12), transparent 60%),
    radial-gradient(40vmax 30vmax at 60% 110%, rgba(45, 212, 167, .08), transparent 60%);
}
:root[data-theme="dark"] .sidebar { box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .05); }
:root[data-theme="dark"] .notice--warn, :root[data-theme="dark"] .sub-banner--grace { background: rgba(246, 180, 78, .1); border-color: rgba(246, 180, 78, .35); color: #f8cf8e; }
:root[data-theme="dark"] .notice--info, :root[data-theme="dark"] .sub-banner--trial { background: var(--info-bg); border-color: rgba(143, 143, 255, .35); color: #c9ccff; }
:root[data-theme="dark"] .notice--err, :root[data-theme="dark"] .sub-banner--expired { background: rgba(255, 125, 130, .1); border-color: rgba(255, 125, 130, .38); color: #ffb3b6; }
:root[data-theme="dark"] .notice--ok { background: rgba(61, 220, 159, .1); border-color: rgba(61, 220, 159, .35); color: #9ff0cf; }
:root[data-theme="dark"] .modal__foot { background: #0f1434; }
:root[data-theme="dark"] .btn { box-shadow: none; }
:root[data-theme="dark"] .btn--primary, :root[data-theme="dark"] .btn--primary:hover { box-shadow: 0 10px 26px -10px rgba(91, 91, 247, .9), inset 0 1px 0 rgba(255, 255, 255, .2); }
:root[data-theme="dark"] .toast { background: rgba(26, 33, 80, .96); border: 1px solid rgba(255, 255, 255, .08); border-left: 3px solid var(--cyan); }
:root[data-theme="dark"] .toast--err { background: #5c1d2a; }
:root[data-theme="dark"] .overlay { background: rgba(3, 5, 18, .65); }
:root[data-theme="dark"] .folder-node__icon, :root[data-theme="dark"] .folder-node__icon::before { filter: saturate(.9) brightness(.95); }
:root[data-theme="dark"] .segmented button.is-on, :root[data-theme="dark"] .auth__tabs button.is-on { background: #232b62; color: #fff; box-shadow: 0 2px 10px -3px rgba(0, 0, 0, .6); }
:root[data-theme="dark"] .people-chip { background: rgba(143, 143, 255, .18); color: #c9ccff; }
:root[data-theme="dark"] .pay-qr__code { background: #fff; }          /* QR stays black on white so phones can scan it */
:root[data-theme="dark"] .auth__panel { background: #0c1130; }
:root[data-theme="dark"] .btn-google { background: #131a3b; }
:root[data-theme="dark"] .loader3d__shadow { background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent); }
:root[data-theme="dark"] .busy__card { background: rgba(19, 26, 59, .92); }
:root[data-theme="dark"] .doc-head .btn--ghost { color: #c9ccff; }
:root[data-theme="dark"] img.avatar-img, :root[data-theme="dark"] .avatar img { filter: none; }

/* theme switch (top bar, sign-in page, Terms page) */
.theme-btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--grey-200); background: var(--glass-strong); color: var(--grey-700); cursor: pointer; font-size: 12px; font-weight: 600; }
.theme-btn:hover { border-color: var(--grey-300); color: var(--text); }
.theme-btn svg { width: 16px; height: 16px; }
.auth__panel .theme-btn { position: absolute; top: 20px; right: 22px; }
.doc-head__actions { display: flex; gap: 10px; align-items: center; }
html { transition: background-color .25s; }
