/* ============================================================
   KDTCKRA | Official H5 Fintech Super-App Architecture
   Palette: Sovereign Emerald-Slate, Obsidian Vault, Frosted Platinum
   Typography: IBM Plex Sans / Public Sans / IBM Plex Mono
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --canvas-top: #10313A;
  --canvas-mid: #1D4E5B;
  --canvas-low: #8FB2BC;
  --canvas-bot: #DAE7EB;
  --recessed-card: rgba(9, 31, 37, 0.48);
  --recessed-border: rgba(255, 255, 255, 0.22);
  --vault-bg: linear-gradient(135deg, #0D1626 0%, #182742 100%);
  --vault-border: rgba(224, 199, 146, 0.28);
  --vault-accent: #E6C885;
  --surface: #EAF2F4;
  --surface-strong: #F4F9FA;
  --surface-inset: #DCE8EC;
  --text: #0A1D22;
  --muted: #3A5259;
  --border: rgba(15, 46, 54, 0.14);
  --border-strong: rgba(15, 46, 54, 0.28);
  --primary: #123C47;
  --primary-hover: #194F5D;
  --primary-ink: #FFFFFF;
  --diamond-grad: linear-gradient(135deg, #1F5B69 0%, #0E313A 100%);
  --diamond-shadow: 0 6px 14px rgba(10, 33, 39, 0.26);
  --accent: #0F4C5C;
  --positive: #0C6B37;
  --positive-bg: #D9F2E3;
  --warning: #854D0E;
  --warning-bg: #FEF3C7;
  --danger: #991B1B;
  --danger-bg: #FEE2E2;
  --dock-bg: #FFFFFF;
  --dock-pill: #D5E6EB;
  --dock-active: #0E353F;
  --dock-muted: #526970;
  --shadow-card: 0 8px 22px -6px rgba(9, 30, 36, 0.18);
  --font-display: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html[data-theme="dark"] {
  --canvas-top: #070D17;
  --canvas-mid: #0E192D;
  --canvas-low: #13223B;
  --canvas-bot: #172844;
  --recessed-card: rgba(6, 11, 22, 0.62);
  --recessed-border: rgba(148, 163, 184, 0.2);
  --vault-bg: linear-gradient(135deg, #0D2930 0%, #153F4A 100%);
  --vault-border: rgba(125, 211, 252, 0.25);
  --vault-accent: #7DD3FC;
  --surface: #142036;
  --surface-strong: #192742;
  --surface-inset: #0F1829;
  --text: #F1F5F9;
  --muted: #94A3B8;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.3);
  --primary: #1E5B6B;
  --primary-hover: #256F82;
  --primary-ink: #FFFFFF;
  --diamond-grad: linear-gradient(135deg, #236B7D 0%, #13414D 100%);
  --diamond-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  --accent: #38BDF8;
  --positive: #34D399;
  --positive-bg: rgba(16, 185, 129, 0.16);
  --warning: #FBBF24;
  --warning-bg: rgba(245, 158, 11, 0.16);
  --danger: #F87171;
  --danger-bg: rgba(239, 68, 68, 0.16);
  --dock-bg: #0D1626;
  --dock-pill: #1A2C49;
  --dock-active: #7DD3FC;
  --dock-muted: #94A3B8;
  --shadow-card: 0 10px 26px -8px rgba(0, 0, 0, 0.5);
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  min-height: 100vh;
  background: linear-gradient(
    180deg,
    var(--canvas-top) 0%,
    var(--canvas-mid) 32%,
    var(--canvas-low) 70%,
    var(--canvas-bot) 100%
  );
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Base interaction affordances (R-39) */
a[href],
button,
summary,
select,
label[for],
input[type="checkbox"],
input[type="radio"],
[role="button"],
[role="tab"],
[role="switch"] {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
}

:focus-visible {
  outline: 2px solid var(--vault-accent);
  outline-offset: 2px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

::selection {
  background: var(--primary);
  color: var(--primary-ink);
}

/* ---------- utilities ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mt { margin-top: 12px; }
.hidden { display: none !important; }
.green { color: var(--positive); }
.red { color: var(--danger); }
.mono-text { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.col { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

/* ---------- H5 app shell ---------- */
.shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.content {
  flex: 1;
  padding: 12px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.loading {
  text-align: center;
  padding: 64px 16px;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  background: var(--recessed-card);
  border: 1px solid var(--recessed-border);
  border-radius: 16px;
}

.empty-state,
.folder-empty {
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
}

/* ---------- H5 topbar (Screenshot 2 header) ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(16, 49, 58, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

html[data-theme="dark"] .topbar {
  background: rgba(7, 13, 23, 0.88);
}

.topbar-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.topbar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.topbar-icon-btn svg {
  width: 20px;
  height: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0D1626 0%, #1F4E5B 100%);
  border: 1.5px solid rgba(230, 200, 133, 0.55);
  color: var(--vault-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo svg {
  width: 19px;
  height: 19px;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.01em;
  color: #FFFFFF;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 13px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.15s ease;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.26);
}

.lang-toggle .globe-ic {
  width: 17px;
  height: 17px;
}

.lang-toggle .caret-ic {
  width: 13px;
  height: 13px;
  opacity: 0.85;
}

/* ---------- 5-Tab Bottom Dock (Screenshot 1 & 2) ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--dock-bg);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -6px 24px rgba(8, 25, 30, 0.16);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  z-index: 30;
  border-top: 1px solid var(--border);
}

.bottom-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  color: var(--dock-muted);
  text-decoration: none;
}

.nav-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  max-width: 68px;
  padding: 7px 6px;
  border-radius: 14px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.bottom-nav a.active .nav-pill {
  background: var(--dock-pill);
  color: var(--dock-active);
}

.nav-ic {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-ic svg {
  width: 22px;
  height: 22px;
}

.nav-lbl {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.1;
}

.app-footer,
.auth-foot {
  padding: 12px 16px 96px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* ---------- Top Dual-Metric Vault Banner (Screenshot 1 top card) ---------- */
.vault-banner {
  position: relative;
  overflow: hidden;
  background: var(--vault-bg);
  border: 1px solid var(--vault-border);
  border-radius: 18px;
  padding: 22px 18px;
  color: #FFFFFF;
  box-shadow: 0 14px 28px -10px rgba(7, 15, 28, 0.45);
}

.vault-watermark {
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 124px;
  height: 124px;
  color: var(--vault-accent);
  opacity: 0.16;
  pointer-events: none;
}

.vault-dual {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  text-align: center;
}

.vault-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.bc-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.bc-amount {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.bc-amount.secondary {
  color: var(--vault-accent);
}

.vault-meta-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.level-chip {
  display: inline-block;
  background: rgba(230, 200, 133, 0.18);
  border: 1px solid rgba(230, 200, 133, 0.45);
  color: var(--vault-accent);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  padding: 3px 11px;
  border-radius: 8px;
}

.bc-daily {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #6EE7B7;
  font-weight: 600;
}

/* ---------- Top Recessed Counter Card (Screenshot 2 top card) ---------- */
.tasks-summary-card {
  background: var(--recessed-card);
  border: 1px solid var(--recessed-border);
  border-radius: 18px;
  padding: 20px 16px;
  color: #FFFFFF;
}

.tasks-counter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  text-align: center;
  align-items: center;
}

.tasks-counter-grid.three-col {
  grid-template-columns: repeat(3, 1fr);
}

.tasks-counter-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tasks-counter-label {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  line-height: 1.3;
}

.tasks-counter-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
}

/* ---------- 2x2 Action Tile Grid with Rotated Diamond Badges (Screenshot 1) ---------- */
.action-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.action-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 14px;
  padding: 16px 14px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  box-shadow: var(--shadow-card);
  transition: transform 0.12s ease, background-color 0.15s ease;
}

html[data-theme="dark"] .action-tile {
  border-color: var(--border-strong);
}

.action-tile:hover {
  background: var(--surface-strong);
  transform: translateY(-1px);
}

.diamond-badge {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--diamond-grad);
  box-shadow: var(--diamond-shadow);
  transform: rotate(45deg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 4px;
}

.diamond-ic {
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.diamond-ic svg {
  width: 21px;
  height: 21px;
}

.action-tile-label {
  line-height: 1.25;
}

/* ---------- Folder-Tabbed Container (Screenshot 2 folder card) ---------- */
.folder-card {
  background: var(--recessed-card);
  border: 1px solid var(--recessed-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.folder-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.folder-tab {
  min-height: 48px;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.folder-tab.active {
  background: var(--surface);
  color: var(--text);
  border-radius: 16px 16px 0 0;
}

.folder-body {
  background: var(--surface);
  padding: 18px 16px;
  min-height: 200px;
  border-radius: 0 0 17px 17px;
}

/* ---------- Menu List Rows with Chevron (Screenshot 1 lower list) ---------- */
.menu-list {
  display: flex;
  flex-direction: column;
  background: rgba(234, 242, 244, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  padding: 4px 14px;
  box-shadow: var(--shadow-card);
}

html[data-theme="dark"] .menu-list {
  background: var(--surface);
  border-color: var(--border-strong);
}

.menu-row {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  text-align: left;
}

.menu-row:last-child {
  border-bottom: none;
}

.menu-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-ic-box {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

html[data-theme="dark"] .menu-ic-box {
  color: var(--vault-accent);
}

.menu-ic-box svg {
  width: 19px;
  height: 19px;
}

.menu-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.menu-row-meta {
  font-size: 13px;
  font-weight: 500;
}

.menu-chevron {
  display: flex;
  align-items: center;
  color: var(--text);
}

.menu-chevron svg {
  width: 18px;
  height: 18px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-card);
}

html[data-theme="dark"] .card {
  border-color: var(--border-strong);
}

.card.slim {
  padding: 13px 16px;
}

.card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.card-header-bar.no-margin {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.card-title,
.page-heading,
.ib-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.ib-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 12px;
  line-height: 1.5;
}

.spec-code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--surface-inset);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 6px;
}

html[data-theme="dark"] .spec-code {
  color: var(--vault-accent);
}

.card-action-link {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

html[data-theme="dark"] .card-action-link {
  color: var(--vault-accent);
}

/* ---------- Auth Hero & Trust Chips ---------- */
.auth-hero h1 {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.auth-hero h1 em {
  font-style: normal;
  color: var(--vault-accent);
  white-space: nowrap;
}

.auth-hero .tagline {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13.5px;
  line-height: 1.55;
  margin-bottom: 14px;
}

.trust-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 5px 10px;
  border-radius: 8px;
}

.trust-row.home .trust-chip {
  background: var(--recessed-card);
  border-color: var(--recessed-border);
}

.trust-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #6EE7B7;
  flex-shrink: 0;
}

.trust-chip.gold .dot {
  background: var(--vault-accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 11px 18px;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

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

.btn:disabled {
  opacity: 0.55;
}

.btn-gold {
  background: var(--primary);
  color: var(--primary-ink);
}

.btn-gold:not(:disabled):hover {
  background: var(--primary-hover);
}

.btn-light {
  background: var(--surface-strong);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-outline:not(:disabled):hover {
  background: var(--surface-inset);
}

.btn-red {
  background: var(--danger);
  color: #FFFFFF;
}

.btn-grey {
  background: var(--surface-inset);
  color: var(--muted);
  border-color: var(--border);
}

.btn-block {
  width: 100%;
}

.btn-small {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 12px;
}

/* ---------- Form Fields ---------- */
.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-family: var(--font-display);
  font-size: 12.5px;
  color: var(--text);
  margin-bottom: 6px;
  font-weight: 600;
}

.field input,
.card input {
  width: 100%;
  min-height: 46px;
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  color: var(--text);
  padding: 11px 14px;
  font-size: 14.5px;
  font-family: var(--font-body);
  font-weight: 500;
  transition: border-color 0.15s ease;
}

.field input:focus,
.card input:focus {
  border-color: var(--primary);
}

.field input::placeholder,
.card input::placeholder {
  color: var(--muted);
  opacity: 0.72;
}

.field-note {
  margin-bottom: 12px;
}

input[type="number"] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.auth-switch {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.auth-switch a {
  font-weight: 700;
  text-decoration: underline;
}

.lang-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.lang-row.big {
  justify-content: flex-start;
  margin-top: 0;
}

.lang-btn {
  min-height: 44px;
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 12.5px;
  font-family: var(--font-body);
}

.lang-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
}

/* ---------- Stats Strip ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

html[data-theme="dark"] .stat {
  border-color: var(--border-strong);
}

.stat-v {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-l {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 600;
}

/* ---------- VIP Mini & VIP List ---------- */
.vip-mini-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.vip-mini {
  min-width: 104px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px;
  color: var(--text);
}

.vip-mini-name {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--primary);
  font-size: 13px;
}

html[data-theme="dark"] .vip-mini-name {
  color: var(--vault-accent);
}

.vip-mini-cost {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  margin: 4px 0;
}

.vip-mini-daily {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--positive);
  font-weight: 700;
}

.vip-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vip-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-card);
}

html[data-theme="dark"] .vip-card {
  border-color: var(--border-strong);
}

.vip-card.current {
  border: 2px solid var(--primary);
}

.vip-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.vip-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-mono);
}

.vip-rows {
  border-top: 1px solid var(--border);
  margin-bottom: 14px;
}

.vip-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.vip-row b {
  font-family: var(--font-mono);
  color: var(--text);
}

.vip-row b.green {
  color: var(--positive);
}

/* ---------- Platform Stats & Settlement Ticker ---------- */
.platform-stats {
  display: flex;
  flex-direction: column;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.kv-row:last-child {
  border-bottom: none;
}

.kv-row b {
  font-family: var(--font-mono);
  color: var(--text);
}

.ticker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.ticker-row .dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--positive);
  flex: none;
}

.ticker-row.empty-row .dot {
  background: var(--muted);
}

.ticker-amt {
  font-family: var(--font-mono);
  font-weight: 600;
  margin-left: auto;
}

.rules {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.7;
}

/* ---------- Lists, Addresses & Badges ---------- */
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}

.list-row:last-child {
  border-bottom: none;
}

.addr-box {
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
  color: var(--text);
  margin-bottom: 12px;
  text-align: center;
}

.addr-mini {
  word-break: break-all;
}

.fee-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
}

.fee-row span:nth-child(even) {
  color: var(--text);
  font-weight: 700;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--surface-inset);
  color: var(--muted);
}

.badge.ok {
  background: var(--positive-bg);
  color: var(--positive);
}

.badge.warn {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge.bad {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ---------- Admin ---------- */
.admin-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.admin-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
}

/* ---------- Toast ---------- */
#toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--primary);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  max-width: 90vw;
  box-shadow: var(--shadow-card);
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#toast.success {
  border-left-color: var(--positive);
}

#toast.error {
  border-left-color: var(--danger);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- language dropdown menu ---------- */
.lang-dd { position: relative; }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 172px;
  background: var(--surface-strong, #F4F9FA);
  border: 1px solid var(--border-strong, rgba(15, 46, 54, 0.28));
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 18px 40px -16px rgba(10, 29, 34, 0.45);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lang-menu.hidden { display: none; }
.lang-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #0A1D22);
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-opt:hover { background: var(--surface-inset, #DCE8EC); }
.lang-opt.active { background: var(--primary, #123C47); color: #F4F9FA; }
