/* =====================================================================
   GYMFLOW · LUXE — "Onyx & Champagne" private-club theme (v3.0)
   Loaded after styles.css; overrides colors, type, surfaces and motion.
   ===================================================================== */
:root {
  color-scheme: dark;
  --bg: #0b0a09;
  --bg-2: #12100e;
  --surface: rgba(255, 246, 228, .035);
  --surface-2: rgba(255, 246, 228, .055);
  --surface-solid: #15130f;
  --stroke: rgba(234, 205, 150, .13);
  --stroke-2: rgba(234, 205, 150, .24);
  --ink: #f5efe4;
  --ink-2: #dcd3c4;
  --muted: #a1998b;
  --muted-dark: #c2b9aa;
  --faint: #6f685e;
  --gold: #d8b679;
  --gold-bright: #ecd29c;
  --gold-deep: #a8823f;
  --gold-soft: #f3e3c2;
  --champagne: linear-gradient(135deg, #f6e3b8 0%, #d6ae68 46%, #b88a45 70%, #efd59e 100%);
  --rose: #e6b3a3;
  --sage: #9ccfad;
  --amber: #ebbd72;
  --coral: #e98f7f;
  --sky: #a9bdf0;
  --line: rgba(234, 205, 150, .1);
  --line-strong: rgba(234, 205, 150, .18);
  --paper: var(--surface);
  --canvas: var(--bg);
  --radius: 22px;
  --r-sm: 14px;
  --shadow-xs: 0 1px 0 rgba(255,255,255,.04) inset, 0 10px 30px -18px rgba(0,0,0,.7);
  --shadow-sm: 0 1px 0 rgba(255,255,255,.05) inset, 0 24px 60px -30px rgba(0,0,0,.85);
  --shadow-lg: 0 40px 120px -20px rgba(0,0,0,.85);
  --glow: 0 0 0 1px rgba(234,205,150,.08), 0 20px 50px -24px rgba(216,182,121,.35);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --sidebar-width: 268px;
}

html { background: var(--bg); }
body {
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(216,182,121,.10), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(230,179,163,.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink); font-family: var(--sans); font-size: 14.5px; font-weight: 400; letter-spacing: .005em;
}
::selection { background: rgba(216,182,121,.35); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: rgba(216,182,121,.25) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(216,182,121,.2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid rgba(236,210,156,.6); outline-offset: 2px; }

/* ---------- 3D ambient backdrop + grain ---------- */
.luxe-ambient { position: fixed; inset: 0; z-index: 0; width: 100vw; height: 100vh; pointer-events: none; opacity: .42; transition: opacity 1.2s var(--ease); }
body.luxe-auth .luxe-ambient { opacity: 0; }
.luxe-grain { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
#app, .app-root { position: relative; z-index: 2; }

/* ---------- Brand mark (monogram) ---------- */
.boot-mark, .brand-mark { background: var(--champagne); color: #1a1307; font-family: var(--serif); font-weight: 600; font-size: 21px;
  box-shadow: 0 8px 24px -8px rgba(216,182,121,.6), inset 0 1px 0 rgba(255,255,255,.55); }
.brand-mark { border-radius: 50%; }
.boot-screen { color: var(--muted); }
.boot-spinner { border-color: rgba(234,205,150,.15); border-top-color: var(--gold); }

/* ---------- Typography ---------- */
h1, h2, h3, .topbar-heading, .panel-title, .page-heading h1, .modal-head h2, .blank-state h3, .settings-heading h3, .onboarding-card h3, .detail-hero h3 {
  font-family: var(--serif); font-weight: 600; letter-spacing: .01em; color: var(--ink);
}
.page-heading h1 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.05; letter-spacing: 0; font-weight: 500; }
.page-heading h1::after { content: ""; display: block; width: 56px; height: 1px; margin-top: 14px; background: linear-gradient(90deg, var(--gold), transparent); }
.page-heading p { color: var(--muted); font-size: 14px; margin-top: 12px; }
.panel-title { font-size: 21px; font-weight: 600; }
.panel-subtitle { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.topbar-heading { font-size: 24px; font-weight: 500; margin-top: 2px; }
.breadcrumb { color: var(--gold); font-size: 10.5px; font-weight: 500; letter-spacing: .28em; }
.breadcrumb span { color: var(--faint) !important; }

/* ---------- Auth (sign-in / setup) ---------- */
.auth-screen { position: relative; grid-template-columns: minmax(320px, 1.12fr) minmax(400px, .88fr); background: transparent; }
.auth-aside { isolation: isolate; background:
    radial-gradient(800px 520px at 50% 45%, rgba(216,182,121,.16), transparent 62%),
    linear-gradient(180deg, #0f0d0b, #090807);
  border-right: 1px solid var(--stroke); }
.auth-aside::before, .auth-aside::after { border-color: rgba(234,205,150,.08); }
.auth-3d { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; }
.auth-brand, .auth-copy, .auth-footer { z-index: 2; }
.auth-brand { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-soft); }
.auth-copy { align-self: flex-start; max-width: 460px; padding: 0; margin-top: auto; }
.auth-kicker { color: var(--gold); font-size: 11px; font-weight: 500; letter-spacing: .38em; }
.auth-copy h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 5vw, 76px); line-height: .98; letter-spacing: -.01em;
  background: linear-gradient(180deg, #fffaf0 20%, #e3c389 110%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-copy h1 em { font-style: italic; }
.auth-copy p { color: rgba(245,239,228,.62); font-size: 15px; font-weight: 300; }
.auth-feature-list { grid-template-columns: repeat(3, auto); justify-content: start; gap: 10px; margin-top: 26px; }
.auth-feature { padding: 8px 12px 8px 8px; border: 1px solid var(--stroke); border-radius: 999px; background: rgba(12,10,8,.55); backdrop-filter: blur(10px); color: var(--ink-2); font-size: 12px; }
.auth-feature span:first-child { width: 24px; height: 24px; border-radius: 50%; background: rgba(216,182,121,.14); color: var(--gold); }
.auth-feature svg { width: 13px; height: 13px; }
.auth-footer { color: var(--faint); letter-spacing: .2em; text-transform: uppercase; font-size: 10.5px; }
.auth-panel { position: relative; }
.auth-card { position: relative; border-radius: 28px; padding: clamp(28px, 4vw, 46px);
  background: linear-gradient(160deg, rgba(255,246,228,.06), rgba(255,246,228,.015)), rgba(14,12,10,.82);
  border: 1px solid var(--stroke-2); backdrop-filter: blur(18px); box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.06); color: var(--ink); }
.auth-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(160deg, rgba(236,210,156,.55), transparent 35%, transparent 70%, rgba(236,210,156,.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.auth-card-top .eyebrow { color: var(--gold); font-size: 11px; font-weight: 500; letter-spacing: .34em; }
.auth-card h2 { font-size: 36px; font-weight: 500; color: var(--ink); letter-spacing: 0; }
.auth-card-top p { color: var(--muted); font-size: 14px; }
.auth-card .field label { color: var(--muted-dark); }
.auth-card .security-note { background: rgba(255,246,228,.035); border: 1px solid var(--line); color: var(--muted); }
.auth-card .security-note svg { color: var(--gold); }
.auth-card [data-action="toggle-lang"] { border-color: var(--stroke-2) !important; color: var(--gold) !important; }
.button-link { background: transparent; color: var(--muted); border: 0; }
.button-link:hover { color: var(--gold-bright); background: transparent; box-shadow: none; }

/* ---------- Sidebar ---------- */
.sidebar { background: linear-gradient(180deg, rgba(18,16,13,.92), rgba(10,9,8,.96)); border-right: 1px solid var(--stroke); backdrop-filter: blur(20px); padding: 26px 16px 18px; }
.sidebar-brand { border-bottom-color: var(--line); padding-bottom: 24px; }
.brand-copy strong { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: .06em; color: var(--ink); max-width: 160px; }
.brand-copy small { color: var(--gold); letter-spacing: .3em; font-size: 9px; font-weight: 500; opacity: .85; }
.sidebar-label { color: var(--faint); font-size: 10px; font-weight: 500; letter-spacing: .32em; margin: 26px 12px 10px; }
.nav-item { position: relative; min-height: 46px; border-radius: 14px; color: rgba(245,239,228,.62); font-size: 14px; font-weight: 400; letter-spacing: .02em; }
.nav-item svg { opacity: .7; }
.nav-item:hover { background: rgba(255,246,228,.04); color: var(--ink); }
.nav-item.active, .side-nav .nav-item.active { color: var(--gold-soft); box-shadow: none;
  background: linear-gradient(90deg, rgba(216,182,121,.18), rgba(216,182,121,.03)); }
.nav-item.active::before { content: ""; position: absolute; left: -16px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--champagne); box-shadow: 0 0 14px rgba(216,182,121,.7); }
.nav-item.active svg { color: var(--gold); opacity: 1; }
.nav-badge { background: rgba(235,189,114,.16); color: var(--amber); border-radius: 999px; font-weight: 600; }
.sidebar-plan-card { border-color: var(--stroke); border-radius: 18px; background: radial-gradient(160px 100px at 0% 0%, rgba(216,182,121,.14), transparent 70%), rgba(255,246,228,.03); }
.sidebar-plan-icon { background: rgba(216,182,121,.14); color: var(--gold); border-radius: 50%; }
.sidebar-plan-card strong { color: var(--ink); font-size: 13px; font-weight: 500; }
.sidebar-plan-card p { color: var(--muted); font-size: 12px; }
.sidebar-profile { border-top-color: var(--line); }
.profile-avatar { background: var(--champagne); color: #1a1307; font-weight: 600; }
.profile-name strong { color: var(--ink); font-size: 13px; font-weight: 500; }
.profile-name small { color: var(--muted); font-size: 11px; }
.profile-menu { color: var(--muted); }
.profile-menu:hover { background: rgba(255,246,228,.06); color: var(--ink); }
.profile-menu[data-action="toggle-lang"] { border-color: var(--stroke-2) !important; color: var(--gold) !important; }
.mobile-sidebar-close { border-color: var(--stroke) !important; color: var(--ink) !important; }

/* ---------- Topbar ---------- */
.topbar { min-height: 86px; background: rgba(11,10,9,.62); border-bottom: 1px solid var(--line); backdrop-filter: blur(22px) saturate(1.2); }
.mobile-menu, .icon-button { background: var(--surface); border: 1px solid var(--stroke); color: var(--ink-2); border-radius: 50%; }
.icon-button:hover { border-color: var(--stroke-2); color: var(--gold-bright); }
.notify-dot { border-color: var(--bg); background: var(--coral); box-shadow: 0 0 10px var(--coral); }
.header-separator { background: var(--line); }
.header-date { color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; }
.content-wrap { padding-top: 36px; }

/* ---------- Buttons ---------- */
.button { min-height: 42px; padding: 0 18px; border-radius: 999px; font-size: 13px; font-weight: 500; letter-spacing: .04em; background: var(--surface-2); color: var(--ink); border: 1px solid var(--stroke); }
.button:hover { background: rgba(255,246,228,.08); box-shadow: none; transform: translateY(-1px); }
.button-primary, .button-accent, .auth-card .button-primary {
  position: relative; overflow: hidden; border: 0; color: #1b1407; background: var(--champagne); background-size: 160% 100%;
  font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: 12px;
  box-shadow: 0 12px 30px -12px rgba(216,182,121,.7), inset 0 1px 0 rgba(255,255,255,.6); transition: background-position .6s var(--ease), transform .2s var(--ease), box-shadow .3s; }
.button-primary:hover, .button-accent:hover, .auth-card .button-primary:hover { background: var(--champagne); background-size: 160% 100%; background-position: 100% 0; filter: none;
  box-shadow: 0 18px 40px -14px rgba(216,182,121,.85), inset 0 1px 0 rgba(255,255,255,.6); }
.button-primary::after, .button-accent::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transition: left .8s var(--ease); }
.button-primary:hover::after, .button-accent:hover::after { left: 130%; }
.button-secondary { background: var(--surface); border-color: var(--stroke); color: var(--ink); }
.button-secondary:hover { background: rgba(255,246,228,.07); border-color: var(--stroke-2); }
.button-quiet { background: transparent; border-color: transparent; color: var(--muted-dark); }
.button-quiet:hover { background: rgba(255,246,228,.05); }
.button-danger { background: rgba(233,143,127,.1); border-color: rgba(233,143,127,.25); color: var(--coral); }
.button-danger:hover { background: rgba(233,143,127,.16); }
.button-sm { min-height: 34px; padding: 0 13px; font-size: 12px; }
.button-icon { background: var(--surface); border-color: var(--stroke); color: var(--muted-dark); border-radius: 50%; width: 34px; height: 34px; }
.button-icon:hover { color: var(--gold-bright); border-color: var(--stroke-2); }
.button-icon.danger:hover { color: var(--coral); border-color: rgba(233,143,127,.35); }

/* ---------- Surfaces: panels & cards ---------- */
.panel, .stat-card, .summary-tile, .table-card, .settings-card, .toggle-line, .chip-box, .activity-row, .detail-fact {
  background: linear-gradient(160deg, rgba(255,246,228,.055), rgba(255,246,228,.015)); border: 1px solid var(--stroke); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); backdrop-filter: blur(14px); }
.panel { position: relative; }
.panel::before, .stat-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(216,182,121,.12), transparent 60%); }
.panel:hover::before, .stat-card:hover::before { opacity: 1; }
.panel-pad, .live-panel, .mkt-panel, .ai-studio-card, .panel:not([class*=" "]) { padding: 24px 26px; }
.live-panel { max-width: 860px; }
.panel-link { color: var(--gold); font-size: 12.5px; font-weight: 500; letter-spacing: .04em; }
.panel-link:hover { color: var(--gold-bright); }

/* Stat cards with 3D tilt */
.stat-grid { gap: 18px; margin-bottom: 20px; perspective: 1000px; }
.stat-card { position: relative; padding: 22px 22px 20px; transform-style: preserve-3d; transition: transform .5s var(--ease), border-color .4s, box-shadow .4s; }
.stat-card:hover { border-color: var(--stroke-2); box-shadow: var(--glow); }
.stat-card::after { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(236,210,156,.6), transparent); opacity: .6; }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.stat-icon { width: 40px; height: 40px; border-radius: 50%; background: rgba(216,182,121,.12); color: var(--gold); border: 1px solid rgba(216,182,121,.18); }
.stat-icon.amber { background: rgba(235,189,114,.12); color: var(--amber); border-color: rgba(235,189,114,.2); }
.stat-icon.blue { background: rgba(169,189,240,.1); color: var(--sky); border-color: rgba(169,189,240,.18); }
.stat-icon.rose { background: rgba(230,179,163,.1); color: var(--rose); border-color: rgba(230,179,163,.2); }
.stat-value { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 3vw, 44px); letter-spacing: 0; margin: 16px 0 10px; color: var(--ink); transform: translateZ(30px); }
.stat-foot { color: var(--muted); font-size: 12px; }
.stat-foot strong { color: var(--sage); font-weight: 500; }
.stat-foot .warn { color: var(--amber); }

/* Charts */
.chart-summary strong { font-family: var(--serif); font-size: 34px; font-weight: 500; color: var(--ink); }
.chart-summary span { color: var(--muted); font-size: 12px; }
.bar-chart { height: 190px; border-bottom-color: var(--line); background: repeating-linear-gradient(to bottom, transparent, transparent 46px, rgba(234,205,150,.07) 47px, transparent 48px); }
.bar-track { height: 150px; width: min(100%, 36px); }
.bar-fill { border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, rgba(234,205,150,.28), rgba(234,205,150,.06)); border: 1px solid rgba(234,205,150,.14); border-bottom: 0; }
.bar-column.today .bar-fill { background: var(--champagne); border: 0; box-shadow: 0 0 26px rgba(216,182,121,.45); }
.bar-column:hover .bar-fill { background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); }
.bar-label { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.chart-empty { color: var(--muted); font-size: 13px; }
.plan-mix-title { color: var(--ink-2); font-size: 13px; font-weight: 400; }
.plan-mix-count { color: var(--gold-soft); font-size: 12px; font-weight: 500; }
.plan-mix-track, .progress-track { height: 6px; background: rgba(255,246,228,.06); }
.plan-mix-bar, .progress-value { background: var(--champagne); box-shadow: 0 0 12px rgba(216,182,121,.4); }
.plan-mix-row:nth-child(2) .plan-mix-bar { background: linear-gradient(90deg, #9ccfad, #6fa985); box-shadow: none; }
.plan-mix-row:nth-child(3) .plan-mix-bar { background: linear-gradient(90deg, #e6b3a3, #c98a77); box-shadow: none; }
.plan-mix-row:nth-child(4) .plan-mix-bar { background: linear-gradient(90deg, #a9bdf0, #7d93cc); box-shadow: none; }
.plan-mix-row:nth-child(5) .plan-mix-bar { background: linear-gradient(90deg, #cfa9d6, #a57fb0); box-shadow: none; }
.plan-mix-empty, .insight-mini, .locked-note, .account-line, .insights-note, .detail-hero { background: rgba(255,246,228,.035); border: 1px solid var(--line); color: var(--muted); }
.statbar-fill { background: var(--champagne) !important; box-shadow: 0 0 16px rgba(216,182,121,.35) !important; }
.statbar-lab { color: var(--muted) !important; font-size: 11px !important; }
.statbar-val { color: var(--gold-soft) !important; font-size: 12px !important; }

/* Lists */
.due-row, .activity-row, .reminder-row, .history-item, .plan-setting-row { border-top-color: var(--line) !important; }
.activity-list .activity-row { background: rgba(255,246,228,.025); border-radius: 16px; box-shadow: none; }
.overview .activity-row, .lower-grid .activity-row { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; backdrop-filter: none; }
.lower-grid .activity-row:first-child { border-top: 0; }
.member-avatar { border-radius: 50%; background: rgba(216,182,121,.14); color: var(--gold-bright); font-size: 12px; font-weight: 600; border: 1px solid rgba(216,182,121,.22); }
.member-avatar.avatar-blue { background: rgba(169,189,240,.12); color: var(--sky); border-color: rgba(169,189,240,.22); }
.member-avatar.avatar-amber { background: rgba(235,189,114,.12); color: var(--amber); border-color: rgba(235,189,114,.22); }
.member-avatar.avatar-rose { background: rgba(230,179,163,.12); color: var(--rose); border-color: rgba(230,179,163,.22); }
.member-avatar.avatar-lilac { background: rgba(207,169,214,.12); color: #d9b6df; border-color: rgba(207,169,214,.22); }
.member-main strong, .history-item strong, .plan-setting-main strong, .account-line strong, .reminder-date strong { color: var(--ink); font-size: 14px; font-weight: 500; }
.member-main small, .history-item small, .plan-setting-main small, .account-line small, .reminder-date, .due-count small { color: var(--muted); font-size: 12px; }
.due-count strong { color: var(--amber); font-size: 13px; font-weight: 500; }
.cash-icon { border-radius: 50%; background: rgba(156,207,173,.1); color: var(--sage); border: 1px solid rgba(156,207,173,.2); }
.activity-amount { color: var(--gold-soft); font-size: 14px; font-weight: 500; }
.activity-amount small { color: var(--muted); font-size: 11px; }
.empty-mini { color: var(--muted); font-size: 13px; }
.activity-main small, .activity-row time { color: var(--muted) !important; }
.activity-dot.ok { background: var(--sage); box-shadow: 0 0 8px var(--sage); }
.activity-dot.bad { background: var(--coral); box-shadow: 0 0 8px var(--coral); }

/* Notices */
.notice-banner, [style*="background:#f1f8ef"] { background: linear-gradient(100deg, rgba(235,189,114,.1), rgba(235,189,114,.03)) !important; border: 1px solid rgba(235,189,114,.25) !important; border-radius: 18px; color: var(--ink-2) !important; }
.notice-banner strong { color: var(--amber); font-size: 14px; font-weight: 500; }
.notice-banner p { color: var(--muted-dark); font-size: 13px; }
.notice-banner svg { color: var(--amber); }
.notice-banner .notice-action { color: var(--amber); font-size: 12px; font-weight: 500; letter-spacing: .06em; }
.onboarding-card { border-color: var(--stroke-2); background: radial-gradient(500px 200px at 0% 0%, rgba(216,182,121,.16), transparent 70%), rgba(255,246,228,.03); border-radius: var(--radius); }
.onboarding-card p { color: var(--muted); font-size: 13px; }
.onboarding-card h3 { font-size: 22px; }
.onboarding-mark, .blank-icon, .settings-icon { background: rgba(216,182,121,.12); color: var(--gold); border: 1px solid rgba(216,182,121,.2); border-radius: 50%; }
.blank-state { color: var(--muted); }
.blank-state h3 { font-size: 24px; }
.blank-state p { font-size: 13.5px; }

/* ---------- Toolbar / filters / search ---------- */
.search-field input, .control { min-height: 44px; border-radius: 14px; background: rgba(8,7,6,.55); border: 1px solid var(--stroke); color: var(--ink); font-size: 14px; }
.search-field svg { color: var(--muted); }
.search-field input:focus, .control:focus { border-color: rgba(236,210,156,.55); box-shadow: 0 0 0 4px rgba(216,182,121,.12); background: rgba(8,7,6,.75); }
.control::placeholder, .search-field input::placeholder { color: var(--faint); }
select.control { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%23d8b679' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; }
select.control option { background: #15130f; color: var(--ink); }
input[type="date"].control, input[type="datetime-local"].control, input[type="time"].control { color-scheme: dark; }
.filter-pills { background: rgba(255,246,228,.03); border-color: var(--stroke); border-radius: 999px; padding: 4px; }
.filter-pill { min-height: 34px; padding: 0 14px; border-radius: 999px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.filter-pill:hover { color: var(--ink); }
.filter-pill.active { background: var(--champagne); color: #1b1407; box-shadow: 0 6px 16px -8px rgba(216,182,121,.8); }

/* ---------- Tables ---------- */
.table-card { overflow: hidden; }
.data-table thead th { height: 48px; background: rgba(255,246,228,.03); border-bottom-color: var(--line); color: var(--gold); font-size: 10.5px; font-weight: 500; letter-spacing: .22em; }
.data-table tbody td { height: 68px; border-bottom-color: var(--line); color: var(--ink-2); font-size: 13.5px; }
.data-table tbody tr { transition: background .25s; }
.data-table tbody tr:hover td { background: rgba(216,182,121,.045); }
.table-member-name button { color: var(--ink); font-size: 14px; font-weight: 500; }
.table-member-name button:hover { color: var(--gold-bright); }
.table-member-name small, .plan-cell small { color: var(--muted); font-size: 12px; }
.plan-cell strong { color: var(--ink-2); font-size: 13px; font-weight: 500; }
.money-cell { color: var(--gold-soft) !important; font-weight: 500 !important; }
.money-cell.muted { color: var(--faint) !important; }
.table-meta { border-top-color: var(--line); color: var(--muted); font-size: 12px; }
.table-meta strong { color: var(--ink-2); }
.data-table.is-stacked tbody tr { border-bottom-color: var(--line) !important; }
.data-table.is-stacked tbody td[data-label]::before { color: var(--gold) !important; letter-spacing: .2em !important; font-weight: 500 !important; }

/* Status pills */
.status-pill { min-height: 26px; padding: 0 11px; border-radius: 999px; font-size: 11px; font-weight: 500; letter-spacing: .06em; border: 1px solid transparent; }
.status-pill::before { box-shadow: 0 0 8px currentColor; }
.status-active, .status-paid, .status-sent { background: rgba(156,207,173,.1); color: var(--sage); border-color: rgba(156,207,173,.22); }
.status-expiring, .status-partial, .status-queued { background: rgba(235,189,114,.1); color: var(--amber); border-color: rgba(235,189,114,.24); }
.status-expired, .status-due, .status-failed, .status-cancelled { background: rgba(233,143,127,.1); color: var(--coral); border-color: rgba(233,143,127,.24); }
.status-upcoming, .status-no-plan, .status-paused { background: rgba(169,189,240,.08); color: var(--sky); border-color: rgba(169,189,240,.2); }
.status-none { background: rgba(255,246,228,.05); color: var(--muted); border-color: var(--line); }

/* Summary / insights */
.summary-tile { padding: 18px 20px; }
.summary-tile span, .insight-mini span { color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.summary-tile strong, .insight-mini strong { font-family: var(--serif); font-size: 30px; font-weight: 500; color: var(--ink); letter-spacing: 0; }
.insight-mini { border-radius: 16px; padding: 16px; }
.progress-line span { color: var(--ink-2); font-size: 13px; }
.progress-line strong { color: var(--gold-soft); font-size: 13px; font-weight: 500; }
.insights-note { border-radius: 16px; font-size: 13px; }

/* ---------- Forms & settings ---------- */
.field label { color: var(--muted-dark); font-size: 12px; font-weight: 500; letter-spacing: .06em; }
.field label .optional { color: var(--faint); font-size: 11px; }
.form-hint { color: var(--muted); font-size: 12px; }
.check-row { color: var(--ink-2); font-size: 13px; }
.check-row input { accent-color: var(--gold); width: 16px; height: 16px; }
textarea.control { min-height: 100px; }
.settings-card { padding: 26px; }
.settings-heading h3 { font-size: 22px; }
.settings-heading p { color: var(--muted); font-size: 13px; }
.locked-note { border-radius: 14px; font-size: 12px; }
.locked-note svg { color: var(--gold); }
.plan-setting-price { color: var(--gold-soft); font-size: 14px; font-weight: 500; }
.email-status { background: rgba(235,189,114,.1); color: var(--amber); border: 1px solid rgba(235,189,114,.22); border-radius: 999px; font-size: 11px; font-weight: 500; padding: 6px 12px; }
.email-status.ready { background: rgba(156,207,173,.1); color: var(--sage); border-color: rgba(156,207,173,.22); }
.code-snippet { background: #080706; border-color: var(--stroke); color: var(--gold-soft); font-size: 12px; border-radius: 14px; }
.email-step { color: var(--muted-dark); font-size: 13px; }
.account-line { border-radius: 16px; }
.account-line .profile-avatar { background: var(--champagne); color: #1b1407; }
.hours-day { color: var(--ink-2) !important; font-size: 14px !important; }
.hours-sep, .hours-closed { color: var(--muted) !important; }
.switch { background: rgba(255,246,228,.12); }
.switch.on { background: var(--champagne); box-shadow: 0 0 14px rgba(216,182,121,.45); }
.switch span { background: #fffaf0; }
.toggle-line { border-radius: 18px; }
.toggle-line small { color: var(--muted); }
.chip { background: rgba(216,182,121,.14); color: var(--gold-soft); border: 1px solid rgba(216,182,121,.25); }
.chip button { background: rgba(255,246,228,.12); }
.mkt-tab { background: var(--surface); border-color: var(--stroke); color: var(--muted-dark); }
.mkt-tab:hover { color: var(--ink); border-color: var(--stroke-2); }
.mkt-tab.active { background: var(--champagne); border-color: transparent; color: #1b1407; font-weight: 500; }
.letter-preview, .mkt-preview { border-color: var(--stroke-2); border-radius: 18px; }
.wa-btn { background: rgba(156,207,173,.12); border-color: rgba(156,207,173,.3); color: var(--sage); }
.wa-btn-grey { background: var(--surface); border-color: var(--stroke); color: var(--muted-dark); }
.wa-days { color: var(--sage); } .wa-days.due { color: var(--coral); }
[style*="color:#456440"], [style*="color:#304337"] { color: var(--ink-2) !important; }
[style*="color:#b65c52"] { color: var(--coral) !important; }
[style*="background:#eef1ed"] { background: var(--line) !important; }
[style*="color:#14231e"] { color: var(--ink) !important; }

/* ---------- Live control panel ---------- */
.live-count strong { color: var(--ink); font-weight: 500; font-size: 88px;
  background: linear-gradient(180deg, #fffaf0 20%, #d8b679 120%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.live-count small { color: var(--muted); letter-spacing: .3em; }
.live-btn { width: 92px; height: 92px; font-family: var(--serif); }
.live-btn.plus { background: var(--champagne); box-shadow: 0 18px 40px -12px rgba(216,182,121,.75), inset 0 1px 0 rgba(255,255,255,.6); }
.live-btn.minus { background: rgba(255,246,228,.04); color: var(--rose); border: 1px solid rgba(230,179,163,.35); }

/* ---------- Modal & toast ---------- */
.modal-backdrop { background: rgba(5,4,3,.68); backdrop-filter: blur(10px) saturate(1.1); }
.modal-card { background: linear-gradient(170deg, #1a1712, #100e0c 60%); border: 1px solid var(--stroke-2); border-radius: 26px; color: var(--ink); box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,.4); }
.modal-head { background: rgba(20,18,14,.92); border-bottom-color: var(--line); padding: 24px 26px 18px; }
.modal-head h2 { font-size: 28px; font-weight: 500; }
.modal-head p { color: var(--muted); font-size: 13px; }
.modal-body { padding: 22px 26px 26px; }
.modal-close { background: var(--surface); border-color: var(--stroke); color: var(--ink-2); border-radius: 50%; width: 34px; height: 34px; }
.modal-close:hover { color: var(--gold-bright); border-color: var(--stroke-2); }
.detail-hero { border-radius: 18px; }
.detail-hero h3 { font-size: 24px; }
.detail-hero p { color: var(--muted); font-size: 13px; }
.detail-section h4 { color: var(--gold); font-family: var(--sans); font-size: 10.5px; font-weight: 500; letter-spacing: .26em; }
.detail-fact { border-radius: 14px; box-shadow: none; padding: 12px 14px; }
.detail-fact span { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.detail-fact strong { color: var(--ink); font-size: 14px; font-weight: 500; }
.history-side strong { color: var(--gold-soft); font-size: 13px; }
.toast { background: rgba(22,19,15,.94); border: 1px solid var(--stroke-2); color: var(--ink-2); border-radius: 16px; font-size: 13.5px; backdrop-filter: blur(14px); box-shadow: var(--shadow-lg); }
.toast svg { color: var(--sage); }
.toast.error { border-color: rgba(233,143,127,.35); color: #f3c6bd; }
.toast.error svg { color: var(--coral); }
.loading-inline { color: var(--muted); font-size: 13px; }
.screen-overlay { background: rgba(5,4,3,.6) !important; backdrop-filter: blur(4px); }

/* ---------- Atlas assistant ---------- */
.ai-fab { background: var(--champagne); color: #1b1407; font-weight: 600; box-shadow: -10px 0 30px -6px rgba(216,182,121,.5); }
.ai-drawer { background: linear-gradient(170deg, #1a1712, #0f0d0b 70%); border-color: var(--stroke-2); border-radius: 24px; backdrop-filter: blur(18px); }
.ai-head { background: transparent; border-bottom-color: var(--line); }
.ai-head strong { font-size: 24px; color: var(--gold-soft); }
.ai-head small { color: var(--muted); }
.ai-msg { font-size: 14px; border-radius: 16px; }
.ai-msg.user { background: var(--champagne); }
.ai-msg.assistant { background: rgba(255,246,228,.04); border-color: var(--line); color: var(--ink-2); }
.ai-form { border-top-color: var(--line); }

/* ---------- Motion: staggered entrance ---------- */
@keyframes luxeRise { from { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
#content-view.view-anim { animation: none; }
#content-view.view-anim > *, #content-view.view-anim .stat-grid > *, #content-view.view-anim .dashboard-grid > *, #content-view.view-anim .lower-grid > * {
  animation: luxeRise .8s var(--ease) both; }
#content-view.view-anim .stat-grid > *:nth-child(2) { animation-delay: .06s; }
#content-view.view-anim .stat-grid > *:nth-child(3) { animation-delay: .12s; }
#content-view.view-anim .stat-grid > *:nth-child(4) { animation-delay: .18s; }
#content-view.view-anim .dashboard-grid > * { animation-delay: .22s; }
#content-view.view-anim .lower-grid > * { animation-delay: .3s; }
.auth-card { animation: luxeRise 1s .2s var(--ease) both; }
.auth-copy { animation: luxeRise 1.1s .35s var(--ease) both; }

/* ---------- Boot loader refinements ---------- */
.boot-curtain { background: var(--bg); }
.boot-num { font-weight: 500; }
.boot-label { color: var(--gold); opacity: .8; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) { :root { --sidebar-width: 240px; } .stat-value { font-size: 34px; } }
@media (max-width: 950px) {
  :root { --sidebar-width: 0px; }
  .sidebar { width: 272px; }
  .nav-item.active::before { left: -16px; }
}
@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-aside { display: flex !important; min-height: 46vh; padding: 26px 22px; border-right: 0; border-bottom: 1px solid var(--stroke); }
  .auth-copy { margin-top: auto; }
  .auth-copy h1 { font-size: clamp(40px, 11vw, 56px); }
  .auth-copy p, .auth-feature-list, .auth-footer { display: none; }
  .auth-panel { min-height: auto; padding: 22px 16px 40px; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .topbar { min-height: 72px; }
  .topbar-heading { font-size: 21px; }
  .content-wrap { padding-top: 24px; }
  .page-heading h1 { font-size: 32px; }
  .stat-grid { gap: 12px; }
  .stat-card { padding: 16px; border-radius: 18px; }
  .stat-value { font-size: 28px; margin: 12px 0 6px; }
  .stat-label { font-size: 10px; letter-spacing: .14em; }
  .stat-icon { width: 34px; height: 34px; }
  .panel-pad { padding: 18px; }
  .modal-card { border-radius: 24px 24px 14px 14px; }
  .luxe-ambient { opacity: .35; }
  .live-count strong { font-size: 64px; }
  .live-btn { width: 72px; height: 72px; }
}
@media (max-width: 360px) { .stat-value { font-size: 23px; } }
@media (prefers-reduced-motion: reduce) {
  #content-view.view-anim > *, .auth-card, .auth-copy { animation: none !important; }
  .stat-card { transform: none !important; }
}

/* ======================= WhatsApp (v3.2) ======================= */
.wa-stats { margin-bottom: 18px; }
.wa-stats + .panel, .wa-templates { margin-top: 18px; }
.wa-filters { margin: 4px 0 18px; overflow-x: auto; max-width: 100%; }
.wa-pill-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: rgba(255,246,228,.08); font-size: 11px; }
.filter-pill.active .wa-pill-count { background: rgba(27,20,7,.16); }
.wa-glyph { width: 15px; height: 15px; flex: none; }

.wa-next { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; padding: 18px 20px; border-radius: 20px;
  border: 1px solid rgba(156,207,173,.28); background: radial-gradient(420px 160px at 0% 0%, rgba(37,211,102,.12), transparent 70%), rgba(255,246,228,.03); }
.wa-next .member-avatar { width: 48px; height: 48px; font-size: 14px; flex: none; }
.wa-next-main { min-width: 0; flex: 1; display: grid; gap: 3px; }
.wa-next-label { color: var(--sage); font-size: 10.5px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; }
.wa-next-main strong { font-family: var(--serif); font-size: 24px; font-weight: 500; color: var(--ink); line-height: 1.1; }
.wa-next-main small { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; }
.wa-next-btn { min-height: 48px; padding: 0 22px; flex: none; background: linear-gradient(135deg, #3ee07f, #1fae5b 60%, #25d366) !important; color: #052b14 !important;
  box-shadow: 0 14px 34px -14px rgba(37,211,102,.75), inset 0 1px 0 rgba(255,255,255,.5) !important; }
.wa-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: rgba(5,43,20,.18); font-size: 12px; letter-spacing: 0; }
.wa-next-empty { border-color: var(--stroke); background: rgba(255,246,228,.03); }
.wa-next-empty .blank-icon { width: 44px; height: 44px; margin: 0; flex: none; color: var(--sage); }
.wa-next-empty .wa-next-main strong { font-size: 20px; }

.wa-table .wa-name { display: block; color: var(--ink); font-size: 14px; font-weight: 500; }
.wa-table tbody td:last-child { text-align: right; }
.wa-row-done td { opacity: .62; }
.wa-row-done td:last-child { opacity: 1; }
.wa-last strong { display: block; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.wa-last small { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.wa-btn { display: inline-flex; gap: 7px; background: rgba(37,211,102,.12) !important; border: 1px solid rgba(37,211,102,.35) !important; color: #7fe3a6 !important; }
.wa-btn:hover { background: rgba(37,211,102,.2) !important; }

.wa-save { font-size: 12px; color: var(--muted); white-space: nowrap; }
.wa-save[data-state="saved"] { color: var(--sage); }
.wa-save[data-state="error"] { color: var(--coral); }
.wa-editor { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr); gap: 22px; align-items: start; margin-top: 6px; }
.wa-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.wa-presets > span { color: var(--muted); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; margin-right: 4px; }
.wa-preset { min-height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--surface); color: var(--ink-2); font: 500 12.5px var(--sans); cursor: pointer; transition: border-color .2s, color .2s; }
.wa-preset:hover { border-color: var(--stroke-2); color: var(--gold-bright); }
.wa-textarea { min-height: 220px; font-size: 14.5px; line-height: 1.6; font-family: var(--sans); }
.wa-templates code { padding: 1px 6px; border-radius: 6px; background: rgba(216,182,121,.12); color: var(--gold-soft); font-size: 12px; }

/* WhatsApp-style phone preview */
.wa-phone { overflow: hidden; border-radius: 24px; border: 1px solid var(--stroke-2); background: #0b141a; box-shadow: var(--shadow-sm); }
.wa-phone-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #1f2c34; }
.wa-phone-top strong { display: block; color: #e9edef; font-size: 14px; font-weight: 500; }
.wa-phone-top small { display: block; color: #8696a0; font-size: 11.5px; }
.wa-phone-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--champagne); color: #1b1407; font-size: 12px; font-weight: 600; flex: none; }
.wa-phone-body { min-height: 230px; padding: 18px 14px; background:
  radial-gradient(circle at 20% 20%, rgba(255,255,255,.025) 0 2px, transparent 3px) 0 0/26px 26px, #0b141a; }
.wa-bubble { position: relative; max-width: 92%; margin-left: auto; padding: 8px 10px 20px; border-radius: 10px 0 10px 10px; background: #005c4b; color: #e9edef; box-shadow: 0 1px 1px rgba(0,0,0,.3); }
.wa-bubble::after { content: ""; position: absolute; top: 0; right: -8px; border-width: 0 0 10px 8px; border-style: solid; border-color: transparent transparent transparent #005c4b; }
.wa-bubble p { margin: 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.wa-bubble-meta { position: absolute; right: 9px; bottom: 4px; color: #8fd3c3; font-size: 10.5px; }

@media (max-width: 900px) { .wa-editor { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .wa-next { flex-wrap: wrap; padding: 16px; }
  .wa-next-btn { width: 100%; }
  .wa-next-main strong { font-size: 21px; }
  .wa-table tbody td:last-child { text-align: left; }
  .wa-table tbody td:last-child .button { width: 100%; }
  .wa-stats .summary-tile strong { font-size: 24px; }
}

/* ---- WhatsApp automatic reminders (v3.3) ---- */
.wa-auto { margin-bottom: 18px; border-color: rgba(37,211,102,.22); background: radial-gradient(520px 200px at 0% 0%, rgba(37,211,102,.1), transparent 70%), linear-gradient(160deg, rgba(255,246,228,.055), rgba(255,246,228,.015)); }
.wa-auto-head { display: flex; align-items: center; gap: 16px; }
.wa-auto-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%; background: rgba(37,211,102,.14); color: #7fe3a6; border: 1px solid rgba(37,211,102,.3); }
.wa-auto-icon .wa-glyph { width: 22px; height: 22px; }
.wa-auto-main { flex: 1; min-width: 0; }
.wa-auto-main .panel-subtitle { font-size: 13px; line-height: 1.5; margin-top: 6px; }
.wa-auto-state { display: inline-block; margin-right: 6px; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; background: rgba(255,246,228,.08); color: var(--muted-dark); }
.wa-auto-state.on { background: rgba(37,211,102,.16); color: #7fe3a6; }
.wa-auto-state.off { background: rgba(233,143,127,.12); color: var(--coral); }
.wa-auto .switch.on { background: linear-gradient(135deg, #3ee07f, #1fae5b); box-shadow: 0 0 14px rgba(37,211,102,.45); }
.wa-auto .switch:disabled { opacity: .4; }
.wa-auto-facts { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.wa-auto-facts > div span { display: block; color: var(--muted); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; }
.wa-auto-facts > div strong { display: block; margin-top: 4px; color: var(--ink); font-size: 14px; font-weight: 500; }
.wa-auto-facts .button { margin-left: auto; }
.wa-auto-error { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(233,143,127,.08); border: 1px solid rgba(233,143,127,.22); color: #f3c6bd; font-size: 12.5px; }
.wa-auto-tag { display: inline-block; padding: 0 6px; border-radius: 6px; background: rgba(37,211,102,.14); color: #7fe3a6; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; }
.wa-last.is-failed strong { color: var(--coral); }
@media (max-width: 640px) { .wa-auto-facts .button { margin-left: 0; width: 100%; } .wa-auto-head { align-items: flex-start; } }

/* =====================================================================
   v3.4 — readability pass + light "Ivory" theme
   ===================================================================== */

/* ---- Sidebar always fits: scrolls on short screens, Settings never hidden ---- */
.sidebar { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.sidebar::-webkit-scrollbar { display: none; }
@media (max-height: 900px) {
  .sidebar { padding-top: 18px; padding-bottom: 12px; }
  .sidebar-brand { padding-bottom: 16px; }
  .sidebar-label { margin: 16px 12px 6px; }
  .nav-item { min-height: 40px; }
  .sidebar-plan-card { display: none; }
}
@media (max-height: 680px) { .nav-item { min-height: 36px; } .sidebar-label { margin: 12px 12px 4px; } }

/* ---- Dark theme: brighter text, lighter surfaces, calmer background ---- */
html[data-theme="dark"] {
  --bg: #13110f;
  --ink: #f8f3ea;
  --ink-2: #e8e0d3;
  --muted: #bfb6a7;
  --muted-dark: #d5ccbd;
  --faint: #93897b;
  --stroke: rgba(234, 205, 150, .17);
  --stroke-2: rgba(234, 205, 150, .3);
  --line: rgba(234, 205, 150, .13);
}
html[data-theme="dark"] body { font-size: 15px; }
html[data-theme="dark"] :is(.panel, .stat-card, .summary-tile, .table-card, .settings-card) {
  background: linear-gradient(160deg, rgba(255,246,228,.085), rgba(255,246,228,.035)), #1a1814; }
html[data-theme="dark"] .luxe-ambient { opacity: .28; }
html[data-theme="dark"] .data-table tbody td { color: var(--ink); }

/* ---- Light "Ivory" theme (dashboard only; sign-in screen stays dark) ---- */
html[data-theme="light"] body:not(.luxe-auth) {
  background: radial-gradient(1200px 700px at 85% -10%, rgba(214,174,104,.16), transparent 60%), #f5efe5;
  color: #211c15;
}
html[data-theme="light"] body:not(.luxe-auth) .luxe-ambient { opacity: .32; }
html[data-theme="light"] body:not(.luxe-auth) .luxe-grain { opacity: .02; }
html[data-theme="light"] .app-shell {
  color-scheme: light;
  --ink: #1f1a14;
  --ink-2: #3a3228;
  --muted: #6b6152;
  --muted-dark: #4f463a;
  --faint: #998d7c;
  --gold: #9a7330;
  --gold-bright: #7f5c1f;
  --gold-soft: #6e4f19;
  --stroke: rgba(120, 88, 36, .16);
  --stroke-2: rgba(120, 88, 36, .3);
  --line: rgba(120, 88, 36, .12);
  --line-strong: rgba(120, 88, 36, .2);
  --surface: #ffffff;
  --surface-2: #fbf8f2;
  --sage: #2e7a4c;
  --amber: #9b660f;
  --coral: #b4473a;
  --sky: #3d5ca6;
  --rose: #a5584a;
  --shadow-sm: 0 1px 2px rgba(60, 40, 10, .05), 0 14px 34px -22px rgba(60, 40, 10, .28);
  --shadow-lg: 0 30px 80px -20px rgba(60, 40, 10, .35);
  --glow: 0 0 0 1px rgba(154, 115, 48, .12), 0 18px 40px -22px rgba(154, 115, 48, .45);
  font-size: 15px;
}
/* sidebar keeps its dark espresso look for contrast */
html[data-theme="light"] .app-shell .sidebar {
  --ink: #f8f3ea; --ink-2: #e8e0d3; --muted: #c2b9aa; --muted-dark: #d5ccbd; --faint: #968c7e;
  --gold: #d8b679; --gold-bright: #ecd29c; --gold-soft: #f3e3c2;
  --stroke: rgba(234,205,150,.16); --stroke-2: rgba(234,205,150,.28); --line: rgba(234,205,150,.12);
  --surface: rgba(255,246,228,.04); --surface-2: rgba(255,246,228,.06);
  background: linear-gradient(180deg, #1d1915, #141210);
}
html[data-theme="light"] .app-shell .topbar { background: rgba(250, 246, 238, .86); border-bottom-color: var(--line); }
html[data-theme="light"] .app-shell .breadcrumb { color: var(--gold); }

/* surfaces */
html[data-theme="light"] .app-shell :is(.panel, .stat-card, .summary-tile, .table-card, .settings-card, .toggle-line, .chip-box, .detail-fact) {
  background: #fffdf9; border-color: var(--stroke); box-shadow: var(--shadow-sm); backdrop-filter: none; }
html[data-theme="light"] .app-shell :is(.panel, .stat-card)::before { background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(214,174,104,.12), transparent 60%); }
html[data-theme="light"] .app-shell .stat-card::after { background: linear-gradient(90deg, transparent, rgba(154,115,48,.45), transparent); }
html[data-theme="light"] .app-shell :is(.plan-mix-empty, .insight-mini, .locked-note, .account-line, .insights-note, .detail-hero) { background: #f8f3ea; border-color: var(--line); }
html[data-theme="light"] .app-shell .activity-list .activity-row { background: #fbf8f2; }
html[data-theme="light"] .app-shell .lower-grid .activity-row { background: transparent; }
html[data-theme="light"] .app-shell .onboarding-card { background: radial-gradient(500px 200px at 0% 0%, rgba(214,174,104,.18), transparent 70%), #fffdf9; }

/* buttons & inputs */
html[data-theme="light"] .app-shell .button:not(.button-primary):not(.button-accent):not(.wa-btn):not(.wa-next-btn):not(.button-danger) { background: #fff; border-color: var(--stroke); color: var(--ink); }
html[data-theme="light"] .app-shell .button:not(.button-primary):not(.button-accent):not(.wa-next-btn):hover { border-color: var(--stroke-2); }
html[data-theme="light"] .app-shell :is(.icon-button, .button-icon, .modal-close, .mobile-menu) { background: #fff; border-color: var(--stroke); color: var(--ink-2); }
html[data-theme="light"] .app-shell :is(.control, .search-field input) { background: #fff; border-color: rgba(120,88,36,.22); color: var(--ink); }
html[data-theme="light"] .app-shell :is(.control, .search-field input):focus { background: #fff; border-color: rgba(154,115,48,.6); box-shadow: 0 0 0 4px rgba(214,174,104,.18); }
html[data-theme="light"] .app-shell select.control option { background: #fff; color: var(--ink); }
html[data-theme="light"] .app-shell :is(input[type="date"], input[type="datetime-local"], input[type="time"]).control { color-scheme: light; }
html[data-theme="light"] .app-shell .filter-pills { background: #efe7da; border-color: var(--line); }
html[data-theme="light"] .app-shell .mkt-tab { background: #fff; }
html[data-theme="light"] .app-shell .wa-preset { background: #fff; }
html[data-theme="light"] .app-shell .switch:not(.on) { background: #d9cfbf; }

/* tables & pills */
html[data-theme="light"] .app-shell .data-table thead th { background: #f8f3ea; color: var(--gold); }
html[data-theme="light"] .app-shell .data-table tbody td { color: var(--ink-2); }
html[data-theme="light"] .app-shell .data-table tbody tr:hover td { background: rgba(214,174,104,.08); }
html[data-theme="light"] .app-shell :is(.status-active, .status-paid, .status-sent) { background: rgba(46,122,76,.1); color: #2e7a4c; border-color: rgba(46,122,76,.25); }
html[data-theme="light"] .app-shell :is(.status-expiring, .status-partial, .status-queued) { background: rgba(176,118,20,.1); color: #8d5c0c; border-color: rgba(176,118,20,.28); }
html[data-theme="light"] .app-shell :is(.status-expired, .status-due, .status-failed, .status-cancelled) { background: rgba(180,71,58,.09); color: #a8402f; border-color: rgba(180,71,58,.25); }
html[data-theme="light"] .app-shell :is(.status-upcoming, .status-no-plan, .status-paused) { background: rgba(61,92,166,.08); color: #3d5ca6; border-color: rgba(61,92,166,.22); }
html[data-theme="light"] .app-shell .status-none { background: #f1ebe0; color: var(--muted); }
html[data-theme="light"] .app-shell .member-avatar { background: rgba(214,174,104,.2); color: #7a5717; border-color: rgba(154,115,48,.25); }
html[data-theme="light"] .app-shell .member-avatar.avatar-blue { background: rgba(61,92,166,.1); color: #3d5ca6; }
html[data-theme="light"] .app-shell .member-avatar.avatar-amber { background: rgba(176,118,20,.12); color: #8d5c0c; }
html[data-theme="light"] .app-shell .member-avatar.avatar-rose { background: rgba(165,88,74,.1); color: #9a4a3c; }
html[data-theme="light"] .app-shell .member-avatar.avatar-lilac { background: rgba(130,90,150,.1); color: #74508a; }

/* charts */
html[data-theme="light"] .app-shell .bar-fill { background: linear-gradient(180deg, rgba(154,115,48,.28), rgba(154,115,48,.1)); border-color: rgba(154,115,48,.2); }
html[data-theme="light"] .app-shell .bar-column.today .bar-fill { background: var(--champagne); box-shadow: 0 10px 24px -8px rgba(154,115,48,.55); }
html[data-theme="light"] .app-shell .bar-chart { background: repeating-linear-gradient(to bottom, transparent, transparent 46px, rgba(120,88,36,.08) 47px, transparent 48px); }
html[data-theme="light"] .app-shell :is(.plan-mix-track, .progress-track) { background: #efe7da; }

/* notices, modal, misc */
html[data-theme="light"] .app-shell :is(.notice-banner, [style*="background:#f1f8ef"]) { background: #fff6e4 !important; border-color: #ecd5a8 !important; color: #5d4618 !important; }
html[data-theme="light"] .app-shell .notice-banner p { color: #6b5426; }
html[data-theme="light"] .app-shell .modal-backdrop { background: rgba(40, 30, 15, .35); }
html[data-theme="light"] .app-shell .modal-card { background: #fffdf9; border-color: var(--stroke); }
html[data-theme="light"] .app-shell .modal-head { background: rgba(255, 253, 249, .96); }
html[data-theme="light"] .app-shell .live-count strong { background: linear-gradient(180deg, #2a2219 20%, #9a7330 130%); -webkit-background-clip: text; background-clip: text; }
html[data-theme="light"] .app-shell .live-btn.minus { background: #fff; }
html[data-theme="light"] .app-shell .wa-btn { background: rgba(37,211,102,.12) !important; border-color: rgba(26,138,76,.35) !important; color: #157a40 !important; }
html[data-theme="light"] .app-shell :is(.wa-auto-icon, .wa-auto-tag, .wa-auto-state.on) { color: #157a40; }
html[data-theme="light"] .app-shell .wa-auto { background: radial-gradient(520px 200px at 0% 0%, rgba(37,211,102,.1), transparent 70%), #fffdf9; }
html[data-theme="light"] .app-shell .wa-next { background: radial-gradient(420px 160px at 0% 0%, rgba(37,211,102,.12), transparent 70%), #fffdf9; }
html[data-theme="light"] .app-shell .wa-next-label { color: #157a40; }
html[data-theme="light"] .app-shell .wa-auto-error { background: #fdeeea; color: #8f3a2e; }
html[data-theme="light"] .app-shell .wa-pill-count { background: rgba(120,88,36,.1); }
html[data-theme="light"] .app-shell .wa-templates code { background: rgba(214,174,104,.2); color: #6e4f19; }
html[data-theme="light"] .app-shell :is(.chart-summary strong, .stat-value) { color: var(--ink); }
html[data-theme="light"] .app-shell .notify-dot { border-color: #faf6ee; }
html[data-theme="light"] .app-shell [style*="color:#b0b9b2"] { color: var(--faint) !important; }
.theme-toggle svg { width: 18px; height: 18px; }

/* big money values must fit their card at any width */
.stat-value { font-size: clamp(22px, 2.15vw, 42px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .stat-value { font-size: clamp(20px, 6.2vw, 28px); } }

/* ---- Gym logo (v3.6) ---- */
.brand-mark.has-logo { padding: 0; overflow: hidden; background: #fff; box-shadow: 0 6px 18px -8px rgba(0,0,0,.6), 0 0 0 1px rgba(234,205,150,.35); }
.brand-mark img, .logo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-field { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; padding: 16px; border-radius: 18px; border: 1px dashed var(--stroke-2); background: var(--surface); }
.logo-preview { display: grid; place-items: center; width: 76px; height: 76px; flex: none; border-radius: 50%; overflow: hidden;
  background: var(--champagne); color: #1b1407; font: 600 32px/1 var(--serif); box-shadow: 0 10px 24px -12px rgba(0,0,0,.5); }
.logo-preview.has-logo { background: #fff; box-shadow: 0 10px 24px -12px rgba(0,0,0,.5), 0 0 0 1px var(--stroke-2); }
.logo-copy { min-width: 0; }
.logo-copy strong { display: block; color: var(--ink); font-size: 14px; font-weight: 500; }
.logo-copy .form-hint { margin: 4px 0 10px; }
.logo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.logo-upload { cursor: pointer; }
@media (max-width: 520px) { .logo-field { flex-direction: column; align-items: flex-start; } }

/* =====================================================================
   v3.7 — performance pass: same look, far less GPU work
   ===================================================================== */
body { background-attachment: scroll; }
.luxe-grain, .luxe-ambient { display: none !important; }
/* see-through blur on every card is the most expensive effect on low-end devices: use solid surfaces instead */
.panel, .stat-card, .summary-tile, .table-card, .settings-card, .toggle-line, .chip-box, .activity-row, .detail-fact, .auth-feature { backdrop-filter: none !important; }
html[data-theme="dark"] :is(.panel, .stat-card, .summary-tile, .table-card, .settings-card) { background: linear-gradient(160deg, rgba(255,246,228,.07), rgba(255,246,228,.03)), #1a1814; }
.sidebar { backdrop-filter: none; }
.topbar { backdrop-filter: blur(8px); }
.screen-overlay { backdrop-filter: none; }
.modal-backdrop { backdrop-filter: blur(3px); }
.auth-card { backdrop-filter: none; background: linear-gradient(160deg, rgba(255,246,228,.06), rgba(255,246,228,.015)), #12100d; }
/* entrance animation without blur filters */
@keyframes luxeRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
#content-view.view-anim > *, #content-view.view-anim .stat-grid > *, #content-view.view-anim .dashboard-grid > *, #content-view.view-anim .lower-grid > * { animation-duration: .5s; }
/* sign-in screen without 3D (phones / slow devices): keep a soft gold glow */
.auth-aside { background: radial-gradient(520px 420px at 50% 42%, rgba(216,182,121,.2), transparent 65%), linear-gradient(180deg, #0f0d0b, #090807); }

/* ---- QR codes card (v3.7) ---- */
.qr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qr-tile { display: grid; justify-items: center; gap: 8px; padding: 18px 14px; border: 1px solid var(--stroke); border-radius: 18px; background: var(--surface); text-align: center; }
.qr-tile img { width: 100%; max-width: 170px; aspect-ratio: 1; border-radius: 12px; background: #fff; padding: 6px; box-shadow: 0 8px 22px -14px rgba(0,0,0,.6); }
.qr-tile strong { color: var(--ink); font-size: 14px; font-weight: 500; margin-top: 4px; }
.qr-tile small { color: var(--muted); font-size: 12px; line-height: 1.45; min-height: 2.9em; }
.qr-link { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }
.qr-tile .button { margin-top: 4px; }
@media (max-width: 520px) { .qr-grid { grid-template-columns: 1fr; } }

/* ---- capacity setting (v3.7.1) ---- */
.capacity-row { display: flex; align-items: center; gap: 12px; }
.capacity-row .control { max-width: 130px; font-size: 18px; font-weight: 500; text-align: center; }
.capacity-unit { color: var(--muted); font-size: 13px; }

/* ---- True visit statistics + weekly report (v3.8) ---- */
.visit-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0 0; max-width: 860px; }
.visit-kpis .summary-tile small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.visit-panel, .weekly-panel { margin-top: 16px; }
.visit-panel .statbars { gap: 8px; min-height: 0; padding: 18px 2px 4px; align-items: stretch; }
.visit-panel .statbar { height: 210px; flex: 1 0 34px; justify-content: flex-end; }
.visit-panel .statbar-fill { max-height: calc(100% - 64px); max-width: 34px; border-radius: 8px 8px 3px 3px; }
.visit-panel .statbar-val { font-size: 14px !important; font-weight: 600; color: var(--ink) !important; order: -1; }
.visit-panel .statbar.is-zero .statbar-val { color: var(--faint) !important; font-weight: 400; }
.visit-panel .statbar-lab { margin-top: 4px; }
.statbar-sub { font-size: 10.5px; color: var(--faint); white-space: nowrap; }
.weekly-head { display: flex; align-items: flex-start; gap: 16px; }
.weekly-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: rgba(216,182,121,.14); color: var(--gold); border: 1px solid rgba(216,182,121,.25); }
.weekly-icon svg { width: 20px; height: 20px; }
.weekly-main { flex: 1; min-width: 0; }
.weekly-main .panel-subtitle { font-size: 13px; line-height: 1.55; margin-top: 6px; }
.weekly-main .panel-subtitle strong { color: var(--ink); font-weight: 500; }
@media (max-width: 900px) { .visit-kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .visit-panel .statbar { flex-basis: 26px; } .statbar-sub { display: none; } }
