/* ============================================================
   Zestify Command — style.css  (premium redesign)
   Light + dark theme · grainy matte gradients · generous rounding
   ============================================================ */

:root {
  --r-sm: 12px;  --r-md: 16px;  --r-lg: 22px;  --r-xl: 30px;  --r-2xl: 38px;

  --acc-purple: #8b7cf0;
  --acc-cyan:   #5ec8d8;
  --acc-pink:   #e08bb8;
  --acc-amber:  #e0b070;
  --grad-brand: linear-gradient(135deg, #9d7cf5 0%, #b56fd6 45%, #e08bb8 100%);
  --grad-brand-2: linear-gradient(120deg, #8b7cf0, #5ec8d8);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', var(--font);
  --trans: 240ms cubic-bezier(.4,0,.2,1);
  --spring: 420ms cubic-bezier(.34,1.56,.64,1);
}

/* ---------- DARK ---------- */
[data-theme="dark"] {
  --bg-0: #100e18;
  --bg-grad-a: #241a38; --bg-grad-b: #132430; --bg-grad-c: #2a1830;
  --surface: rgba(32, 28, 46, 0.66);
  --surface-2: rgba(44, 39, 60, 0.55);
  --surface-solid: #201b2e;
  --border: rgba(255,255,255,0.08);
  --border-2: rgba(255,255,255,0.05);
  --text: #eeebf7; --text-dim: #a49fb8; --text-faint: #6f6a82;
  --shadow: 0 24px 60px -28px rgba(0,0,0,0.7);
  --shadow-sm: 0 10px 30px -18px rgba(0,0,0,0.6);
  --grain-op: 0.055;
  --input-bg: rgba(16,14,24,0.55);
  --orb-op: 0.5;
}

/* ---------- LIGHT ---------- */
[data-theme="light"] {
  --bg-0: #f2eff8;
  --bg-grad-a: #e9e2f7; --bg-grad-b: #e0eff2; --bg-grad-c: #f7e8f1;
  --surface: rgba(255,255,255,0.74);
  --surface-2: rgba(249,247,254,0.86);
  --surface-solid: #ffffff;
  --border: rgba(40,25,70,0.10);
  --border-2: rgba(40,25,70,0.06);
  --text: #221d33; --text-dim: #5d5872; --text-faint: #918ba3;
  --shadow: 0 24px 55px -30px rgba(80,50,120,0.32);
  --shadow-sm: 0 10px 26px -20px rgba(80,50,120,0.28);
  --grain-op: 0.04;
  --input-bg: rgba(255,255,255,0.75);
  --orb-op: 0.4;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }
body {
  font-family: var(--font); color: var(--text);
  background:
    radial-gradient(1200px 760px at 10% -10%, var(--bg-grad-a), transparent 58%),
    radial-gradient(1100px 820px at 92% 4%, var(--bg-grad-b), transparent 60%),
    radial-gradient(1000px 760px at 55% 112%, var(--bg-grad-c), transparent 58%),
    var(--bg-0);
  background-attachment: fixed;
  transition: color var(--trans), background-color var(--trans);
  overflow-x: hidden;
}

/* Grain overlay */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: var(--grain-op);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
/* Floating soft orbs (matte, blurred — not neon) */
.orb { position: fixed; z-index: 0; border-radius: 50%; filter: blur(60px); opacity: var(--orb-op); pointer-events: none; }
.orb-1 { width: 420px; height: 420px; top: -120px; left: -100px; background: radial-gradient(circle, #9d7cf5, transparent 68%); animation: float1 18s ease-in-out infinite; }
.orb-2 { width: 380px; height: 380px; bottom: -140px; right: -80px; background: radial-gradient(circle, #e08bb8, transparent 68%); animation: float2 22s ease-in-out infinite; }
.orb-3 { width: 300px; height: 300px; top: 40%; right: 30%; background: radial-gradient(circle, #5ec8d8, transparent 68%); animation: float1 26s ease-in-out infinite; }
@keyframes float1 { 0%,100%{ transform: translate(0,0);} 50%{ transform: translate(40px,50px);} }
@keyframes float2 { 0%,100%{ transform: translate(0,0);} 50%{ transform: translate(-50px,-40px);} }

.zc-logo { display: block; }
.grad-text { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Robot mascot */
.zc-robot { display: block; width: 100%; height: auto; }
.floaty { animation: bob 4s ease-in-out infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-8px);} }

/* Lottie animated robot */
.lottie-bot { position: relative; width: 100%; display: grid; place-items: center; }
.lottie-bot svg { display: block !important; width: 100% !important; height: auto !important; }
.lottie-fallback { width: 100%; }
.hero-lottie { max-width: 300px; filter: drop-shadow(0 26px 40px rgba(80,40,120,0.32)); }
.banner-lottie { max-width: 150px; }
.side-mascot .lottie-bot { max-width: 150px; }

/* ============ LOGIN ============ */
.login-shell {
  position: relative; z-index: 1;
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; align-items: stretch;
}
.login-hero {
  position: relative; margin: 20px 0 20px 20px; border-radius: var(--r-2xl);
  padding: 40px; display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(150deg, rgba(157,124,245,0.22), rgba(224,139,184,0.14) 55%, rgba(94,200,216,0.16));
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.hero-top { display: flex; align-items: center; gap: 12px; }
.hero-word { font-family: var(--font-display); font-weight: 700; letter-spacing: 4px; font-size: 15px; color: var(--text-dim); }
.hero-robot { flex: 1; min-height: 240px; display: grid; place-items: center; margin: 6px 0; }
.hero-robot .zc-robot { max-width: 280px; max-height: 320px; filter: drop-shadow(0 26px 36px rgba(80,40,120,0.28)); }
.hero-copy h2 { font-family: var(--font-display); font-size: 34px; line-height: 1.12; font-weight: 700; letter-spacing: -0.5px; }
.hero-copy p { color: var(--text-dim); margin-top: 12px; font-size: 15px; max-width: 420px; line-height: 1.55; }
.hero-stats { display: flex; gap: 28px; margin-top: 30px; }
.hero-stats b { font-family: var(--font-display); font-size: 26px; display: block; }
.hero-stats span { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }

.login-form-wrap { position: relative; display: grid; place-items: center; padding: 24px; }
.login-card {
  position: relative; z-index: 1; width: 100%; max-width: 400px;
  background: var(--surface); backdrop-filter: blur(24px);
  border: 1px solid var(--border); border-radius: var(--r-2xl);
  padding: 40px 34px 32px; box-shadow: var(--shadow);
  animation: rise var(--spring) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(22px) scale(.98);} to { opacity: 1; transform: none;} }
.login-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  background: var(--grad-brand); opacity: .9;
}
.login-badge { display: grid; place-items: center; margin-bottom: 16px; }
.login-badge .zc-logo { animation: spinIn 700ms var(--spring) both; filter: drop-shadow(0 12px 22px rgba(140,90,220,0.4)); }
@keyframes spinIn { from { transform: rotate(-30deg) scale(.6); opacity: 0;} to { transform: none; opacity: 1;} }
.login-title { text-align: center; font-family: var(--font-display); font-size: 25px; font-weight: 700; letter-spacing: -0.5px; }
.login-sub { text-align: center; color: var(--text-dim); margin: 6px 0 24px; font-size: 14px; }

.field-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-dim); margin: 15px 0 7px; letter-spacing: .2px; }

input[type=text], input[type=email], input[type=password], .select-input {
  width: 100%; background: var(--input-bg); border: 1px solid var(--border);
  border-radius: var(--r-md); color: var(--text); padding: 13px 15px;
  font-family: var(--font); font-size: 14.5px;
  transition: border-color var(--trans), box-shadow var(--trans), background var(--trans);
}
input::placeholder { color: var(--text-faint); }
input:focus, .select-input:focus {
  outline: none; border-color: var(--acc-purple);
  box-shadow: 0 0 0 4px rgba(139,124,240,0.14);
}

.input-copy { position: relative; display: flex; align-items: center; }
.input-copy .in-ic { position: absolute; left: 13px; display: grid; place-items: center; pointer-events: none; }
.input-copy .in-ic svg { width: 17px; height: 17px; fill: var(--text-faint); }
.input-copy input { flex: 1; padding-right: 46px; }
.input-copy.with-icon input { padding-left: 40px; }
.input-copy.two-btn input { padding-right: 82px; }
.copy-mini {
  position: absolute; right: 7px; width: 32px; height: 32px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2);
  display: grid; place-items: center; cursor: pointer; color: var(--text-dim);
  transition: var(--trans);
}
.copy-mini.pw-eye { right: 45px; }
.copy-mini:hover { color: #fff; border-color: transparent; background: var(--grad-brand); transform: translateY(-1px); }
.copy-mini:active { transform: scale(.9); }
.copy-mini svg { width: 15px; height: 15px; fill: currentColor; }

.login-err { color: #e07a7a; font-size: 13px; min-height: 18px; margin: 12px 2px 0; }

/* ============ BUTTONS ============ */
.btn {
  font-family: var(--font); font-weight: 600; font-size: 14px;
  border: 1px solid transparent; border-radius: var(--r-md);
  padding: 11px 18px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: var(--trans); position: relative; overflow: hidden;
}
.btn .ic { width: 16px; height: 16px; fill: currentColor; }
.btn-block { width: 100%; justify-content: center; }
.btn.btn-block { margin-top: 22px; padding: 14px; }
.btn-sm.btn-block { margin-top: 0; padding: 9px 13px; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 12px; }
.btn-primary { color: #fff; background: var(--grad-brand); box-shadow: 0 12px 26px -14px rgba(150,90,220,0.7); }
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-2px); box-shadow: 0 18px 34px -14px rgba(150,90,220,0.75); }
.btn-primary:active { transform: translateY(0); }
.btn-primary.loading { pointer-events: none; }
.btn-primary.loading span, .btn-primary.loading .ic { opacity: 0; }
.btn-primary.loading::after {
  content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg);} }
.btn-ghost { color: var(--text-dim); background: var(--surface-2); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--acc-purple); transform: translateY(-1px); }
.btn-danger { color: #fff; background: linear-gradient(135deg,#e07272,#c85555); }
.btn-danger:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* ============ THEME TOGGLE ============ */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-dim);
  border-radius: 12px; padding: 10px 12px; cursor: pointer; font-size: 13px; font-weight: 500;
  transition: var(--trans);
}
.theme-toggle:hover { border-color: var(--acc-purple); color: var(--text); }
.tt-icon { font-size: 15px; }
.login-theme { position: absolute; top: 18px; right: 18px; z-index: 2; }
.login-theme .tt-label { display: none; }

/* ============ LAYOUT ============ */
.layout { position: relative; z-index: 1; display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }

.sidebar {
  border-right: 1px solid var(--border); background: var(--surface); backdrop-filter: blur(22px);
  padding: 22px 16px; display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px; }
.side-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1; }
.side-sub { font-size: 10px; color: var(--text-faint); letter-spacing: 3px; text-transform: uppercase; margin-top: 2px; }

.side-nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; border: 1px solid transparent; background: transparent;
  color: var(--text-dim); font-family: var(--font); font-size: 14.5px; font-weight: 500;
  padding: 12px 14px; border-radius: var(--r-md); cursor: pointer; text-align: left; width: 100%;
  transition: var(--trans); position: relative;
}
.nav-item svg { width: 19px; height: 19px; fill: currentColor; opacity: .85; transition: var(--trans); }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { color: var(--text); background: linear-gradient(135deg, rgba(139,124,240,0.2), rgba(224,139,184,0.12)); border-color: var(--border); }
.nav-item.active::before { content:''; position: absolute; left: 4px; top: 22%; bottom: 22%; width: 3px; border-radius: 3px; background: var(--grad-brand); }
.nav-item.active svg { opacity: 1; }

.side-mascot { flex: 1; display: grid; place-items: end center; padding: 6px; min-height: 40px; }
.side-mascot .zc-robot { max-width: 150px; }

.side-foot { display: flex; flex-direction: column; gap: 10px; }

.main { padding: 26px 32px 52px; min-width: 0; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-heading { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.page-crumb { color: var(--text-dim); font-size: 13.5px; margin-top: 3px; }
.topbar-actions { display: flex; gap: 10px; }

.page.hidden, .modal-overlay.hidden, .hidden { display: none !important; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(16px); animation: reveal .6s var(--trans) forwards; }
.reveal:nth-child(1){ animation-delay: .04s;} .reveal:nth-child(2){ animation-delay: .1s;}
.reveal:nth-child(3){ animation-delay: .16s;} .reveal:nth-child(4){ animation-delay: .22s;}
@keyframes reveal { to { opacity: 1; transform: none;} }

/* ============ DASHBOARD HERO BANNER ============ */
.hero-banner {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px;
  border-radius: var(--r-2xl); padding: 26px 30px; margin-bottom: 20px; overflow: hidden; position: relative;
  background: linear-gradient(120deg, rgba(157,124,245,0.2), rgba(224,139,184,0.13) 50%, rgba(94,200,216,0.14));
  border: 1px solid var(--border);
}
.pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: #fff; background: var(--grad-brand); padding: 5px 12px; border-radius: 20px; }
.hero-banner-text h3 { font-family: var(--font-display); font-size: 27px; font-weight: 700; margin: 12px 0 6px; }
.hero-banner-text p { color: var(--text-dim); font-size: 14px; max-width: 460px; }
.hero-chips { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--text-dim);
  background: var(--surface-2); border: 1px solid var(--border); padding: 6px 12px; border-radius: 20px; }
.dot { width: 8px; height: 8px; border-radius: 50%; } .dp{background:var(--acc-purple);} .dc{background:var(--acc-cyan);} .dpk{background:var(--acc-pink);}
.hero-banner-bot { width: 150px; display: grid; place-items: center; }
.hero-banner-bot .zc-robot { max-width: 140px; }

/* ============ KPI ============ */
.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 20px; }
.kpi-card {
  display: flex; align-items: center; gap: 15px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px; backdrop-filter: blur(16px); transition: var(--trans);
}
.kpi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); border-color: rgba(139,124,240,0.35); }
.kpi-ic { width: 48px; height: 48px; border-radius: 15px; flex: none; display: grid; place-items: center; color: #fff; }
.kpi-ic svg { width: 24px; height: 24px; fill: #fff; }
.k-purple { background: linear-gradient(135deg, #9d7cf5, #6d5fd0); }
.k-cyan   { background: linear-gradient(135deg, #5ec8d8, #47a6b8); }
.k-pink   { background: linear-gradient(135deg, #e08bb8, #c66aa0); }
.k-amber  { background: linear-gradient(135deg, #e0b070, #cc9450); }
.kpi-num { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -.5px;
  background: linear-gradient(135deg, var(--text), var(--text-dim)); -webkit-background-clip: text; background-clip: text; }
.kpi-lbl { font-size: 12.5px; color: var(--text-dim); margin-top: 1px; }

/* ============ PANELS / CHARTS ============ */
.chart-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.an-grid { grid-template-columns: 1fr 1fr; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; backdrop-filter: blur(16px); transition: var(--trans); }
.panel:hover { border-color: rgba(139,124,240,0.28); }
.panel-title { font-size: 14.5px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.panel-title::before { content:''; width: 4px; height: 15px; border-radius: 3px; background: var(--grad-brand); }
.chart-box { position: relative; height: 240px; }
.chart-box.tall { height: 430px; }

/* ============ REGISTRY ============ */
.registry-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.search-wrap { position: relative; flex: 1; min-width: 240px; display: flex; align-items: center; }
.search-wrap .ic { position: absolute; left: 14px; width: 17px; height: 17px; fill: var(--text-faint); pointer-events: none; }
.search-wrap input { padding-left: 40px; padding-right: 60px; }
.search-count { position: absolute; right: 14px; font-size: 12px; color: var(--text-faint); }
.registry-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.registry-list { display: flex; flex-direction: column; gap: 14px; }
.mega-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; backdrop-filter: blur(14px); transition: border-color var(--trans), box-shadow var(--trans); animation: reveal .5s both; }
.mega-card:hover { border-color: rgba(139,124,240,0.3); }
.mega-card.open { box-shadow: var(--shadow-sm); }
.mega-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; user-select: none; }
.mega-avatar { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; color: #fff; font-weight: 800; font-family: var(--font-display); font-size: 15px; }
.mega-info { flex: 1; min-width: 0; }
.mega-name { font-weight: 700; font-size: 15.5px; }
.mega-meta { font-size: 12.5px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.mega-meta .sep { opacity: .4; }
.pw-mask { font-family: ui-monospace, Menlo, monospace; letter-spacing: 1px; }
.mini-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 8px; padding: 2px 6px 2px 8px; }
.mega-count { font-size: 12px; font-weight: 600; color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border); padding: 5px 11px; border-radius: 20px; }
.mega-actions { display: flex; gap: 6px; align-items: center; }
.icon-btn { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-dim); cursor: pointer; display: grid; place-items: center; transition: var(--trans); }
.icon-btn:hover { color: #fff; border-color: transparent; background: var(--grad-brand); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.9); }
.icon-btn.danger:hover { background: linear-gradient(135deg,#e07272,#c85555); }
.icon-btn svg { width: 15px; height: 15px; fill: currentColor; }
.chev { transition: transform var(--spring); display: grid; place-items: center; }
.mega-card.open .chev { transform: rotate(180deg); }

.mega-body { max-height: 0; overflow: hidden; transition: max-height var(--spring); }
.mega-card.open .mega-body { max-height: 2600px; }
.mega-body-inner { padding: 2px 14px 16px; }

.acct-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--r-md); border: 1px solid var(--border-2);
  background: var(--surface-2); margin-top: 8px; transition: var(--trans);
}
.acct-row:hover { border-color: rgba(139,124,240,0.3); transform: translateX(2px); }
.acct-name { font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.flag { font-size: 12px; padding: 2px 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); font-weight: 600; }
.acct-id { display: flex; align-items: center; gap: 8px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; color: var(--text-dim); }
.tag-incomplete { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: #d89a55; background: rgba(224,176,112,0.14); border: 1px solid rgba(224,176,112,0.32); padding: 2px 7px; border-radius: 7px; }
.acct-actions { display: flex; gap: 6px; }
.add-acct-row { margin-top: 12px; }

/* ============ ANALYTICS ============ */
.leaderboard { display: flex; flex-direction: column; gap: 14px; }
.lb-row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px; }
.lb-rank { font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 13px; text-align: center; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); }
.lb-row:nth-child(1) .lb-rank { background: linear-gradient(135deg,#e0b070,#cc9450); border-color: transparent; }
.lb-row:nth-child(2) .lb-rank { background: linear-gradient(135deg,#c9c9d6,#a4a4b8); border-color: transparent; }
.lb-row:nth-child(3) .lb-rank { background: linear-gradient(135deg,#d09a6a,#b57d4d); border-color: transparent; }
.lb-body { min-width: 0; }
.lb-top { display: flex; justify-content: space-between; margin-bottom: 6px; }
.lb-name { font-weight: 600; font-size: 14px; }
.lb-val { font-size: 13px; color: var(--text-dim); font-weight: 600; }
.lb-bar { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.lb-fill { height: 100%; border-radius: 6px; background: var(--grad-brand); width: 0; transition: width .9s var(--spring); }

/* ============ MODALS ============ */
.modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(8,6,14,0.55); backdrop-filter: blur(7px); display: grid; place-items: center; padding: 20px; animation: fade 180ms ease; }
@keyframes fade { from { opacity: 0;} to { opacity: 1;} }
.modal { width: 100%; max-width: 440px; background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--r-2xl); box-shadow: var(--shadow); overflow: hidden; animation: rise var(--spring) both; }
.modal.sm { max-width: 380px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 6px; }
.modal-head h3 { font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.modal-x { background: none; border: none; color: var(--text-dim); font-size: 26px; line-height: 1; cursor: pointer; transition: var(--trans); }
.modal-x:hover { color: var(--text); transform: rotate(90deg); }
.modal-body { padding: 6px 24px 8px; }
.modal-body .field-label:first-child { margin-top: 6px; }
.color-input { height: 48px; padding: 5px; cursor: pointer; }
.select-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%23999'%3E%3Cpath d='M7 8l3 3 3-3z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.hint { font-size: 12px; color: var(--text-faint); margin-top: 8px; min-height: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 22px; }

/* ============ TOAST ============ */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 22px); display: flex; align-items: center; gap: 9px; background: var(--surface-solid); border: 1px solid var(--border); color: var(--text); padding: 12px 20px; border-radius: var(--r-md); box-shadow: var(--shadow); font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; z-index: 200; transition: var(--trans); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1040px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { display: none; }
}
@media (max-width: 980px) {
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .chart-grid, .an-grid { grid-template-columns: 1fr; }
  .hero-banner { grid-template-columns: 1fr; } .hero-banner-bot { display: none; }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side-nav { flex-direction: row; flex: 1 1 100%; }
  .side-mascot { display: none; }
  .main { padding: 18px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .acct-row { grid-template-columns: 1fr; }
}
