@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif&family=General+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=general-sans@400,500,600,700&f[]=cabinet-grotesk@500,700,800&display=swap');

/* ─── TOKENS ─── */
:root {
  --bg: #f6f5f1;
  --bg-2: #efece4;
  --surface: #ffffff;
  --ink: #13130f;
  --ink-2: #3a3a32;
  --muted: #86857d;
  --muted-2: #b8b6ac;
  --line: #e5e2d6;
  --line-soft: #efece2;
  --accent: #ff5b1f;
  --accent-soft: #ffe9dd;
  --leaf: #1f5d3a;
  --leaf-soft: #dfece2;
  --plum: #3b2a4a;
  --gold: #c8a24a;
  --berry: #b5304a;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(19,19,15,.04);
  --shadow-md: 0 4px 16px -4px rgba(19,19,15,.08);
  --shadow-lg: 0 18px 40px -20px rgba(19,19,15,.18);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); font-family: 'General Sans', 'Cabinet Grotesk', sans-serif; color: var(--ink); font-size: 14px; -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(19,19,15,.03) 1px, transparent 1px); background-size: 4px 4px; mix-blend-mode: multiply; z-index: 0; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
.serif { font-family: 'Instrument Serif', serif; font-weight: 400; letter-spacing: -.01em; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ─── APP LAYOUT ─── */
.app { width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 240px 1fr; position: relative; min-height: 100vh; }
.main { position: relative; display: flex; flex-direction: column; }

/* ─── SIDEBAR ─── */
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 18px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: #f7f4ea; display: grid; place-items: center; font-family: 'Instrument Serif', serif; font-size: 22px; line-height: 1; }
.brand b { font-size: 16px; font-weight: 600; letter-spacing: -.015em; display: block; }
.brand span { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-weight: 500; }
.nav-label { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; padding: 14px 12px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; font-weight: 500; margin-bottom: 1px; position: relative; transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast); }
.nav a:hover { background: var(--bg-2); color: var(--ink); }
.nav a.active { background: var(--ink); color: #f7f4ea; }
.nav a.active svg { color: #f7f4ea; }
.nav a svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.nav .pill { margin-left: auto; background: var(--accent-soft); color: var(--accent); font-size: 10.5px; padding: 1px 7px; border-radius: var(--radius-pill); font-weight: 600; }
.nav a.active .pill { background: rgba(255,255,255,.16); color: #f7f4ea; }
.upgrade { margin-top: auto; padding: 16px; border-radius: 14px; background: linear-gradient(160deg, #1c1c17, #2b2b22); color: #f7f4ea; position: relative; overflow: hidden; }
.upgrade::after { content: ""; position: absolute; width: 80px; height: 80px; right: -20px; bottom: -30px; border-radius: 50%; background: radial-gradient(circle, var(--accent), transparent 70%); opacity: .6; }
.upgrade .tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: #c8a24a; font-weight: 600; margin-bottom: 8px; }
.upgrade h4 { font-family: 'Instrument Serif', serif; font-size: 20px; line-height: 1.15; margin-bottom: 6px; }
.upgrade p { font-size: 11.5px; color: #bcb8a8; line-height: 1.5; position: relative; z-index: 1; }
.upgrade button { margin-top: 12px; width: 100%; border: 0; background: #f7f4ea; color: #13130f; padding: 8px; border-radius: 8px; font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; position: relative; z-index: 1; transition: transform var(--duration-fast); }
.upgrade button:hover { transform: scale(1.02); }
.sidebar-footer { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.logout-link { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; font-size: 13px; color: var(--muted); font-weight: 500; transition: background var(--duration-fast); }
.logout-link:hover { background: var(--bg-2); color: var(--berry); }

/* ─── TOPBAR ─── */
.topbar { display: flex; align-items: center; padding: 18px 32px; gap: 16px; border-bottom: 1px solid var(--line); background: rgba(246,245,241,.85); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 20; }
.crumb { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.crumb b { color: var(--ink); font-weight: 500; }
.search { margin-left: auto; display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 9px 16px; width: 340px; box-shadow: var(--shadow-sm); }
.search input { border: 0; background: transparent; outline: none; font-family: inherit; font-size: 13px; flex: 1; }
.search .kbd { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--muted); background: var(--bg-2); padding: 1px 6px; border-radius: 5px; }
.search svg { width: 14px; height: 14px; color: var(--muted); }
.icb { width: 38px; height: 38px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer; position: relative; transition: background var(--duration-fast); }
.icb:hover { background: var(--bg-2); }
.icb svg { width: 15px; height: 15px; color: var(--ink-2); }
.icb .ping { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--bg); }
.profile { display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--line); cursor: pointer; position: relative; transition: background var(--duration-fast); }
.profile:hover { background: var(--bg-2); }
.profile .av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #ff8a5b, #ff5b1f); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 12px; }
.profile b { font-size: 12.5px; font-weight: 600; line-height: 1.1; display: block; }
.profile span { font-size: 10.5px; color: var(--muted); }
.profile-dropdown { position: absolute; top: 100%; right: 0; margin-top: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-md); z-index: 30; min-width: 160px; overflow: hidden; }
.profile-dd-item { padding: 10px 16px; font-size: 13px; cursor: pointer; transition: background var(--duration-fast); }
.profile-dd-item:hover { background: var(--bg-2); }

/* ─── CONTENT ─── */
.content { padding: 28px 32px 40px; display: flex; flex-direction: column; gap: 24px; position: relative; z-index: 1; }

/* ─── HERO ─── */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: stretch; }
.hero-left { background: linear-gradient(160deg, #1a1a14 0%, #262620 60%, #3a2918 100%); color: #f7f4ea; border-radius: var(--radius-xl); padding: 32px; position: relative; overflow: hidden; min-height: 280px; }
.hero-left::before { content: ""; position: absolute; top: -80px; right: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(255,91,31,.35), transparent 65%); }
.hero-left::after { content: ""; position: absolute; bottom: -60px; left: -40px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(200,162,74,.18), transparent 70%); }
.hero-meta { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: #c8a24a; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; position: relative; z-index: 2; }
.hero-meta .live { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.06); padding: 4px 10px; border-radius: var(--radius-pill); border: 1px solid rgba(255,255,255,.08); }
.hero-meta .live i { width: 6px; height: 6px; border-radius: 50%; background: #7ed957; box-shadow: 0 0 0 3px rgba(126,217,87,.18); animation: pulse 2s ease infinite; }
.hero-left h1 { font-size: 48px; line-height: 1.05; letter-spacing: -.015em; margin: 18px 0 12px; position: relative; z-index: 2; }
.hero-left h1 em { color: var(--accent); font-style: normal; }
.hero-left p { color: #bcb8a8; font-size: 14px; line-height: 1.55; max-width: 520px; position: relative; z-index: 2; }
.hero-cta { display: flex; gap: 10px; margin-top: 22px; position: relative; z-index: 2; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: var(--radius-pill); font-family: inherit; font-weight: 600; font-size: 13px; cursor: pointer; border: 0; transition: transform var(--duration-fast), box-shadow var(--duration-fast); }
.btn:active { transform: scale(.97); }
.btn.light { background: #f7f4ea; color: #13130f; }
.btn.light:hover { box-shadow: var(--shadow-md); }
.btn.ghost { background: rgba(255,255,255,.08); color: #f7f4ea; border: 1px solid rgba(255,255,255,.14); }
.btn.ghost:hover { background: rgba(255,255,255,.12); }
.btn svg { width: 14px; height: 14px; }

.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; position: relative; overflow: hidden; transition: transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal); }
.hero-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.hero-card.accent { background: linear-gradient(160deg, var(--accent-soft), #fff7f1); border-color: #fad8c5; }
.hero-card .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; margin-bottom: 12px; }
.hero-card .val { font-size: 42px; line-height: 1; letter-spacing: -.02em; }
.hero-card .delta { margin-top: 10px; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.hero-card .delta.up { color: var(--berry); }
.hero-card .delta.dn { color: var(--leaf); }
.hero-card .delta svg { width: 11px; height: 11px; }
.hero-card .spark { margin-top: 14px; height: 36px; width: 100%; }

/* ─── COMPETITOR RACE ─── */
.race { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 28px; }
.race-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.race-head h2 { font-size: 30px; letter-spacing: -.01em; }
.race-head p { font-size: 13px; color: var(--muted); margin-top: 2px; max-width: 380px; line-height: 1.5; }
.benchmark { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px dashed var(--line); border-radius: var(--radius-pill); font-size: 12px; color: var(--ink-2); }
.benchmark b { color: var(--ink); font-weight: 600; }
.race-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.comp { padding: 22px; border-radius: var(--radius-lg); background: var(--bg-2); border: 1px solid var(--line-soft); position: relative; overflow: hidden; transition: transform var(--duration-normal) var(--ease-out); }
.comp:hover { transform: translateY(-2px); }
.comp.bk { background: linear-gradient(160deg, #fff8e0, #f3e9b7); }
.comp.zp { background: linear-gradient(160deg, #ede4ff, #dbcbff); }
.comp.is { background: linear-gradient(160deg, #ffe7d4, #ffcfa9); }
.comp-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.comp-mark { width: 42px; height: 42px; border-radius: 13px; background: var(--ink); color: #f7f4ea; display: grid; place-items: center; font-weight: 700; font-size: 14px; font-family: 'Cabinet Grotesk', 'General Sans', sans-serif; }
.comp.bk .comp-mark { background: #7a5a00; color: #fff8e0; }
.comp.zp .comp-mark { background: #3b2a4a; color: #ede4ff; }
.comp.is .comp-mark { background: #7a3a13; color: #ffe7d4; }
.comp-pill { font-size: 10.5px; background: rgba(0,0,0,.06); padding: 3px 9px; border-radius: var(--radius-pill); font-weight: 600; color: var(--ink-2); }
.comp-pill.bm { background: var(--ink); color: #f7f4ea; }
.comp h3 { font-size: 32px; letter-spacing: -.01em; line-height: 1; margin-bottom: 4px; }
.comp .gap-val { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.comp .gap-val b { font-family: 'JetBrains Mono', monospace; font-weight: 500; }
.comp .stats-row { margin-top: 18px; display: flex; gap: 18px; padding-top: 16px; border-top: 1px dashed rgba(0,0,0,.12); }
.comp .stats-row div { flex: 1; }
.comp .stats-row span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: rgba(0,0,0,.55); font-weight: 600; }
.comp .stats-row b { display: block; font-size: 18px; font-family: 'Instrument Serif', serif; margin-top: 3px; }

/* ─── SPLIT / PANEL ─── */
.split { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.panel-head { padding: 22px 24px; display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 1px solid var(--line-soft); }
.panel-head h3 { font-size: 24px; letter-spacing: -.01em; }
.panel-head p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ─── DATA TABLE ─── */
.row { display: grid; grid-template-columns: 2fr .7fr .7fr .7fr .7fr 1fr .6fr; padding: 16px 24px; align-items: center; border-bottom: 1px solid var(--line-soft); font-size: 13px; gap: 8px; transition: background var(--duration-fast); }
.row:last-child { border-bottom: 0; }
.row:not(.head):hover { background: var(--bg); }
.row.head { padding: 12px 24px; background: var(--bg); font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
.row.expanded { background: var(--bg); }
.prod { display: flex; align-items: center; gap: 12px; }
.thumb { width: 42px; height: 42px; border-radius: 12px; background: var(--bg-2); display: grid; place-items: center; font-size: 18px; border: 1px solid var(--line-soft); flex-shrink: 0; }
.prod b { font-weight: 600; font-size: 13.5px; display: block; }
.prod span { font-size: 11.5px; color: var(--muted); margin-top: 1px; display: block; }
.prc { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--ink-2); }
.prc.us { color: var(--ink); font-weight: 500; }
.gap { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 12px; padding: 5px 10px; border-radius: var(--radius-pill); }
.gap.bad { background: #fbe5e8; color: var(--berry); }
.gap.warn { background: #fef1d7; color: #8a6310; }
.gap.good { background: var(--leaf-soft); color: var(--leaf); }
.act-btn { border: 1px solid var(--line); background: var(--surface); font-family: inherit; font-size: 11.5px; padding: 6px 11px; border-radius: var(--radius-pill); font-weight: 600; cursor: pointer; color: var(--ink); display: inline-flex; align-items: center; gap: 4px; transition: all var(--duration-fast); }
.act-btn:hover { background: var(--ink); color: #f7f4ea; border-color: var(--ink); }
.sort-indicator { cursor: pointer; margin-left: 4px; opacity: .5; transition: opacity var(--duration-fast); }
.sort-indicator:hover { opacity: 1; }
.empty-table { padding: 48px 24px; text-align: center; color: var(--muted); }

/* ─── OFFERS ─── */
.offers { padding: 8px 0; }
.offer { padding: 18px 24px; display: flex; gap: 14px; border-bottom: 1px solid var(--line-soft); position: relative; transition: background var(--duration-fast); }
.offer:last-child { border-bottom: 0; }
.offer:hover { background: var(--bg); }
.offer .badge { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; font-family: 'Instrument Serif', serif; font-size: 18px; line-height: 1; }
.offer .badge.z { background: #ede4ff; color: #3b2a4a; }
.offer .badge.b { background: #fff8e0; color: #7a5a00; }
.offer .badge.i { background: #ffe7d4; color: #7a3a13; }
.offer .body { flex: 1; }
.offer h4 { font-size: 13.5px; font-weight: 600; letter-spacing: -.005em; }
.offer p { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.offer .meta { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 10.5px; background: var(--bg-2); padding: 3px 8px; border-radius: var(--radius-pill); color: var(--ink-2); font-weight: 500; border: 1px solid var(--line-soft); display: inline-block; }
.tag.hot { background: var(--accent-soft); color: var(--accent); border-color: #fad8c5; }

/* ─── QUICK NAV ─── */
.q-section { margin-top: 4px; }
.q-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; }
.q-head h3 { font-size: 28px; letter-spacing: -.01em; }
.q-head p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.q-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: inherit; transition: transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal); position: relative; overflow: hidden; }
.q:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.q .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--bg-2); display: grid; place-items: center; border: 1px solid var(--line-soft); }
.q .ic svg { width: 18px; height: 18px; color: var(--ink); }
.q h4 { font-size: 22px; letter-spacing: -.01em; line-height: 1.1; }
.q p { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.q .arrow { position: absolute; top: 22px; right: 22px; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; border: 1px solid var(--line-soft); }
.q .arrow svg { width: 13px; height: 13px; }

/* ─── FOOTER ─── */
.footer { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); margin-top: 8px; }
.footer .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); margin-right: 6px; box-shadow: 0 0 0 3px var(--leaf-soft); }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--muted); text-decoration: none; transition: color var(--duration-fast); }
.footer-links a:hover { color: var(--ink); }

/* ─── TOAST ─── */
.toast-container { position: fixed; top: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 500; animation: slideInRight var(--duration-normal) var(--ease-out); min-width: 280px; }
.toast-icon { flex-shrink: 0; }
.toast-success { border-left: 3px solid var(--leaf); }
.toast-success .toast-icon svg { color: var(--leaf); }
.toast-error { border-left: 3px solid var(--berry); }
.toast-error .toast-icon svg { color: var(--berry); }
.toast-info { border-left: 3px solid var(--plum); }
.toast-info .toast-icon svg { color: var(--plum); }
.toast-warning { border-left: 3px solid var(--gold); }
.toast-warning .toast-icon svg { color: var(--gold); }
.toast-exit { opacity: 0; transform: translateX(40px); transition: all var(--duration-normal); }

/* ─── MODAL ─── */
.modal-overlay { position: fixed; inset: 0; background: rgba(19,19,15,.4); backdrop-filter: blur(4px); z-index: 1000; display: grid; place-items: center; opacity: 0; transition: opacity var(--duration-normal); }
.modal-overlay.open { opacity: 1; }
.modal { background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); width: 90%; max-width: 520px; transform: scale(.95); transition: transform var(--duration-normal) var(--ease-spring); }
.modal-overlay.open .modal { transform: scale(1); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-family: 'Instrument Serif', serif; font-size: 22px; }
.modal-close { background: none; border: none; font-size: 22px; color: var(--muted); cursor: pointer; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; transition: background var(--duration-fast); }
.modal-close:hover { background: var(--bg-2); }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--line-soft); display: flex; gap: 8px; justify-content: flex-end; }
.modal-action { padding: 10px 20px; }

/* ─── DROPDOWN ─── */
.dropdown-wrap { position: relative; display: inline-block; }
.dropdown-trigger { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: all var(--duration-fast); }
.dropdown-trigger:hover { border-color: var(--ink); color: var(--ink); }
.dropdown-trigger svg { width: 12px; height: 12px; flex-shrink: 0; }
.dropdown-panel { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 180px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-md); z-index: 30; overflow: hidden; }
.dropdown-panel.open { display: block; animation: fadeIn var(--duration-fast) var(--ease-out); }
.dropdown-item { padding: 10px 16px; font-size: 13px; cursor: pointer; transition: background var(--duration-fast); }
.dropdown-item:hover { background: var(--bg-2); }
.dropdown-item.selected { background: var(--bg-2); font-weight: 600; color: var(--ink); }

/* ─── TOGGLE ─── */
.toggle { display: inline-flex; background: var(--bg-2); padding: 3px; border-radius: var(--radius-pill); gap: 2px; }
.toggle button { border: 0; background: transparent; font-family: inherit; font-size: 12px; padding: 6px 14px; border-radius: var(--radius-pill); color: var(--muted); font-weight: 600; cursor: pointer; transition: all var(--duration-fast); }
.toggle button.active { background: var(--ink); color: #f7f4ea; }

/* ─── SCREEN HEADER ─── */
.screen-header { display: flex; justify-content: space-between; align-items: flex-start; }

/* ─── FILTER BAR ─── */
.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ─── TABS ─── */
.tabs-bar { display: flex; gap: 0; border-bottom: 1px solid var(--line); }
.tab-btn { border: none; background: none; padding: 12px 20px; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; transition: all var(--duration-fast); }
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--ink); border-bottom-color: var(--ink); }

/* ─── LOGIN ─── */
.login-container { display: grid; place-items: center; min-height: 100vh; padding: 40px; background: var(--bg); }
.login-box { width: 520px; text-align: center; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 12px; }
.user-cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.user-card { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--radius-md); border: 2px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; transition: all var(--duration-fast); }
.user-card:hover { border-color: var(--muted-2); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.user-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.uc-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #ff8a5b, #ff5b1f); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.uc-info b { font-size: 14px; display: block; }
.uc-role { font-size: 12px; color: var(--muted); font-weight: 500; display: block; }
.uc-cats { font-size: 11px; color: var(--muted-2); display: block; margin-top: 2px; }
.login-form { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.login-input { width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; background: var(--surface); }
.login-btn { margin-top: 12px; width: 100%; justify-content: center; background: var(--ink); color: #f7f4ea; padding: 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; border: none; }
.login-btn:disabled { opacity: .4; cursor: not-allowed; }
.login-btn:not(:disabled):hover { box-shadow: var(--shadow-md); }

/* ─── ANIMATIONS ─── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
@keyframes shimmer { from { background-position: -200px 0; } to { background-position: 200px 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

.animate-in { animation: slideUp var(--duration-slow) var(--ease-out); }
.animate-fade { animation: fadeIn var(--duration-normal) var(--ease-out); }
.skeleton { background: linear-gradient(90deg, var(--bg-2) 25%, var(--line-soft) 50%, var(--bg-2) 75%); background-size: 400px 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }
