/* ============ OxySync Cabinet - Realstyle dark theme ============ */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800;900&family=Geist+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg:      #05070e;
  --bg-2:    rgba(8,12,22,.78);
  --panel:   rgba(12,16,24,.72);
  --panel-2: rgba(17,21,31,.72);
  --raised:  rgba(22,27,39,.82);
  --hover:   rgba(91,156,246,.10);
  --input:   rgba(5,7,14,.62);
  --line:    rgba(120,160,255,.09);
  --line-2:  rgba(120,160,255,.18);
  --scan:    rgba(91,156,246,.010);

  --tx:   #e7eefc;
  --tx-2: #91a8cf;
  --tx-3: #526485;

  --acc:      #5b9cf6;
  --acc-2:    #7db2f8;
  --acc-dim:  rgba(91,156,246,.14);
  --acc-dark: #2e5bd6;

  --pri:      #818cf8;
  --pri-2:    #a5aeff;
  --pri-dim:  rgba(129,140,248,.14);

  /* ✦ Pro tier — brand blue, matches landing (premium white→blue sheen) */
  --pro:      #5b9cf6;
  --pro-2:    #a9c4f2;
  --pro-dim:  rgba(91,156,246,.14);
  --pro-rgb:  91,156,246;
  --pro-grad: linear-gradient(135deg, #cfe2ff 0%, #7db2f8 45%, #2e5bd6 100%);

  --cyn:      #6cc5e0;
  --cyn-dim:  rgba(108,197,224,.12);

  --grn:      #34d399;
  --grn-dim:  rgba(52,211,153,.12);
  --amb:      #f3c455;
  --amb-dim:  rgba(243,196,85,.12);
  --red:      #f1647d;
  --red-dim:  rgba(241,100,125,.12);
  --vio:      #a892f0;
  --vio-dim:  rgba(168,146,240,.12);

  --rsb-w:   224px;
  --nav-h:   56px;
  --r:       16px;
  --r-lg:    20px;
  --r-md:    14px;
  --r-sm:    11px;
  --r-xs:    6px;

  /* soft minimalist — gentle shadows, no neon glow */
  --shadow:    0 24px 60px -30px rgba(0,0,0,.8);
  --o-glow:    0 10px 30px -18px rgba(91,156,246,.4);
  --c-glow:    0 8px 24px -16px rgba(108,197,224,.3);
  --logo-glow: 0 0 0 1px rgba(91,156,246,.2), 0 6px 18px -8px rgba(91,156,246,.35);

  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;
  --sans: "Geist", system-ui, sans-serif;
}

/* ============ RESET & BASE ============ */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: linear-gradient(180deg,#05070e 0%,#07101a 45%,#05070e 100%);
  color: var(--tx);
  font-family: var(--sans);
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0;
}

/* Ambient atmosphere — landing-grade depth (aura + faint grid, no scanlines) */
body::before {
  content: ""; pointer-events: none;
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(120,160,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,160,255,.028) 1px, transparent 1px);
  background-size: 62px 62px, 62px 62px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 70%);
}

/* Ambient gradient */
body::after {
  content: ""; pointer-events: none;
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% -2%, rgba(91,156,246,.22) 0%,rgba(91,156,246,.09) 36%,transparent 72%),
    radial-gradient(ellipse 44% 44% at 82% 18%, rgba(129,140,248,.16) 0%,transparent 66%),
    radial-gradient(ellipse 48% 48% at 14% 30%, rgba(56,217,245,.08) 0%,transparent 70%),
    linear-gradient(180deg,transparent 0%,rgba(5,7,14,.10) 50%,rgba(5,7,14,.8) 100%);
}

#root { height: 100%; position: relative; z-index: 1; display: flex; flex-direction: column; }
::selection { background: rgba(91,156,246,.28); color: #fff; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.14); }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }

/* ============ APP SHELL ============ */
.app { display: flex; flex-direction: row; height: 100%; overflow: hidden; }

/* ── Sidebar ── */
.r-sidebar {
  width: var(--rsb-w); flex: 0 0 var(--rsb-w);
  display: flex; flex-direction: column;
  background:
    radial-gradient(circle at 50% 0%, rgba(91,156,246,.07), transparent 50%),
    linear-gradient(180deg, rgba(10,14,24,.9), rgba(7,10,18,.86));
  border-right: 1px solid rgba(120,160,255,.08);
  box-shadow: inset -1px 0 0 rgba(255,255,255,.02);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  overflow-y: auto; overflow-x: hidden;
}

.rsb-logo {
  display: flex; align-items: center; gap: 11px;
  padding: 18px 16px 16px;
  border-bottom: 1px solid rgba(120,160,255,.10);
  flex-shrink: 0;
}

.rsb-nav {
  display: flex; flex-direction: column;
  padding: 8px 8px; flex: 1;
  gap: 5px;
}

/* Nav item */
.rsb-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; border: 1px solid transparent; width: 100%; text-align: left;
  background: transparent; color: var(--tx-2); font-weight: 650;
  font-size: 13px; border-radius: var(--r-md); cursor: pointer;
  white-space: nowrap;
  font-family: var(--sans); text-decoration: none;
  transition: color .15s, background .15s, border-color .15s, box-shadow .15s;
  position: relative;
}
.rsb-item:hover {
  color: var(--tx);
  background: rgba(91,156,246,.08);
  border-color: rgba(120,160,255,.12);
}
.rsb-item.on {
  color: var(--acc-2); font-weight: 700;
  background: rgba(91,156,246,.1);
  border-color: transparent;
}
.rsb-item.on .rsb-icon-wrap {
  background: var(--acc-dim);
  border-color: var(--line-2);
  color: var(--acc);
}

/* Icon container inside nav item */
.rsb-icon-wrap {
  width: 30px; height: 30px;
  border-radius: 11px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.035);
  display: grid; place-items: center;
  flex: 0 0 30px;
  transition: background .15s, box-shadow .15s, color .15s, border-color .15s;
  color: var(--tx-3);
}
.rsb-item:hover .rsb-icon-wrap {
  background: rgba(91,156,246,.12);
  border-color: rgba(120,160,255,.16);
  color: var(--tx-2);
}


.rsb-badge {
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 800;
  border-radius: 99px; padding: 2px 6px;
  font-family: var(--mono); margin-left: auto; flex-shrink: 0;
}
.rsb-cat {
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0;
  color: var(--tx-3); padding: 16px 12px 5px;
  display: flex; align-items: center; gap: 8px;
}
.rsb-cat::after {
  content: ""; flex: 1; height: 1px;
  background: var(--line);
}

/* Sidebar divider line */
.rsb-divider {
  height: 1px; background: var(--line);
  margin: 6px 12px;
}

/* ── Sidebar bottom action links — clean rows, hover highlight ── */
.rsb-links { display: flex; flex-direction: column; gap: 2px; padding: 4px 8px 2px; }
.rsb-l-arr { margin-left: auto; flex-shrink: 0; opacity: .4; transition: transform .18s, opacity .18s; }
.rsb-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 9px; border-radius: 10px;
  background: none; border: 1px solid transparent;
  color: var(--tx-2); font-weight: 600; font-size: 13px; letter-spacing: -.01em;
  transition: background .16s, color .16s;
}
.rsb-link:hover { background: rgba(255,255,255,.035); color: var(--tx); }
.rsb-link:hover .rsb-l-arr { transform: translateX(2px); opacity: .7; }

/* ── Main area ── */
.main-area {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* ── Topbar ── */
.topbar {
  height: var(--nav-h); flex: 0 0 var(--nav-h);
  background: linear-gradient(180deg, rgba(10,14,24,.78), rgba(8,11,19,.62));
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border-bottom: 1px solid rgba(120,160,255,.08);
  display: flex; align-items: center; gap: 12px;
  padding: 0 22px; overflow: hidden;
  position: sticky; top: 0; z-index: 10;
}
.topbar-title {
  font-weight: 800; font-size: 15px;
  letter-spacing: 0; white-space: nowrap;
}

.content { flex: 1; overflow-y: auto; padding: 22px; }
.content-inner { max-width: 1380px; margin: 0 auto; }

/* ============ PRIMITIVES ============ */
.card {
  background:
    linear-gradient(180deg, rgba(18,24,36,.72), rgba(10,14,22,.66)),
    radial-gradient(circle at 50% 0%, rgba(91,156,246,.08), transparent 58%);
  border: 1px solid rgba(120,160,255,.13);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.045);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
}
.card-pad { padding: 18px; }
.card-h {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(120,160,255,.11);
  background: linear-gradient(180deg, rgba(255,255,255,.025), transparent);
}
.card-h h3 { margin: 0; font-size: 13px; font-weight: 700; }
.card-h .sub { font-family: var(--mono); font-size: 10.5px; color: var(--tx-3); }
.grid { display: grid; gap: 14px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 12.5px;
  white-space: nowrap; border: 1px solid var(--line-2);
  background: rgba(17,23,36,.55); color: var(--tx);
  transition: background .16s, border-color .16s, box-shadow .16s, transform .06s;
  font-family: var(--sans); letter-spacing: -.01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.btn:hover { background: rgba(91,156,246,.11); border-color: rgba(120,160,255,.26); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-pri {
  background: linear-gradient(135deg, #7db2f8, #5b9cf6); border-color: transparent; color: #05111f;
  box-shadow: var(--o-glow); font-weight: 800;
}
.btn-pri:hover { background: linear-gradient(135deg, #96c2ff, #66a6fb); box-shadow: 0 8px 24px -10px rgba(91,156,246,.5); }
.btn-cyn {
  background: linear-gradient(135deg, var(--cyn), #8fd4e6); border-color: transparent; color: #06181d;
  font-weight: 800; box-shadow: var(--c-glow);
}
.btn-cyn:hover { background: #5de5f8; }
.btn-ghost {
  background: rgba(255,255,255,.025); border-color: var(--line);
  color: var(--tx-2);
}
.btn-ghost:hover { color: var(--tx); background: rgba(91,156,246,.08); border-color: var(--line-2); }
.btn-sm { padding: 5px 11px; font-size: 11.5px; border-radius: 999px; }
.btn-danger { color: var(--red); border-color: rgba(255,79,109,.3); background: var(--red-dim); }
.btn-danger:hover { background: rgba(255,79,109,.2); }

/* ── Badges ── soft minimalist (sans, sentence case, no glow) */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  line-height: 1.45; white-space: nowrap;
  font-family: var(--sans); text-transform: none; letter-spacing: -.01em;
  border: 1px solid currentColor;
  border-color: rgba(255,255,255,.1);
}
.badge .pip {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.b-grn { color: var(--grn); background: var(--grn-dim); }
.b-pro { color: var(--pro-2); background: var(--pro-dim); border-color: rgba(91,156,246,.3); }
/* Pro tier name — premium diagonal gradient text (visible on large sizes) */
.pro-grad {
  background: linear-gradient(135deg, #cfe2ff 0%, #7db2f8 45%, #2e5bd6 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.b-amb { color: var(--amb); background: var(--amb-dim); }
.b-red { color: var(--red); background: var(--red-dim); }
.b-acc { color: var(--acc); background: var(--acc-dim); }
.b-cyn { color: var(--cyn); background: var(--cyn-dim); }
.b-pri { color: var(--pri); background: var(--pri-dim); }
.b-mut { color: var(--tx-2); background: var(--raised); }
.b-vio { color: var(--vio); background: var(--vio-dim); }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(120,160,255,.14); font-size: 11.5px;
  font-weight: 650; color: var(--tx-2); background: rgba(255,255,255,.025);
}
.tag {
  font-size: 10px; font-weight: 700;
  color: var(--tx-2); background: rgba(255,255,255,.035);
  border: 1px solid rgba(120,160,255,.12);
  border-radius: 999px; padding: 2px 7px;
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 0;
}

/* ── Toggle ── */
.tgl {
  width: 38px; height: 21px;
  border-radius: 99px; background: rgba(255,255,255,.055);
  border: 1px solid rgba(120,160,255,.12); position: relative;
  transition: background .18s, border-color .18s, box-shadow .18s;
  flex: 0 0 auto;
}
.tgl::after {
  content: ""; position: absolute;
  top: 2px; left: 2px;
  width: 15px; height: 15px;
  border-radius: 50%; background: #5a6a8a;
  transition: transform .2s cubic-bezier(.4,0,.2,1), background .18s;
}
.tgl.on {
  background: linear-gradient(135deg, #7db2f8, #5b9cf6); border-color: transparent;
}
.tgl.on::after { transform: translateX(17px); background: #05111f; }

/* ── Segmented control ── */
.seg {
  display: inline-flex; background: rgba(5,7,14,.42);
  border: 1px solid rgba(120,160,255,.14); border-radius: 999px;
  padding: 3px; gap: 2px;
}
.seg button {
  padding: 5px 12px; border-radius: 999px;
  border: none; background: none;
  color: var(--tx-2); font-weight: 700;
  font-size: 11.5px; font-family: inherit;
  transition: background .14s, color .14s;
}
.seg button.on { background: linear-gradient(135deg, rgba(91,156,246,.20), rgba(91,156,246,.10)); color: var(--acc-2); }

/* ── Table ── */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-family: var(--sans);
  font-size: 11.5px; font-weight: 600;
  text-transform: none; letter-spacing: -.01em;
  color: var(--tx-3); padding: 10px 16px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover { background: rgba(91,156,246,.055); }
.t-id { font-family: var(--mono); font-size: 11.5px; color: var(--acc); font-weight: 600; }
.t-price { font-family: var(--mono); font-weight: 700; }
.t-sub { font-size: 11px; color: var(--tx-3); }

/* ── List rows ── */
.lrow {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  transition: background .1s;
}
.lrow:last-child { border-bottom: none; }
.lrow:hover { background: rgba(91,156,246,.045); }

.empty { text-align: center; color: var(--tx-3); padding: 40px; font-size: 13px; }
.divider { height: 1px; background: var(--line); border: none; margin: 0; }

/* ── Search bar ── */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--input); border: 1px solid rgba(120,160,255,.13);
  border-radius: 999px; padding: 7px 12px;
  color: var(--tx-3); flex: 1; max-width: 100%;
  transition: border-color .14s, box-shadow .14s, background .14s;
}
.search-bar:focus-within {
  background: rgba(5,7,14,.78);
  border-color: rgba(120,160,255,.28);
  box-shadow: 0 0 0 3px rgba(91,156,246,.08);
}
.search-bar input {
  background: none; border: none; outline: none;
  color: var(--tx); flex: 1; font-size: 12.5px; font-family: inherit;
}
.search-bar svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── Icon button ── */
.icon-btn {
  width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid rgba(120,160,255,.13); background: rgba(255,255,255,.025);
  color: var(--tx-2); display: grid; place-items: center;
  flex: 0 0 auto; transition: background .14s, color .14s, border-color .14s;
}
.icon-btn:hover { background: rgba(91,156,246,.09); color: var(--tx); border-color: var(--line-2); }
.icon-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── Text input ── */
.dr-input {
  width: 100%;
  background: var(--input);
  border: 1px solid rgba(120,160,255,.13);
  border-radius: 12px;
  padding: 10px 13px;
  color: var(--tx); font-size: 13px;
  font-family: var(--sans); outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.dr-input:focus {
  background: rgba(5,7,14,.78);
  border-color: rgba(120,160,255,.32);
  box-shadow: 0 0 0 3px rgba(91,156,246,.1);
}

/* ── Page heading ── */
.page-head {
  margin-bottom: 22px;
}
.page-head-title {
  font-size: 22px; font-weight: 800;
  letter-spacing: 0; line-height: 1.15;
  margin-bottom: 3px;
}
.page-head-sub {
  font-family: var(--mono); font-size: 11.5px;
  color: var(--tx-3); letter-spacing: 0;
}

/* ============ AUTH SCREENS ============ */
.auth-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 32px 16px;
  position: relative;
  overflow: hidden;
}
.auth-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 18%, rgba(91,156,246,.20), transparent 36%),
    radial-gradient(circle at 68% 36%, rgba(129,140,248,.13), transparent 34%);
  filter: blur(8px);
}
.auth-card {
  width: 100%; max-width: 440px;
  background:
    linear-gradient(180deg, rgba(18,24,36,.78), rgba(8,12,20,.72)),
    radial-gradient(circle at 50% 0%, rgba(91,156,246,.12), transparent 62%);
  border: 1px solid rgba(120,160,255,.18);
  border-radius: 18px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.055);
  padding: 40px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

.cab-logo {
  display: flex; align-items: center; gap: 13px;
  margin-bottom: 32px; justify-content: center;
}
.cab-logo-icon {
  width: 44px; height: 44px; border-radius: 15px;
  background: linear-gradient(135deg, rgba(125,178,248,.24), rgba(91,156,246,.10));
  border: 1px solid rgba(120,160,255,.24);
  display: grid; place-items: center;
  color: var(--acc-2); flex: 0 0 auto;
  box-shadow: 0 6px 18px -10px rgba(91,156,246,.35);
}
.cab-logo-name {
  font-size: 20px; font-weight: 850; letter-spacing: 0;
}
.cab-logo-sub {
  font-family: var(--mono); font-size: 9.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0;
  color: var(--tx-3); margin-top: 1px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12.5px; font-weight: 600;
  color: var(--tx-2); text-transform: none; letter-spacing: -.01em;
}
.field-input-wrap { position: relative; }
.cab-input {
  width: 100%; background: var(--input);
  border: 1px solid rgba(120,160,255,.15);
  border-radius: 12px; color: var(--tx);
  font-family: var(--sans); font-size: 14px;
  padding: 12px 14px; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.cab-input:focus {
  background: rgba(5,7,14,.78);
  border-color: rgba(120,160,255,.34);
  box-shadow: 0 0 0 3px rgba(91,156,246,.12);
}
.cab-input.with-icon { padding-right: 46px; }
.field-icon-btn {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; color: var(--tx-3);
  padding: 4px; display: grid; place-items: center;
  transition: color .15s;
  flex-shrink: 0;
}
.field-icon-btn svg { flex-shrink: 0; }
.field-icon-btn:hover { color: var(--tx-2); }

.btn-auth {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, #7db2f8, #5b9cf6);
  color: #05111f; border: none; border-radius: 999px;
  font-family: var(--sans); font-size: 14px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 8px 22px -12px rgba(91,156,246,.45);
  transition: opacity .15s, transform .1s, box-shadow .15s;
}
.btn-auth svg { flex-shrink: 0; }
.btn-auth:hover:not(:disabled) {
  opacity: .9;
  box-shadow: 0 10px 26px -12px rgba(91,156,246,.5);
}
.btn-auth:active:not(:disabled) { transform: scale(.99); }
.btn-auth:disabled { opacity: .38; cursor: not-allowed; }
.btn-link {
  background: none; border: none;
  color: var(--acc-2); font-family: var(--sans);
  font-size: 13px; font-weight: 600;
  cursor: pointer; padding: 0; transition: color .15s;
}
.btn-link:hover { color: var(--tx); }

.alert {
  padding: 12px 16px; border-radius: var(--r-md);
  font-size: 13px; line-height: 1.5; border: 1px solid;
}
.alert-err  { background: var(--red-dim); border-color: rgba(255,79,109,.2); color: var(--red); }
.alert-warn { background: var(--amb-dim); border-color: rgba(255,201,71,.2);  color: var(--amb); }
.alert-info { background: var(--acc-dim); border-color: rgba(91,156,246,.2);  color: var(--acc-2); }

.auth-sep {
  display: flex; align-items: center; gap: 10px;
  color: var(--tx-3); font-size: 12px; margin: 4px 0;
}
.auth-sep::before, .auth-sep::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* ── Spinner ── */
@keyframes cab-spin { to { transform: rotate(360deg); } }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.1);
  border-top-color: var(--acc);
  border-radius: 50%;
  animation: cab-spin .65s linear infinite;
  display: inline-block; flex-shrink: 0;
}

/* ── Animations ── */
@keyframes cab-fade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@keyframes cab-pop {
  from { opacity: 0; transform: scale(.96) translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.fade-in { animation: cab-fade .28s cubic-bezier(.22,1,.36,1) both; }
.pop-in  { animation: cab-pop .28s cubic-bezier(.22,1,.36,1) both; }

/* ── Util ── */
.flex-col { display: flex; flex-direction: column; }
.gap-14   { gap: 14px; }
.gap-16   { gap: 16px; }
.ic-wrap  { display: inline-flex; line-height: 0; }
.ic-wrap svg { width: 100%; height: 100%; }

/* ============ RESPONSIVE ============ */
/* Burger hidden on desktop — MUST come before the ≤900px media query so the
   media rule (display:grid) wins on mobile. (A later base rule would override
   the media one and leave the burger hidden everywhere.) */
.mnav-burger { display: none; }

/* Mobile navigation drawer */
.mnav-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(0,0,0,.55);
  animation: cabMnavFade .15s ease;
}
.mnav-drawer {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 268px; max-width: 84vw;
  background: var(--bg-2, var(--panel));
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow, 0 10px 40px rgba(0,0,0,.5));
  display: flex; flex-direction: column;
  animation: cabMnavSlide .2s cubic-bezier(.21,1.05,.5,1);
}
.mnav-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.mnav-body { flex: 1; overflow-y: auto; padding: 10px 10px 20px; }
.mnav-body .rsb-cat { padding: 10px 8px 4px; }
.mnav-divider { height: 1px; background: var(--line); margin: 8px 6px; }
.mnav-item {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px;
  border: none; background: none;
  border-radius: var(--r-sm, 8px);
  color: var(--tx-2); font-size: 14px; font-weight: 600;
  font-family: inherit; text-align: left; text-decoration: none;
  cursor: pointer; transition: background .12s, color .12s;
}
.mnav-item svg { width: 19px; height: 19px; flex-shrink: 0; }
.mnav-item:hover { background: var(--hover); color: var(--tx); }
.mnav-item.on { background: var(--acc-dim, rgba(91,156,246,.15)); color: var(--acc); }

/* "go elsewhere" link rows in the drawer (panel / admin / telegram) — clean */
.mnav-link {
  width: 100%;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 11px; margin-top: 2px;
  border-radius: 10px;
  font-size: 14px; font-weight: 600;
  color: var(--tx-2);
  font-family: inherit; text-align: left; text-decoration: none;
  cursor: pointer; transition: background .14s, color .14s;
  border: 1px solid transparent;
}
.mnav-link:active { transform: scale(.99); }
.mnav-link:hover  { background: rgba(255,255,255,.035); color: var(--tx); }
.mnav-link .mnav-link-ic { display: inline-flex; flex-shrink: 0; }
.mnav-link .mnav-link-ic svg { width: 18px; height: 18px; }
.mnav-link-acc .mnav-link-ic { color: var(--acc); }
.mnav-link-amb .mnav-link-ic { color: var(--amb); }
.mnav-link-tg  .mnav-link-ic { color: #29a9eb; }
/* Telegram blue */
.mnav-link-tg { background: rgba(41,169,235,.1); border-color: rgba(41,169,235,.35); color: #29a9eb; }
.mnav-link-tg .mnav-link-ic { background: rgba(41,169,235,.16); }

@keyframes cabMnavFade  { from { opacity: 0 } to { opacity: 1 } }
@keyframes cabMnavSlide { from { transform: translateX(-100%) } to { transform: translateX(0) } }

@media (max-width: 900px) {
  .r-sidebar { display: none; }
  .mnav-burger { display: grid; place-items: center; flex-shrink: 0; }
  .topbar { padding: 0 12px; gap: 8px; }
  .content { padding: 14px 12px 28px; }

  /* Subtitle under the page title clutters the narrow topbar — hide it.
     (By class, not position: the burger button is now the first .topbar child.) */
  .cab-topbar-subtitle { display: none; }
  /* Long titles ("Реферальная программа", "Профиль и безопасность") must not
     overlap the days pill — let the title shrink and ellipsis instead. */
  .topbar-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cab-topbar-heading { flex: 1 1 auto; min-width: 0; }

  /* Compact days pill: "30 дн." instead of "30 дн. до конца", smaller */
  .cab-topbar-days { padding: 4px 9px; gap: 5px; }
  .cab-topbar-days .cab-days-full { display: none; }
  .cab-topbar-days .cab-days-unit { font-size: 9.5px; }
}

.mob-grid-2 { grid-template-columns: 1fr 1fr; }
.mob-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ── Mobile (≤600px) ── */
@media (max-width: 800px) {
  /* (Sidebar is fully replaced by the burger drawer at ≤900px) */

  /* Topbar: ещё компактнее на самых узких экранах (subtitle + compact days
     pill already handled at ≤900px) */
  .topbar { padding: 0 8px; gap: 6px; height: 48px; flex: 0 0 48px; }
  .topbar-title { font-size: 13.5px; }
  .cab-topbar-panel-btn { display: none; }

  /* Content */
  .content { padding: 10px 8px 80px; }

  /* Auth card: убираем паддинги */
  .auth-card { padding: 24px 18px; border-radius: 14px; }

  /* Grids в одну колонку */
  .grid { grid-template-columns: 1fr !important; }
  .mob-grid-2 { grid-template-columns: 1fr !important; }
  .mob-grid-3 { grid-template-columns: 1fr !important; }

  /* Топбар: скрыть "Админ" текст, оставить только иконку */
  .cab-topbar-admin-text { display: none; }

  /* Таблицы: горизонтальный скролл */
  .tbl-wrap, .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl { min-width: 440px; }

  /* Список строк: перенос на мобиле */
  .lrow { flex-wrap: wrap; gap: 8px; }

  /* Кнопки в строку */
  .btn-sm { font-size: 11px; padding: 4px 9px; }

  /* Safe area для iOS */
  .main-area { padding-bottom: env(safe-area-inset-bottom); }
}

/* ═══════════════════════════════════════════════════════════
   ✦ REDESIGN LAYER — landing-grade polish (v2.8)
   New reusable primitives. Old classes untouched.
   ═══════════════════════════════════════════════════════════ */

/* — page header (big title like landing) — */
.rx-head { margin-bottom: 26px; animation: rxFade .55s cubic-bezier(.2,.8,.25,1) both; }
.rx-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em; color: var(--acc-2);
  background: var(--acc-dim); border: 1px solid var(--line-2);
  border-radius: 99px; padding: 4px 12px; margin-bottom: 14px;
}
.rx-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 8px var(--acc); }
.rx-h1 {
  font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08;
  background: linear-gradient(180deg, #fff 32%, #a9c4f2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rx-sub { margin-top: 9px; font-size: 14px; color: var(--tx-2); line-height: 1.5; }

/* — glass card — */
.rcard {
  position: relative; border-radius: 18px; overflow: hidden;
  background: linear-gradient(168deg, rgba(18,23,34,.78) 0%, rgba(11,15,23,.82) 100%);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -34px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  transition: transform .2s cubic-bezier(.2,.8,.25,1), border-color .2s, box-shadow .2s;
}
.rcard::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(120% 80% at 50% -20%, rgba(91,156,246,.1) 0%, transparent 60%);
}
.rcard.hov:hover { transform: translateY(-3px); border-color: var(--line-2);
  box-shadow: 0 32px 70px -34px rgba(0,0,0,.95), 0 0 0 1px rgba(91,156,246,.12), inset 0 1px 0 rgba(255,255,255,.06); }
.rcard-pad { padding: 22px 24px; position: relative; }
.rcard-ft { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; gap: 8px; position: relative; }
.rcard-lbl { font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--tx-2); }

/* accent top-line for highlighted cards */
.rcard-accent::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, transparent, var(--acc) 30%, var(--acc-2) 70%, transparent);
  opacity: .9;
}

/* — KPI strip (hero-dashboard style) — */
.rx-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.rx-kpi {
  position: relative; border-radius: 14px; padding: 16px 17px;
  background: linear-gradient(168deg, rgba(20,25,37,.7), rgba(12,16,24,.78));
  border: 1px solid var(--line); overflow: hidden;
  transition: transform .2s cubic-bezier(.2,.8,.25,1), border-color .2s;
}
.rx-kpi:hover { transform: translateY(-2px); border-color: var(--line-2); }
.rx-kpi-ic {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--acc-dim); color: var(--acc); margin-bottom: 12px;
  border: 1px solid var(--line-2);
}
.rx-kpi-lbl { font-family: var(--mono); font-size: 10.5px; color: var(--tx-2); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.rx-kpi-val { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-top: 3px; line-height: 1; }
.rx-kpi-sub { font-family: var(--mono); font-size: 11px; margin-top: 6px; font-weight: 600; color: var(--tx-2); }
.rx-kpi-glow { position: absolute; top: -40px; right: -40px; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(91,156,246,.14), transparent 68%); pointer-events: none; }

/* staggered entrance */
@keyframes rxFade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rx-stagger > * { animation: rxFade .55s cubic-bezier(.2,.8,.25,1) both; }
.rx-stagger > *:nth-child(1) { animation-delay: .04s; }
.rx-stagger > *:nth-child(2) { animation-delay: .10s; }
.rx-stagger > *:nth-child(3) { animation-delay: .16s; }
.rx-stagger > *:nth-child(4) { animation-delay: .22s; }
.rx-stagger > *:nth-child(5) { animation-delay: .28s; }
.rx-stagger > *:nth-child(6) { animation-delay: .34s; }

/* — changelog as release cards — */
.rx-rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.rx-rel {
  position: relative; border-radius: 14px; padding: 16px 18px;
  background: linear-gradient(168deg, rgba(18,23,34,.6), rgba(11,15,23,.66));
  border: 1px solid var(--line); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s cubic-bezier(.2,.8,.25,1), border-color .2s, box-shadow .2s;
}
.rx-rel-click { cursor: pointer; }
.rx-rel-click:hover { border-color: rgba(91,156,246,.4); }
.rx-rel-title2 { font-weight: 700; font-size: 14px; color: var(--tx); line-height: 1.35; margin-bottom: 14px; }
.rx-rel-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.rx-rel-count { font-size: 12px; color: var(--tx-3); }
.rx-rel-more { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--acc-2); }

/* changelog detail modal */
.cl-scrim {
  position: fixed; inset: 0; z-index: 200; padding: 20px;
  background: rgba(4,6,12,.72); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  animation: rxFade .2s ease both;
}
.cl-modal {
  width: 450px; max-width: 100%; max-height: 86vh; overflow-y: auto;
  background: linear-gradient(168deg, rgba(18,23,34,.95), rgba(11,15,23,.97));
  border: 1px solid var(--line-2); border-radius: 16px; padding: 22px;
  box-shadow: 0 30px 80px -28px rgba(0,0,0,.85);
}
.cl-modal-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.cl-modal-tag { font-weight: 800; font-size: 16px; color: var(--tx); letter-spacing: -.01em; line-height: 1.3; }
.cl-modal-x {
  margin-left: auto; width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 8px; border: 1px solid var(--line); background: var(--raised);
  color: var(--tx-3); cursor: pointer; font-size: 17px; line-height: 1; display: grid; place-items: center;
  transition: color .14s, border-color .14s;
}
.cl-modal-x:hover { color: var(--tx); border-color: var(--line-2); }
.rx-rel:hover { transform: translateY(-2px); border-color: var(--line-2); }
.rx-rel.is-new {
  border-color: rgba(91,156,246,.32);
  background: linear-gradient(168deg, rgba(91,156,246,.08), rgba(11,15,23,.7));
  box-shadow: 0 18px 44px -28px rgba(91,156,246,.5);
}
.rx-rel.is-new::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--acc) 30%, var(--acc-2) 70%, transparent);
}
.rx-rel-top { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; flex-wrap: wrap; }
.rx-rel-ver {
  font-family: var(--mono); font-weight: 700; font-size: 12.5px;
  padding: 3px 10px; border-radius: 7px;
  background: var(--raised); color: var(--tx-2); border: 1px solid var(--line);
}
.rx-rel.is-new .rx-rel-ver { background: var(--acc-dim); color: var(--acc-2); border-color: var(--line-2); }
.rx-rel-new {
  font-family: var(--mono); font-size: 9.5px; font-weight: 800; letter-spacing: .1em;
  padding: 3px 9px; border-radius: 7px; text-transform: uppercase;
  background: linear-gradient(135deg, var(--acc-2), var(--acc)); color: #04101f;
  box-shadow: 0 6px 16px -10px rgba(91,156,246,.5);
}
.rx-rel-tag { font-weight: 600; font-size: 13px; color: var(--tx-2); }
.rx-rel-date { font-family: var(--mono); font-size: 10.5px; color: var(--tx-3); margin-left: auto; }
.rx-rel-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.rx-rel-li { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; line-height: 1.5; color: var(--tx-2); }
.rx-rel.is-new .rx-rel-li { color: var(--tx); }
.rx-rel-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; margin-top: 6.5px; background: var(--tx-3); }
.rx-rel.is-new .rx-rel-dot { background: var(--acc); box-shadow: 0 0 6px var(--acc); }

@media (max-width: 900px) {
  .rx-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .rx-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rx-kpi { padding: 13px 13px; }
  .rx-kpi-val { font-size: 19px; }
}
