/* ═══════════════════════════════════════════════
   TAXOLVE  — Complete Design System
   No external font dependencies
═══════════════════════════════════════════════ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }

/* ── TOKENS ── */
:root {
  --maroon:       #7B1F1F;
  --maroon-dk:    #5C1616;
  --maroon-lt:    #9B3030;
  --maroon-ghost: rgba(123,31,31,0.08);
  --gold:         #C4862A;
  --gold-lt:      #E0A040;

  --bg:           #F5F2ED;
  --surface:      #FFFFFF;
  --surface2:     #FAF7F2;
  --border:       #E5DDD4;
  --border-lt:    #EDE6DC;
  --text:         #1A1208;
  --text2:        #4A3F35;
  --muted:        #8A7968;
  --input-bg:     #FAF8F5;

  --sidebar-w:    240px;
  --sidebar-bg:   #6B1A1A;
  --sidebar-text: rgba(255,255,255,0.72);
  --sidebar-hov:  rgba(255,255,255,0.10);
  --sidebar-act:  rgba(255,255,255,0.18);

  --ok:           #2D7A4F;
  --ok-bg:        #EBF7F1;
  --err:          #C0392B;
  --err-bg:       #FDF0EF;
  --warn:         #B7770D;
  --warn-bg:      #FEF6E7;

  --r:            10px;
  --r-lg:         16px;
  --sh:           0 1px 4px rgba(0,0,0,0.07);
  --sh-lg:        0 4px 20px rgba(0,0,0,0.10);
  --t:            all .18s ease;
}

[data-theme="dark"] {
  --bg:       #0F0A06;
  --surface:  #1A1208;
  --surface2: #221608;
  --border:   #2A1E12;
  --border-lt:#241A10;
  --text:     #EDE8E0;
  --text2:    #C0B8AE;
  --muted:    #786860;
  --input-bg: #160E06;
  --sidebar-bg: #2A0E0E;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════
   APP SHELL  —  sidebar + main  (true two-column)
═══════════════════════════════════════════════ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.app-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
}

.sidebar-header {
  padding: 22px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sidebar-logo-mark {
  width: 34px; height: 34px;
  background: var(--gold);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: #fff;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 20px; font-weight: 800;
  color: #fff; letter-spacing: -0.3px;
}
.sidebar-logo-text span { color: var(--gold-lt); }

.sidebar-nav {
  flex: 1;
  padding: 10px 10px;
  list-style: none;
}

.nav-section-title {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,0.28);
  padding: 14px 10px 5px;
  cursor: default;
}

.sidebar-nav li a,
.sidebar-nav li > button.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: var(--r);
  transition: var(--t);
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  font-family: inherit;
  text-align: left;
}

.sidebar-nav li a:hover,
.sidebar-nav li > button.nav-btn:hover { background: var(--sidebar-hov); color: #fff; }

.sidebar-nav li a.active { background: var(--sidebar-act); color: #fff; font-weight: 600; }

.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-chevron { margin-left: auto; font-size: 10px; opacity: .5; transition: transform .2s; display: inline-block; }
.nav-item-has-sub.open .nav-chevron { transform: rotate(180deg); }

.nav-sub { list-style: none; padding: 2px 0 2px 42px; display: none; }
.nav-item-has-sub.open .nav-sub { display: block; }
.nav-sub li a { padding: 7px 10px; font-size: 13px; color: rgba(255,255,255,.5); border-radius: var(--r); }
.nav-sub li a:hover { color: rgba(255,255,255,.85); background: var(--sidebar-hov); }
.nav-sub li a.active { color: #fff; }

.sidebar-footer {
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

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

/* TOPBAR */
.app-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--sh);
}

.topbar-user {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 12px 5px 6px;
  border-radius: 50px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: var(--t); cursor: pointer;
}
.topbar-user:hover { border-color: var(--maroon); }

.topbar-avatar {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--maroon), var(--gold));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; color: #fff;
}

.topbar-name { font-size: 13px; font-weight: 600; }

.theme-toggle {
  width: 36px; height: 36px;
  border-radius: var(--r);
  background: var(--surface2); border: 1.5px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 15px; transition: var(--t); color: var(--text);
}
.theme-toggle:hover { border-color: var(--maroon); }

/* CONTENT */
.app-content { flex: 1; padding: 28px 32px; }

/* ═══════════════════════════════════════════════
   SECTIONS
═══════════════════════════════════════════════ */
.tax-section { display: none; }
.tax-section.active { display: block; }

/* ── PAGE HEADER ── */
.page-header { margin-bottom: 24px; }
.page-title  { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 3px; letter-spacing: -0.3px; }
.page-sub    { font-size: 13px; color: var(--muted); }

/* ── GREETING ── */
.greeting-title {
  font-size: 28px; font-weight: 800;
  color: var(--text); margin-bottom: 4px;
  letter-spacing: -0.5px;
}
.greeting-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 24px; }

/* ── ANALYTICS GRID ── */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.an-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--sh);
  transition: var(--t);
}
.an-card:hover { box-shadow: var(--sh-lg); transform: translateY(-1px); }
.an-card-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 10px; }
.an-card-value { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -.5px; line-height: 1; margin-bottom: 5px; }
.an-card-sub   { font-size: 11.5px; color: var(--muted); }

.an-card.ac-maroon { background: linear-gradient(135deg, var(--maroon-dk), var(--maroon)); border-color: transparent; }
.an-card.ac-maroon .an-card-label { color: rgba(255,255,255,.5); }
.an-card.ac-maroon .an-card-value { color: #fff; }
.an-card.ac-maroon .an-card-sub   { color: rgba(255,255,255,.4); }

.an-card.ac-gold { background: linear-gradient(135deg, #7A4E10, var(--gold)); border-color: transparent; }
.an-card.ac-gold .an-card-label { color: rgba(255,255,255,.55); }
.an-card.ac-gold .an-card-value { color: #fff; }
.an-card.ac-gold .an-card-sub   { color: rgba(255,255,255,.45); }

/* ── YEAR BAR ── */
.year-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 10px 18px;
  margin-bottom: 20px; box-shadow: var(--sh);
}
.year-bar label { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.year-bar select {
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 6px 26px 6px 10px;
  background: var(--input-bg); color: var(--text);
  font-family: inherit; font-size: 13px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238A7968' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  outline: none;
}
.year-bar select:focus { border-color: var(--maroon); }
.year-bar .save-note { margin-left: auto; font-size: 11.5px; color: var(--muted); }

/* ── TAB BAR ── */
.tab-bar {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 18px;
}
.tab-btn {
  padding: 9px 20px;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  background: none; border: none; border-bottom: 2.5px solid transparent;
  margin-bottom: -2px; cursor: pointer; font-family: inherit;
  transition: var(--t); white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--maroon); border-bottom-color: var(--maroon); }

/* ═══════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 18px;
  box-shadow: var(--sh);
  overflow: hidden;
}

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-lt);
}

.card-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}

.card-body { padding: 20px; }

/* ═══════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; border: none;
  transition: var(--t);
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}
.btn-maroon { background: var(--maroon); color: #fff; }
.btn-maroon:hover { background: var(--maroon-lt); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(123,31,31,.3); }

.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-lt); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(196,134,42,.35); }

.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text2); }
.btn-outline:hover { border-color: var(--maroon); color: var(--maroon); background: var(--maroon-ghost); }

.btn-ghost { background: transparent; color: var(--muted); border: none; }
.btn-ghost:hover { background: var(--surface2); color: var(--text); }

.btn-danger { background: var(--err-bg); color: var(--err); border: 1.5px solid rgba(192,57,43,.2); }
.btn-danger:hover { background: var(--err); color: #fff; border-color: var(--err); }

.btn-ok { background: var(--ok-bg); color: var(--ok); border: 1.5px solid rgba(45,122,79,.2); }
.btn-ok:hover { background: var(--ok); color: #fff; }

.btn-sm  { padding: 6px 14px; font-size: 12px; }
.btn-lg  { padding: 12px 30px; font-size: 14.5px; }
.btn-xl  { padding: 14px 36px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ═══════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text2); margin-bottom: 6px; }
.form-control {
  width: 100%; height: 44px;
  background: var(--input-bg); border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 0 12px; font-size: 13.5px; color: var(--text);
  font-family: inherit; transition: var(--t); outline: none;
}
.form-control:focus { border-color: var(--maroon); background: var(--surface); box-shadow: 0 0 0 3px rgba(123,31,31,.09); }
.form-control::placeholder { color: var(--muted); font-size: 13px; }
select.form-control {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7'%3E%3Cpath d='M1 1l4.5 5 4.5-5' stroke='%238A7968' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px; cursor: pointer;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.input-group { position: relative; }
.input-group .form-control { padding-right: 42px; }
.input-toggle { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--muted); background: none; border: none; padding: 3px; font-size: 14px; line-height: 1; }
.form-error { display: block; color: var(--err); font-size: 11.5px; margin-top: 4px; }
.form-hint  { display: block; color: var(--muted); font-size: 11.5px; margin-top: 4px; line-height: 1.5; }

/* ═══════════════════════════════════════════════
   DATA TABLES
═══════════════════════════════════════════════ */
.tbl-wrap { overflow-x: auto; }

.data-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.data-table th {
  background: var(--surface2); color: var(--muted);
  font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px;
  padding: 9px 13px; text-align: left; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 9px 13px; border-bottom: 1px solid var(--border-lt);
  color: var(--text); vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface2); }
.data-table input, .data-table select {
  background: var(--input-bg); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 6px 9px;
  font-size: 12.5px; color: var(--text); font-family: inherit;
  width: 100%; min-width: 80px; transition: var(--t); outline: none;
}
.data-table input:focus, .data-table select:focus {
  border-color: var(--maroon); box-shadow: 0 0 0 2px rgba(123,31,31,.08);
}
.data-table select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='5'%3E%3Cpath d='M1 1l3.5 3.5L8 1' stroke='%238A7968' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center; padding-right: 22px; cursor: pointer;
}
.total-row td { font-weight: 700 !important; background: var(--surface2) !important; border-top: 2px solid var(--border) !important; }
.ngn-val { font-weight: 700; color: var(--maroon); font-size: 13px; white-space: nowrap; }
[data-theme="dark"] .ngn-val { color: var(--gold-lt); }

/* ── ROW REMOVE BTN ── */
.btn-remove {
  background: none; border: none; color: var(--err);
  cursor: pointer; padding: 5px; border-radius: 6px;
  font-size: 13px; transition: var(--t); line-height: 1;
}
.btn-remove:hover { background: var(--err-bg); }

/* ═══════════════════════════════════════════════
   ENTRY MODAL / DRAWER
═══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 500;
  display: none;
  align-items: flex-start;
  justify-content: flex-end;
}
.modal-overlay.show { display: flex; }

.entry-drawer {
  background: var(--surface);
  width: 520px;
  max-width: 100vw;
  height: 100vh;
  overflow-y: auto;
  box-shadow: -8px 0 40px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  animation: slideIn .22s ease;
}

@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
  background: var(--surface);
  position: sticky; top: 0; z-index: 10;
}
.drawer-title { font-size: 16px; font-weight: 800; color: var(--text); }
.drawer-close {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--muted); transition: var(--t);
}
.drawer-close:hover { background: var(--err-bg); color: var(--err); border-color: var(--err); }

.drawer-body { padding: 24px; flex: 1; }

.drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
  flex-shrink: 0;
  background: var(--surface);
  position: sticky; bottom: 0;
}

/* ═══════════════════════════════════════════════
   RECEIPT UPLOAD
═══════════════════════════════════════════════ */
.receipt-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--r);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--t);
  position: relative;
  background: var(--surface2);
}
.receipt-upload-zone:hover { border-color: var(--maroon); background: var(--maroon-ghost); }
.receipt-upload-zone input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer; width: 100%; height: 100%;
  font-size: 0;
}
.receipt-upload-icon { font-size: 28px; margin-bottom: 8px; }
.receipt-upload-text { font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 3px; }
.receipt-upload-hint { font-size: 11.5px; color: var(--muted); }

.receipt-files-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.receipt-file-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 9px;
}
.receipt-file-icon { font-size: 18px; flex-shrink: 0; }
.receipt-file-name { flex: 1; font-size: 12.5px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt-file-size { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.receipt-file-del { background: none; border: none; color: var(--err); cursor: pointer; padding: 4px 6px; border-radius: 5px; font-size: 12px; flex-shrink: 0; }
.receipt-file-del:hover { background: var(--err-bg); }

/* Inline receipt badge on table rows */
.rcpt-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 20px; font-size: 11px; font-weight: 600;
  background: var(--ok-bg); color: var(--ok);
  border: 1px solid rgba(45,122,79,.2);
  cursor: pointer; white-space: nowrap;
  transition: var(--t);
}
.rcpt-badge:hover { background: var(--ok); color: #fff; }
.rcpt-badge-none {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 20px; font-size: 11px; font-weight: 600;
  background: var(--surface2); color: var(--muted);
  border: 1.5px dashed var(--border);
  cursor: pointer; white-space: nowrap;
  transition: var(--t);
}
.rcpt-badge-none:hover { border-color: var(--maroon); color: var(--maroon); background: var(--maroon-ghost); }

/* ═══════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════ */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 56px 32px; text-align: center;
}
.empty-icon {
  width: 60px; height: 60px; background: var(--surface2);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 16px;
  border: 2px dashed var(--border);
}
.empty-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 7px; }
.empty-desc  { font-size: 13px; color: var(--muted); max-width: 260px; line-height: 1.6; margin-bottom: 22px; }

/* ═══════════════════════════════════════════════
   SUMMARY CARDS
═══════════════════════════════════════════════ */
.sum-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 18px;
}
.sum-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px 20px;
  box-shadow: var(--sh); transition: var(--t);
}
.sum-card:hover { box-shadow: var(--sh-lg); transform: translateY(-1px); }
.sum-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 9px; }
.sum-value { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -.3px; line-height: 1; margin-bottom: 4px; }
.sum-sub   { font-size: 11px; color: var(--muted); }
.sum-card.s-maroon { background: linear-gradient(135deg,var(--maroon-dk),var(--maroon)); border-color: transparent; }
.sum-card.s-maroon .sum-label { color: rgba(255,255,255,.5); }
.sum-card.s-maroon .sum-value { color: #fff; }
.sum-card.s-maroon .sum-sub   { color: rgba(255,255,255,.4); }
.sum-card.s-gold { background: linear-gradient(135deg,#7A4E10,var(--gold)); border-color: transparent; }
.sum-card.s-gold .sum-label { color: rgba(255,255,255,.55); }
.sum-card.s-gold .sum-value { color: #fff; }
.sum-card.s-gold .sum-sub   { color: rgba(255,255,255,.45); }

/* TAX BANDS TABLE */
.bands-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bands-table th { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 9px 13px; text-align: left; border-bottom: 1px solid var(--border); }
.bands-table td { padding: 11px 13px; border-bottom: 1px solid var(--border-lt); color: var(--text); }
.bands-table tr:last-child td { border-bottom: none; }
.band-bar-wrap { background: var(--surface2); border-radius: 20px; height: 5px; overflow: hidden; min-width: 70px; }
.band-bar { height: 100%; background: linear-gradient(90deg, var(--maroon), var(--gold)); border-radius: 20px; transition: width .5s ease; }

/* ═══════════════════════════════════════════════
   ALERTS & BADGES
═══════════════════════════════════════════════ */
.alert { padding: 11px 15px; border-radius: var(--r); font-size: 13px; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 9px; line-height: 1.5; }
.alert-err { background: var(--err-bg); color: var(--err); border: 1px solid rgba(192,57,43,.2); }
.alert-ok  { background: var(--ok-bg);  color: var(--ok);  border: 1px solid rgba(45,122,79,.2); }
.alert-info{ background: #EAF4FB;       color: #1E5F8A;    border: 1px solid rgba(30,95,138,.2); }
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-ok   { background: var(--ok-bg);   color: var(--ok); }
.badge-err  { background: var(--err-bg);  color: var(--err); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }

/* ═══════════════════════════════════════════════
   AUTOSAVE STATUS
═══════════════════════════════════════════════ */
.save-status {
  position: fixed; bottom: 22px; right: 22px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 50px; padding: 7px 16px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
  box-shadow: var(--sh-lg);
  opacity: 0; transform: translateY(8px); transition: all .22s ease; z-index: 999;
}
.save-status.show  { opacity: 1; transform: translateY(0); }
.save-status.saving{ color: var(--warn); }
.save-status.saved { color: var(--ok); }
.save-status.error { color: var(--err); }
.save-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.saving .save-dot { animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ═══════════════════════════════════════════════
   AUTH PAGES
═══════════════════════════════════════════════ */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 400px 1fr; }
.auth-left {
  background: linear-gradient(160deg, var(--maroon-dk) 0%, var(--maroon) 55%, #9B4040 100%);
  display: flex; flex-direction: column; justify-content: center; padding: 56px 44px;
  position: relative; overflow: hidden;
}
.auth-left::before { content: ''; position: absolute; width: 400px; height: 400px; border-radius: 50%; background: rgba(255,255,255,.03); top: -120px; right: -160px; }
.auth-left::after  { content: ''; position: absolute; width: 280px; height: 280px; border-radius: 50%; background: rgba(196,134,42,.07); bottom: -60px; left: -70px; }
.auth-logo { display: flex; align-items: center; gap: 11px; margin-bottom: 36px; position: relative; z-index: 1; }
.auth-logo-mark { width: 42px; height: 42px; background: var(--gold); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; color: #fff; }
.auth-logo-text { font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -.3px; }
.auth-logo-text span { color: var(--gold-lt); }
.auth-tagline { font-size: 14px; color: rgba(255,255,255,.62); line-height: 1.75; max-width: 290px; margin-bottom: 40px; position: relative; z-index: 1; }
.auth-features { list-style: none; position: relative; z-index: 1; }
.auth-features li { display: flex; align-items: center; gap: 11px; padding: 10px 0; color: rgba(255,255,255,.72); font-size: 13.5px; border-bottom: 1px solid rgba(255,255,255,.06); }
.auth-features li:last-child { border: none; }
.auth-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-lt); flex-shrink: 0; }
.auth-right { background: var(--surface); display: flex; align-items: center; justify-content: center; padding: 44px 56px; overflow-y: auto; }
.auth-form-wrap { width: 100%; max-width: 400px; }
.auth-form-title { font-size: 26px; font-weight: 800; color: var(--text); margin-bottom: 5px; letter-spacing: -.3px; }
.auth-form-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 26px; }
.auth-form-sub a { color: var(--maroon); text-decoration: none; font-weight: 700; }
.auth-form-sub a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════
   ADMIN
═══════════════════════════════════════════════ */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--sidebar-bg); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.admin-sidebar-header { padding: 22px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-nav { list-style: none; padding: 10px; }
.admin-nav li a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--sidebar-text); text-decoration: none; font-size: 13.5px; font-weight: 500; border-radius: var(--r); transition: var(--t); }
.admin-nav li a:hover { background: var(--sidebar-hov); color: #fff; }
.admin-nav li a.active { background: var(--sidebar-act); color: #fff; font-weight: 600; }
.admin-main { background: var(--bg); }
.admin-topbar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 14px 26px; display: flex; align-items: center; justify-content: space-between; }
.admin-content { padding: 26px; }
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 22px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 22px; box-shadow: var(--sh); }
.stat-num { font-size: 34px; font-weight: 800; color: var(--text); line-height: 1; margin-bottom: 5px; letter-spacing: -.5px; }
.stat-lbl { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.stat-accent { color: var(--maroon) !important; }
.tbl-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { background: var(--surface2); padding: 10px 14px; text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); border-bottom: 1px solid var(--border); }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-lt); color: var(--text); }
.admin-table tr:hover td { background: var(--surface2); }
.admin-table tr:last-child td { border-bottom: none; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 18px; }
.page-btn { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: var(--t); }
.page-btn:hover, .page-btn.active { background: var(--maroon); color: #fff; border-color: var(--maroon); }

/* ═══════════════════════════════════════════════
   UTILS
═══════════════════════════════════════════════ */
.divider  { height: 1px; background: var(--border); margin: 18px 0; }
.hidden   { display: none !important; }
.d-flex   { display: flex; align-items: center; }
.gap-8    { gap: 8px; }
.gap-12   { gap: 12px; }
.flex-1   { flex: 1; }
.jc-between { justify-content: space-between; }
.text-right { text-align: right; }
.text-center{ text-align: center; }
.fw-700   { font-weight: 700; }
.fw-600   { font-weight: 600; }
.text-muted{ color: var(--muted); }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.w-full{ width: 100%; }
.spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid var(--border); border-top-color: var(--maroon); border-radius: 50%; animation: spin .65s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ── */
@media(max-width:1080px){ .analytics-grid{grid-template-columns:repeat(2,1fr);} .sum-grid{grid-template-columns:repeat(2,1fr);} .stat-grid{grid-template-columns:repeat(2,1fr);} }
@media(max-width:820px){
  .auth-page{grid-template-columns:1fr;} .auth-left{display:none;}
  .auth-right{padding:36px 20px;}
  .app-sidebar{transform:translateX(-100%);} .app-main{margin-left:0;}
  .admin-layout{grid-template-columns:1fr;} .admin-sidebar{display:none;}
  .form-row,.form-row-3{grid-template-columns:1fr;}
  .app-content{padding:18px;}
}
@media(max-width:540px){
  .analytics-grid,.sum-grid,.stat-grid{grid-template-columns:1fr;}
  .entry-drawer{width:100vw;}
}
