/* ═══════════════════════════════════════════════════════════════════════
   Neon Glass — the single source of truth for the look.
   Never hardcode these values in a page; use the tokens.
   Admin can override --accent-1 / --accent-2 from Platform Settings.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #06070d;
  --bg-elev: #0a0b13;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.125);

  --text: #f4f6fb;
  --text-dim: #95a0b6;
  --text-faint: #747e95;
  --label: #646c86;

  --accent-1: #7c8cff;
  --accent-1-lt: #8e9bff;
  --accent-1-soft: rgba(124, 140, 255, 0.12);
  --accent-1-line: rgba(124, 140, 255, 0.34);

  --accent-2: #00e0b4;
  --accent-2-dim: #2fd3ad;
  --accent-2-soft: rgba(0, 224, 180, 0.065);
  --accent-2-line: rgba(0, 224, 180, 0.26);

  --warn: #ffc454;
  --danger: #f48fbe;

  --grad: linear-gradient(118deg, var(--accent-1), var(--accent-2));
  --hairline: inset 0 1px 0 rgba(255, 255, 255, 0.055);

  --r-sm: 10px;
  --r-md: 13px;
  --r-lg: 17px;
  --r-xl: 19px;

  --nav-h: 76px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; letter-spacing: -0.03em; }

/* Money and counts: aligned figures, tight tracking */
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }

/* Page shell — phone-first, centred on larger screens */
.shell {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
}
.shell--wide { max-width: 1180px; }

.body-pad { padding: 14px 16px 0; flex: 1; }
.has-nav { padding-bottom: var(--nav-h); }

/* Ambient glow */
.glow { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }

/* Glass surfaces */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--hairline);
}
.glass-accent {
  background: linear-gradient(140deg, rgba(124, 140, 255, 0.17), rgba(0, 224, 180, 0.07));
  border: 1px solid rgba(124, 140, 255, 0.38);
  box-shadow: var(--hairline);
}
.glass-money {
  background: var(--accent-2-soft);
  border: 1px solid var(--accent-2-line);
  box-shadow: var(--hairline);
}
.card { border-radius: var(--r-lg); padding: 15px; }

/* Buttons — all ≥44px tall for touch */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 15px 26px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: -0.015em;
  cursor: pointer;
  border: none;
  transition: filter 0.15s ease, background 0.15s ease;
  width: 100%;
}
.btn-primary {
  background: var(--grad);
  color: var(--bg);
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(94, 110, 255, 0.28);
}
.btn-primary:hover { filter: brightness(1.07); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; filter: none; box-shadow: none; }
.btn-ghost {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-weight: 650;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn-danger {
  background: rgba(244, 143, 190, 0.14);
  border: 1px solid rgba(244, 143, 190, 0.42);
  color: #f8c3dc;
  font-weight: 800;
}
.btn-sm { min-height: 38px; padding: 10px 16px; font-size: 12.5px; width: auto; }

/* Icon-only button */
.icon-btn {
  width: 38px;
  height: 38px;
  min-height: 38px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c6cbe0;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.09); }

/* Forms */
.fld {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 650;
  font-family: inherit;
}
.fld:focus { outline: none; border-color: var(--accent-1-line); }
.fld::placeholder { color: var(--label); font-weight: 500; }
select.fld { appearance: none; background-image: none; }

.lbl {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: #8e98ae;
  margin-bottom: 5px;
}

.field { margin-bottom: 11px; }

/* Pills and badges */
.pill {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.07em;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill-teal { background: rgba(0, 224, 180, 0.14); color: var(--accent-2-dim); }
.pill-indigo { background: rgba(124, 140, 255, 0.16); color: #9aa6ff; }
.pill-pink { background: rgba(244, 114, 182, 0.15); color: var(--danger); }
.pill-purple { background: rgba(168, 85, 247, 0.13); color: #bd90ef; }
.pill-warn { background: rgba(255, 196, 84, 0.14); color: var(--warn); }
.pill-mute { background: rgba(255, 255, 255, 0.06); color: var(--text-faint); }

/* Sticky chrome */
.chrome-top {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(16px);
  background: rgba(6, 7, 13, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  padding: 8px 8px 20px;
  backdrop-filter: blur(16px);
  background: rgba(10, 11, 19, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.065);
}
.bottom-nav a {
  flex: 1;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 12px;
  color: #656d85;
  font-size: 9px;
  font-weight: 600;
}
.bottom-nav a.active { color: var(--accent-1-lt); font-weight: 800; }

/* Sticky action bar above the nav */
.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  gap: 9px;
  padding: 13px 16px 20px;
  backdrop-filter: blur(16px);
  background: rgba(10, 11, 19, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.065);
  margin: 0 -16px;
}

/* Alerts */
.alert {
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 12px;
}
.alert-error { background: rgba(244, 143, 190, 0.09); border: 1px solid rgba(244, 143, 190, 0.3); color: #f8c3dc; }
.alert-ok { background: rgba(0, 224, 180, 0.08); border: 1px solid var(--accent-2-line); color: #9fe6d2; }
.alert-warn { background: rgba(255, 196, 84, 0.09); border: 1px solid rgba(255, 196, 84, 0.3); color: #f0d49a; }

/* Progress */
.bar { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.075); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--grad); }

.steps { display: flex; gap: 3.5px; }
.steps > i { flex: 1; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); }
.steps > i.on { background: var(--grad); }

/* Layout helpers */
.row { display: flex; align-items: center; gap: 11px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 11px; }
.col { display: flex; flex-direction: column; }
.gap-7 { gap: 7px; } .gap-9 { gap: 9px; } .gap-11 { gap: 11px; } .gap-14 { gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.flex-1 { flex: 1; min-width: 0; }
.mt-auto { margin-top: auto; }

/* Type scale */
.t-hero { font-size: 36px; line-height: 1.06; font-weight: 900; letter-spacing: -0.035em; }
.t-h1 { font-size: 27px; font-weight: 900; letter-spacing: -0.034em; line-height: 1.12; }
.t-h2 { font-size: 19.5px; font-weight: 850; letter-spacing: -0.03em; }
.t-h3 { font-size: 15.5px; font-weight: 850; letter-spacing: -0.025em; }
.t-body { font-size: 13.5px; line-height: 1.6; color: var(--text-dim); }
.t-small { font-size: 11.5px; color: var(--text-faint); }
.t-label { font-size: 9px; font-weight: 900; letter-spacing: 0.14em; color: var(--label); }
.t-money { font-size: 33px; font-weight: 900; letter-spacing: -0.04em; }
.t-teal { color: var(--accent-2); }
.t-indigo { color: var(--accent-1-lt); }
.t-dim { color: var(--text-dim); }
.t-faint { color: var(--text-faint); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Model logo slot — renders the admin upload, or a neutral fallback mark */
.logo-slot {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.logo-slot img { width: 20px; height: 20px; object-fit: contain; }

/* Horizontal chip row without a scrollbar */
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 650;
  color: #c0c7d9;
  white-space: nowrap;
}
.chip.active { background: var(--grad); color: var(--bg); font-weight: 850; border-color: transparent; }

/* Tables become cards on phones */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--label);
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--border);
}
.table td { padding: 13px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 13px; }
.table-wrap { overflow-x: auto; }

@media (max-width: 640px) {
  .table thead { display: none; }
  .table tr {
    display: block;
    margin-bottom: 8px;
    border-radius: var(--r-md);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 4px 0;
  }
  .table td { display: flex; justify-content: space-between; border: none; padding: 8px 13px; }
  .table td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    color: var(--label);
  }
}

/* Admin sidebar layout, stacks on phones */
.admin-wrap { display: flex; flex-wrap: wrap; min-height: 100dvh; }
.admin-side {
  width: 228px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 20px 14px;
}
.admin-main { flex: 999 1 560px; min-width: 0; padding: 24px 28px; }
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 550;
  color: var(--text-dim);
  min-height: 42px;
}
.side-link:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.side-link.active {
  background: var(--accent-1-soft);
  color: #c6cdff;
  border: 1px solid var(--accent-1-line);
  font-weight: 700;
}

@media (max-width: 860px) {
  .admin-side { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .admin-main { padding: 20px 16px; }
}
