/* D:\projects\videochat-platform\backend\public\assets\vc\ui.css */
/* ==========================================================================
   VC UI — design system for the video chat platform
   - Light / dark themes via [data-theme] on <html>
   - Brand color is a single variable (--brand) so it can be set from the
     admin settings panel later (white-label / product sales).
   - No build step required: plain CSS, works on XAMPP / shared hosting.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --brand: #6d5efc;
  --brand-2: #ff4f8b;
  --brand-ink: #ffffff;
  --brand-soft: color-mix(in srgb, var(--brand) 12%, transparent);
  --brand-line: color-mix(in srgb, var(--brand) 35%, transparent);
  --grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);

  --success: #12b76a;
  --warning: #f79009;
  --danger:  #f04438;
  --info:    #2e90fa;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;

  --sidebar-w: 264px;
  --topbar-h: 64px;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(.2,.8,.2,1);
}

:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg:          #f5f6fa;
  --bg-grad:     radial-gradient(1200px 600px at 100% -10%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 60%);
  --surface:     #ffffff;
  --surface-2:   #f8f9fc;
  --surface-3:   #eef0f6;
  --border:      #e4e7ef;
  --border-strong: #d3d8e4;
  --text:        #101828;
  --text-2:      #344054;
  --muted:       #667085;
  --faint:       #98a2b3;
  --sidebar-bg:  #ffffff;
  --sidebar-text:#475467;
  --input-bg:    #ffffff;
  --shadow-sm:   0 1px 2px rgba(16,24,40,.05);
  --shadow:      0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
  --shadow-lg:   0 12px 32px -8px rgba(16,24,40,.18), 0 4px 8px -4px rgba(16,24,40,.06);
  --overlay:     rgba(16,24,40,.45);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:          #0b0d14;
  --bg-grad:     radial-gradient(1200px 600px at 100% -10%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 60%);
  --surface:     #131620;
  --surface-2:   #181c28;
  --surface-3:   #202536;
  --border:      #252a3a;
  --border-strong: #323850;
  --text:        #f2f4f8;
  --text-2:      #d0d5e1;
  --muted:       #9099ad;
  --faint:       #6b7489;
  --sidebar-bg:  #0f121b;
  --sidebar-text:#a3abbf;
  --input-bg:    #10131c;
  --shadow-sm:   0 1px 2px rgba(0,0,0,.4);
  --shadow:      0 1px 3px rgba(0,0,0,.45), 0 1px 2px rgba(0,0,0,.3);
  --shadow-lg:   0 16px 40px -10px rgba(0,0,0,.65);
  --overlay:     rgba(0,0,0,.6);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-grad), var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { color: var(--text); line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 750; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 650; }
h4 { font-size: 14px; font-weight: 650; }
p  { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
code, kbd, pre { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--surface-3); padding: 2px 6px; border-radius: var(--radius-xs); }
img { max-width: 100%; }
::selection { background: var(--brand-soft); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--radius-xs); }

.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; }

/* ---------- 3. Icons ---------- */
.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.i-sm { width: 15px; height: 15px; }
.i-lg { width: 22px; height: 22px; }

/* ---------- 4. App shell (panels) ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--sidebar-bg); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  scrollbar-width: thin;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  height: var(--topbar-h); padding: 0 20px; flex: none;
  border-bottom: 1px solid var(--border);
  color: var(--text); font-weight: 750; font-size: 16px; letter-spacing: -.01em;
}
.sidebar-brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; background: var(--grad);
  display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px -6px var(--brand);
}
.brand-mark .i { width: 18px; height: 18px; stroke-width: 2.2; }
.sidebar-role { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-left: auto; }

.nav { padding: 14px 12px 24px; display: flex; flex-direction: column; gap: 2px; }
.nav-group-label {
  font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em;
  color: var(--faint); padding: 16px 12px 6px;
}
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--sidebar-text); font-weight: 550; font-size: 13.5px;
  transition: background .15s var(--ease), color .15s var(--ease);
  position: relative;
}
.nav-link:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--brand-soft); color: var(--brand); }
.nav-link.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--brand);
}
.nav-link .count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--danger); color: #fff;
}
.nav-link .count.muted-count { background: var(--surface-3); color: var(--muted); }
.nav-link .soon { margin-left: auto; font-size: 10px; font-weight: 650; color: var(--faint); border: 1px solid var(--border); border-radius: 999px; padding: 0 6px; }

.sidebar-foot { margin-top: auto; padding: 14px; border-top: 1px solid var(--border); }
.wallet-card {
  border-radius: var(--radius); padding: 14px; color: #fff; background: var(--grad);
  box-shadow: 0 10px 24px -12px var(--brand);
}
.wallet-card .wc-label { font-size: 11px; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }
.wallet-card .value { font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.wallet-card .sub { font-size: 12px; opacity: .85; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h); display: flex; align-items: center; gap: 12px;
  padding: 0 28px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}
.topbar .crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; min-width: 0; }
.topbar .crumbs strong { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.topbar .menu-btn { display: none; }

.content { padding: 28px; width: 100%; max-width: 1360px; margin: 0 auto; }

/* user menu */
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text); font-weight: 550; }
.user-chip:hover { border-color: var(--border-strong); }
.avatar {
  width: 32px; height: 32px; border-radius: 999px; flex: none; overflow: hidden;
  display: inline-grid; place-items: center; font-weight: 700; font-size: 13px;
  background: var(--brand-soft); color: var(--brand); object-fit: cover;
}
.avatar-sm { width: 26px; height: 26px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; font-size: 18px; }
.avatar-xl { width: 88px; height: 88px; font-size: 32px; }

/* mobile */
.backdrop { display: none; }
@media (max-width: 1024px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(84vw, var(--sidebar-w)); z-index: 60;
    transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: var(--overlay); z-index: 55; }
  .topbar { padding: 0 16px; }
  .topbar .menu-btn { display: inline-flex; }
  .content { padding: 18px 16px; }
  .hide-mobile { display: none !important; }
}

/* ---------- 5. Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin-top: 4px; font-size: 14px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 6. Buttons ---------- */
.btn, button, input[type="submit"] {
  font: inherit; font-weight: 600; font-size: 13.5px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .05s;
  box-shadow: var(--shadow-sm);
}
.btn:hover, button:hover { background: var(--surface-2); border-color: var(--border-strong); text-decoration: none; color: var(--text); }
.btn:active, button:active { transform: translateY(1px); }
.btn:disabled, button:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary, button.primary {
  background: var(--brand); border-color: transparent; color: var(--brand-ink);
  box-shadow: 0 6px 16px -8px var(--brand);
}
.btn-primary:hover, button.primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); color: var(--brand-ink); }
.btn-gradient { background: var(--grad); color: #fff; border-color: transparent; }
.btn-gradient:hover { filter: brightness(1.06); color: #fff; background: var(--grad); }
.btn-danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 88%, #000); color: #fff; }
.btn-success { background: var(--success); color: #fff; border-color: transparent; }
.btn-success:hover { background: color-mix(in srgb, var(--success) 88%, #000); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); border-color: transparent; }
.btn-soft { background: var(--brand-soft); border-color: transparent; color: var(--brand); box-shadow: none; }
.btn-soft:hover { background: color-mix(in srgb, var(--brand) 18%, transparent); color: var(--brand); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }
.btn-block { width: 100%; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* ---------- 7. Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 20px;
}
:not(.grid):not(.stack):not(.row) > .card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); margin: -20px -20px 16px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 15px; font-weight: 650; }
.card-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card-flush { padding: 0; }
.card-flush > .card-head { margin: 0; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); margin: 16px -20px -20px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.card-flush > .card-foot { margin: 0; }

/* ---------- 8. Grids ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1200px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 900px)  { .grid-3, .grid-main { grid-template-columns: 1fr; } }
@media (max-width: 640px)  { .grid-2 { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row-flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 9. Stats ---------- */
.stat { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
.stat .stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat .stat-label { color: var(--muted); font-size: 13px; font-weight: 550; }
.stat .stat-icon {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.stat .stat-value { font-size: 28px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.stat .stat-foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.stat .stat-foot a { font-weight: 600; }
.stat.tone-success .stat-icon { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.stat.tone-warning .stat-icon { background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning); }
.stat.tone-danger  .stat-icon { background: color-mix(in srgb, var(--danger) 14%, transparent);  color: var(--danger); }
.stat.tone-info    .stat-icon { background: color-mix(in srgb, var(--info) 14%, transparent);    color: var(--info); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 650; font-size: 12px; padding: 1px 7px; border-radius: 999px; }
.delta.up { color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.delta.down { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }

/* ---------- 10. Badges ---------- */
.badge, .pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2); border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; opacity: .9; }
.badge.plain::before { display: none; }
.badge-success { background: color-mix(in srgb, var(--success) 13%, transparent); color: var(--success); }
.badge-warning { background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning); }
.badge-danger  { background: color-mix(in srgb, var(--danger) 13%, transparent);  color: var(--danger); }
.badge-info    { background: color-mix(in srgb, var(--info) 13%, transparent);    color: var(--info); }
.badge-brand   { background: var(--brand-soft); color: var(--brand); }
.badge-neutral { background: var(--surface-3); color: var(--muted); }
.badge-live { background: var(--danger); color: #fff; text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; }
.badge-live::before { background: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* legacy dot badge in nav (model requests) */
.badge-dot { display:inline-grid; place-items:center; margin-left:6px; background:var(--danger); color:#fff; border-radius:999px; min-width:18px; height:18px; padding:0 5px; font-size:11px; font-weight:700; }
.badge-dot.blink { animation: badgePulse 1s infinite; }
@keyframes badgePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }

/* ---------- 11. Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.card-flush .table-wrap { border-radius: 0 0 var(--radius) var(--radius); }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th {
  font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  background: var(--surface-2); white-space: nowrap;
}
thead th:first-child { border-top-left-radius: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
.cell-title { font-weight: 600; color: var(--text); }
.cell-sub { color: var(--muted); font-size: 12.5px; }
.cell-user { display: flex; align-items: center; gap: 10px; min-width: 180px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-compact th, .table-compact td { padding: 9px 12px; }

/* ---------- 12. Forms ---------- */
label, .label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.help, .hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; font-weight: 400; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"],
input[type="url"], input[type="tel"], input[type="date"], input[type="datetime-local"], input[type="time"],
input:not([type]), select, textarea, .input {
  font: inherit; font-size: 14px; color: var(--text);
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--input-bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  box-shadow: var(--shadow-sm);
}
textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus, .input:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft);
}
input[type="file"] { font: inherit; font-size: 13px; color: var(--muted); width: 100%; padding: 8px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; margin-right: 12px; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--brand); margin: 0; vertical-align: -3px; }
input[type="color"] { width: 48px; height: 40px; padding: 4px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--input-bg); cursor: pointer; }
.input-group { display: flex; align-items: stretch; }
.input-group > input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group > .addon { display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--border-strong); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-2); color: var(--muted); font-size: 13px; white-space: nowrap; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text-2); margin: 0; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid { margin-bottom: 16px; }
.form-grid:last-child { margin-bottom: 0; }
.form-grid > .field { margin-bottom: 0; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
.error, .field-error { color: var(--danger); font-size: 12.5px; margin-top: 6px; font-weight: 500; }
input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--danger); }

/* switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; margin: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .2s var(--ease); flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }

/* filter bar */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.search { position: relative; }
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search input { padding-left: 38px; }
.toolbar .search { flex: 1 1 240px; max-width: 360px; }
.filter-bar .search input { height: 36px; padding-top: 0; padding-bottom: 0; font-size: 13.5px; }
.toolbar select { width: auto; min-width: 150px; }

/* ---------- 13. Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.segmented { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-3); gap: 2px; }
.segmented a, .segmented button { height: 30px; padding: 0 12px; border-radius: 8px; border: 0; background: transparent; box-shadow: none; color: var(--muted); font-weight: 600; font-size: 12.5px; display: inline-flex; align-items: center; }
.segmented a:hover { text-decoration: none; color: var(--text); }
.segmented .active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* settings layout: vertical sub-nav + content */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 24px; align-items: start; }
.subnav { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 2px; }
.subnav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 550; }
.subnav a:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.subnav a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
@media (max-width: 900px) { .settings-layout { grid-template-columns: 1fr; } .subnav { position: static; flex-direction: row; overflow-x: auto; } .subnav a { white-space: nowrap; } }

/* ---------- 14. Alerts / flash ---------- */
.alert, .status {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); margin-bottom: 16px; font-size: 13.5px;
}
.alert .i { margin-top: 1px; }
.alert-success, .status { border-color: color-mix(in srgb, var(--success) 35%, transparent); background: color-mix(in srgb, var(--success) 9%, var(--surface)); color: color-mix(in srgb, var(--success) 70%, var(--text)); }
.alert-danger  { border-color: color-mix(in srgb, var(--danger) 35%, transparent);  background: color-mix(in srgb, var(--danger) 8%, var(--surface));  color: color-mix(in srgb, var(--danger) 70%, var(--text)); }
.alert-warning { border-color: color-mix(in srgb, var(--warning) 40%, transparent); background: color-mix(in srgb, var(--warning) 9%, var(--surface)); color: color-mix(in srgb, var(--warning) 60%, var(--text)); }
.alert-info    { border-color: color-mix(in srgb, var(--info) 35%, transparent);    background: color-mix(in srgb, var(--info) 8%, var(--surface));    color: color-mix(in srgb, var(--info) 70%, var(--text)); }

.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.toast { min-width: 260px; max-width: 380px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: flex-start; animation: toastIn .3s var(--ease); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 15. Empty state ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .empty-icon { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--surface-3); color: var(--faint); }
.empty .empty-icon .i { width: 26px; height: 26px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }

/* ---------- 16. Dropdown ---------- */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; z-index: 70;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 6px; display: none;
}
.dropdown.open .dropdown-menu { display: block; animation: toastIn .15s var(--ease); }
.dropdown-menu a, .dropdown-menu button {
  display: flex; width: 100%; align-items: center; gap: 10px; height: auto; padding: 9px 10px; border-radius: 8px;
  color: var(--text-2); font-weight: 550; font-size: 13.5px; background: transparent; border: 0; box-shadow: none; justify-content: flex-start;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.dropdown-menu .divider { height: 1px; background: var(--border); margin: 6px 4px; }
.dropdown-menu .menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown-menu .danger { color: var(--danger); }

/* ---------- 17. Pagination ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-top: 1px solid var(--border); }
.pager .info { color: var(--muted); font-size: 13px; }
.pager .pages { display: flex; gap: 4px; flex-wrap: wrap; }
.pager .pages a, .pager .pages span { min-width: 34px; height: 34px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid var(--border); color: var(--text-2); font-weight: 600; font-size: 13px; background: var(--surface); }
.pager .pages a:hover { background: var(--surface-2); text-decoration: none; }
.pager .pages .current { background: var(--brand); color: #fff; border-color: transparent; }
.pager .pages .disabled { color: var(--faint); background: transparent; }

/* ---------- 18. Charts (CSS bar chart) ---------- */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 24px; }
.bars .bar { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.bars .bar .col { width: 100%; max-width: 44px; border-radius: 8px 8px 4px 4px; background: var(--grad); position: relative; min-height: 4px; transition: filter .15s; }
.bars .bar .col:hover { filter: brightness(1.12); }
.bars .bar .col .tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 650; color: var(--text-2); white-space: nowrap; }
.bars .bar .lbl { font-size: 11.5px; color: var(--muted); }

/* list rows (activity / leaderboards) */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.rank { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: var(--surface-3); color: var(--muted); }
.rank.r1 { background: color-mix(in srgb, #f5b301 18%, transparent); color: #c98a00; }
.rank.r2 { background: color-mix(in srgb, #98a2b3 22%, transparent); color: #667085; }
.rank.r3 { background: color-mix(in srgb, #d97a3a 18%, transparent); color: #b45f25; }

/* key/value description list */
.kv { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 10px 16px; }
.kv dt { color: var(--muted); font-weight: 550; }
.kv dd { margin: 0; color: var(--text); font-weight: 550; word-break: break-word; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 10px; } }

/* progress */
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--grad); border-radius: 999px; }

/* ---------- 19. Modal (native <dialog>) ---------- */
dialog.modal { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); width: min(520px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: var(--overlay); backdrop-filter: blur(2px); }
dialog.modal .modal-head { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
dialog.modal .modal-head h3 { margin: 0; }
dialog.modal .modal-body { padding: 20px; }
dialog.modal .modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- 20. Public site (header + model grid) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
}
.site-header .inner { max-width: 1360px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 16px; }
.site-header .brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 750; font-size: 17px; }
.site-header .brand:hover { text-decoration: none; }
.site-header nav { display: flex; gap: 4px; margin-left: 12px; }
.site-header nav a { padding: 8px 12px; border-radius: 9px; color: var(--muted); font-weight: 600; }
.site-header nav a:hover, .site-header nav a.active { color: var(--text); background: var(--surface-3); text-decoration: none; }
.site-header .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.site-main { max-width: 1360px; margin: 0 auto; padding: 24px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip:hover { border-color: var(--border-strong); text-decoration: none; color: var(--text); }
.chip.active { background: var(--text); color: var(--bg); border-color: transparent; }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.model-card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s var(--ease); display: block; color: inherit; }
.model-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.model-card .thumb { aspect-ratio: 4 / 5; background: var(--surface-3) center/cover no-repeat; position: relative; }
.model-card .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,0) 45%); }
.model-card .tl { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; gap: 6px; }
.model-card .meta { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; color: #fff; }
.model-card .meta .name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.model-card .meta .sub { font-size: 12.5px; opacity: .85; display: flex; gap: 10px; }
.online-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 30%, transparent); }

/* auth pages */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--grad); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -160px; border-radius: 999px; background: rgba(255,255,255,.08); }
.auth-side h2 { color: #fff; font-size: 32px; line-height: 1.15; max-width: 420px; }
.auth-side p { opacity: .9; max-width: 420px; }
.auth-side-image { display: block; width: 100%; max-width: 460px; max-height: 300px; object-fit: cover; margin-top: 28px; border-radius: 18px; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-form .box { width: 100%; max-width: 420px; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- 21. Legacy compatibility (old views until migrated) ---------- */
.container { max-width: 1360px; margin: 0 auto; }
.content .container { padding: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .row { grid-template-columns: 1fr; } }
.muted { color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.topcats { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin: 8px 0 16px; }
.topcats a { height: 34px; padding: 0 14px; border-radius: 999px; border:1px solid var(--border); background: var(--surface); display: inline-flex; align-items: center; font-weight: 600; font-size: 13px; color: var(--text-2); }
.topcats a.active { background: var(--text); color: var(--bg); border-color: transparent; }
.tagpanel { display:none; margin: 12px 0 16px; }

/* print */
@media print { .sidebar, .topbar, .site-header { display: none !important; } .shell { display: block; } body { background: #fff; } }

/* ---------- 22. Icon tiles & link rows ---------- */
.icon-tile { width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.icon-tile.tone-success { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.icon-tile.tone-warning { background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning); }
.icon-tile.tone-danger  { background: color-mix(in srgb, var(--danger) 14%, transparent);  color: var(--danger); }
.icon-tile.tone-info    { background: color-mix(in srgb, var(--info) 14%, transparent);    color: var(--info); }
.icon-tile.tone-neutral { background: var(--surface-3); color: var(--muted); }
a.list-row { color: inherit; text-decoration: none; border-radius: 10px; margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
a.list-row:hover { background: var(--surface-2); text-decoration: none; }
.big-num { font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
td .btn-group { flex-wrap: nowrap; }

/* ---------- 23. Chat bubbles ---------- */
.chat { display: flex; flex-direction: column; gap: 8px; padding: 16px; overflow-y: auto; background: var(--surface-2); }
.bubble { max-width: 78%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--surface); border: 1px solid var(--border); color: var(--text); align-self: flex-start; word-wrap: break-word; }
.bubble .who { display: block; font-size: 11.5px; font-weight: 650; color: var(--muted); margin-bottom: 2px; }
.bubble.mine { align-self: flex-end; background: var(--brand); border-color: transparent; color: #fff; border-radius: 14px 14px 4px 14px; }
.bubble.mine .who { color: rgba(255,255,255,.8); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chip input { margin: 0; }
.chip:has(input:checked) { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hero h1 { font-size: 28px; margin: 0; }
.hero .sub { color: var(--muted); margin-top: 4px; }
.searchbar { position: relative; flex: 1 1 320px; width: 380px; max-width: 100%; }
.searchbar .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.searchbar input { padding-left: 42px; height: 44px; border-radius: 12px; }
.profile-cover { height: 220px; border-radius: var(--radius-lg); background: var(--grad) center/cover no-repeat; position: relative; overflow: hidden; }
.profile-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 60%); }
.profile-head { display: flex; gap: 20px; align-items: flex-start; margin-top: -48px; padding: 0 24px; position: relative; z-index: 2; flex-wrap: wrap; }
.profile-head .avatar-xl { border: 4px solid var(--bg); box-shadow: var(--shadow); }
.profile-head .who { flex: 1; min-width: 220px; padding-top: 58px; }
.profile-head .avatar { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); }
.profile-head h1 { margin: 0; color: var(--text); }
@media (max-width: 640px) { .profile-cover { height: 160px; } .profile-head { padding: 0 8px; } }

.model-card .thumb.placeholder { display: grid; place-items: center; }
.model-card .thumb.placeholder .initial { font-size: 72px; font-weight: 800; color: rgba(255,255,255,.9); letter-spacing: -.04em; position: relative; z-index: 1; margin-bottom: 40px; text-shadow: 0 8px 30px rgba(0,0,0,.25); }
@media (max-width: 640px) {
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .model-card .thumb.placeholder .initial { font-size: 44px; margin-bottom: 30px; }
  .model-card .meta .name { font-size: 13.5px; }
  .model-card .meta .sub { font-size: 11.5px; }
  .site-main { padding: 16px; }
  .site-header .inner { padding: 0 16px; }
  .hero h1 { font-size: 22px; }
}

/* ===================================================================
   Sprint 1 — settings, token shop, payments, age gate, maintenance
   =================================================================== */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.settings-fields { display: flex; flex-direction: column; }
.settings-fields > .field { padding: 16px 0; margin: 0; border-bottom: 1px solid var(--border); }
.settings-fields > .field:first-child { padding-top: 0; }
.settings-fields > :last-child { border-bottom: 0; padding-bottom: 0; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.settings-fields > .setting-row:first-child { padding-top: 0; }
.setting-text { min-width: 0; }
.setting-label { font-weight: 600; color: var(--text); }
.setting-row .help { margin-top: 3px; }
.settings-fields textarea { min-height: 84px; }

.color-input { display: flex; gap: 8px; align-items: center; max-width: 320px; }
.color-input input[type="color"] { width: 44px; height: 40px; padding: 3px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; flex: none; }
.color-input input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-input input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 6px; }

.upload-row { display: flex; gap: 14px; align-items: center; }
.upload-thumb { width: 64px; height: 64px; border-radius: 12px; border: 1px dashed var(--border-strong); background: var(--surface-2); display: grid; place-items: center; color: var(--faint); overflow: hidden; flex: none; }
.upload-thumb img { width: 100%; height: 100%; object-fit: contain; }

.brand-preview { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; background: var(--surface-2); }
.bp-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 650; margin-bottom: 10px; }
.bp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bp-btn { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: var(--radius-sm); background: var(--p1); color: #fff; font-weight: 600; font-size: 13.5px; }
.bp-grad { background: linear-gradient(135deg, var(--p1), var(--p2)); }
.bp-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; background: color-mix(in srgb, var(--p1) 14%, transparent); color: var(--p1); font-weight: 600; font-size: 12.5px; }
.bp-link { color: var(--p1); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Brand mark (logo or generated) */
.brand-logo { height: 32px; width: auto; max-width: 160px; object-fit: contain; display: block; }

/* Token shop */
.balance-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 24px; border-radius: var(--radius-lg); background: var(--grad); color: #fff; margin-bottom: 24px; position: relative; overflow: hidden; }
.balance-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.12); }
.balance-hero .bh-label { font-size: 13px; opacity: .85; font-weight: 500; }
.balance-hero .bh-value { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; display: flex; align-items: center; gap: 8px; }
.balance-hero .btn { position: relative; z-index: 1; background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); color: #fff; }
.balance-hero .btn:hover { background: rgba(255,255,255,.28); color: #fff; }

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.price-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px 20px 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s; }
.price-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand-line); }
.price-card.featured { border: 2px solid var(--brand); box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 20%, transparent); }
.price-card .ribbon { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); padding: 3px 12px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 11.5px; font-weight: 700; white-space: nowrap; letter-spacing: .02em; }
.price-card .pc-name { font-weight: 650; color: var(--muted); font-size: 13.5px; }
.price-card .pc-tokens { display: flex; align-items: baseline; gap: 6px; }
.price-card .pc-tokens strong { font-size: 32px; font-weight: 800; letter-spacing: -.02em; color: var(--text); line-height: 1; }
.price-card .pc-tokens span { color: var(--muted); font-weight: 600; }
.price-card .pc-bonus { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); font-size: 12.5px; font-weight: 650; }
.price-card .pc-price { font-size: 22px; font-weight: 750; color: var(--text); }
.price-card .pc-unit { font-size: 12px; color: var(--faint); margin-top: -10px; }
.price-card form { margin-top: auto; }

.checkout { max-width: 560px; margin: 0 auto; }
.checkout .summary { display: flex; flex-direction: column; gap: 10px; }
.checkout .summary .row { display: flex; justify-content: space-between; gap: 12px; }
.checkout .summary .row.total { border-top: 1px solid var(--border); padding-top: 12px; font-weight: 750; font-size: 17px; color: var(--text); }
.demo-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px dashed var(--warning); background: color-mix(in srgb, var(--warning) 10%, transparent); color: var(--text-2); font-size: 13px; }

.tx-amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-amount.in { color: var(--success); }
.tx-amount.out { color: var(--danger); }

/* Age gate */
.age-gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, #0b0b14 72%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.age-gate[hidden] { display: none; }
.age-gate .ag-card { width: 100%; max-width: 440px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg, 0 20px 60px rgba(0,0,0,.35)); padding: 30px 26px 24px; text-align: center; }
.age-gate .ag-badge { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.age-gate h2 { margin: 0 0 8px; font-size: 20px; }
.age-gate p { color: var(--muted); margin: 0 0 20px; font-size: 14px; line-height: 1.55; }
.age-gate .ag-actions { display: flex; gap: 10px; }
.age-gate .ag-actions .btn { flex: 1; }

/* Maintenance page */
.maint { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.maint .box { max-width: 480px; text-align: center; }
.maint .icon-wrap { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 20px; background: var(--grad); display: grid; place-items: center; color: #fff; }
.maint h1 { font-size: 24px; margin: 0 0 10px; }
.maint p { color: var(--muted); line-height: 1.6; margin: 0 0 22px; }

@media (max-width: 640px) {
  .setting-row { gap: 14px; }
  .balance-hero { padding: 18px; }
  .balance-hero .bh-value { font-size: 28px; }
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 10px; }
  .price-card { padding: 18px 14px 14px; gap: 10px; }
  .price-card .pc-tokens strong { font-size: 24px; }
  .price-card .pc-price { font-size: 18px; }
  .upload-row { align-items: flex-start; }
}
.settings-fields select { max-width: 420px; }

/* ===================================================================
   Sprint 2 — earnings, commissions, charts
   =================================================================== */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filter-bar select { width: auto; min-width: 170px; height: 36px; padding-top: 0; padding-bottom: 0; font-size: 13.5px; }
.filter-bar .custom-range { display: inline-flex; align-items: center; gap: 6px; }
.filter-bar .custom-range[hidden] { display: none; }
.filter-bar .custom-range input[type="date"] { width: 150px; height: 36px; padding-top: 0; padding-bottom: 0; font-size: 13.5px; }
.range-caption { font-size: 12.5px; margin: 8px 0 18px; }

.chart { position: relative; padding-left: 44px; }
.chart-grid { position: absolute; left: 0; right: 0; top: 0; height: var(--h); display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid .gl { position: relative; border-top: 1px dashed var(--border); height: 0; }
.chart-grid .gl:last-child { border-top-style: solid; border-color: var(--border-strong); }
.chart-grid .gl span { position: absolute; left: 0; top: -8px; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; background: var(--surface); padding-right: 6px; }
.chart-cols { position: relative; height: calc(var(--h) + 24px); display: flex; align-items: stretch; gap: 3px; }
.chart-cols .cc { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.chart-cols .cc::before { content: ""; height: var(--h); position: absolute; inset: 0 0 auto 0; border-radius: 6px; transition: background .12s; }
.chart-cols .cc:hover::before { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.chart-cols .col { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); width: 100%; max-width: 34px; height: calc(var(--h) * var(--v, 0)); min-height: 2px; border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--brand) 55%, transparent); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.chart-cols .cc.peak .col, .chart-cols .cc:hover .col { background: var(--brand); }
.chart-cols .col .ov { width: 100%; background: var(--brand-2); opacity: .9; }
.chart-cols .xl { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; height: 16px; }
.chart-cols .tt { position: absolute; z-index: 5; bottom: calc(24px + 8px); left: 50%; transform: translate(-50%, 4px); min-width: 170px; padding: 9px 11px; border-radius: 10px; background: var(--text); color: var(--surface); font-size: 12px; line-height: 1.5; display: flex; flex-direction: column; gap: 2px; opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s; box-shadow: var(--shadow); white-space: nowrap; }
.chart-cols .tt strong { font-size: 12.5px; }
.chart-cols .tt em { font-style: normal; opacity: .7; }
.chart-cols .cc:hover .tt { opacity: 1; transform: translate(-50%, 0); }
.chart-cols .cc:first-child .tt, .chart-cols .cc:nth-child(2) .tt { left: 0; transform: translate(0, 4px); }
.chart-cols .cc:first-child:hover .tt, .chart-cols .cc:nth-child(2):hover .tt { transform: translate(0, 0); }
.chart-cols .cc:last-child .tt, .chart-cols .cc:nth-last-child(2) .tt { left: auto; right: 0; transform: translate(0, 4px); }
.chart-cols .cc:last-child:hover .tt, .chart-cols .cc:nth-last-child(2):hover .tt { transform: translate(0, 0); }
.chart .dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; background: var(--brand); margin-right: 6px; vertical-align: 0; }
.chart .dot.ov { background: var(--brand-2); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-size: 12.5px; color: var(--text-2); margin-top: 12px; }

.split-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-3); }
.split-bar > span { display: block; height: 100%; }
.split-bar .s-site { background: var(--brand); }
.split-bar .s-studio { background: var(--warning); }
.split-bar .s-model { background: var(--success); }
.split-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--text-2); margin-top: 8px; }
.split-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 6px; }

.ctx-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ctx-row:last-child { border-bottom: 0; }
.ctx-row .progress { grid-column: 1 / -1; }

.pct-input { display: inline-flex; align-items: center; gap: 0; }
.pct-input input { width: 84px; text-align: right; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.pct-input .addon { height: 40px; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--border-strong); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-2); color: var(--muted); font-weight: 600; }

.calc-box { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 14px 16px; background: var(--surface-2); }
.calc-box .calc-title { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 650; margin-bottom: 8px; }
.calc-box .calc-line { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 13.5px; }
.calc-box .calc-line strong { font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .chart { padding-left: 34px; }
  .chart-cols { gap: 1px; }
  .filter-bar .segmented { width: 100%; overflow-x: auto; }
  .filter-bar select { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .filter-bar .search { flex: 1 1 100%; }
  .filter-bar > .btn { margin-left: 0 !important; }
}
.kv-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.kv-row:last-of-type { border-bottom: 0; }
.kv-row span { color: var(--text-2); }
.kv-row strong { font-variant-numeric: tabular-nums; }

/* Mobile: compact stat cards (2 per row) and non-wrapping range tabs */
.segmented a, .segmented button { white-space: nowrap; flex: none; }
@media (max-width: 640px) {
  .grid-4 > .stat { padding: 14px; gap: 6px; }
  .grid-4 > .stat .stat-value { font-size: 21px; }
  .grid-4 > .stat .stat-label { font-size: 12px; }
  .grid-4 > .stat .stat-icon { width: 30px; height: 30px; }
  .grid-4 > .stat .stat-icon svg { width: 16px; height: 16px; }
  .grid-4 > .stat .stat-foot { font-size: 11.5px; flex-wrap: wrap; }
  .filter-bar .segmented { scrollbar-width: none; }
  .filter-bar .segmented::-webkit-scrollbar { display: none; }
}

/* ===================================================================
   Sprint 3 — payouts
   =================================================================== */
dialog.modal.modal-wide { width: min(640px, calc(100vw - 32px)); }

.payout-open { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.payout-steps { display: flex; gap: 0; margin-top: 16px; }
.payout-steps .ps { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; text-align: center; }
.payout-steps .ps::before { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--border-strong); z-index: 0; }
.payout-steps .ps:first-child::before { display: none; }
.payout-steps .ps.done::before, .payout-steps .ps.current::before { background: var(--brand); }
.payout-steps .ps-dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--muted); border: 2px solid var(--surface); }
.payout-steps .ps.done .ps-dot { background: var(--brand); color: #fff; }
.payout-steps .ps.current .ps-dot { background: var(--surface); color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.payout-steps .ps-l { font-size: 12px; color: var(--muted); font-weight: 600; }
.payout-steps .ps.current .ps-l { color: var(--text); }

.amount-row { display: flex; gap: 8px; }
.payout-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--success) 9%, transparent); border: 1px solid color-mix(in srgb, var(--success) 25%, transparent); }
.payout-total span { color: var(--text-2); font-weight: 600; }
.payout-total strong { font-size: 24px; font-weight: 800; color: var(--success); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

.method-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.mp-opt input { position: absolute; opacity: 0; pointer-events: none; }
.mp-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .12s, box-shadow .12s, background .12s; min-width: 0; }
.mp-card:hover { border-color: var(--brand-line, var(--brand)); }
.mp-opt input:checked + .mp-card { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.mp-opt input:focus-visible + .mp-card { outline: 2px solid var(--brand); outline-offset: 2px; }

.type-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.type-opt input { position: absolute; opacity: 0; pointer-events: none; }
.type-opt span { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; transition: all .12s; }
.type-opt input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.type-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.type-fields[hidden] { display: none; }

.po-summary { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.po-amount { font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--text); line-height: 1.15; }
.acct-box { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.acct-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-weight: 650; font-size: 13.5px; }
.acct-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.acct-row:last-child { border-bottom: 0; }
.acct-val { word-break: break-all; color: var(--text); font-weight: 600; }
.po-pay { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border-strong); }
.po-pay .field { margin-bottom: 0; }

@media (max-width: 640px) {
  .payout-steps .ps-l { font-size: 11px; }
  .method-pick { grid-template-columns: 1fr; }
  .acct-row { grid-template-columns: 1fr auto; }
  .acct-row > .muted { grid-column: 1 / -1; font-size: 12px; margin-bottom: -6px; }
  .po-summary { flex-direction: column; }
  .po-summary > div:last-child { text-align: left !important; }
}

/* ===================================================================
   Sprint 4 — studio panel
   =================================================================== */
.review-banner { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); margin-bottom: 20px; color: var(--text); }
.review-banner.tone-warning { border-color: color-mix(in srgb, var(--warning) 40%, var(--border)); background: color-mix(in srgb, var(--warning) 7%, var(--surface)); }
.review-banner.tone-danger { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.review-banner.tone-success { border-color: color-mix(in srgb, var(--success) 40%, var(--border)); background: color-mix(in srgb, var(--success) 7%, var(--surface)); }
a.review-banner { align-items: center; transition: box-shadow .15s; }
a.review-banner:hover { box-shadow: var(--shadow); }
.review-banner .rb-title { font-weight: 700; font-size: 15px; margin-bottom: 3px; }
.review-banner .rb-text { color: var(--text-2); font-size: 13.5px; line-height: 1.55; }

.doc-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }

.cred-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); max-width: 520px; }
.cred-row code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; font-weight: 700; color: var(--text); word-break: break-all; }

.dot-live { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent); flex: none; }

table tfoot td { border-top: 2px solid var(--border-strong); background: var(--surface-2); font-size: 13.5px; }

@media (max-width: 640px) {
  .review-banner { padding: 14px; gap: 10px; }
  .cred-row { grid-template-columns: 1fr auto; }
  .cred-row > .muted { grid-column: 1 / -1; font-size: 12px; margin-bottom: -4px; }
}

/* ===================================================================
   Sprint 5 — account, profile, favorites, blocks, reports
   =================================================================== */
.chat-error { margin-top: 8px; padding: 8px 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); font-size: 13px; font-weight: 600; }
.profile-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; padding-top: 62px; }
.btn-fav-on { background: color-mix(in srgb, #ff4f8b 12%, var(--surface)); border-color: color-mix(in srgb, #ff4f8b 45%, transparent); color: #e0336f; }
.btn-fav-on svg { fill: currentColor; }
.fav-count { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--muted); margin-left: 2px; }
.btn-fav-on .fav-count { background: color-mix(in srgb, #ff4f8b 18%, transparent); color: #e0336f; }
.profile-bio { white-space: pre-line; line-height: 1.65; color: var(--text-2); margin: 0 0 14px; }
.sched-list { display: flex; flex-direction: column; }
.sched-day { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.sched-day:last-child { border-bottom: 0; }
.sched-day.today { font-weight: 700; }
.sched-day.off .sd-name { color: var(--muted); }
.sd-times { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.sd-times span:not(.muted) { padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); font-weight: 650; }
.reason-list { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 640px) {
  .profile-actions { margin-left: 0; width: 100%; padding-top: 0; flex-wrap: wrap; }
  .profile-actions > form, .profile-actions > .btn:not(.btn-icon) { flex: 1 1 auto; }
  .profile-actions > form > .btn { width: 100%; }
}
.tag-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-opt input { position: absolute; opacity: 0; pointer-events: none; }
.tag-opt span { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; transition: all .12s; }
.tag-opt input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.tag-opt input:disabled + span { opacity: .45; cursor: not-allowed; }
.tag-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.sched-edit { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.sched-edit:last-of-type { border-bottom: 0; }
.se-day { font-weight: 650; }
.se-slots { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.se-slot { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.se-slot input[type="time"] { width: auto; height: 32px; padding: 0 6px; font-size: 13.5px; }
@media (max-width: 640px) {
  .sched-edit { grid-template-columns: 1fr auto; }
  .se-slots { grid-column: 1 / -1; grid-row: 2; }
}
.fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.fav-card { position: relative; display: flex; align-items: flex-start; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; }
.fav-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.fav-main { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; color: inherit; }
.fav-main:hover { text-decoration: none; }
.fav-remove { color: #e0336f; }
.fav-remove svg { fill: currentColor; }
tr.row-urgent td { background: color-mix(in srgb, var(--danger) 5%, transparent); }
tr.row-urgent td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.quote-box { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--border-strong); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; white-space: pre-line; font-size: 13.5px; color: var(--text-2); }
@media (max-width: 640px) { .fav-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .card-head { flex-wrap: wrap; row-gap: 4px; }
  .card-head > span.muted { flex-basis: 100%; }
}

/* ===================================================================
   Sprint 6a — pages, banners, e-mails, logs
   =================================================================== */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; }
.site-footer .site-main { padding-top: 22px; padding-bottom: 26px; display: flex; flex-direction: column; gap: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: var(--text-2); font-size: 13.5px; font-weight: 550; }
.footer-links a:hover { color: var(--brand); }
.footer-bottom { font-size: 13px; gap: 10px; flex-wrap: wrap; }

.page-article { max-width: 760px; margin: 8px auto 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px 40px; box-shadow: var(--shadow-sm); }
.page-article h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -.02em; }
.prose { font-size: 15.5px; line-height: 1.75; color: var(--text-2); }
.prose h2 { font-size: 20px; color: var(--text); margin: 28px 0 10px; letter-spacing: -.01em; }
.prose h3 { font-size: 17px; color: var(--text); margin: 22px 0 8px; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { margin: 14px 0; padding: 10px 16px; border-left: 3px solid var(--brand); background: color-mix(in srgb, var(--brand) 6%, transparent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); }
.prose strong { color: var(--text); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }

.editor-tabs { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--border); margin: 4px 0 10px; }
.editor-tabs button { border: 0; background: none; box-shadow: none; padding: 8px 12px; font-weight: 650; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.editor-tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.md-toolbar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.md-toolbar[hidden] { display: none; }
.md-toolbar button { height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.md-toolbar button:hover { border-color: var(--brand); color: var(--brand); }
.md-editor { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.6; min-height: 360px; }
.md-preview { min-height: 360px; padding: 6px 4px; }

.promo-banner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 26px; margin-bottom: 20px; border-radius: var(--radius-lg); background: var(--grad); background-size: cover; background-position: center; color: #fff; overflow: hidden; box-shadow: var(--shadow-sm); min-height: 96px; }
.promo-banner::after { content: ""; position: absolute; right: -40px; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.12); pointer-events: none; }
.promo-banner.has-img::after { display: none; }
.promo-banner .pb-text { position: relative; z-index: 1; min-width: 0; }
.promo-banner .pb-title { font-size: 20px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; }
.promo-banner .pb-sub { font-size: 14px; opacity: .92; margin-top: 4px; }
.promo-banner .pb-btn { position: relative; z-index: 1; flex: none; background: #fff; color: #1d1d2b; border-color: #fff; font-weight: 700; }
.promo-banner .pb-btn:hover { background: rgba(255,255,255,.9); color: #1d1d2b; }
.banner-list { display: flex; flex-direction: column; gap: 16px; }
.banner-item { padding: 14px; }
.banner-item .promo-banner { margin-bottom: 12px; }
.bi-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.var-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.var-chips .chip { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; height: 28px; cursor: pointer; }
.dot-edited { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-left: auto; }
.email-preview-card { position: sticky; top: calc(var(--topbar-h) + 16px); overflow: hidden; }
.ep-subject { padding: 10px 18px; border-bottom: 1px solid var(--border); font-size: 13.5px; background: var(--surface-2); }
.email-preview-card iframe { display: block; width: 100%; height: 560px; border: 0; background: #f4f4f8; }

.log-list { font-size: 13px; }
.log-row { border-bottom: 1px solid var(--border); }
.log-row summary { display: flex; align-items: center; gap: 10px; padding: 9px 16px; cursor: pointer; list-style: none; }
.log-row summary::-webkit-details-marker { display: none; }
.log-row summary:hover { background: var(--surface-2); }
.log-row.lvl-error summary, .log-row.lvl-critical summary { box-shadow: inset 3px 0 0 var(--danger); }
.log-date { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--muted); white-space: nowrap; }
.log-msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.log-row[open] .log-msg { white-space: normal; word-break: break-word; }
.log-detail { margin: 0; padding: 12px 16px; background: var(--surface-2); border-top: 1px dashed var(--border); font-size: 12px; line-height: 1.5; max-height: 360px; overflow: auto; white-space: pre-wrap; word-break: break-all; color: var(--text-2); }

@media (max-width: 1100px) { #emailGrid { grid-template-columns: 1fr !important; } .email-preview-card { position: static; } }
@media (max-width: 640px) {
  .page-article { padding: 22px 18px; }
  .page-article h1 { font-size: 24px; }
  .promo-banner { flex-direction: column; align-items: flex-start; padding: 18px; gap: 12px; }
  .promo-banner .pb-title { font-size: 17px; }
  .log-row summary { flex-wrap: wrap; }
  .log-msg { flex-basis: 100%; }
}
@media (max-width: 640px) { .searchbar { width: 100%; flex-basis: 100%; } }

/* ===== Messages (inbox) — Sprint 6b ===== */
.inbox { display: grid; grid-template-columns: 340px minmax(0,1fr); gap: 16px; height: calc(100vh - 140px); min-height: 480px; }
:not(.grid):not(.stack):not(.row).inbox > .card + .card,
:not(.grid):not(.stack):not(.row).msg-review > .card + .card { margin-top: 0; }
.inbox > .card { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 0; }
.inbox-head { padding: 16px 16px 12px; border-bottom: 1px solid var(--border); display: grid; gap: 10px; }
.inbox-head h2 { margin: 0; font-size: 18px; }
.inbox-head .search { width: 100%; }
.conv-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.conv { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; color: var(--text); text-decoration: none; }
.conv:hover { background: var(--surface-3); text-decoration: none; }
.conv.active { background: color-mix(in srgb, var(--brand) 12%, transparent); }
.conv-main { min-width: 0; flex: 1; }
.conv-top, .conv-bottom { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.conv-name { font-weight: 600; font-size: 14px; }
.conv-time { font-size: 11.5px; color: var(--faint); flex-shrink: 0; }
.conv-preview { font-size: 13px; color: var(--muted); }
.conv.unread .conv-name, .conv.unread .conv-preview { color: var(--text); font-weight: 700; }
.conv .count { flex-shrink: 0; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.thread-placeholder { flex: 1; display: grid; place-items: center; }
.thread-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.thread-back { display: none; }
.thread-body { flex: 1; min-height: 0; }
.thread-body .bubble { display: flex; flex-direction: column; gap: 2px; }
.bubble-text { white-space: pre-wrap; }
.bubble-meta { align-self: flex-end; font-size: 11px; color: var(--faint); }
.bubble.mine .bubble-meta { color: rgba(255,255,255,.75); }
.day-sep { display: flex; justify-content: center; margin: 6px 0; }
.day-sep span { font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 3px 10px; border-radius: 999px; }
.thread-empty { margin: auto; text-align: center; max-width: 340px; font-size: 13.5px; }
.thread-foot { padding: 12px 16px; border-top: 1px solid var(--border); }
.thread-compose { display: flex; gap: 8px; align-items: flex-end; }
.thread-compose textarea { flex: 1; resize: none; min-height: 42px; max-height: 160px; line-height: 1.45; padding: 10px 12px; }
.thread-compose .btn-icon { width: 42px; height: 42px; flex-shrink: 0; }
.thread-hint { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--muted); }
.msg-modal-note { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }

/* Admin message review */
.msg-review { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 16px; align-items: start; }
.msg-review .chat { max-height: 70vh; border-radius: 0 0 var(--radius) var(--radius); }

@media (max-width: 900px) {
  .inbox { grid-template-columns: 1fr; height: calc(100vh - 120px); height: calc(100dvh - 120px); }
  .inbox.has-thread .inbox-list { display: none; }
  .inbox:not(.has-thread) .inbox-thread { display: none; }
  .thread-back { display: inline-flex; }
  .thread-head .hide-sm { display: none; }
  .thread-foot { padding: 10px 12px; }
  .msg-review { grid-template-columns: 1fr; }
}
tr.row-active td { background: color-mix(in srgb, var(--brand) 8%, transparent); }

/* ===== Action banners & live dot (studio + model dashboards) ===== */
.review-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: border-color .15s var(--ease), transform .15s var(--ease); }
.review-banner:hover { text-decoration: none; transform: translateY(-1px); }
.review-banner.tone-warning { border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); background: color-mix(in srgb, var(--warning) 7%, var(--surface)); }
.review-banner.tone-info { border-color: color-mix(in srgb, var(--info) 45%, var(--border)); background: color-mix(in srgb, var(--info) 7%, var(--surface)); }
.review-banner > .i { color: var(--muted); flex: none; }
.rb-title { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.rb-text { font-size: 13px; color: var(--muted); margin-top: 2px; }
.dot-live { width: 9px; height: 9px; border-radius: 50%; background: var(--success); flex: none; display: inline-block; box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 60%, transparent); animation: livePulse 1.8s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 55%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ===== Model dashboard ===== */
.room-status { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.room-status.is-online { border-color: color-mix(in srgb, var(--success) 45%, var(--border)); background: color-mix(in srgb, var(--success) 6%, var(--surface)); }
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.mini-stats span { display: block; font-size: 12px; color: var(--muted); }
.mini-stats strong { font-size: 18px; font-weight: 700; }
.checklist { list-style: none; margin: 8px 0 0; padding: 0; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; }
.check-dot { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); margin-top: 1px; }
.check-dot .i { width: 13px; height: 13px; }
.checklist li.done .check-dot { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
.checklist li.done .cl-label { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.checklist .cl-label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.checklist a.cl-label:hover { color: var(--brand); text-decoration: none; }
.checklist .cl-label small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; margin-top: 1px; }
.source-row { padding: 9px 0; display: grid; gap: 6px; font-size: 13.5px; }
.source-row .progress { height: 6px; }
.list-link { color: var(--text); text-decoration: none; }
.list-link:hover { text-decoration: none; background: var(--surface-2); }
.count-pill { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }

@media (max-width: 900px) {
  .room-status form { width: 100%; }
  .room-status form .btn { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
  .mini-stats strong { font-size: 15px; }
}

/* ===== Gifts — tray (Sprint 7) ===== */
.i-xs { width: 12px; height: 12px; }
.gift-tray { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.gift-tray > * { min-width: 0; }
.gt-head > .gt-tabs { flex: 1 1 auto; min-width: 0; }
.gift-tray .gt-item, .gift-tray .gt-tab, .gift-tray .gt-q, .gift-tray .gt-chip { height: auto; line-height: 1.2; box-shadow: none; white-space: normal; }
.gift-tray .gt-item:hover { background-color: var(--surface); }
.gift-tray .gt-q:hover { background: transparent; }
.gift-tray .gt-q.active:hover { background: var(--brand); color: #fff; }
.gt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gt-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; max-width: 100%; }
.gt-tabs::-webkit-scrollbar { display: none; }
.gt-tab { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s var(--ease); }
.gt-tab:hover { color: var(--text); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.gt-tab.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand) 70%, transparent); }
.gt-balance { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.gt-balance strong { color: var(--text); }
.gt-balance a { font-weight: 700; margin-left: 4px; }
.gt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-height: 300px; overflow-y: auto; padding: 9px 2px 2px; }
.gift-tray.compact .gt-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); max-height: 250px; }
.gt-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 6px 9px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: transform .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease); font: inherit; }
.gt-item[hidden] { display: none; }
.gt-item:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--brand) 60%, transparent); }
.gt-item:hover .gt-pic { transform: scale(1.12) rotate(-4deg); }
.gt-item.selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.gt-item.selected .gt-pic { animation: gtBounce .6s var(--ease); }
.gt-item.locked { opacity: .5; }
.gt-item.tier-3 { background: linear-gradient(160deg, color-mix(in srgb, #ffd166 10%, var(--surface)), var(--surface)); }
.gt-item.tier-4 { background: linear-gradient(160deg, color-mix(in srgb, #ff4f8b 12%, var(--surface)), color-mix(in srgb, #6d5efc 10%, var(--surface))); border-color: color-mix(in srgb, #ff4f8b 35%, var(--border)); }
.gt-pic { font-size: 34px; line-height: 1.1; height: 40px; display: grid; place-items: center; transition: transform .2s var(--ease); }
.gt-pic img { width: 40px; height: 40px; object-fit: contain; }
.gift-tray.compact .gt-pic { font-size: 30px; height: 36px; }
.gt-name { font-size: 12px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gt-price { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: #c98a00; }
[data-theme="dark"] .gt-price { color: #ffd166; }
.gt-flag { position: absolute; top: -7px; left: 50%; transform: translateX(-50%); font-size: 9.5px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--grad); color: #fff; white-space: nowrap; }
.gt-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); animation: gtUp .2s var(--ease); }
.gt-bar[hidden], .gt-tip[hidden], .gt-grid[hidden], .gt-again[hidden], .gt-error[hidden] { display: none; }
.gt-selected { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 150px; }
.gt-sel-emoji { font-size: 30px; line-height: 1; display: grid; place-items: center; }
.gt-sel-emoji img { width: 34px; height: 34px; object-fit: contain; }
.gt-sel-name { font-weight: 700; font-size: 14px; }
.gt-sel-total { font-size: 12.5px; color: var(--muted); }
.gt-sel-total span { font-weight: 700; color: var(--text); }
.gt-qty { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.gt-q { border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-family: inherit; }
.gt-q.active { background: var(--brand); color: #fff; }
.gt-note { flex: 1 1 100%; order: 5; }
.gt-send { min-width: 120px; justify-content: center; }
.gt-send.is-short { background: var(--surface-3); color: var(--muted); box-shadow: none; }
.gift-tray.is-busy .gt-send, .gift-tray.is-busy .gt-again-btn { opacity: .6; pointer-events: none; }
.gt-again { display: flex; justify-content: center; }
.gt-again-btn { border-style: dashed; }
.gt-error { padding: 8px 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); font-size: 13px; font-weight: 600; }
.gt-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.gt-chip { padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-weight: 700; cursor: pointer; font-family: inherit; }
.gt-chip.active, .gt-chip:hover { border-color: var(--brand); color: var(--brand); }
.gt-tip-custom { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gt-tip-custom input { flex: 1 1 140px; }
@keyframes gtBounce { 0% { transform: scale(1); } 40% { transform: scale(1.3) rotate(-8deg); } 70% { transform: scale(.95) rotate(4deg); } 100% { transform: scale(1.08); } }
@keyframes gtUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===== Gifts — animations ===== */
.gift-fx { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.gf-float { position: absolute; bottom: 60px; line-height: 1; animation: gfFloat 2.6s cubic-bezier(.25,.8,.35,1) forwards; filter: drop-shadow(0 6px 10px rgba(0,0,0,.25)); }
.gf-float img, .gf-big img, .gb-pic img { width: 1em; height: 1em; object-fit: contain; }
@keyframes gfFloat { 0% { transform: translate(0, 0) scale(.4); opacity: 0; } 12% { opacity: 1; transform: translate(0, -30px) scale(1.1); } 100% { transform: translate(var(--drift), -62vh) scale(.9) rotate(12deg); opacity: 0; } }
.gf-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 10px; height: 10px; }
.gf-big { font-size: 92px; line-height: 1; animation: gfPop 2s cubic-bezier(.2,1.4,.4,1) forwards; filter: drop-shadow(0 10px 24px rgba(0,0,0,.35)); position: relative; z-index: 2; }
.gf-center.size-3 .gf-big { font-size: 150px; animation-duration: 3.2s; }
.gf-center.size-4 .gf-big { font-size: 190px; animation-duration: 3.4s; }
@keyframes gfPop { 0% { transform: scale(0) rotate(-20deg); opacity: 0; } 18% { transform: scale(1.25) rotate(6deg); opacity: 1; } 30% { transform: scale(1) rotate(0); } 80% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(.6) translateY(-80px); opacity: 0; } }
.gf-ring { position: absolute; width: 120px; height: 120px; border-radius: 50%; border: 4px solid #ffd166; animation: gfRing 1s ease-out forwards; }
.gf-center.size-3 .gf-ring, .gf-center.size-4 .gf-ring { width: 200px; height: 200px; border-color: #ff4f8b; }
@keyframes gfRing { from { transform: scale(.2); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }
.gf-rays { position: absolute; width: 520px; height: 520px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255,209,102,.38) 0 9deg, transparent 9deg 22deg); -webkit-mask: radial-gradient(circle, #000 18%, transparent 68%); mask: radial-gradient(circle, #000 18%, transparent 68%); animation: gfRays 3.2s linear forwards; }
@keyframes gfRays { 0% { transform: scale(.3) rotate(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: scale(1.2) rotate(120deg); opacity: 0; } }
.gf-spark { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #ffd166; box-shadow: 0 0 10px #ffd166; animation: gfSpark .9s ease-out forwards; }
.gf-spark:nth-child(3n) { background: #ff4f8b; box-shadow: 0 0 10px #ff4f8b; }
.gf-spark:nth-child(3n+1) { background: #8b7dff; box-shadow: 0 0 10px #8b7dff; }
@keyframes gfSpark { from { transform: translate(0,0) scale(1); opacity: 1; } to { transform: translate(var(--x), var(--y)) scale(.2); opacity: 0; } }
.gf-qty { position: absolute; right: -90px; top: -40px; z-index: 3; font-size: 40px; font-weight: 900; color: #fff; -webkit-text-stroke: 2px #ff4f8b; text-shadow: 0 4px 0 #ff4f8b; animation: gfPop 2s cubic-bezier(.2,1.4,.4,1) .15s both; }
.gf-dim { position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(20,10,40,.15), rgba(10,5,25,.55)); animation: gfDim 4.2s ease forwards; }
@keyframes gfDim { 0% { opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
.gf-confetti { position: absolute; top: -20px; border-radius: 2px; animation-name: gfConfetti; animation-timing-function: cubic-bezier(.3,.6,.5,1); animation-fill-mode: forwards; }
@keyframes gfConfetti { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(105vh) rotate(var(--r)); opacity: .9; } }
.gift-banner { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 8px 16px 8px 8px; border-radius: 999px; background: rgba(20,16,40,.82); color: #fff; font-size: 14px; backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0,0,0,.3); animation: gbIn 3.2s ease forwards; }
.gift-banner.big { background: linear-gradient(90deg, #6d5efc, #ff4f8b); font-size: 15.5px; padding: 10px 20px 10px 10px; animation-duration: 4.6s; }
.gb-pic { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.15); display: grid; place-items: center; font-size: 22px; flex: none; }
.gb-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes gbIn { 0% { opacity: 0; transform: translate(-50%, -30px); } 10% { opacity: 1; transform: translate(-50%, 0); } 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -20px); } }

/* ===== Gifts — profile & messages ===== */
.gift-goal { padding: 14px; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, var(--surface)), color-mix(in srgb, #ff4f8b 8%, var(--surface))); border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--border)); }
.gift-goal .gg-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.gift-goal .gg-title { font-weight: 700; display: flex; align-items: center; gap: 6px; font-size: 14px; }
.gift-goal .progress { height: 10px; }
.gift-goal .gg-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.gift-goal.done .progress > span { background: linear-gradient(90deg, #06d6a0, #4cc9f0); }
.gift-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.gw-item { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.gw-item .gw-pic { font-size: 28px; line-height: 1.1; }
.gw-item .gw-pic img { width: 30px; height: 30px; object-fit: contain; }
.gw-item .gw-count { font-size: 12px; font-weight: 800; color: var(--muted); }
.btn-gift { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px -8px color-mix(in srgb, #ff4f8b 70%, transparent); }
.btn-gift:hover { color: #fff; filter: brightness(1.06); }
.btn-gift .i { animation: giftWiggle 2.4s ease-in-out infinite; }
@keyframes giftWiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-14deg); } 90% { transform: rotate(12deg); } 95% { transform: rotate(-6deg); } }
dialog.modal.modal-gift { width: min(660px, calc(100vw - 24px)); }
.bubble.gift { background: linear-gradient(135deg, color-mix(in srgb, #ffd166 22%, var(--surface)), color-mix(in srgb, #ff4f8b 14%, var(--surface))); border-color: color-mix(in srgb, #ff4f8b 30%, var(--border)); color: var(--text); }
.bubble.gift.mine { background: linear-gradient(135deg, #6d5efc, #ff4f8b); color: #fff; }
.bubble.gift .bubble-text { font-weight: 700; font-size: 15px; }

@media (max-width: 640px) {
  .gt-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-height: 260px; }
  .gift-tray.compact .gt-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gt-item { padding: 10px 2px 7px; }
  .gt-pic { font-size: 28px; height: 34px; }
  .gt-name { font-size: 11px; }
  .gt-balance { width: 100%; justify-content: flex-end; }
  .gt-qty { flex: 1; justify-content: space-between; }
  .gt-q { flex: 1; }
  .gt-send { flex: 1 1 100%; }
  .gf-big { font-size: 72px; }
  .gf-center.size-3 .gf-big { font-size: 110px; }
  .gf-center.size-4 .gf-big { font-size: 140px; }
  .gf-rays { width: 360px; height: 360px; }
  .gf-qty { right: -60px; font-size: 30px; }
}
.gift-thumb { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-size: 24px; flex: none; }
.gift-thumb img { width: 30px; height: 30px; object-fit: contain; }
.gift-thumb.sm { width: 34px; height: 34px; font-size: 20px; }
.tier-dots { display: inline-flex; gap: 3px; }
.tier-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.tier-dots span.on { background: var(--grad); }
tr.row-muted td { opacity: .55; }

/* ===== Gift menu ===== */
.gm-list { display: flex; flex-direction: column; }
.gm-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); }
.gm-row.off { opacity: .55; }
.gm-move { display: flex; flex-direction: column; gap: 2px; }
.gm-move .btn-icon { width: 26px; height: 22px; }
.gm-main { flex: 1; min-width: 0; }
.gm-action { font-weight: 700; font-size: 14px; }
.gm-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.gift-tray .gm-chip, .gm-chip { height: auto; line-height: 1.3; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); border: 1px dashed var(--border-strong); color: var(--text-2); box-shadow: none; white-space: normal; text-align: left; }
.gm-chip:hover { border-color: var(--brand); color: var(--brand); }
/* Menu inside the gift tray and on the profile */
.gt-menu { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; padding: 2px; }
.gt-menu[hidden] { display: none; }
.gift-tray .gt-mi { height: auto; line-height: 1.3; box-shadow: none; white-space: normal; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); text-align: left; font: inherit; cursor: pointer; justify-content: flex-start; }
.gift-tray .gt-mi:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); background: var(--surface); }
.gift-tray .gt-mi.selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.gift-tray .gt-mi.locked { opacity: .55; }
.gt-mi-pic { font-size: 28px; width: 40px; text-align: center; flex: none; }
.gt-mi-pic img { width: 34px; height: 34px; object-fit: contain; }
.gt-mi-main { flex: 1; min-width: 0; }
.gt-mi-action { font-weight: 700; font-size: 14px; }
.gt-mi-sub { font-size: 12px; color: var(--muted); }
.gt-mi-price { font-weight: 800; color: #c98a00; white-space: nowrap; font-size: 13px; }
[data-theme="dark"] .gt-mi-price { color: #ffd166; }
.gt-wish { flex: 1 1 100%; order: 4; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, #ffd166 18%, var(--surface)); border: 1px solid color-mix(in srgb, #ffd166 40%, var(--border)); }
.gt-wish[hidden] { display: none; }
.gift-tray.menu-mode .gt-qty { display: none; }
.pm-menu { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.pm-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.pm-row .gt-mi-pic { font-size: 24px; width: 32px; }
.pm-row .pm-send { height: 32px; padding: 0 12px; font-size: 12.5px; }
@media (max-width: 640px) {
  .gm-row { padding: 12px; gap: 10px; }
  .pm-row .pm-send span { display: none; }
}
.gift-banner .gb-wish { display: block; font-size: 12.5px; opacity: .92; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; }
.gift-banner { border-radius: 22px; }

/* ===== Room background picker ===== */
.bg-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.bg-opt { display: flex; flex-direction: column; gap: 6px; cursor: pointer; margin: 0; }
.bg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.bg-thumb { position: relative; aspect-ratio: 16/9; border-radius: 12px; background: var(--surface-3) center/cover no-repeat; border: 2px solid var(--border); transition: border-color .15s var(--ease), transform .15s var(--ease); overflow: hidden; }
.bg-opt:hover .bg-thumb { transform: translateY(-2px); }
.bg-opt.active .bg-thumb { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.bg-opt.active .bg-thumb::after { content: "✓"; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center; }
.bg-opt.is-pending { cursor: not-allowed; }
.bg-opt.is-pending .bg-thumb { opacity: .6; }
.bg-none { display: grid; place-items: center; color: var(--muted); background: repeating-linear-gradient(45deg, var(--surface-2) 0 8px, var(--surface-3) 8px 16px); }
.bg-name { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.bg-tag { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 10.5px; font-weight: 700; }
.bg-tag.own { left: auto; right: 6px; background: var(--brand); }
.bg-state { position: absolute; inset: auto 0 0 0; padding: 3px; text-align: center; background: rgba(245,158,11,.9); color: #fff; font-size: 10.5px; font-weight: 700; }
.bg-state.rej { background: rgba(220,38,38,.9); }
.bg-upload { margin-top: 14px; }
.bg-upload summary { cursor: pointer; font-weight: 650; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; color: var(--brand); }
.bg-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.bg-admin-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bg-admin-item.off { opacity: .55; }
.bg-admin-item .bg-thumb { display: block; }

/* ===== "Call in progress" bar ===== */
.active-call-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 12px 14px 12px 16px; border-radius: var(--radius); background: linear-gradient(90deg, color-mix(in srgb, var(--success) 16%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--success) 45%, var(--border)); color: var(--text); text-decoration: none; }
.active-call-bar:hover { text-decoration: none; filter: brightness(1.02); }
.active-call-bar .acb-text { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-call-bar .acb-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--success); color: #fff; font-weight: 700; font-size: 13px; white-space: nowrap; }
@media (max-width: 640px) { .active-call-bar .acb-text { white-space: normal; font-size: 13px; } }

/* ---- Admin: Canlı Denetim (live call thumbnails) + Görüntü İhlalleri (violation queue) ---- */
.stack-cards { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.live-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.live-card.has-violation { border-color: color-mix(in srgb, var(--danger) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger) 35%, transparent); }
.live-thumb { position: relative; aspect-ratio: 4 / 3; background: #0f0d1a; overflow: hidden; }
.live-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-noimg, .vio-noimg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: rgba(255,255,255,.55); font-size: 12.5px; }
.live-noimg .i, .vio-noimg .i { width: 26px; height: 26px; }
.live-tag { position: absolute; top: 8px; left: 8px; }
.live-age { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 11.5px; }
.live-away { position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 999px; background: rgba(245,158,11,.92); color: #1f1300; font-size: 11.5px; font-weight: 700; }
.live-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.live-names { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; min-width: 0; }
.live-names b { font-size: 14.5px; }
.live-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; }
.live-meta span { display: inline-flex; align-items: center; gap: 4px; }
.live-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.live-actions { display: flex; gap: 8px; margin-top: 2px; }
.live-actions form { margin: 0; }

.vio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; padding: 16px; }
.vio-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.vio-card.vio-ended { border-color: color-mix(in srgb, var(--danger) 55%, transparent); }
.vio-thumb { position: relative; display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 0; background: #0f0d1a; cursor: pointer; overflow: hidden; }
.vio-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: blur(14px) saturate(.8); transform: scale(1.08); transition: filter .2s; }
.vio-thumb:hover img, .vio-thumb:focus-visible img { filter: blur(6px); }
.vio-level { position: absolute; top: 8px; left: 8px; }
.vio-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vio-kind { font-size: 13px; font-weight: 600; }
.vio-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.vio-big { margin-bottom: 14px; border-radius: var(--radius); overflow: hidden; background: #0f0d1a; text-align: center; }
.vio-big img { max-width: 100%; max-height: 52vh; display: inline-block; vertical-align: middle; }
.vio-scores { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.vio-score { display: grid; grid-template-columns: 150px 1fr 44px; align-items: center; gap: 10px; font-size: 13px; }
.vio-score b { text-align: right; }
@media (max-width: 640px) {
  .live-grid, .vio-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .vio-grid { padding: 10px; }
  .live-body, .vio-body { padding: 10px; }
  .live-actions { flex-wrap: wrap; }
  .vio-score { grid-template-columns: 110px 1fr 40px; }
}
@media (max-width: 400px) {
  .live-grid, .vio-grid { grid-template-columns: 1fr; }
}
.live-guard { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; }
.live-guard span[class^="lg-"] { padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.live-guard .lg-ok { background: color-mix(in srgb, var(--success) 14%, transparent); color: color-mix(in srgb, var(--success) 75%, var(--text)); }
.live-guard .lg-bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: color-mix(in srgb, var(--danger) 75%, var(--text)); }
.live-guard .lg-muted { background: var(--surface-2, rgba(127,127,127,.12)); color: var(--muted, #888); }
/* Member's small frame in the corner of the model's frame (".live-thumb img" would otherwise stretch it full size). */
.live-thumb img.live-pip { position: absolute; right: 8px; top: 8px; width: 32%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 2px solid rgba(255,255,255,.9); box-shadow: 0 4px 12px rgba(0,0,0,.5); background: #0f0d1a; z-index: 1; }
.live-scores { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }

/* Chart tooltips on phones: a hidden (opacity 0) tooltip still widened the page and made it scroll sideways.
   On narrow screens it only exists while a column is touched/hovered, and the right-hand columns open it
   towards the left. Desktop unchanged. */
@media (max-width: 900px) {
  .chart-cols .tt { display: none; }
  .chart-cols .cc:hover .tt, .chart-cols .cc:focus-within .tt { display: flex; }
  .chart-cols .cc:nth-last-child(3) .tt, .chart-cols .cc:nth-last-child(4) .tt { left: auto; right: 0; transform: translate(0, 4px); }
  .chart-cols .cc:nth-last-child(3):hover .tt, .chart-cols .cc:nth-last-child(4):hover .tt { transform: translate(0, 0); }
  .chart-cols .tt { min-width: 150px; max-width: calc(100vw - 32px); white-space: normal; }
}

/* In-page confirm / prompt window (ui.js uiConfirm / uiPrompt) */
dialog.modal.ui-confirm { width: min(420px, calc(100vw - 32px)); }
.ui-confirm-msg { margin: 0; font-size: 15px; line-height: 1.55; }
.ui-confirm-input { width: 100%; margin-top: 12px; }

/* Requests list: balance under the name on phones (the balance column is off-screen there) */
.req-bal-m { display: none; color: var(--warning, #b45309); }
@media (max-width: 700px) { .req-bal-m { display: block; } }

/* Gift-menu requests: member page + admin dispute dossier */
.gr-row { padding: 14px 20px; align-items: flex-start; flex-wrap: wrap; }
.gr-main { flex: 1; min-width: 200px; }
.gr-state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.gr-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .gr-actions { width: 100%; padding-left: 52px; } }
.text-danger { color: var(--danger); font-weight: 650; }
.gd-timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.gd-timeline li { position: relative; font-size: 14px; line-height: 1.5; }
.gd-timeline li::before { content: ''; position: absolute; left: -21px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); }
.gd-timeline li.gd-ok::before { border-color: var(--success); background: var(--success); }
.gd-timeline li.gd-warn::before { border-color: var(--warning); background: var(--warning); }
.gd-timeline b { font-variant-numeric: tabular-nums; margin-right: 6px; }
.gd-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.gd-frames a { position: relative; display: block; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.gd-frames img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gd-frames span { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; }

/* Token purchase: payment method choice, bank transfer, crypto wait */
.btn-xs { padding: 3px 8px; font-size: 12px; min-height: 0; border-radius: 6px; }
.pay-methods-wrap, .pay-bank, .pay-receipt { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 12px; min-width: 0; }
.pay-method { min-width: 0; }
.pay-wait { flex-wrap: nowrap; }
.pay-wait > div:last-child { min-width: 0; }
.mono.break { word-break: break-all; }
.pay-methods-title { font-weight: 700; font-size: 14.5px; color: var(--text); }
.pay-methods { display: flex; flex-direction: column; gap: 8px; }
.pay-method { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.pay-method:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.pay-method.is-on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
.pm-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.pm-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pm-text small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.pm-go { color: var(--muted); flex: none; }
.pay-method.is-on .pm-go { color: var(--brand); }
.pay-kv { grid-template-columns: 110px minmax(0, 1fr); }
.pay-kv dd { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
@media (max-width: 640px) { .pay-kv { grid-template-columns: 1fr; } }
.pay-ref { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; font-size: 15px; letter-spacing: .5px; padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.pay-receipt { border-top: 1px solid var(--border); padding-top: 14px; display: flex; }
.pay-receipt .field { margin-bottom: 0; }
.pay-wait { align-items: flex-start; gap: 14px; }
.pay-spin { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--brand) 25%, transparent); border-top-color: var(--brand); animation: paySpin 1s linear infinite; margin-top: 2px; }
@keyframes paySpin { to { transform: rotate(360deg); } }
.pay-proof { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; }
.pay-method, .pay-method .pm-text, .pay-method .pm-text b, .pay-method .pm-text small { white-space: normal; overflow-wrap: anywhere; }
.pay-method { height: auto; min-height: 64px; line-height: 1.35; justify-content: flex-start; font-weight: 400; }
.pay-method .pm-text b { font-weight: 700; }
.pay-wait { display: flex; }

/* Two-step sign-in (Hesap Ayarları → İki adımlı doğrulama, sign-in code page) */
.tf-setup { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.tf-qr { flex: none; padding: 8px; background: #fff; border: 1px solid var(--border); border-radius: 12px; line-height: 0; }
.tf-qr svg { display: block; width: 200px; height: 200px; }
.tf-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 220px; font-size: 14px; line-height: 1.5; }
.tf-secret { font-size: 13.5px; font-weight: 700; letter-spacing: .5px; }
.tf-code { font-size: 20px; letter-spacing: 4px; font-variant-numeric: tabular-nums; text-align: center; }
.tf-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tf-codes code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14.5px; font-weight: 700; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); text-align: center; letter-spacing: .5px; }
@media (max-width: 640px) { .tf-setup { flex-direction: column; align-items: center; } .tf-steps { min-width: 0; } }
@media print { body * { visibility: hidden; } .tf-codes-card, .tf-codes-card * { visibility: visible; } .tf-codes-card { position: absolute; left: 0; top: 0; } }
.settings-confirm { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.pay-more { border-top: 1px solid var(--border); padding-top: 12px; }
.pay-more > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--muted); list-style: none; }
.pay-more > summary::before { content: '▸ '; }
.pay-more[open] > summary::before { content: '▾ '; }
.pay-more > summary::-webkit-details-marker { display: none; }
.pay-method.is-off { opacity: .55; cursor: not-allowed; background: var(--surface-2); }
.pay-method.is-off:hover { border-color: var(--border); background: var(--surface-2); }
.pc-pay-note { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, transparent); }
