:root {
  --bg: #05060b;
  --bg-deep: #030408;
  --surface: #0c111b;
  --surface-2: #111827;
  --surface-3: #172033;
  --surface-glass: rgba(12, 17, 27, 0.9);
  --text: #f5f7fb;
  --muted: #91a0b7;
  --muted-2: #5f6d83;
  --line: #202b3e;
  --line-strong: #33435d;
  --cyan: #67e8f9;
  --cyan-strong: #22d3ee;
  --green: #7bf1a8;
  --amber: #f5c66b;
  --coral: #ff8a75;
  --violet: #a78bfa;
  --danger: #ff747f;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  color-scheme: dark;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(180deg, #05060b 0%, #080c14 58%, #060810 100%);
}
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.is-hidden { display: none !important; }
.starfield { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.82; }

.loading-screen {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background: rgba(3, 4, 8, 0.78);
}
.brand-mark {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid rgba(103, 232, 249, 0.55);
  border-radius: 50%;
  color: var(--cyan);
  background: #080d16;
  box-shadow: inset 0 0 0 6px #0b1420, 0 0 34px rgba(34, 211, 238, 0.18);
}
.brand-mark span { font-size: 36px; font-weight: 900; }
.brand-mark i { position: absolute; inset: -9px 9px; border: 1px solid rgba(123, 241, 168, 0.44); border-radius: 50%; transform: rotate(55deg); }
.brand-mark i::after { content: ""; position: absolute; top: 8px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.brand-mark-small { width: 44px; height: 44px; box-shadow: inset 0 0 0 4px #0b1420; }
.brand-mark-small span { font-size: 21px; }
.brand-mark-small i { inset: -6px 6px; }
.loading-copy { color: var(--muted); font-size: 11px; font-weight: 800; }
.loading-copy b { color: var(--cyan); }
.loading-bar { width: 152px; height: 2px; overflow: hidden; background: var(--line); }
.loading-bar span { display: block; width: 40%; height: 100%; background: var(--cyan); animation: load 1s ease-in-out infinite alternate; box-shadow: 0 0 10px var(--cyan); }
@keyframes load { to { transform: translateX(150%); } }
@keyframes spin { to { transform: rotate(360deg); } }

.app-shell { min-height: 100vh; position: relative; z-index: 1; }
.sidebar { display: none; }
.workspace { min-width: 0; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 18px 13px;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(32, 43, 62, 0.78);
  background: rgba(5, 6, 11, 0.86);
  backdrop-filter: blur(20px);
}
.topbar h1 { margin: 3px 0 0; font-size: 24px; line-height: 1.1; font-weight: 780; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.eyebrow, .panel-kicker, .section-index, .view-intro span, .referral-hero span, .form-title span {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}
.connection-chip {
  min-height: 34px;
  display: none;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  font-weight: 750;
}
.connection-chip span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(123, 241, 168, 0.8); }
main { width: min(100%, 1120px); margin: 0 auto; padding: 16px 15px 42px; }
.view { display: none; }
.view.is-active { display: block; animation: view-in 180ms ease-out; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } }

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--surface);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}
.icon-button:hover { border-color: var(--cyan); background: var(--surface-2); }
.icon-button svg { width: 18px; height: 18px; }
.icon-button:active { transform: translateY(1px); }
.spin { animation: spin 0.8s linear infinite; }
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 780;
  white-space: nowrap;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button svg { width: 17px; height: 17px; }
.button-dark { border-color: var(--line-strong); color: var(--text); background: #151d2b; }
.button-dark:hover { border-color: #48607e; background: #1a2536; }
.button-accent { color: #031216; background: var(--cyan); box-shadow: 0 9px 24px rgba(34, 211, 238, 0.16); }
.button-accent:hover { background: #8deefa; }
.button-trial { color: #07130c; background: var(--green); box-shadow: 0 9px 24px rgba(123, 241, 168, 0.14); }
.button-danger { color: #1a0808; background: var(--danger); }
.button-wide { width: 100%; margin-top: 12px; }
.button:disabled { opacity: 0.42; cursor: not-allowed; transform: none; }
.text-button { border: 0; background: transparent; color: var(--cyan); font-weight: 780; }

.command-deck { display: grid; gap: 10px; }
.balance-band {
  min-height: 162px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 9px 16px;
  align-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  border: 1px solid #2b3c55;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(18, 29, 46, 0.98), rgba(8, 13, 23, 0.98));
  box-shadow: var(--shadow);
}
.balance-band::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, var(--cyan), var(--green), var(--amber)); }
.balance-band > span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.balance-band > strong { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 34px; line-height: 1; font-weight: 760; }
.balance-band .button { grid-column: 2; grid-row: 1 / 3; position: relative; z-index: 2; }
.orbit-lines { position: absolute; width: 190px; height: 190px; right: -48px; top: -13px; opacity: 0.34; }
.orbit-lines i { position: absolute; inset: 22px; border: 1px solid #4a6788; border-radius: 50%; transform: rotate(24deg); }
.orbit-lines i:nth-child(2) { inset: 47px 4px; border-color: var(--cyan); transform: rotate(62deg); }
.orbit-lines i:nth-child(3) { inset: 74px -14px; border-color: var(--green); transform: rotate(108deg); }

.subscription-panel { min-width: 0; }
.subscription-card {
  min-height: 188px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 21px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 17, 27, 0.94);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
}
.subscription-card::after { content: ""; position: absolute; right: 24px; bottom: -47px; width: 112px; height: 112px; border: 1px solid rgba(103, 232, 249, 0.16); border-radius: 50%; }
.subscription-card.active { border-color: #2b5d67; box-shadow: inset 3px 0 0 var(--cyan-strong), 0 14px 38px rgba(0, 0, 0, 0.3); }
.subscription-card.subscription-empty { border-style: dashed; }
.subscription-empty-actions { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 2; }
.subscription-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; position: relative; z-index: 2; }
.subscription-identity { display: flex; align-items: center; gap: 14px; min-width: 0; position: relative; z-index: 2; }
.signal-block {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid #2b6975;
  border-radius: 50%;
  color: var(--cyan);
  background: #0b2029;
  box-shadow: inset 0 0 0 5px #0d2832, 0 0 20px rgba(34, 211, 238, 0.12);
}
.signal-block.is-off { border-color: #594834; color: var(--amber); background: #201a13; box-shadow: none; }
.signal-block svg { width: 23px; height: 23px; }
.panel-kicker { display: block; margin-bottom: 5px; color: var(--muted); }
.subscription-card h2 { margin: 0 0 5px; font-size: 18px; }
.subscription-card p { margin: 0; color: var(--muted); font-size: 12px; }
.status-pill { flex: 0 0 auto; padding: 6px 9px; border: 1px solid #2e6570; border-radius: 999px; color: var(--cyan); background: #0b222b; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.status-pill.expired { border-color: #653c45; color: #ff9ca5; background: #27151a; }
.subscription-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; position: relative; z-index: 2; }
.subscription-actions .button { padding: 0 10px; }
.subscription-actions .trial-action { grid-column: 1 / -1; }

.home-insights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.home-insights > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 9px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(12, 17, 27, 0.84);
}
.home-insights > div:nth-child(2) svg { color: var(--green); }
.home-insights > div:nth-child(3) svg { color: var(--amber); }
.home-insights svg { grid-row: 1 / 3; width: 18px; height: 18px; color: var(--cyan); }
.home-insights span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.home-insights strong { overflow-wrap: anywhere; font-size: 12px; }

.section-heading { min-height: 58px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.section-heading > div { display: flex; align-items: center; gap: 9px; }
.section-index { color: var(--muted-2); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.section-heading h2, .admin-toolbar h2 { margin: 0; font-size: 16px; font-weight: 770; }
.list, .tariffs-list, .segmented-list, .tickets-list { display: grid; gap: 8px; }
.list-row, .tariff-row, .payment-row, .ticket-row {
  width: 100%;
  min-height: 70px;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: left;
  color: var(--text);
  background: rgba(12, 17, 27, 0.9);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}
.list-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.tariff-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; }
.payment-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 22px; }
.ticket-row { display: grid; gap: 8px; }
.tariff-row:hover, .payment-row:hover { border-color: var(--line-strong); background: var(--surface-2); }
.list-row strong, .tariff-row strong, .payment-row strong, .ticket-row strong { display: block; font-size: 14px; }
.list-row span, .tariff-row span, .payment-row span, .ticket-row span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.row-value { display: flex; align-items: center; justify-content: flex-end; gap: 8px; text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; }
.row-value svg { width: 16px; height: 16px; color: var(--muted-2); }
.tariff-index, .payment-icon, .view-icon {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0a0f18;
}
.tariff-index { width: 34px; height: 34px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; font-weight: 800; }
.payment-icon { width: 38px; height: 38px; color: var(--cyan); }
.payment-icon svg { width: 18px; height: 18px; }
.payment-check { width: 19px; height: 19px; color: var(--muted-2); }
.tariff-row.is-selected, .payment-row.is-selected { border-color: #2f7180; background: #0d1d28; box-shadow: inset 3px 0 0 var(--cyan-strong); }
.tariff-row.is-selected .tariff-index { border-color: var(--cyan); color: #051116; background: var(--cyan); }
.payment-row.is-selected .payment-check { color: var(--cyan); }
.discount-label { color: var(--green) !important; font-weight: 800; }
.empty-state { padding: 25px 16px; border: 1px dashed var(--line-strong); border-radius: 7px; text-align: center; color: var(--muted); background: rgba(12, 17, 27, 0.52); }

.view-intro, .referral-hero {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.view-intro::after, .referral-hero::after { content: ""; position: absolute; right: 4%; width: 130px; height: 54px; border: 1px solid rgba(103, 232, 249, 0.24); border-radius: 50%; transform: rotate(-16deg); }
.view-icon { width: 46px; height: 46px; color: var(--cyan); background: #0b1b26; }
.view-icon svg { width: 21px; height: 21px; }
.view-intro strong, .referral-hero strong, .form-title strong { display: block; margin-top: 5px; font-size: 17px; }
.status-banner { margin: 12px 0 0; padding: 13px 14px; border: 1px solid #285765; border-left: 3px solid var(--cyan); border-radius: 6px; color: #a8edf5; background: #0b1b24; font-size: 12px; font-weight: 720; }
.checkout-bar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #314159;
  border-radius: 8px;
  background: rgba(12, 17, 27, 0.96);
  position: sticky;
  bottom: 88px;
  z-index: 10;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.checkout-bar span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.checkout-bar strong { display: block; margin-top: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 21px; }
.promo-section { margin-top: 4px; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
input, textarea, select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  color: var(--text);
  background: #090e17;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, textarea:focus, select:focus { border-color: var(--cyan-strong); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1); }
textarea { resize: vertical; }

.referral-hero { min-height: 116px; border: 1px solid var(--line); border-radius: 8px; background: rgba(12, 17, 27, 0.9); }
.referral-orbit { flex: 0 0 66px; width: 66px; height: 66px; display: grid; place-items: center; position: relative; border: 1px solid #36546f; border-radius: 50%; color: var(--cyan); }
.referral-orbit::after { content: ""; position: absolute; inset: 9px -10px; border: 1px solid rgba(123, 241, 168, 0.45); border-radius: 50%; transform: rotate(55deg); }
.referral-orbit svg { width: 25px; height: 25px; }
.referral-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.referral-summary > div, .metric { min-width: 0; padding: 16px 13px; border: 1px solid var(--line); border-radius: 7px; background: rgba(12, 17, 27, 0.9); }
.referral-summary > div:nth-child(1) { border-top-color: var(--cyan); }
.referral-summary > div:nth-child(2) { border-top-color: var(--green); }
.referral-summary > div:nth-child(3) { border-top-color: var(--amber); }
.referral-summary span, .metric span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.referral-summary strong, .metric strong { display: block; margin-top: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 19px; overflow-wrap: anywhere; }
.copy-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }

.support-layout { display: grid; gap: 16px; }
.support-contact { margin-bottom: 4px; padding: 15px; border: 1px solid #31536b; border-radius: 7px; color: #c9d7e8; background: #0b1722; font-size: 12px; line-height: 1.55; }
.support-contact strong { display: block; margin-bottom: 5px; color: var(--cyan); font-size: 10px; text-transform: uppercase; }
.support-form { display: grid; gap: 10px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: rgba(12, 17, 27, 0.92); }
.support-form label { font-size: 12px; font-weight: 760; }
.form-title { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.form-title > svg { width: 34px; height: 34px; padding: 7px; border: 1px solid #31536b; border-radius: 50%; color: var(--cyan); }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.ticket-row p { margin: 0; color: var(--text); font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.ticket-answer { padding-top: 8px; border-top: 1px solid var(--line); color: #b8f4ca !important; }
.ticket-status { display: inline-flex !important; width: fit-content; margin: 0 !important; padding: 4px 7px; border: 1px solid var(--line-strong); border-radius: 999px; }

.metrics-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.metric { display: grid; grid-template-columns: 26px minmax(0, 1fr); grid-template-rows: auto auto; gap: 3px 8px; border-top-color: #344b68; }
.metric svg { grid-row: 1 / 3; width: 18px; height: 18px; align-self: center; color: var(--cyan); }
.metric strong { font-size: 17px; }
.admin-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 16px 0 4px; scrollbar-width: none; }
.admin-tabs button { min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); white-space: nowrap; background: var(--surface); font-size: 12px; font-weight: 700; }
.admin-tabs button.is-active { border-color: var(--cyan); color: #031216; background: var(--cyan); }
.admin-toolbar { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-content { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: rgba(12, 17, 27, 0.94); box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22); }
.data-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; vertical-align: middle; }
.data-table th { color: var(--muted); font-size: 9px; text-transform: uppercase; background: #080d15; }
.data-table tbody tr { transition: background 120ms ease; }
.data-table tbody tr:hover { background: #121a28; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table code { color: var(--cyan); }
.table-action { min-height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--text); background: #151e2d; font-weight: 720; }
.table-action:hover { border-color: var(--cyan); color: var(--cyan); }
.table-divider { padding: 18px 13px 10px; border-top: 8px solid var(--bg); }
.table-divider h3 { margin: 0; font-size: 14px; }

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  min-height: calc(70px + env(safe-area-inset-bottom));
  display: grid;
  align-items: start;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 7px 6px env(safe-area-inset-bottom);
  border-top: 1px solid var(--line);
  background: rgba(6, 8, 14, 0.94);
  backdrop-filter: blur(20px);
}
.nav-button { min-width: 0; min-height: 56px; display: grid; place-items: center; gap: 3px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 9px; }
.nav-button svg { width: 19px; height: 19px; }
.nav-button.is-active { color: var(--cyan); font-weight: 820; background: rgba(103, 232, 249, 0.07); }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; align-items: end; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2, 3, 7, 0.78); backdrop-filter: blur(4px); }
.modal-sheet { position: relative; width: 100%; max-height: 88vh; overflow-y: auto; padding: 18px; border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 8px 8px 0 0; background: #0b1019; box-shadow: var(--shadow); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-body { display: grid; gap: 12px; }
.modal-body img { width: min(100%, 320px); aspect-ratio: 1; object-fit: contain; margin: 0 auto; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.modal-form { display: grid; gap: 11px; }
.modal-form label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 750; }
.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 200; width: min(calc(100% - 28px), 440px); transform: translateX(-50%); padding: 13px 15px; border: 1px solid #31566a; border-radius: 7px; color: var(--text); background: #0e1d28; box-shadow: var(--shadow); font-size: 13px; font-weight: 680; }
.toast.is-error { border-color: #6c3b46; background: #2a151b; }
.legal-footer { width: min(100%, 1120px); margin: 0 auto; padding: 18px 15px calc(92px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted-2); font-size: 11px; }
.legal-footer, .legal-footer nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.legal-footer a { color: var(--muted); text-decoration: none; }
.legal-footer a:hover { color: var(--cyan); }

@media (min-width: 520px) {
  .connection-chip { display: flex; }
  .tariffs-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .app-shell { display: grid; grid-template-columns: 246px minmax(0, 1fr); }
  .sidebar {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px 14px;
    position: sticky;
    top: 0;
    border-right: 1px solid var(--line);
    background: rgba(6, 8, 14, 0.94);
    backdrop-filter: blur(20px);
  }
  .brand-row { display: flex; align-items: center; gap: 11px; padding: 0 7px 22px; border-bottom: 1px solid var(--line); }
  .brand-row strong, .brand-row span, .sidebar-user strong, .sidebar-user span { display: block; }
  .brand-row span, .sidebar-user span { margin-top: 3px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
  .side-nav { display: grid; gap: 5px; padding-top: 18px; }
  .side-nav .nav-button { min-height: 44px; display: flex; justify-content: flex-start; gap: 11px; padding: 0 12px; border: 1px solid transparent; border-radius: 7px; font-size: 12px; }
  .side-nav .nav-button.is-active { border-color: #294d61; background: #0c1b25; }
  .sidebar-user { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 15px 8px 0; border-top: 1px solid var(--line); }
  .avatar { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #315b70; border-radius: 50%; color: var(--cyan); background: #0c1d28; font-weight: 800; }
  .workspace { padding-bottom: 0; }
  .topbar { padding-inline: 30px; }
  main { padding: 22px 28px 58px; }
  .command-deck { grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr); }
  .balance-band, .subscription-card { height: 100%; }
  .tariffs-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .support-layout { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; }
  .bottom-nav { display: none; }
  .checkout-bar { bottom: 18px; }
  .metrics-grid { grid-template-columns: repeat(4, 1fr); }
  .modal { align-items: center; justify-items: center; }
  .modal-sheet { width: min(540px, calc(100% - 40px)); border: 1px solid var(--line-strong); border-radius: 8px; }
  .toast { bottom: 28px; }
  .legal-footer { padding: 18px 28px 32px; }
}

@media (max-width: 430px) {
  .balance-band { grid-template-columns: 1fr; min-height: 190px; }
  .balance-band .button { grid-column: 1; grid-row: auto; width: 100%; }
  .subscription-actions { grid-template-columns: 1fr; }
  .subscription-empty-actions { display: grid; }
  .home-insights { grid-template-columns: 1fr 1fr; }
  .home-insights > div:last-child { grid-column: 1 / -1; }
  .referral-summary { grid-template-columns: 1fr 1fr; }
  .referral-summary > div:last-child { grid-column: 1 / -1; }
  .checkout-bar { align-items: stretch; flex-direction: column; }
  .checkout-bar .button { width: 100%; }
  .inline-form { grid-template-columns: 1fr; }
  .tariff-row { grid-template-columns: 34px minmax(0, 1fr) auto; padding-inline: 10px; }
  .row-value { font-size: 12px; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .form-footer .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
