/* ─────────────────────────────────────────────
   LeaveFlow — Main Stylesheet
   Blazor .NET 9 · 3-Level Approval System
   ───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface2: #f0ede8;
  --border: #e2ddd8;
  --sidebar: #1a1a2e;
  --sidebar-text: rgba(255,255,255,.6);
  --sidebar-active: rgba(255,255,255,.1);
  --blue: #2563eb;
  --blue-light: #eff6ff;
  --teal: #0891b2;
  --green: #059669;
  --green-light: #d1fae5;
  --amber: #d97706;
  --amber-light: #fffbeb;
  --red: #dc2626;
  --red-light: #fee2e2;
  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  --text: #1c1917;
  --muted: #78716c;
  --light: #a8a29e;
  --font: 'DM Sans', sans-serif;
  --mono: 'DM Mono', monospace;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
  --radius: 10px;
  --sidebar-w: 256px;
  --topbar-h: 54px;
  --mob-nav-h: 64px;
}

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

html, body { height: 100%; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; }

a { color: inherit; text-decoration: none; }
button { font-family: var(--font); }

/* ── APP SHELL ── */
.app-shell { display: flex; min-height: 100vh; position: relative; }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 200;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}

.sidebar-logo { padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.07); flex-shrink: 0; }
.logo-mark { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 36px; height: 36px; background: var(--blue); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.logo-name { font-size: 1.1rem; font-weight: 700; color: #fff; }
.logo-sub { font-size: .58rem; color: rgba(255,255,255,.35); font-family: var(--mono); margin-top: 2px; letter-spacing: .06em; }

.sidebar-nav { flex: 1; padding: 10px 0; }
.nav-section { padding: 14px 16px 4px; font-size: .6rem; color: rgba(255,255,255,.28); letter-spacing: .12em; font-weight: 700; text-transform: uppercase; }

.sidebar-nav .nav-item, .sidebar-nav a.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 16px; font-size: .82rem;
  color: var(--sidebar-text);
  border-left: 3px solid transparent;
  transition: all .18s; cursor: pointer;
  text-decoration: none;
}
.sidebar-nav a.nav-item:hover,
.sidebar-nav .nav-item:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.9); }
.sidebar-nav a.active { background: var(--sidebar-active); color: #fff; border-left-color: var(--blue); }
.nav-icon { font-size: .95rem; width: 18px; text-align: center; }

.nbadge { margin-left: auto; font-size: .62rem; font-weight: 700; padding: 2px 7px; border-radius: 20px; background: var(--blue); color: #fff; }
.nbadge.red { background: var(--red); }

/* Role switcher */
.role-switcher { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.07); border-bottom: 1px solid rgba(255,255,255,.07); }
.rs-label { font-size: .65rem; color: rgba(255,255,255,.3); margin-bottom: 5px; }
.rs-select { width: 100%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 6px; color: rgba(255,255,255,.8); font-size: .78rem; padding: 6px 8px; font-family: var(--font); outline: none; }
.rs-select option { background: #1a1a2e; }

.sidebar-footer { padding: 14px 16px; flex-shrink: 0; }
.user-card { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; color: #fff; flex-shrink: 0; }
.u-name { font-size: .82rem; font-weight: 600; color: #fff; }
.u-role { font-size: .65rem; color: rgba(255,255,255,.4); }

.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 199; display: none; }
.sidebar-overlay.open { display: block; }

/* ── MAIN AREA ── */
.main-area { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* ── TOPBAR ── */
.topbar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  height: var(--topbar-h); padding: 0 24px;
  display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow);
}
.menu-btn { display: none; background: none; border: none; cursor: pointer; font-size: 1.3rem; color: var(--text); padding: 4px; }
.topbar-title { font-size: .95rem; font-weight: 700; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.notif-bell {
  position: relative; width: 36px; height: 36px;
  background: transparent; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s;
}
.notif-bell:hover { background: var(--surface2); }
.bell-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--red); color: #fff;
  font-size: .58rem; font-weight: 700;
  padding: 1px 5px; border-radius: 10px;
  border: 2px solid var(--surface);
  min-width: 18px; text-align: center;
}

/* ── PAGE CONTENT ── */
.page-content { flex: 1; padding: 24px; padding-bottom: calc(24px + var(--mob-nav-h)); overflow-x: hidden; }

/* ── PAGE HEADER ── */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 10px; }
.page-title { font-size: 1.3rem; font-weight: 700; }
.page-sub { font-size: .8rem; color: var(--muted); margin-top: 2px; }

/* ── STATS GRID ── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.stat-ico { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.si-blue { background: var(--blue-light); }
.si-amber { background: var(--amber-light); }
.si-green { background: var(--green-light); }
.si-red { background: var(--red-light); }
.stat-lbl { font-size: .68rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.stat-val { font-size: 2rem; font-weight: 700; font-family: var(--mono); line-height: 1; }
.stat-val.blue { color: var(--blue); }
.stat-val.amber { color: var(--amber); }
.stat-val.green { color: var(--green); }
.stat-val.red { color: var(--red); }
.stat-sub { font-size: .72rem; color: var(--light); }

/* ── FUNNEL ── */
.funnel-grid { display: flex; align-items: center; gap: 0; padding: 20px; }
.funnel-card {
  flex: 1; padding: 18px; border-radius: var(--radius); cursor: pointer;
  transition: transform .18s, box-shadow .18s; text-align: center;
}
.funnel-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.funnel-card.blue { background: var(--blue-light); border: 2px solid #bfdbfe; }
.funnel-card.purple { background: var(--purple-light); border: 2px solid #ddd6fe; }
.funnel-card.green { background: var(--green-light); border: 2px solid #bbf7d0; }
.funnel-card.amber { background: var(--amber-light); border: 2px solid #ddd6fe; }
.funnel-level { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 8px; }
.funnel-count { font-size: 2.2rem; font-weight: 700; font-family: var(--mono); }
.funnel-card.blue .funnel-count { color: var(--blue); }
.funnel-card.purple .funnel-count { color: var(--purple); }
.funnel-card.green .funnel-count { color: var(--green); }
.funnel-card.amber .funnel-count { color: var(--amber); }
.funnel-sub { font-size: .72rem; color: var(--muted); margin-top: 4px; }
.funnel-arrow { font-size: 1.5rem; color: var(--light); padding: 0 10px; flex-shrink: 0; }

/* ── CARD ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-hd { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: var(--surface); }
.card-hd h3 { font-size: .88rem; font-weight: 600; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-16 { margin-top: 16px; }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 16px; font-size: .68rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; text-align: left; background: var(--surface2); white-space: nowrap; }
td { padding: 12px 16px; font-size: .82rem; border-top: 1px solid var(--border); vertical-align: middle; }
tr:hover td { background: rgba(0,0,0,.013); }
.nowrap { white-space: nowrap; }
.fw6 { font-weight: 600; }
.mono { font-family: var(--mono); }
.text-muted { color: var(--muted); }
.text-red { color: var(--red); }
.fs-xs { font-size: .75rem; }

/* ── USER CELL ── */
.user-cell { display: flex; align-items: center; gap: 10px; }
.mini-avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; color: #fff; flex-shrink: 0; }

/* ── PIPELINE ── */
.pipeline { display: flex; align-items: center; }
.pipeline-sm { gap: 2px; }
.pipeline-lg { gap: 4px; margin: 12px 0; }

.pip-step { display: flex; flex-direction: column; align-items: center; }
.pip-circle {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 700;
  border: 2px solid var(--border); background: var(--surface); color: var(--light);
  transition: all .3s;
}
.pipeline-lg .pip-circle { width: 30px; height: 30px; font-size: .8rem; }
.pip-circle.done     { background: var(--green); border-color: var(--green); color: #fff; }
.pip-circle.active   { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.15); }
.pip-circle.rejected { background: var(--red); border-color: var(--red); color: #fff; }
.pip-circle.stopped  { background: var(--surface2); border-color: var(--border); color: var(--light); }

.pip-line { width: 20px; height: 2px; background: var(--border); flex-shrink: 0; }
.pip-line-done { background: var(--green); }
.pip-label { font-size: .6rem; color: var(--muted); margin-top: 5px; text-align: center; white-space: nowrap; }
.pip-label.done { color: var(--green); font-weight: 600; }
.pip-label.active { color: var(--blue); font-weight: 700; }
.pip-label.rejected { color: var(--red); font-weight: 600; }

/* ── PILLS ── */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.pill-approved  { background: var(--green-light); color: #065f46; }
.pill-rejected  { background: var(--red-light); color: #991b1b; }
.pill-pending   { background: var(--amber-light); color: #92400e; }
.pill-cancelled { background: #f5f5f4; color: var(--muted); }
.pill-l1 { background: var(--blue-light); color: #1e40af; }
.pill-l2 { background: var(--purple-light); color: #5b21b6; }
.pill-l3 { background: var(--green-light); color: #065f46; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px; font-size: .83rem;
  font-family: var(--font); font-weight: 500; cursor: pointer;
  border: none; transition: all .18s; text-decoration: none;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface2); color: var(--text); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #047857; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 6px 12px; font-size: .78rem; }
.btn-txt { } /* mobile hide target */

/* ── BANNERS ── */
.info-banner { padding: 12px 16px; border-radius: 8px; font-size: .82rem; line-height: 1.5; }
.banner-blue   { background: var(--blue-light); border: 1px solid #bfdbfe; color: #1e40af; }
.banner-purple { background: var(--purple-light); border: 1px solid #ddd6fe; color: #5b21b6; }
.banner-green  { background: var(--green-light); border: 1px solid #bbf7d0; color: #065f46; }
.banner-red    { background: var(--red-light); border: 1px solid #fca5a5; color: #991b1b; }

/* ── FORMS ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: .75rem; color: var(--muted); font-weight: 500; }
input, select, textarea {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px; color: var(--text);
  font-family: var(--font); font-size: .84rem; outline: none;
  transition: border-color .18s, background .18s; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); background: #fff; }
input.readonly { opacity: .7; cursor: not-allowed; }
textarea { resize: vertical; min-height: 80px; }
.field-error { font-size: .72rem; color: var(--red); margin-top: 2px; }
.days-preview { margin-top: 12px; padding: 10px 14px; background: var(--blue-light); border-radius: 8px; font-size: .82rem; color: #1e40af; }

/* ── FILTER BAR ── */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-bar select { width: auto; }
.search-wrap { position: relative; flex: 1; min-width: 180px; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--light); font-size: .9rem; pointer-events: none; }
.search-input { padding-left: 34px; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(28,25,23,.5); backdrop-filter: blur(4px);
  z-index: 500; display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; width: 100%; max-width: 560px;
  max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: slideUp .25s ease;
}
.modal-lg { max-width: 700px; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-hd { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-hd h2 { font-size: .95rem; font-weight: 700; }
.close-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.2rem; padding: 2px 6px; border-radius: 4px; }
.close-btn:hover { background: var(--surface2); }
.modal-bd { padding: 22px; }
.modal-ft { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* ── REVIEW GRID ── */
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: .82rem; }
.review-grid .full { grid-column: 1/-1; }
.rl { font-size: .68rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.rv { font-weight: 500; }

/* ── PREV APPROVALS ── */
.prev-approval { margin-bottom: 4px; }
.prev-comment { font-size: .7rem; color: var(--muted); margin-top: 2px; font-style: italic; }
.prev-steps-box { padding: 12px; background: var(--green-light); border-radius: 8px; margin-bottom: 14px; }
.prev-step-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.prev-step-row:last-child { margin-bottom: 0; }

/* ── ACTION GROUP ── */
.action-group { display: flex; gap: 5px; flex-wrap: wrap; }

/* ── BALANCE ── */
.balance-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 18px; }
.balance-item { }
.balance-hd { display: flex; justify-content: space-between; font-size: .78rem; margin-bottom: 6px; font-weight: 500; }
.prog-bar { height: 7px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.prog-fill { height: 100%; border-radius: 4px; transition: width .6s ease; }
.balance-foot { display: flex; justify-content: space-between; margin-top: 4px; }

/* ── NOTIFICATIONS ── */
.notif-section-label { font-size: .68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.notif-card {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 8px; background: var(--surface);
  cursor: pointer; transition: background .18s;
}
.notif-card.unread { border-left: 3px solid var(--blue); background: #f8faff; }
.notif-card:hover { background: var(--surface2); }
.notif-icon { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.notif-body { flex: 1; }
.notif-title { font-size: .84rem; font-weight: 600; }
.notif-text { font-size: .78rem; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.notif-time { font-size: .7rem; color: var(--light); margin-top: 5px; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex-shrink: 0; margin-top: 6px; }

/* ── AUDIT ── */
.audit-list { padding: 0 20px 8px; }
.audit-row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.audit-row:last-child { border-bottom: none; }
.audit-dot { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.audit-body { flex: 1; }
.audit-title { font-size: .82rem; font-weight: 500; }
.audit-meta { font-size: .73rem; color: var(--muted); margin-top: 2px; }
.audit-comment { margin-top: 5px; padding: 7px 10px; background: var(--surface2); border-radius: 6px; font-size: .76rem; color: var(--muted); border-left: 3px solid var(--border); font-style: italic; }
.audit-time { font-size: .68rem; color: var(--light); margin-top: 4px; }

/* ── TRAIL LIST ── */
.trail-list { }
.trail-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.trail-row:last-child { border-bottom: none; }
.trail-dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .78rem; flex-shrink: 0; }
.trail-title { font-size: .82rem; font-weight: 500; }

/* ── FLOW PREVIEW (apply page) ── */
.flow-preview { display: flex; align-items: center; padding: 20px; gap: 0; }
.fp-step { text-align: center; flex: 1; }
.fp-icon { font-size: 1.5rem; margin-bottom: 6px; }
.fp-label { font-size: .75rem; color: var(--muted); line-height: 1.4; }
.fp-step.active .fp-label { color: var(--blue); font-weight: 600; }
.fp-arrow { font-size: 1.3rem; color: var(--light); padding: 0 8px; flex-shrink: 0; }

/* ── ROLE BADGES ── */
.role-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; font-weight: 600; padding: 5px 12px; border-radius: 6px; }
.rb-tl { background: var(--amber-light); color: #92400e; }
.rb-hr { background: var(--purple-light); color: #5b21b6; }
.rb-ceo { background: #fdf4ff; color: #7e22ce; }

/* ── SECTION LABEL ── */
.section-lbl { font-size: .68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }

/* ── PERMISSIONS ── */
.perm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.perm-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.perm-role { font-size: .88rem; font-weight: 700; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.perm-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: .8rem; color: var(--muted); border-bottom: 1px solid var(--surface2); }
.perm-row:last-child { border-bottom: none; }
.perm-check { font-size: 1rem; }

/* ── EMPTY STATE ── */
.empty-state { padding: 48px 24px; text-align: center; }
.empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-text { font-size: .88rem; color: var(--muted); }

/* ── TOAST ── */
.toast-wrap {
  position: fixed; bottom: 80px; right: 20px; z-index: 999;
  padding: 13px 20px; border-radius: 10px;
  font-size: .85rem; font-weight: 500; color: #fff;
  box-shadow: var(--shadow-lg); min-width: 260px;
  transform: translateY(20px); opacity: 0;
  transition: all .3s ease; pointer-events: none;
}
.toast-visible { transform: none; opacity: 1; }

/* ── NOT FOUND ── */
.not-found { padding: 40px; text-align: center; color: var(--muted); }
.not-found a { color: var(--blue); }

/* ── MOBILE BOTTOM NAV ── */
.mob-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  height: var(--mob-nav-h);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 150;
}
.mob-nav-items, .mob-nav { /* flex set below in responsive */ }
.mob-nav { display: flex; justify-content: space-around; align-items: center; }

.mob-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: .62rem; color: var(--muted); cursor: pointer;
  padding: 8px 10px; border-radius: 8px; transition: color .18s;
  text-decoration: none; flex: 1; justify-content: center;
}
.mob-item.active { color: var(--blue); }
.mob-icon { font-size: 1.2rem; position: relative; }
.mob-badge {
  position: absolute; top: -4px; right: -6px;
  background: var(--red); color: #fff; font-size: .55rem; font-weight: 700;
  padding: 1px 4px; border-radius: 8px; border: 2px solid var(--surface);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .perm-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .main-area { margin-left: 0; }
  .menu-btn { display: flex; }
  .mob-nav { display: flex; }
  .page-content { padding: 14px 12px calc(var(--mob-nav-h) + 16px); }
  .topbar { padding: 0 14px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .funnel-grid { flex-direction: column; gap: 8px; }
  .funnel-arrow { transform: rotate(90deg); }
  .balance-grid { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .action-group { gap: 4px; }
  .btn-txt { display: none; }
  .toast-wrap { right: 10px; bottom: calc(var(--mob-nav-h) + 10px); left: 10px; min-width: auto; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-title { font-size: 1.1rem; }
}
