:root {
  color-scheme: dark;
  --bg: #0d0f10;
  --panel: #141719;
  --surface: var(--panel);
  --surface-recessed: #181c1f;
  --surface-raised: #1a1e21;
  --line: #282d31;
  --line-subtle: rgba(255, 255, 255, 0.08);
  --line-strong: #373f45;
  --border: var(--line-subtle);
  --muted: #8f9aa3;
  --text: #eef2f4;
  --ink: var(--text);
  --green: #57d67a;
  --green-hover: #6fe28f;
  --green-dim: rgba(87, 214, 122, 0.14);
  --cyan: #51cce8;
  --cyan-dim: rgba(81, 204, 232, 0.14);
  --purple: #8b5cf6;
  --purple-dim: rgba(139, 92, 246, 0.16);
  --red: #ed6570;
  --red-dim: rgba(237, 101, 112, 0.14);
  --yellow: #ffd54f;
  --yellow-dim: rgba(255, 213, 79, 0.14);

  /* Semantic aliases unified with gex.qvatel.com */
  --accent: var(--green);
  --accent-hover: var(--green-hover);
  --accent-dim: var(--green-dim);
  --danger: var(--red);
  --danger-dim: var(--red-dim);
  --amber: var(--yellow);
  --amber-dim: var(--yellow-dim);
  --info: var(--cyan);
  --info-dim: var(--cyan-dim);
  --vip: var(--purple);
  --vip-dim: var(--purple-dim);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --focus-ring: 0 0 0 3px rgba(81, 204, 232, 0.22);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --shadow-popover: 0 16px 40px rgba(0, 0, 0, 0.68), 0 0 0 1px rgba(255, 255, 255, 0.1);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 140ms ease;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, p {
  margin: 0;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

:is(button, input, select, textarea, a, summary):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* Top Navigation Bar */
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.topbar-inner {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--cyan);
  flex-shrink: 0;
}

.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-flow {
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  color: var(--cyan);
  text-transform: uppercase;
}

.brand-badge {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(87, 214, 122, 0.4);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.user-pill {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-recessed);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 150ms ease, opacity 150ms ease;
  text-decoration: none;
}

.btn:hover:not(:disabled) {
  border-color: rgba(81, 204, 232, 0.55);
  background: var(--surface-raised);
  text-decoration: none;
}

.btn:active:not(:disabled) {
  transform: translateY(0.5px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #08150c;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(87, 214, 122, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.btn-danger {
  color: var(--danger);
  border-color: rgba(237, 101, 112, 0.38);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger-dim);
  border-color: var(--danger);
}

.btn-amber {
  background: rgba(255, 213, 79, 0.14);
  border-color: rgba(255, 213, 79, 0.45);
  color: #ffe38a;
  font-weight: 650;
}

.btn-amber:hover:not(:disabled) {
  background: rgba(255, 213, 79, 0.24);
  border-color: var(--yellow);
  color: #fff3c4;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
  min-height: 34px;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
}

.btn-ghost:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-sm {
  min-height: 30px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  border-radius: 6px;
}

.btn-block {
  width: 100%;
}

/* Layout containers */
.page-center {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: calc(100vh - 61px);
  display: grid;
  place-items: center;
  padding: 2.5rem 1rem 3rem;
}

.page-center::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 10%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 10%, transparent 80%);
  pointer-events: none;
  z-index: -2;
}

.page-center::after {
  content: "";
  position: absolute;
  top: -110px;
  left: 50%;
  width: min(760px, 120vw);
  height: 360px;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at 38% 45%, rgba(81, 204, 232, 0.11) 0%, transparent 62%),
    radial-gradient(ellipse at 65% 40%, rgba(87, 214, 122, 0.09) 0%, transparent 62%);
  filter: blur(28px);
  pointer-events: none;
  z-index: -1;
}

.container {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3.5rem;
}

.container-narrow {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.25rem 0 3.5rem;
}

/* Cards */
.card {
  background: var(--panel);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius);
  padding: 1.65rem;
  box-shadow: var(--shadow-card);
}

.auth-card {
  width: min(444px, 100%);
  padding: 2rem 1.9rem 1.75rem;
  border-color: rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(24, 28, 31, 0.72) 0%, var(--panel) 32%);
}

.auth-card .form-stack {
  animation: fadeUp 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.card-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.4rem;
}

/* Tabs */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.3rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 1.4rem;
}

.tab-btn {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.tab-btn:hover:not([aria-selected="true"]) {
  color: var(--ink);
}

.tab-btn[aria-selected="true"] {
  background: var(--surface-recessed);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Form controls */
.form-stack {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 500;
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.78rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.field input:hover:not([readonly]):not(:focus),
.field select:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.2);
}

.field input:focus,
.field select:focus {
  border-color: var(--cyan);
  outline: none;
  box-shadow: var(--focus-ring);
}

.field-hint {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Alerts & Banners */
.alert {
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.alert-error {
  border-color: rgba(237, 101, 112, 0.45);
  background: var(--danger-dim);
  color: #ffc5ca;
}

.alert-success {
  border-color: rgba(87, 214, 122, 0.45);
  background: var(--accent-dim);
  color: #bbf3ca;
}

.alert-warn {
  border-color: rgba(255, 213, 79, 0.42);
  background: var(--amber-dim);
  color: #ffeaab;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
  color: var(--muted);
  white-space: nowrap;
}

.badge-active {
  color: var(--green);
  background: var(--green-dim);
  border-color: rgba(87, 214, 122, 0.38);
}

.badge-vip {
  color: #c4b5fd;
  background: var(--purple-dim);
  border-color: rgba(139, 92, 246, 0.45);
}

.badge-info {
  color: var(--cyan);
  background: var(--cyan-dim);
  border-color: rgba(81, 204, 232, 0.42);
}

.badge-warn {
  color: var(--yellow);
  background: var(--yellow-dim);
  border-color: rgba(255, 213, 79, 0.4);
}

.badge-danger {
  color: var(--red);
  background: var(--red-dim);
  border-color: rgba(237, 101, 112, 0.42);
}

/* Billing Plan Card */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.plan-card {
  display: grid;
  gap: 1.25rem;
  border: 1px solid rgba(87, 214, 122, 0.35);
  background: linear-gradient(180deg, rgba(87, 214, 122, 0.05) 0%, var(--surface) 45%);
}

.plan-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.plan-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  color: #d1dadf;
  font-size: 0.92rem;
}

.feature-list li::before {
  content: "\2713";
  color: var(--accent);
  font-weight: 800;
  margin-right: 0.6rem;
}

.plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.4rem;
}

/* Admin Dashboard */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
}

.kpi-card {
  background: var(--panel);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-card);
  transition: border-color 150ms ease, background-color 150ms ease;
}

.kpi-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.kpi-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin-top: 0.3rem;
  font-variant-numeric: tabular-nums;
}

.kpi-value.accent {
  color: var(--green);
}

.kpi-value.info {
  color: var(--cyan);
}

.kpi-value.vip {
  color: #c4b5fd;
}

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.search-input {
  min-width: 240px;
  min-height: 36px;
  padding: 0.4rem 0.78rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.88rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.search-input:focus {
  border-color: var(--cyan);
  outline: none;
  box-shadow: var(--focus-ring);
}

.table-card {
  background: var(--panel);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 0.72rem 0.95rem;
  border-bottom: 1px solid var(--line-subtle);
  white-space: nowrap;
  vertical-align: middle;
}

th {
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

tbody tr {
  transition: background-color 120ms ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.024);
}

tr:last-child td {
  border-bottom: 0;
}

.action-group {
  display: inline-flex;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.82rem;
}

.muted {
  color: var(--muted);
}

.footer-note {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.legal-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 1.15rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.legal-footer a {
  color: var(--muted);
}

.legal-footer a:hover {
  color: var(--cyan);
  text-decoration: none;
}

/* Legal Pages */
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.legal-tab {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}

.legal-tab:hover {
  color: var(--ink);
  border-color: var(--accent);
  text-decoration: none;
}

.legal-tab[aria-current="page"] {
  background: var(--accent-dim);
  border-color: rgba(87, 214, 122, 0.5);
  color: var(--accent);
}

.legal-doc {
  display: grid;
  gap: 1.35rem;
}

.legal-doc h1 {
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.legal-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.legal-section {
  display: grid;
  gap: 0.45rem;
}

.legal-section h2 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
}

.legal-section p,
.legal-section li {
  color: #cfd8de;
  font-size: 0.92rem;
  line-height: 1.62;
}

.legal-section ul {
  margin: 0.2rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.35rem;
}

.legal-callout {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 213, 79, 0.38);
  border-left: 3px solid var(--yellow);
  background: linear-gradient(90deg, rgba(255, 213, 79, 0.11) 0%, var(--surface-recessed) 100%);
  color: #ffeaab;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Commercial Homepage (Landing) */
.topbar-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(20, 23, 25, 0.9);
  backdrop-filter: blur(10px);
}

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 1.35rem;
}

.nav-link {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 140ms ease;
}

.nav-link:hover {
  color: var(--ink);
  text-decoration: none;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(87, 214, 122, 0.12) 0%, rgba(87, 214, 122, 0) 70%),
    var(--bg);
}

.hero {
  width: min(1040px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5rem 0 4.5rem;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 1.4rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(87, 214, 122, 0.35);
}

.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-title {
  max-width: 840px;
  font-size: clamp(2.05rem, 4.5vw, 3.35rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 15%, #cfdbe3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  max-width: 660px;
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  color: var(--muted);
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.btn-lg {
  min-height: 46px;
  padding: 0.65rem 1.45rem;
  font-size: 0.96rem;
}

.hero-highlights {
  width: 100%;
  max-width: 880px;
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.95rem;
}

.hero-stat {
  background: linear-gradient(180deg, rgba(24, 28, 31, 0.9) 0%, var(--panel) 100%);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius);
  padding: 1.05rem 1.2rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  box-shadow: var(--shadow-card);
}

.hero-stat-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.hero-stat-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.landing-section {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4rem 0;
}

.landing-section-border {
  border-top: 1px solid var(--line);
}

.section-header {
  max-width: 680px;
  margin: 0 auto 2.5rem;
  text-align: center;
  display: grid;
  gap: 0.65rem;
}

.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.section-title {
  font-size: clamp(1.5rem, 2.8vw, 2.05rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.section-subtitle {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.58;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.65rem;
  display: grid;
  gap: 0.75rem;
  align-content: start;
  transition: border-color 160ms ease, transform 160ms ease;
}

.feature-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-dim);
  border: 1px solid rgba(87, 214, 122, 0.32);
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
}

.pricing-wrap {
  width: min(560px, 100%);
  margin: 0 auto;
}

.pricing-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.pricing-amount {
  font-size: 2.55rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.pricing-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}

.pricing-note {
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

.faq-list {
  width: min(820px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 0.85rem;
}

.faq-item {
  background: var(--panel);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius);
  padding: 1.1rem 1.35rem;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.faq-item:hover {
  border-color: var(--line-strong);
}

.faq-item[open] {
  border-color: rgba(81, 204, 232, 0.34);
  background: linear-gradient(180deg, rgba(81, 204, 232, 0.04) 0%, var(--panel) 48%);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 0.98rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.62;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 2rem 0 2.5rem;
}

.site-footer-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  gap: 0.85rem;
  justify-items: center;
  text-align: center;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.35rem;
  font-size: 0.86rem;
}

.site-footer-links a {
  color: var(--muted);
}

.site-footer-links a:hover {
  color: var(--cyan);
  text-decoration: none;
}

.site-footer-disclaimer {
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 720px;
}

/* Account & Billing Dashboard */
.account-stack {
  display: grid;
  gap: 1.35rem;
}

.account-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.account-heading {
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.account-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.card-header .card-title {
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}

.card-header .card-subtitle {
  margin-bottom: 0;
  font-size: 0.86rem;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field input[readonly] {
  background: var(--surface-recessed);
  color: var(--muted);
  border-color: var(--line);
  cursor: default;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.2rem;
}

.account-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--line);
}

.sessions-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.session-cell-stack {
  display: grid;
  gap: 0.15rem;
}

.session-sub {
  font-size: 0.76rem;
  color: var(--muted);
}

.empty-state {
  padding: 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Institutional Fintech Animations & Animated Ticker Homepage */
@keyframes heroGlowDrift {
  0%, 100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 0.85;
  }
  50% {
    transform: translate(-47%, 12px) scale(1.07);
    opacity: 1;
  }
}

@keyframes pulseDot {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(87, 214, 122, 0.55);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(87, 214, 122, 0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tickerMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.hero-shell {
  isolation: isolate;
}

.hero-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 78% 72% at 50% 24%, #000 18%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse 78% 72% at 50% 24%, #000 18%, transparent 82%);
  pointer-events: none;
  z-index: -2;
}

.hero-shell::before {
  content: "";
  position: absolute;
  top: -130px;
  left: 50%;
  width: min(1040px, 145vw);
  height: 480px;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at 34% 38%, rgba(87, 214, 122, 0.16) 0%, rgba(87, 214, 122, 0) 64%),
    radial-gradient(ellipse at 68% 52%, rgba(81, 204, 232, 0.13) 0%, rgba(81, 204, 232, 0) 60%);
  filter: blur(26px);
  pointer-events: none;
  z-index: -1;
  animation: heroGlowDrift 14s ease-in-out infinite;
}

.hero-dot {
  animation: pulseDot 2.4s ease-in-out infinite;
}

.fade-up {
  animation: fadeUp 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fade-delay-1 { animation-delay: 80ms; }
.fade-delay-2 { animation-delay: 160ms; }
.fade-delay-3 { animation-delay: 240ms; }
.fade-delay-4 { animation-delay: 320ms; }

.feature-card:hover {
  border-color: rgba(87, 214, 122, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.hero-stat {
  transition: border-color 160ms ease, transform 160ms ease;
}

.hero-stat:hover {
  border-color: rgba(87, 214, 122, 0.35);
  transform: translateY(-2px);
}

/* Live Ticker Ribbon / Marquee */
.ticker-ribbon-shell {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 23, 25, 0.95) 0%, rgba(13, 15, 16, 0.98) 100%);
  overflow: hidden;
  position: relative;
}

.ticker-ribbon-shell::before,
.ticker-ribbon-shell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
  pointer-events: none;
  z-index: 2;
}

.ticker-ribbon-shell::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}

.ticker-ribbon-shell::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), transparent);
}

.ticker-marquee {
  display: flex;
  width: max-content;
  animation: tickerMarquee 32s linear infinite;
  padding: 0.72rem 0;
}

.ticker-ribbon-shell:hover .ticker-marquee,
.ticker-ribbon-shell:focus-within .ticker-marquee {
  animation-play-state: paused;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-right: 0.85rem;
}

.ticker-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.34rem 0.82rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.ticker-chip:hover,
.ticker-chip.is-selected {
  border-color: rgba(87, 214, 122, 0.55);
  background: var(--accent-dim);
  transform: translateY(-1px);
}

.ticker-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.ticker-chip-sym {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.ticker-chip-tag {
  color: var(--muted);
  font-size: 0.75rem;
}

/* Interactive Ticker Cards */
.tickers-header-meta {
  display: flex;
  justify-content: center;
  margin-top: 0.35rem;
}

.roadmap-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.34rem 0.9rem;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(81, 204, 232, 0.38);
}

.tickers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 1rem;
}

.ticker-card {
  appearance: none;
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  min-height: 124px;
  text-align: left;
  background: linear-gradient(180deg, rgba(24, 28, 31, 0.65) 0%, var(--panel) 100%);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.ticker-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(81, 204, 232, 0.5), transparent);
  opacity: 0;
  transition: opacity 160ms ease;
}

.ticker-card:hover {
  border-color: rgba(81, 204, 232, 0.48);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

.ticker-card:hover::before {
  opacity: 1;
}

.ticker-card.is-selected {
  border-color: rgba(87, 214, 122, 0.6);
  background:
    radial-gradient(85% 90% at 100% 0%, rgba(87, 214, 122, 0.12) 0%, rgba(87, 214, 122, 0) 68%),
    var(--panel);
  box-shadow: 0 0 0 1px rgba(87, 214, 122, 0.25), 0 10px 26px rgba(0, 0, 0, 0.3);
}

.ticker-card.is-selected::before {
  background: linear-gradient(90deg, var(--green), var(--cyan));
  opacity: 1;
}

.ticker-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ticker-card-sym {
  font-size: 1.24rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  color: var(--ink);
}

.ticker-card-name {
  font-size: 0.89rem;
  font-weight: 600;
  color: #d6dfe5;
}

.ticker-card-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: auto;
}

.ticker-detail-bar {
  margin-top: 1.25rem;
  padding: 1.05rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-subtle);
  border-left: 3px solid var(--green);
  background: var(--surface-recessed);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.ticker-detail-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.ticker-detail-sym {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent);
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  background: var(--accent-dim);
  border: 1px solid rgba(87, 214, 122, 0.35);
}

.ticker-detail-text {
  font-size: 0.9rem;
  color: #d7e0e6;
}

/* Private Invitation Access Section */
.invite-wrap {
  width: min(760px, 100%);
  margin: 0 auto;
}

.invite-card {
  display: grid;
  gap: 1.4rem;
  padding: 1.85rem;
  border: 1px solid rgba(87, 214, 122, 0.36);
  background:
    radial-gradient(70% 75% at 100% 0%, rgba(139, 92, 246, 0.1) 0%, transparent 65%),
    radial-gradient(65% 70% at 0% 0%, rgba(87, 214, 122, 0.09) 0%, transparent 62%),
    var(--panel);
}

.invite-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.9rem;
}

.invite-step {
  padding: 1rem 1.05rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-subtle);
  background: var(--surface-recessed);
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.invite-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
  padding-top: 0.45rem;
}

.invite-cta-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.invite-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.52rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--surface-recessed);
  border: 1px solid rgba(81, 204, 232, 0.28);
  color: #cbeff8;
  font-size: 0.82rem;
  font-weight: 600;
}

.invite-status-icon {
  width: 15px;
  height: 15px;
  color: var(--cyan);
  flex-shrink: 0;
}

.invite-step-num {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.invite-step-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}

.invite-step-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Billing Cancellation Clarity */
.btn-cancel-manage {
  background: rgba(237, 101, 112, 0.1);
  border-color: rgba(237, 101, 112, 0.5);
  color: #ffd3d6;
  font-weight: 700;
}

.btn-cancel-manage:hover:not(:disabled) {
  background: rgba(237, 101, 112, 0.2);
  border-color: var(--danger);
  color: #fff;
}

.cancel-microcopy {
  padding: 0.82rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-subtle);
  background: var(--surface-recessed);
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.58;
}

/* Admin Command Center */
.kpi-grid-8 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 1.15rem 0 1.5rem;
}

.kpi-value.danger {
  color: var(--danger);
}

.kpi-value.amber {
  color: var(--amber);
}

.kpi-sub {
  margin-top: 0.25rem;
  font-size: 0.76rem;
  color: var(--muted);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 1.4rem;
}

.admin-tab {
  min-height: 38px;
  padding: 0.42rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-weight: 650;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.admin-tab:hover {
  color: var(--ink);
  background: var(--surface-raised);
}

.admin-tab[aria-selected="true"] {
  background: var(--accent-dim);
  border-color: rgba(87, 214, 122, 0.45);
  color: var(--accent);
}

.chart-card {
  background: var(--panel);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius);
  padding: 1.35rem 1.45rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-swatch-rev {
  background: var(--accent);
}

.legend-swatch-sig {
  background: var(--cyan);
}

.chart-bars-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  background: var(--surface-recessed);
  border: 1px solid var(--line-subtle);
  padding: 0.75rem 0.65rem 0.35rem;
}

.chart-bars {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: end;
  min-height: 184px;
  padding-top: 1.15rem;
  background-image: linear-gradient(to top, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 100% 34px;
  background-position: 0 18px;
}

.chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  height: 100%;
  justify-content: flex-end;
}

.chart-col-pair {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 132px;
  width: 100%;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

.chart-bar {
  width: 42%;
  max-width: 16px;
  min-height: 3px;
  border-radius: 4px 4px 0 0;
  transition: opacity 140ms ease, filter 140ms ease;
}

.chart-bar:hover {
  opacity: 0.9;
  filter: brightness(1.12);
}

.chart-bar-rev {
  background: linear-gradient(180deg, var(--green-hover), var(--green));
}

.chart-bar-sig {
  background: linear-gradient(180deg, #86e2f7, var(--cyan));
}

.chart-col-val {
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
}

.chart-col-date {
  font-size: 0.7rem;
  color: var(--muted);
  padding: 0.25rem 0 0.35rem;
}

.create-user-panel {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
  min-height: 42px;
}

.checkbox-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.95rem;
}

.filter-pill {
  min-height: 32px;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.filter-pill:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.filter-pill.is-active {
  background: var(--accent-dim);
  border-color: rgba(87, 214, 122, 0.5);
  color: var(--accent);
}

.user-cell-stack {
  display: grid;
  gap: 0.14rem;
}

.user-cell-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

.user-note-pill {
  display: inline-block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.73rem;
  color: #ffeaab;
  background: var(--amber-dim);
  border: 1px solid rgba(255, 213, 79, 0.35);
  border-radius: 4px;
  padding: 0.08rem 0.4rem;
  margin-top: 0.15rem;
}

.badge-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.action-group-wrap {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-width: 290px;
}

.alert-info {
  border-color: rgba(81, 204, 232, 0.45);
  background: var(--cyan-dim);
  color: #c7f2fb;
}

.admin-dialog {
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  width: min(480px, calc(100% - 2rem));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

.admin-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.dialog-card {
  padding: 1.45rem;
  display: grid;
  gap: 1rem;
}

.dialog-textarea {
  width: 100%;
  min-height: 110px;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  resize: vertical;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.dialog-textarea:focus {
  border-color: var(--cyan);
  outline: none;
  box-shadow: var(--focus-ring);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.input-inline-group {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.input-inline-group input {
  flex: 1;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-shell::before,
  .hero-dot,
  .fade-up,
  .ticker-marquee,
  .auth-card .form-stack,
  .row-menu-popover {
    animation: none !important;
  }
  .ticker-marquee {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }
  .ticker-track[aria-hidden="true"] {
    display: none;
  }
  .feature-card,
  .ticker-card,
  .hero-stat,
  .ticker-chip,
  .btn,
  .toggle-switch-thumb {
    transition: none;
  }
  .feature-card:hover,
  .ticker-card:hover,
  .hero-stat:hover,
  .ticker-chip:hover,
  .btn:hover {
    transform: none;
  }
}

@media (max-width: 960px) {
  .kpi-grid-8 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tickers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .invite-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .hero-highlights {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .chart-bars {
    min-width: 520px;
    gap: 0.28rem;
  }
}

@media (max-width: 600px) {
  .form-grid-2,
  .form-grid-3,
  .tickers-grid {
    grid-template-columns: 1fr;
  }
  .search-input {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 520px) {
  .card {
    padding: 1.3rem 1.15rem;
  }
  .auth-card {
    padding: 1.5rem 1.25rem 1.35rem;
  }
  .invite-card {
    padding: 1.35rem 1.15rem;
  }
  .hero {
    padding: 3.15rem 0 2.75rem;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .kpi-grid-8 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
  .kpi-grid-8 .kpi-card {
    padding: 0.85rem 0.9rem;
  }
  .kpi-grid-8 .kpi-value {
    font-size: 1.35rem;
  }
  .plan-actions,
  .invite-cta-buttons {
    flex-direction: column;
    width: 100%;
  }
  .plan-actions .btn,
  .hero-actions .btn,
  .invite-cta-buttons .btn {
    width: 100%;
  }
  .invite-status-pill {
    width: 100%;
    justify-content: center;
  }
  .chart-card {
    padding: 1.05rem 1rem;
  }
}


/* --- Unified Portal & Admin Sidebar Shell (Stripe / Linear / GEXState FLOW Standard) --- */

.admin-shell,
.portal-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg);
}

.admin-sidebar,
.portal-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.2rem 0.85rem;
  background: #101315;
  border-right: 1px solid var(--line-subtle);
  overflow-y: auto;
  z-index: 20;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.sidebar-brand:hover {
  text-decoration: none;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.65rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--line-subtle);
  min-width: 0;
}

.sidebar-profile-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.14rem;
}

.sidebar-profile-name {
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile-email {
  font-size: 0.74rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile-pill {
  margin-top: 0.25rem;
  align-self: flex-start;
}

.user-avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(81, 204, 232, 0.2), rgba(87, 214, 122, 0.16));
  border: 1px solid rgba(81, 204, 232, 0.32);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  text-transform: uppercase;
}

.user-avatar.avatar-vip {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(81, 204, 232, 0.16));
  border-color: rgba(139, 92, 246, 0.45);
  color: #ddd6fe;
}

.user-avatar.avatar-admin {
  background: linear-gradient(135deg, rgba(87, 214, 122, 0.24), rgba(81, 204, 232, 0.18));
  border-color: rgba(87, 214, 122, 0.45);
  color: var(--green);
}

.user-avatar.avatar-disabled {
  background: rgba(237, 101, 112, 0.12);
  border-color: rgba(237, 101, 112, 0.35);
  color: var(--red);
}

.sidebar-user {
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-subtle);
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
}

.sidebar-section-label {
  padding: 0.25rem 0.65rem 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.82;
}

.sidebar-nav .admin-tab,
.sidebar-nav .portal-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-height: 38px;
  padding: 0.55rem 0.75rem;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.sidebar-tab-label {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  min-width: 0;
}

.sidebar-nav .admin-tab:hover,
.sidebar-nav .portal-tab:hover {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.sidebar-nav .admin-tab:hover .nav-icon,
.sidebar-nav .portal-tab:hover .nav-icon {
  opacity: 1;
}

.sidebar-nav .admin-tab[aria-selected="true"],
.sidebar-nav .portal-tab[aria-selected="true"] {
  background: rgba(87, 214, 122, 0.1);
  border-color: rgba(87, 214, 122, 0.28);
  color: var(--green);
  font-weight: 600;
}

.sidebar-nav .admin-tab[aria-selected="true"] .nav-icon,
.sidebar-nav .portal-tab[aria-selected="true"] .nav-icon {
  color: var(--green);
  opacity: 1;
}

.sidebar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 0.1rem 0.44rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.sidebar-nav .admin-tab[aria-selected="true"] .sidebar-count,
.sidebar-nav .portal-tab[aria-selected="true"] .sidebar-count {
  background: rgba(87, 214, 122, 0.18);
  color: var(--green);
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line-subtle);
}

.sidebar-footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-ext-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.46rem 0.7rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  transition: background-color 140ms ease, color 140ms ease;
}

.sidebar-ext-link:hover {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  text-decoration: none;
}

.sidebar-ext-link.is-highlight {
  color: var(--cyan);
}

.sidebar-ext-link.is-highlight:hover {
  background: var(--cyan-dim);
  color: #8ee3f6;
}

.sidebar-footer-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.sidebar-footer-actions .btn {
  flex: 1 1 auto;
  justify-content: center;
}

.sidebar-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  padding: 0.55rem 0.4rem 0;
  border-top: 1px solid var(--line-subtle);
  font-size: 0.72rem;
  color: var(--muted);
}

.sidebar-legal a {
  color: var(--muted);
}

.sidebar-legal a:hover {
  color: var(--cyan);
  text-decoration: none;
}

.admin-main,
.portal-main {
  padding: 1.75rem 2.1rem 3rem;
  min-width: 0;
  width: 100%;
  margin: 0 auto;
}

.admin-main {
  max-width: 1440px;
}

.portal-main {
  max-width: 880px;
}

.admin-main-header,
.portal-main-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line-subtle);
}

.admin-main-header h1,
.portal-main-header h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
}

.main-header-sub {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 0.2rem;
}

/* Context-Aware Membership Cards (/account) */
.plan-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 1.4rem;
  padding: 1.8rem;
  background: var(--panel);
  border: 1px solid var(--line-subtle);
  box-shadow: var(--shadow-card);
  transition: border-color 180ms ease;
}

.plan-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: transparent;
  pointer-events: none;
}

.plan-card--vip {
  border-color: rgba(139, 92, 246, 0.48);
  background:
    radial-gradient(68% 82% at 100% 0%, rgba(139, 92, 246, 0.18) 0%, rgba(139, 92, 246, 0) 68%),
    radial-gradient(50% 60% at 0% 0%, rgba(81, 204, 232, 0.09) 0%, rgba(81, 204, 232, 0) 65%),
    var(--panel);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.42), 0 12px 32px rgba(139, 92, 246, 0.1), inset 0 1px 0 rgba(196, 181, 253, 0.18);
}

.plan-card--vip::before {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.85), rgba(81, 204, 232, 0.55));
}

.plan-card--admin {
  border-color: rgba(81, 204, 232, 0.42);
  background:
    radial-gradient(65% 80% at 100% 0%, rgba(81, 204, 232, 0.14) 0%, rgba(81, 204, 232, 0) 68%),
    radial-gradient(50% 60% at 0% 0%, rgba(87, 214, 122, 0.08) 0%, rgba(87, 214, 122, 0) 65%),
    var(--panel);
}

.plan-card--admin::before {
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.plan-card--active {
  border-color: rgba(87, 214, 122, 0.42);
  background:
    radial-gradient(65% 78% at 100% 0%, rgba(87, 214, 122, 0.13) 0%, rgba(87, 214, 122, 0) 65%),
    var(--panel);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.42), 0 12px 32px rgba(87, 214, 122, 0.07), inset 0 1px 0 rgba(87, 214, 122, 0.16);
}

.plan-card--active::before {
  background: linear-gradient(90deg, var(--green), rgba(81, 204, 232, 0.45));
}

.plan-card--activate {
  border-color: rgba(87, 214, 122, 0.32);
  background:
    radial-gradient(58% 70% at 100% 0%, rgba(81, 204, 232, 0.07) 0%, transparent 65%),
    linear-gradient(180deg, rgba(87, 214, 122, 0.06) 0%, var(--panel) 48%);
}

.plan-card--activate::before {
  background: linear-gradient(90deg, rgba(87, 214, 122, 0.7), transparent);
}

.plan-card--warn {
  border-color: rgba(255, 213, 79, 0.46);
  background: linear-gradient(180deg, rgba(255, 213, 79, 0.08) 0%, var(--panel) 50%);
}

.plan-card--warn::before {
  background: linear-gradient(90deg, var(--yellow), rgba(237, 101, 112, 0.55));
}

.membership-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.membership-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.membership-title {
  font-size: 1.32rem;
  font-weight: 740;
  letter-spacing: -0.022em;
  color: var(--text);
}

.membership-desc {
  color: #c5cfd6;
  font-size: 0.93rem;
  line-height: 1.62;
  max-width: 62ch;
}

.membership-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.membership-meta-item {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-recessed);
  border: 1px solid var(--line-subtle);
  display: grid;
  gap: 0.24rem;
}

.plan-card--vip .membership-meta-item {
  border-color: rgba(139, 92, 246, 0.22);
}

.plan-card--active .membership-meta-item {
  border-color: rgba(87, 214, 122, 0.2);
}

.membership-meta-label {
  font-size: 0.71rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.membership-meta-val {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.btn-portal-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-weight: 600;
}

.btn-portal-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(237, 101, 112, 0.55);
  color: #ffd7da;
}

/* Admin Single-Line User Row & Sleek Action Menu */
.user-cell {
  display: flex;
  align-items: center;
  gap: 0.68rem;
  min-width: 0;
}

.user-cell-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.06rem;
}

.user-cell-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
}

.user-cell-secondary {
  font-size: 0.76rem;
  color: var(--muted);
}

.note-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.06rem 0.4rem;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 650;
  color: var(--yellow);
  background: var(--yellow-dim);
  border: 1px solid rgba(255, 213, 79, 0.32);
  cursor: help;
}

.ref-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-subtle);
  color: #c5cfd6;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.76rem;
}

.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}

.session-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.session-dot.is-idle {
  background: rgba(143, 154, 163, 0.35);
}

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.col-actions-head,
.col-actions-cell {
  text-align: right;
}

.btn-pay-compact {
  min-height: 29px;
  padding: 0.2rem 0.62rem;
  font-size: 0.76rem;
  font-weight: 650;
  border-radius: 7px;
  background: rgba(87, 214, 122, 0.14);
  border: 1px solid rgba(87, 214, 122, 0.42);
  color: var(--green);
}

.btn-pay-compact:hover:not(:disabled) {
  background: rgba(87, 214, 122, 0.24);
  border-color: var(--green);
  color: #b7f5c8;
}

.row-menu {
  position: relative;
  display: inline-block;
}

.row-menu-trigger {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 29px;
  padding: 0.2rem 0.62rem;
  border-radius: 7px;
  border: 1px solid var(--line-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: #cbd4db;
  font-size: 0.77rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.row-menu-trigger::-webkit-details-marker {
  display: none;
}

.row-menu-trigger:hover,
.row-menu[open] .row-menu-trigger {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-strong);
  color: var(--text);
}

@keyframes menuPop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.row-menu-popover {
  position: fixed;
  z-index: 200;
  min-width: 204px;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  padding: 0.38rem;
  border-radius: 10px;
  background: var(--surface-recessed);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: var(--shadow-popover);
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  text-align: left;
  animation: menuPop 130ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.row-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0.65rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 0.81rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.row-menu-item:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
}

.row-menu-item:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.row-menu-item.is-danger {
  color: var(--red);
}

.row-menu-item.is-danger:hover:not(:disabled) {
  background: rgba(237, 101, 112, 0.14);
  color: #ff9da5;
}

.row-menu-sep {
  height: 1px;
  margin: 0.25rem 0.35rem;
  background: var(--line-subtle);
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.72rem 1rem;
  border-top: 1px solid var(--line-subtle);
  background: rgba(255, 255, 255, 0.015);
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.pagination-select {
  padding: 0.3rem 0.55rem;
  border-radius: 7px;
  border: 1px solid var(--line-subtle);
  background: var(--bg);
  color: var(--text);
  font-size: 0.8rem;
}

@media (max-width: 960px) {
  .admin-shell,
  .portal-shell {
    grid-template-columns: 1fr;
  }
  .admin-sidebar,
  .portal-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line-subtle);
    padding: 0.9rem 1rem;
    gap: 0.75rem;
  }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .sidebar-nav .admin-tab,
  .sidebar-nav .portal-tab {
    width: auto;
    flex: 1 1 135px;
  }
  .sidebar-footer {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
  .sidebar-footer-links {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .admin-main,
  .portal-main {
    padding: 1.15rem 1rem 2.5rem;
  }
  .membership-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .sidebar-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
  }
  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }
  .sidebar-nav .admin-tab,
  .sidebar-nav .portal-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.45rem 0.7rem;
    font-size: 0.82rem;
  }
  .sidebar-footer-actions {
    width: 100%;
  }
  .setting-row {
    align-items: flex-start;
  }
  .setting-row-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .plan-card {
    padding: 1.35rem 1.15rem;
  }
}

/* Phase 2 Security Hardening UI Components */
.verify-banner {
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 213, 79, 0.38);
  border-left: 3px solid var(--yellow);
  background:
    radial-gradient(60% 100% at 0% 50%, rgba(255, 213, 79, 0.12) 0%, transparent 72%),
    var(--surface-recessed);
  color: #ffeaab;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.15rem;
}

.alert-banner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1.1rem;
  flex-wrap: wrap;
}

.alert-banner-lead {
  display: flex;
  align-items: flex-start;
  gap: 0.72rem;
  flex: 1 1 260px;
}

.alert-banner-icon {
  width: 20px;
  height: 20px;
  color: var(--yellow);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.alert-banner-text {
  display: grid;
  gap: 0.2rem;
}

.alert-banner-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff2c6;
}

.alert-banner-sub {
  font-size: 0.83rem;
  color: #ebd9a0;
  line-height: 1.48;
}

.auth-link-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -0.3rem;
}

.btn-link {
  background: transparent;
  border: 0;
  border-radius: 4px;
  padding: 0.18rem 0.25rem;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 140ms ease;
}

.btn-link:hover {
  color: #8ee3f6;
  text-decoration: underline;
}

.invite-only-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.82rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(81, 204, 232, 0.3);
  border-left: 3px solid var(--cyan);
  background:
    linear-gradient(90deg, rgba(81, 204, 232, 0.12) 0%, var(--surface-recessed) 100%);
  color: #cbeff8;
  font-size: 0.83rem;
  line-height: 1.5;
  margin-bottom: 1.2rem;
}

.invite-only-icon {
  width: 17px;
  height: 17px;
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 0.12rem;
}

.security-settings-grid {
  display: grid;
  gap: 1rem;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  flex-wrap: wrap;
  padding: 1.05rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-subtle);
  background: var(--surface-recessed);
  transition: border-color 150ms ease;
}

.setting-row:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.setting-row-info {
  display: grid;
  gap: 0.28rem;
  max-width: 680px;
  flex: 1 1 320px;
}

.setting-row-title {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.setting-row-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.setting-row-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

/* Institutional Toggle Switch (Admin Security Controls) */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.34rem 0.7rem 0.34rem 0.42rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.toggle-switch:hover:not(:disabled) {
  border-color: rgba(81, 204, 232, 0.5);
  background: var(--surface-raised);
}

.toggle-switch:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.toggle-switch-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #282d31;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 180ms ease, border-color 180ms ease;
  flex-shrink: 0;
}

.toggle-switch-thumb {
  position: absolute;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #cfd8de;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), background-color 180ms ease;
}

.toggle-switch[aria-checked="true"] .toggle-switch-track {
  background: rgba(87, 214, 122, 0.28);
  border-color: rgba(87, 214, 122, 0.65);
}

.toggle-switch[aria-checked="true"] .toggle-switch-thumb {
  transform: translateX(16px);
  background: var(--green);
}

.toggle-switch.is-warn[aria-checked="true"] .toggle-switch-track {
  background: rgba(255, 213, 79, 0.24);
  border-color: rgba(255, 213, 79, 0.65);
}

.toggle-switch.is-warn[aria-checked="true"] .toggle-switch-thumb {
  transform: translateX(16px);
  background: var(--yellow);
}

.toggle-switch-text {
  white-space: nowrap;
  color: #d6dfe5;
}

.db-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.db-health-item {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-subtle);
  background: var(--surface-recessed);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.35rem;
}

.db-health-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.db-health-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.db-health-val-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-icon-svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
