/* ============================================================
   FlipStay — NOIR GLASS · dual theme engine
   Night (default): dark cinematic luxury.
   Day: warm ivory glass. Same gold, same morphs.
   Every themeable value flows through variables below.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root{
  color-scheme: dark;
  --bg0: #05070a;
  --ink: #f4f1e8;
  --ink-dim: #cfc9ba;
  --muted: #9b968b;
  --faint: #6d695f;

  --line: rgba(255,255,255,.095);
  --line-soft: rgba(255,255,255,.055);

  --glass1: rgba(255,255,255,.082);
  --glass2: rgba(255,255,255,.028);
  --strong1: rgba(34,40,50,.78);
  --strong2: rgba(14,18,24,.72);

  --inset-hi: rgba(255,255,255,.09);
  --inset-hi2: rgba(255,255,255,.12);

  --gold: #d8b25c;
  --gold-2: #f0d189;
  --gold-deep: #a8823a;
  --gold-soft: rgba(216,178,92,.13);
  --gold-line: rgba(216,178,92,.38);
  --gold-t: #f0d189;

  --emerald: #3ecf8e;
  --emerald-soft: rgba(62,207,142,.12);
  --ok-t: #5fe3a1;
  --danger: #f07878;
  --danger-soft: rgba(240,120,120,.12);
  --danger-t: #ff9d9d;
  --amber: #e8b34b;
  --amber-soft: rgba(232,179,75,.13);
  --amber-t: #f2c66d;
  --blue: #7aa8ff;
  --blue-soft: rgba(122,168,255,.13);
  --blue-t: #9dbfff;

  --wash1: radial-gradient(1100px 600px at 12% -6%, rgba(46,160,110,.10), transparent 60%);
  --wash2: radial-gradient(900px 700px at 105% 110%, rgba(216,178,92,.075), transparent 55%);
  --wash3: radial-gradient(700px 500px at 88% 8%, rgba(90,120,200,.06), transparent 60%);

  --track: rgba(255,255,255,.09);
  --chatbg: rgba(0,0,0,.25);
  --chart-grid: rgba(255,255,255,.07);
  --scrim: rgba(3,5,8,.6);
  --orb-op: .55;

  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  --shadow: 0 24px 60px -22px rgba(0,0,0,.65);
  --gold-glow: 0 10px 28px -8px rgba(216,178,92,.5);

  --font-display: 'Manrope', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

html[data-theme="light"]{
  color-scheme: light;
  --bg0: #f1eee6;
  --ink: #211c13;
  --ink-dim: #57503f;
  --muted: #7c7565;
  --faint: #a8a191;

  --line: rgba(38,30,16,.13);
  --line-soft: rgba(38,30,16,.07);

  --glass1: rgba(255,255,255,.78);
  --glass2: rgba(255,255,255,.52);
  --strong1: rgba(255,255,255,.9);
  --strong2: rgba(250,247,240,.82);

  --inset-hi: rgba(255,255,255,.85);
  --inset-hi2: rgba(255,255,255,.95);

  --gold-t: #8a6a25;

  --ok-t: #1e7f4f;
  --danger-t: #b8352f;
  --amber-t: #96690f;
  --blue-t: #2f6fd6;

  --wash1: radial-gradient(1100px 600px at 12% -6%, rgba(46,160,110,.09), transparent 60%);
  --wash2: radial-gradient(900px 700px at 105% 110%, rgba(216,178,92,.16), transparent 55%);
  --wash3: radial-gradient(700px 500px at 88% 8%, rgba(90,120,200,.08), transparent 60%);

  --track: rgba(38,30,16,.1);
  --chatbg: rgba(38,30,16,.045);
  --chart-grid: rgba(38,30,16,.08);
  --scrim: rgba(38,30,16,.42);
  --orb-op: .5;

  --shadow: 0 24px 55px -24px rgba(60,50,25,.28);
}

*{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }
body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background: var(--wash1), var(--wash2), var(--wash3), var(--bg0);
  background-attachment: fixed;
  min-height: 100vh;
  transition: background-color .4s, color .4s;
}
::selection{ background: rgba(216,178,92,.32); }

/* ---------- Ambient aurora ---------- */
.aurora{ position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb{ position: absolute; border-radius: 50%; filter: blur(110px); opacity: var(--orb-op); animation: drift 26s ease-in-out infinite alternate; transition: opacity .4s; }
.orb.o1{ width: 480px; height: 480px; left: -140px; top: -120px; background: rgba(38,150,100,.16); }
.orb.o2{ width: 420px; height: 420px; right: -120px; top: 32%; background: rgba(216,178,92,.10); animation-delay: -8s; }
.orb.o3{ width: 520px; height: 520px; left: 30%; bottom: -220px; background: rgba(70,110,190,.10); animation-delay: -16s; }
@keyframes drift{ from{ transform: translate(0,0) scale(1); } to{ transform: translate(70px,50px) scale(1.12); } }

/* ---------- Entrance choreography ---------- */
@keyframes morphIn{
  from{ opacity: 0; transform: translateY(22px) scale(.985); filter: blur(7px); }
  to{ opacity: 1; transform: none; filter: blur(0); }
}
.morph-in{ animation: morphIn .7s cubic-bezier(.2,.7,.25,1) both; }
.d1{ animation-delay: .06s; } .d2{ animation-delay: .14s; }
.d3{ animation-delay: .22s; } .d4{ animation-delay: .3s; }

.pview{ animation: viewIn .45s cubic-bezier(.2,.7,.25,1); }
@keyframes viewIn{ from{ opacity: 0; transform: translateY(14px); } }

/* ---------- Typography ---------- */
h1,h2,h3,.h-display{ font-family: var(--font-display); letter-spacing: -0.022em; margin: 0; color: var(--ink); }
.text-dim{ color: var(--muted); }
.text-faint{ color: var(--faint); }
.grad-text{ background: linear-gradient(115deg, var(--gold-2), var(--gold) 60%, var(--gold-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow{ font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--faint); }
.num{ font-variant-numeric: tabular-nums; }
.section-title{ font-size: 19px; font-weight: 800; }

/* ---------- Glass primitives ---------- */
.glass, .card{
  background: linear-gradient(165deg, var(--glass1), var(--glass2));
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  backdrop-filter: blur(24px) saturate(1.25);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 var(--inset-hi), var(--shadow);
  position: relative;
  transition: background .4s, border-color .4s;
}
.glass-strong{
  background: linear-gradient(165deg, var(--strong1), var(--strong2));
  -webkit-backdrop-filter: blur(30px) saturate(1.3);
  backdrop-filter: blur(30px) saturate(1.3);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 var(--inset-hi2), var(--shadow);
  transition: background .4s, border-color .4s;
}
.glass-hover, .card-hover{ transition: transform .3s cubic-bezier(.2,.7,.25,1), border-color .3s, box-shadow .3s; }
.glass-hover:hover, .card-hover:hover{
  transform: translateY(-3px);
  border-color: var(--gold-line);
  box-shadow: inset 0 1px 0 var(--inset-hi2), var(--shadow), 0 12px 40px -18px rgba(216,178,92,.35);
}
.card-pad{ padding: 24px; }
.divider{ height: 1px; background: var(--line-soft); border: 0; margin: 0; }
.hidden{ display: none !important; }

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 800; font-size: 14px; letter-spacing: .01em;
  padding: 12px 22px; border-radius: 13px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap; color: var(--ink);
  transition: transform .18s, box-shadow .25s, background .25s, border-color .25s, filter .25s;
  position: relative;
}
.btn:active{ transform: scale(.97); }
.btn-primary{
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, #c49a45);
  color: #241a06;
  box-shadow: var(--gold-glow), inset 0 1px 0 rgba(255,255,255,.55);
  text-shadow: none;
}
.btn-primary:hover{ filter: brightness(1.06); box-shadow: 0 14px 34px -8px rgba(216,178,92,.6), inset 0 1px 0 rgba(255,255,255,.55); }
.btn-secondary{
  background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink);
  border-color: var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.btn-secondary:hover{ background: color-mix(in srgb, var(--ink) 10%, transparent); border-color: var(--gold-line); }
.btn-ghost{ background: transparent; color: var(--muted); }
.btn-ghost:hover{ background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }
.btn-danger{ background: var(--danger-soft); color: var(--danger-t); border-color: color-mix(in srgb, var(--danger) 32%, transparent); }
.btn-danger:hover{ filter: brightness(1.08); }
.btn-sm{ padding: 9px 15px; font-size: 13px; border-radius: 10px; }
.btn .ic{ width: 16px; height: 16px; }
.btn-loading{ pointer-events: none; color: transparent !important; }
.btn-loading::after{
  content:''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(36,26,6,.3); border-top-color: #241a06;
  animation: spin .7s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

/* ---------- Icons ---------- */
.ic{ width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic-fill{ fill: currentColor; stroke: none; }
.icon-tile{
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--ink) 6%, transparent); border: 1px solid var(--line); color: var(--gold-t);
  box-shadow: inset 0 1px 0 var(--inset-hi);
}
.icon-tile .ic{ width: 21px; height: 21px; }
.tile-accent, .tile-gold{ background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-t); }
.tile-neutral{ background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--muted); }
.tile-danger{ background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 32%, transparent); color: var(--danger-t); }
.logo-mark{ width: 38px; height: 38px; display: block; flex-shrink: 0; filter: drop-shadow(0 4px 14px rgba(216,178,92,.35)); }
.logo-mark.sm{ width: 32px; height: 32px; }

/* ---------- Forms ---------- */
.lbl{ display: block; font-size: 13px; font-weight: 600; color: var(--ink-dim); margin-bottom: 7px; }
.field{
  width: 100%; padding: 13px 16px; font-size: 14.5px; font-family: var(--font-body);
  color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent);
  border: 1px solid var(--line); border-radius: 13px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field::placeholder{ color: var(--faint); }
.field:focus{ border-color: var(--gold); box-shadow: 0 0 0 4px rgba(216,178,92,.15); background: color-mix(in srgb, var(--ink) 7%, transparent); }
select.field option{ background: var(--bg0); color: var(--ink); }
textarea.field{ resize: vertical; min-height: 96px; font-family: var(--font-body); }

/* ---------- Pills ---------- */
.pill{
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  letter-spacing: .02em; white-space: nowrap; border: 1px solid transparent;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.pill .dot{ width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.pill-green{ background: var(--emerald-soft); color: var(--ok-t); border-color: color-mix(in srgb, var(--emerald) 30%, transparent); }
.pill-amber{ background: var(--amber-soft); color: var(--amber-t); border-color: color-mix(in srgb, var(--amber) 32%, transparent); }
.pill-red{ background: var(--danger-soft); color: var(--danger-t); border-color: color-mix(in srgb, var(--danger) 32%, transparent); }
.pill-blue{ background: var(--blue-soft); color: var(--blue-t); border-color: color-mix(in srgb, var(--blue) 32%, transparent); }
.pill-neutral{ background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--muted); border-color: var(--line); }
.pill-accent{ background: var(--gold-soft); color: var(--gold-t); border-color: var(--gold-line); }
.pill-violet{ background: rgba(150,120,255,.13); color: #b9a5ff; border-color: rgba(150,120,255,.3); }
html[data-theme="light"] .pill-violet{ color: #6a4fd0; }
.pill-slate{ background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--muted); border-color: var(--line); }

/* ---------- Toggle ---------- */
.toggle{
  width: 50px; height: 29px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 14%, transparent);
  position: relative; cursor: pointer; transition: background .25s, box-shadow .25s; flex-shrink: 0;
  border: 1px solid var(--line); padding: 0;
}
.toggle::after{
  content:''; position: absolute; top: 2px; left: 2px; width: 23px; height: 23px;
  border-radius: 50%; background: linear-gradient(180deg,#fff,#d9d4c7);
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  transition: transform .28s cubic-bezier(.3,1.35,.5,1);
}
.toggle.on{ background: linear-gradient(180deg, var(--gold-2), var(--gold-deep)); border-color: rgba(216,178,92,.5); box-shadow: 0 0 16px rgba(216,178,92,.35); }
.toggle.on::after{ transform: translateX(21px); }

/* ---------- Sidebar ---------- */
.sidebar{
  background: color-mix(in srgb, var(--bg0) 62%, transparent);
  -webkit-backdrop-filter: blur(28px) saturate(1.2); backdrop-filter: blur(28px) saturate(1.2);
  border-right: 1px solid var(--line-soft);
  transition: background .4s;
}
.nav-label{ font-size: 10.5px; font-weight: 700; letter-spacing: .15em; color: var(--faint); text-transform: uppercase; padding: 0 12px; margin: 22px 0 7px; }
.nav-item{
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border-radius: 12px;
  font-size: 14px; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: all .22s cubic-bezier(.2,.7,.25,1);
  position: relative; text-decoration: none; border: 1px solid transparent;
}
.nav-item .ic{ width: 19px; height: 19px; color: var(--faint); transition: color .2s, transform .2s; }
.nav-item:hover{ background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.nav-item:hover .ic{ color: var(--ink-dim); transform: scale(1.08); }
.nav-item.active{
  background: var(--gold-soft); color: var(--gold-t); font-weight: 700;
  border-color: var(--gold-line);
  box-shadow: inset 0 1px 0 var(--inset-hi), 0 6px 18px -8px rgba(216,178,92,.4);
}
.nav-item.active .ic{ color: var(--gold-t); }
.nav-badge{
  margin-left: auto; background: linear-gradient(180deg,#f07878,#d34f4f); color: #fff;
  font-size: 11px; font-weight: 800; min-width: 21px; height: 21px;
  border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 6px;
  box-shadow: 0 4px 12px -2px rgba(240,120,120,.5);
}
.nav-count{ margin-left: auto; font-size: 12px; font-weight: 700; color: var(--faint); background: color-mix(in srgb, var(--ink) 7%, transparent); border-radius: 999px; padding: 2px 10px; }
.brand-mark{
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 22px; color: #241a06;
  background: linear-gradient(160deg, var(--gold-2), var(--gold) 60%, var(--gold-deep));
  box-shadow: var(--gold-glow), inset 0 1px 0 rgba(255,255,255,.55);
}

/* ---------- Topbar ---------- */
.topbar{
  background: color-mix(in srgb, var(--bg0) 55%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2);
  border-bottom: 1px solid var(--line-soft);
  transition: background .4s;
}
.searchbox{
  display: flex; align-items: center; gap: 9px;
  background: color-mix(in srgb, var(--ink) 5%, transparent); border: 1px solid var(--line);
  border-radius: 12px; padding: 9px 14px; width: 300px; max-width: 40vw; color: var(--faint);
  transition: border-color .2s, box-shadow .2s;
}
.searchbox:focus-within{ border-color: var(--gold); box-shadow: 0 0 0 4px rgba(216,178,92,.13); }
.searchbox input{ border: none; outline: none; background: none; font-size: 14px; width: 100%; font-family: var(--font-body); color: var(--ink); }
.icon-btn{
  width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; position: relative;
  transition: all .2s;
}
.icon-btn:hover{ color: var(--ink); border-color: var(--gold-line); background: color-mix(in srgb, var(--ink) 9%, transparent); }
.icon-btn .ping{ position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: #f07878; border: 2px solid var(--bg0); box-shadow: 0 0 8px #f07878; }
.avatar{
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(160deg, var(--gold-2), var(--gold-deep)); color: #241a06;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 16px;
  cursor: pointer; flex-shrink: 0; box-shadow: var(--gold-glow);
}
/* theme toggle morph */
.theme-btn .ic{ transition: transform .45s cubic-bezier(.3,1.3,.5,1), opacity .25s; }
.theme-btn.switching .ic{ transform: rotate(180deg) scale(.4); opacity: 0; }

/* ---------- KPIs ---------- */
.kpi-label{ font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); margin-bottom: 9px; }
.kpi-value{ font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; }
.kpi-value small{ font-size: 15px; font-weight: 700; color: var(--faint); }
.kpi-delta{ display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; margin-top: 11px; }
.kpi-delta.up{ color: var(--ok-t); } .kpi-delta.down{ color: var(--danger-t); }
.kpi-delta .ic{ width: 15px; height: 15px; }
.stat-card{ transition: transform .3s cubic-bezier(.2,.7,.25,1), border-color .3s, box-shadow .3s; }
.stat-card:hover{ transform: translateY(-3px); border-color: var(--gold-line); }
.stat-num{ font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }

/* ---------- Lists & tables ---------- */
.row-item{ display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-radius: 15px; transition: background .18s; }
.row-item:hover{ background: color-mix(in srgb, var(--ink) 4%, transparent); }
.row-item + .row-item{ border-top: 1px solid var(--line-soft); }
table.data{ width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th{ text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 11px 15px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td{ padding: 14px 15px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; color: var(--ink-dim); }
table.data tr:last-child td{ border-bottom: none; }
table.data tbody tr{ transition: background .15s; }
table.data tbody tr:hover{ background: color-mix(in srgb, var(--ink) 3%, transparent); }

/* ---------- Chat ---------- */
.bubble{ max-width: 78%; padding: 12px 16px; border-radius: 17px; font-size: 14px; line-height: 1.55; }
.bubble-in, .chat-in{
  background: color-mix(in srgb, var(--ink) 7%, transparent); border: 1px solid var(--line);
  border-bottom-left-radius: 6px; align-self: flex-start; color: var(--ink);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.bubble-out, .chat-out{
  background: linear-gradient(160deg, var(--gold-2), #cfa14b); color: #241a06;
  border-bottom-right-radius: 6px; align-self: flex-end; font-weight: 500;
  box-shadow: 0 8px 20px -8px rgba(216,178,92,.5);
}
.bubble-meta{ font-size: 11px; color: var(--faint); margin-top: 4px; }
.convo{ display: flex; gap: 12px; padding: 14px 15px; border-radius: 14px; cursor: pointer; transition: background .18s; align-items: center; border: 1px solid transparent; }
.convo:hover{ background: color-mix(in srgb, var(--ink) 4%, transparent); }
.convo.active{ background: var(--gold-soft); border-color: var(--gold-line); }

/* ---------- Login : split screen (stays noir in both themes) ---------- */
.login-wrap{ display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; position: relative; z-index: 1; }
.brand-panel{
  background: #04060a;
  padding: 56px 62px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden; border-right: 1px solid rgba(255,255,255,.06);
}
.brand-panel::before{
  content:''; position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 20% 10%, rgba(46,160,110,.16), transparent 60%),
    radial-gradient(500px 500px at 90% 90%, rgba(216,178,92,.12), transparent 60%);
}
.brand-panel::after{
  content:''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.045) 48%, transparent 62%);
  background-size: 280% 100%; animation: sheen 9s ease-in-out infinite; pointer-events: none;
}
@keyframes sheen{ 0%,100%{ background-position: 120% 0; } 50%{ background-position: -20% 0; } }
.brand-panel > *{ position: relative; z-index: 1; }
.brand-panel h2{ font-size: clamp(34px, 3.6vw, 50px); line-height: 1.08; font-weight: 800; color: #f4f1e8; }
.brand-panel p.lead{ color: #9b968b; font-size: 16px; max-width: 430px; margin-top: 18px; }
.brand-panel .eyebrow{ color: #6d695f; }
.brand-stats{ display: flex; gap: 44px; margin-top: 48px; }
.brand-stat b{ display: block; font-family: var(--font-display); font-size: 28px; letter-spacing: -0.02em; background: linear-gradient(115deg, var(--gold-2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-stat span{ font-size: 12.5px; color: #6d695f; }
.quote-card{
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px; padding: 22px 24px; max-width: 450px;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.quote-card p{ font-size: 15px; color: #cfc9ba; margin: 0 0 14px; font-style: italic; line-height: 1.6; }
.quote-card .who{ display: flex; align-items: center; gap: 11px; font-size: 13px; color: #6d695f; }
.quote-card .who b{ color: #f4f1e8; }
.login-panel{ display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-box{ width: 100%; max-width: 390px; }
.login-card{ padding: 34px; }
.login-row{ animation: morphIn .7s cubic-bezier(.2,.7,.25,1) both; }
@keyframes riseIn{ from{ opacity: 0; transform: translateY(16px); filter: blur(5px); } to{ opacity: 1; transform: none; filter: blur(0); } }
.rise{ animation: riseIn .6s cubic-bezier(.2,.7,.25,1) both; }

/* ---------- Mobile nav ---------- */
.mobile-nav{
  background: color-mix(in srgb, var(--bg0) 80%, transparent);
  -webkit-backdrop-filter: blur(26px) saturate(1.3); backdrop-filter: blur(26px) saturate(1.3);
  border-top: 1px solid var(--line-soft);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -18px 44px -18px rgba(0,0,0,.35);
  transition: background .4s;
}
.mnav{ display: flex; }
.mnav-item{
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px 8px; font-size: 10.5px; font-weight: 600; color: var(--faint);
  cursor: pointer; border: none; background: none; font-family: var(--font-body);
  transition: color .2s; position: relative; text-decoration: none;
}
.mnav-item .ic, .mnav-item .mi{ width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.mnav-item .mi{ font-size: 19px; }
.mnav-item.active{ color: var(--gold-t); }
.mnav-item.active::before{
  content:''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 36px; height: 3px; border-radius: 0 0 5px 5px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-2));
  box-shadow: 0 2px 10px rgba(216,178,92,.6);
}
.mnav-sheet{ border-radius: 24px 24px 0 0; }

/* ---------- Toasts & popups ---------- */
#toasts{ position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 10px; align-items: center; width: max-content; max-width: calc(100vw - 40px); }
.toast{
  background: rgba(18,23,30,.94); color: #f4f1e8;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.1); border-left: 3px solid var(--gold);
  border-radius: 14px; padding: 14px 19px; display: flex; align-items: center; gap: 11px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow);
  animation: toastIn .35s cubic-bezier(.2,.9,.3,1.2);
}
.toast.out{ opacity: 0; transform: translateY(10px) scale(.97); transition: all .28s; }
@keyframes toastIn{ from{ opacity: 0; transform: translateY(14px) scale(.95); } }
.popup-scrim{
  position: fixed; inset: 0; background: var(--scrim);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .25s;
}
@keyframes fadeIn{ from{ opacity: 0; } }
.popup{
  background: linear-gradient(165deg, var(--strong1), var(--strong2));
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
  border: 1px solid var(--line); border-radius: 24px; padding: 32px;
  width: 100%; max-width: 440px; box-shadow: var(--shadow);
  animation: popIn .38s cubic-bezier(.2,.9,.3,1.18);
}
@keyframes popIn{ from{ opacity: 0; transform: scale(.92) translateY(14px); filter: blur(4px); } }

/* ---------- Compat: modal + sheet (used by app.js) ---------- */
.modal-bg{ position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px; background: var(--scrim); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.modal-bg.open{ display: flex; animation: fadeIn .25s; }
.modal-card{ animation: popIn .38s cubic-bezier(.2,.9,.3,1.18); }
#mnav-sheet{ transform: translateY(106%); transition: transform .42s cubic-bezier(.2,.8,.25,1); }
#mnav-sheet.open{ transform: none; }

/* ---------- Chart animation ---------- */
.chart-draw{ stroke-dasharray: 1500; stroke-dashoffset: 1500; animation: drawline 2s .35s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes drawline{ to{ stroke-dashoffset: 0; } }
.chart-fill{ opacity: 0; animation: fadeIn 1.2s 1.4s forwards; }
.chart-dot{ opacity: 0; animation: popDot .5s 2s cubic-bezier(.2,.9,.3,1.4) forwards; }
@keyframes popDot{ from{ opacity: 0; transform: scale(0); } to{ opacity: 1; transform: scale(1); } }

/* ---------- Calendar ---------- */
.cal-grid{ display: grid; grid-template-columns: 56px repeat(7, minmax(108px,1fr)); }
.cal-head{ font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; padding: 10px 8px; text-align: center; }
.cal-cell{ min-height: 88px; border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); padding: 6px; font-size: 12px; color: var(--muted); }
.cal-day{ font-weight: 700; color: var(--ink-dim); }
.cal-bar{ font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 8px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid transparent; }
.bar-booked{ background: var(--gold-soft); color: var(--gold-t); border-color: var(--gold-line); }
.bar-blocked{ background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted); }
.bar-turn{ background: var(--emerald-soft); color: var(--ok-t); border-color: color-mix(in srgb, var(--emerald) 28%, transparent); }
.booking-bar{ border-radius: 8px; }

/* ---------- Misc ---------- */
.progress{ height: 7px; border-radius: 99px; background: var(--track); overflow: hidden; }
.progress > div{ height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold-deep), var(--gold-2)); transition: width .7s cubic-bezier(.2,.7,.25,1); box-shadow: 0 0 12px rgba(216,178,92,.5); }

@media (max-width: 1023px){
  .login-wrap{ grid-template-columns: 1fr; }
  .brand-panel{ padding: 36px 26px; border-right: none; border-bottom: 1px solid rgba(255,255,255,.06); }
  .brand-panel h2{ font-size: 30px; }
  .brand-stats{ gap: 28px; margin-top: 30px; }
  .quote-card{ display: none; }
  .cal-grid{ grid-template-columns: 44px repeat(7, 132px); }
  .cal-scroll{ overflow-x: auto; }
  .searchbox{ display: none; }
}
@media (min-width: 1024px){ .mobile-nav{ display: none !important; } }

/* ---------- Password strength ---------- */
.pw-meter{ height: 6px; border-radius: 99px; background: var(--track); margin-top: 10px; overflow: hidden; }
.pw-meter > div{ height: 100%; width: 0; border-radius: 99px; transition: width .35s cubic-bezier(.2,.7,.25,1), background .35s; }
.pw-rules{ list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.pw-rules li{ display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 500; color: var(--faint); transition: color .2s; }
.pw-rules .rule-ic{ width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--faint); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .25s; }
.pw-rules .rule-ic .ic{ width: 10px; height: 10px; stroke-width: 3.2; opacity: 0; transform: scale(.4); transition: all .25s; }
.pw-rules li.met{ color: var(--muted); }
.pw-rules li.met .rule-ic{ border-color: var(--emerald); background: var(--emerald-soft); }
.pw-rules li.met .rule-ic .ic{ opacity: 1; transform: scale(1); color: var(--ok-t); }
.pw-error{ display: flex; align-items: center; gap: 9px; margin-top: 12px; padding: 11px 14px; border-radius: 12px; background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 38%, transparent); color: var(--danger-t); font-size: 13px; font-weight: 600; line-height: 1.45; animation: morphIn .3s cubic-bezier(.2,.7,.25,1); }
.pw-error .ic{ width: 16px; height: 16px; flex-shrink: 0; }
.field.field-bad{ border-color: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 14%, transparent); }

/* ---------- Password visibility toggle ---------- */
.pw-wrap{ position: relative; }
.pw-wrap .field{ padding-right: 50px; }
.pw-eye{
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: none; background: none; color: var(--faint);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; transition: color .18s, background .18s; padding: 0;
}
.pw-eye:hover{ color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.pw-eye .ic{ width: 19px; height: 19px; }
