/* ═══════════════════════════════════════════════════════
   LEDGER — Pure Black & White Theme
   Font: Inter (system-quality smooth) + JetBrains Mono
   ═══════════════════════════════════════════════════════ */

:root {
  /* DARK (default) */
  --bg:    #080808;
  --bg1:   #0f0f0f;
  --bg2:   #161616;
  --bg3:   #1e1e1e;
  --bg4:   #262626;
  --line:  #2a2a2a;
  --line2: #333333;
  --t0:    #ffffff;
  --t1:    #e8e8e8;
  --t2:    #a0a0a0;
  --t3:    #606060;
  --t4:    #3a3a3a;
  --acc:   #ffffff;
  --acc-bg: rgba(255,255,255,0.06);
  --acc-bg2: rgba(255,255,255,0.1);
  --green: #4ade80;
  --red:   #f87171;
  --amber: #fbbf24;
  --green-bg: rgba(74,222,128,0.08);
  --red-bg:   rgba(248,113,113,0.08);
  --shadow: 0 1px 3px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.7);
  --r: 10px;
  --r-lg: 14px;
  --sidebar: 224px;
  --topbar: 52px;
  --bnav: 62px;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

[data-theme="light"] {
  --bg:    #f8f8f8;
  --bg1:   #f2f2f2;
  --bg2:   #ffffff;
  --bg3:   #f5f5f5;
  --bg4:   #ebebeb;
  --line:  #e4e4e4;
  --line2: #d8d8d8;
  --t0:    #080808;
  --t1:    #1a1a1a;
  --t2:    #555555;
  --t3:    #999999;
  --t4:    #cccccc;
  --acc:   #080808;
  --acc-bg: rgba(0,0,0,0.05);
  --acc-bg2: rgba(0,0,0,0.09);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--t1);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  height: 100vh;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, select { font-family: inherit; font-size: 14px; color: var(--t1); }
input::placeholder { color: var(--t3); }
select option { background: var(--bg2); }
svg { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════
   PIN SCREEN
   ═══════════════════════════════════════════════════════ */
.pin-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.35s ease, visibility 0.35s;
}
.pin-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.pin-container {
  display: flex; flex-direction: column; align-items: center;
  gap: 28px; padding: 40px 24px; width: 100%; max-width: 340px;
}

.pin-logo { text-align: center; }
.pin-logo-mark {
  width: 60px; height: 60px; background: var(--t0); border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 0 1px var(--line2), 0 8px 24px rgba(255,255,255,0.08);
}
[data-theme="light"] .pin-logo-mark { box-shadow: 0 0 0 1px var(--line2), 0 8px 24px rgba(0,0,0,0.1); }
.pin-logo h1 {
  font-size: 28px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--t0);
}
.pin-logo p { font-size: 13px; color: var(--t2); margin-top: 4px; font-weight: 400; }

.pin-dots {
  display: flex; gap: 16px;
}
.pin-dots span {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--line2);
  background: transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.12s cubic-bezier(0.34,1.56,0.64,1);
}
.pin-dots span.filled {
  background: var(--t0); border-color: var(--t0);
  transform: scale(1.2);
}

.pin-error {
  color: var(--red); font-size: 13px; text-align: center;
  min-height: 18px; font-weight: 500;
  animation: shake 0.3s ease when-error;
}

.pin-keypad {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  width: 252px;
}
.key {
  height: 64px; border-radius: var(--r);
  background: var(--bg2); border: 1px solid var(--line);
  color: var(--t1); font-size: 22px; font-weight: 500;
  font-family: var(--sans);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, transform 0.08s, border-color 0.12s;
  letter-spacing: -0.01em;
  will-change: transform;
}
.key:hover { background: var(--bg3); border-color: var(--line2); }
.key:active { transform: scale(0.94); background: var(--bg4); }
.key-sym { font-size: 16px; color: var(--t2); }
.key-ok { background: var(--t0); color: var(--bg); border-color: var(--t0); }
.key-ok:hover { background: var(--t1); }
.key-ok svg { stroke: var(--bg); }

.pin-hint { font-size: 12px; color: var(--t3); text-align: center; }

/* ═══════════════════════════════════════════════════════
   APP LAYOUT
   ═══════════════════════════════════════════════════════ */
.app { display: flex; height: 100vh; overflow: hidden; }
.app.hidden { display: none; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar); flex-shrink: 0;
  background: var(--bg1);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 50;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--t0);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-brand > span {
  font-size: 16px; font-weight: 800; letter-spacing: -0.03em; color: var(--t0);
}
.nav-items {
  flex: 1; padding: 10px 10px; display: flex; flex-direction: column; gap: 1px;
  overflow-y: auto;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  color: var(--t2); font-size: 13px; font-weight: 500;
  transition: background 0.15s, color 0.15s;
  text-align: left; width: 100%;
}
.nav-item .ni { width: 16px; height: 16px; flex-shrink: 0; transition: inherit; }
.nav-item:hover { background: var(--acc-bg); color: var(--t1); }
.nav-item.active { background: var(--acc-bg2); color: var(--t0); }
.nav-item.active .ni { stroke-width: 2.5; }
.sidebar-lock {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 18px; border-top: 1px solid var(--line);
  color: var(--t3); font-size: 12px; font-weight: 500;
  transition: color 0.15s;
  text-align: left; width: 100%;
}
.sidebar-lock:hover { color: var(--t1); }

/* MAIN CONTENT */
.main-content {
  flex: 1; margin-left: var(--sidebar);
  display: flex; flex-direction: column;
  overflow: hidden; height: 100vh;
}
.topbar {
  display: none;
  height: var(--topbar); background: var(--bg1);
  border-bottom: 1px solid var(--line);
  align-items: center; justify-content: space-between;
  padding: 0 16px; flex-shrink: 0; gap: 12px;
}
.topbar-brand { display: flex; align-items: center; gap: 8px; }
.brand-sm {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--t0);
  display: flex; align-items: center; justify-content: center;
}
.topbar-brand > span { font-size: 15px; font-weight: 800; letter-spacing: -0.03em; color: var(--t0); }
.topbar-lock { color: var(--t2); padding: 6px; border-radius: 7px; transition: background 0.12s, color 0.12s; }
.topbar-lock:hover { background: var(--acc-bg); color: var(--t0); }

.tab-content {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 28px 32px 40px;
  scroll-behavior: smooth;
}
/* Custom scrollbar */
.tab-content::-webkit-scrollbar { width: 4px; }
.tab-content::-webkit-scrollbar-track { background: transparent; }
.tab-content::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 4px; }

/* BOTTOM NAV */
.bottom-nav {
  display: none;
  height: var(--bnav);
  background: var(--bg1); border-top: 1px solid var(--line);
  flex-shrink: 0; align-items: center; justify-content: space-around;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
}
.bn-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 12px; border-radius: 8px;
  color: var(--t3); font-size: 10px; font-weight: 500;
  transition: color 0.15s;
}
.bn-item.active { color: var(--t0); }
.bn-item svg { transition: inherit; }

/* ═══════════════════════════════════════════════════════
   TAB PANES
   ═══════════════════════════════════════════════════════ */
.tab-pane { display: none; }
.tab-pane.active {
  display: block;
  animation: tab-in 0.22s cubic-bezier(0.25,0.46,0.45,0.94) both;
}
@keyframes tab-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* PAGE HEADER */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 12px; flex-wrap: wrap;
}
.page-header h2 {
  font-size: 26px; font-weight: 800;
  letter-spacing: -0.03em; color: var(--t0); line-height: 1.1;
}
.date-chip {
  font-size: 12px; font-family: var(--mono);
  color: var(--t3); background: var(--bg3);
  padding: 4px 10px; border-radius: 20px;
  border: 1px solid var(--line);
}
.sec-head {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--t3); margin-bottom: 10px; margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════ */
.card {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
}
.card-title {
  font-size: 14px; font-weight: 700; color: var(--t0);
  letter-spacing: -0.01em; margin-bottom: 8px;
}
.card-desc { font-size: 13px; color: var(--t2); margin-bottom: 14px; line-height: 1.55; }

/* ═══════════════════════════════════════════════════════
   DASHBOARD STATS
   ═══════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px; margin-bottom: 28px;
}
.stat-hero {
  grid-column: 1 / -1;
  background: var(--t0);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  position: relative; overflow: hidden;
}
.stat-hero .stat-lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bg4); margin-bottom: 6px; }
.stat-hero .stat-num { font-size: 32px; font-weight: 800; letter-spacing: -0.04em; color: var(--bg); line-height: 1; font-family: var(--mono); }
.stat-box {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px 18px;
}
.stat-lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--t3); margin-bottom: 6px; }
.stat-num { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; color: var(--t0); font-family: var(--mono); }

/* ═══════════════════════════════════════════════════════
   LIST ITEMS
   ═══════════════════════════════════════════════════════ */
.list-wrap { display: flex; flex-direction: column; gap: 6px; }

/* Recent / Dashboard items */
.recent-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 12px 16px; gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.recent-row:hover { border-color: var(--line2); background: var(--bg3); }
.recent-left { min-width: 0; }
.recent-id { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--t0); margin-bottom: 2px; }
.recent-narr { font-size: 13px; color: var(--t1); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-date { font-size: 11px; color: var(--t3); margin-top: 1px; }
.recent-amt { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--t0); white-space: nowrap; flex-shrink: 0; }

/* Account items */
.acc-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px 16px; gap: 12px;
  transition: border-color 0.15s;
}
.acc-row:hover { border-color: var(--line2); }
.acc-left { min-width: 0; flex: 1; }
.acc-id { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--t3); margin-bottom: 3px; }
.acc-name { font-size: 15px; font-weight: 700; color: var(--t0); letter-spacing: -0.02em; }
.acc-date { font-size: 11px; color: var(--t3); margin-top: 2px; }
.acc-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.acc-bal-wrap { text-align: right; }
.acc-bal-lbl { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--t3); }
.acc-bal { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--t0); margin-top: 1px; }
.acc-actions { display: flex; gap: 6px; }

/* Voucher items */
.vou-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 13px 16px; gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.vou-row:hover { border-color: var(--line2); background: var(--bg3); }
.vou-left { min-width: 0; flex: 1; }
.vou-id { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--t0); margin-bottom: 3px; }
.vou-summary { font-size: 13px; font-weight: 500; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vou-date { font-size: 11px; color: var(--t3); margin-top: 2px; }
.vou-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.vou-amt { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--t0); }
.vou-badge {
  font-size: 10px; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; border: 1px solid; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-locked  { color: var(--t3); border-color: var(--line2); }
.badge-reversed{ color: var(--amber); border-color: var(--amber); }
.badge-reversal{ color: var(--t2); border-color: var(--line2); }

/* Icon buttons */
.ic-btn {
  width: 32px; height: 32px; border-radius: 7px;
  border: 1px solid var(--line); color: var(--t2);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.ic-btn:hover { background: var(--acc-bg); color: var(--t0); border-color: var(--line2); }
.ic-btn.del:hover { background: var(--red-bg); color: var(--red); border-color: var(--red); }

/* Empty state */
.empty-state {
  text-align: center; padding: 52px 20px; color: var(--t3);
}
.empty-icon { font-size: 40px; margin-bottom: 10px; opacity: 0.3; }
.empty-state p { font-size: 13px; font-weight: 500; }

/* ═══════════════════════════════════════════════════════
   SEARCH BAR
   ═══════════════════════════════════════════════════════ */
.search-wrap {
  position: relative; margin-bottom: 14px;
}
.search-ic {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--t3); pointer-events: none;
}
.search-wrap input {
  width: 100%; padding: 9px 12px 9px 36px;
  border-radius: var(--r); background: var(--bg2);
  border: 1px solid var(--line); outline: none;
  transition: border-color 0.15s;
}
.search-wrap input:focus { border-color: var(--t0); }

/* ═══════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════ */
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 130px; }
.form-group label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--t3);
}
.req { color: var(--red); }
.form-group input,
.form-group select {
  padding: 9px 12px; border-radius: var(--r);
  background: var(--bg3); border: 1px solid var(--line);
  outline: none; transition: border-color 0.15s, background 0.12s;
}
.form-group input:focus,
.form-group select:focus { border-color: var(--t0); background: var(--bg2); }
.form-actions { display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--r);
  background: var(--t0); color: var(--bg);
  font-size: 13px; font-weight: 700; letter-spacing: -0.01em;
  transition: background 0.12s, transform 0.08s, opacity 0.12s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--t1); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary svg { flex-shrink: 0; stroke: var(--bg); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--r);
  background: transparent; border: 1px solid var(--line2);
  color: var(--t1); font-size: 13px; font-weight: 600;
  transition: background 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.btn-outline:hover { background: var(--acc-bg); border-color: var(--t2); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r);
  border: 1px dashed var(--line2); color: var(--t2);
  font-size: 13px; font-weight: 500;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.btn-ghost:hover { border-color: var(--t0); color: var(--t0); background: var(--acc-bg); }

.btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--r);
  background: var(--red-bg); border: 1px solid var(--red);
  color: var(--red); font-size: 13px; font-weight: 700;
  transition: background 0.12s;
}
.btn-danger:hover { background: rgba(248,113,113,0.15); }

.btn-warn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--r);
  background: rgba(251,191,36,0.08); border: 1px solid var(--amber);
  color: var(--amber); font-size: 13px; font-weight: 700;
  transition: background 0.12s;
}
.btn-warn:hover { background: rgba(251,191,36,0.15); }

/* ═══════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  transition: opacity 0.2s;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--bg2); border: 1px solid var(--line2);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 460px;
  max-height: 90vh; display: none;
  flex-direction: column;
  animation: modal-pop 0.22s cubic-bezier(0.34,1.4,0.64,1) both;
}
.modal[style*="flex"] { display: flex; }
.modal.modal-wide { max-width: 680px; }
.modal.modal-sm   { max-width: 360px; }
@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.93) translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
.modal-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.modal-hd h3 { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; color: var(--t0); }
.modal-x {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--bg3); color: var(--t2);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.modal-x:hover { background: var(--bg4); color: var(--t0); }
.modal-bd {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.modal-ft {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 16px 20px; border-top: 1px solid var(--line);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   VOUCHER ENTRY TABLE
   ═══════════════════════════════════════════════════════ */
.entries-wrap {
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; margin-bottom: 10px;
}
.entries-head {
  display: grid; grid-template-columns: 1.8fr 2fr 1fr 1fr 34px;
  background: var(--bg3); padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.entries-head span {
  padding: 0 10px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--t3);
}
.entry-row {
  display: grid; grid-template-columns: 1.8fr 2fr 1fr 1fr 34px;
  border-top: 1px solid var(--line);
}
.entry-row select,
.entry-row input {
  border: none; background: var(--bg2); padding: 8px 10px;
  color: var(--t1); outline: none; width: 100%;
  border-right: 1px solid var(--line);
  transition: background 0.1s;
  font-size: 13px;
}
.entry-row select:focus,
.entry-row input:focus { background: var(--bg3); }
.entry-row input[type="number"] { font-family: var(--mono); font-size: 13px; }
.entry-row .del-row {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg2); color: var(--t3);
  transition: color 0.12s, background 0.12s; cursor: pointer; border: none;
}
.entry-row .del-row:hover { color: var(--red); background: var(--red-bg); }

.totals-wrap {
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; margin-top: 10px;
}
.tot-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px; border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--t2); font-weight: 500;
}
.tot-row:last-child { border-bottom: none; }
.tot-val { font-family: var(--mono); font-weight: 600; color: var(--t0); }
.tot-status.ok  { background: var(--green-bg); }
.tot-status.err { background: var(--red-bg); }
.tot-status.ok  .tot-val { color: var(--green); }
.tot-status.err .tot-val { color: var(--red); }

/* ═══════════════════════════════════════════════════════
   REPORTS
   ═══════════════════════════════════════════════════════ */
.report-controls { margin-bottom: 18px; }
.report-meta {
  display: flex; flex-wrap: wrap; gap: 20px;
  padding: 16px 0 14px; margin-bottom: 4px;
}
.report-meta-item { font-size: 12px; color: var(--t2); }
.report-meta-item strong { display: block; font-size: 14px; font-weight: 700; color: var(--t0); margin-top: 2px; }

.report-table-wrap { overflow-x: auto; }
.rtable {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.rtable th {
  background: var(--bg3); padding: 9px 12px; text-align: left;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--t3);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.rtable td { padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--t1); }
.rtable tr:last-child td { border-bottom: none; }
.rtable tbody tr:hover td { background: var(--bg3); }
.rtable .num { font-family: var(--mono); text-align: right; font-size: 12px; }
.rtable .dr  { color: var(--red); }
.rtable .cr  { color: var(--green); }
.rtable .bl  { font-weight: 700; color: var(--t0); }
.rtable .vid { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--t0); }
.rtable tfoot td { background: var(--bg3); font-weight: 700; color: var(--t0); }
.rtable .opening-row td { color: var(--t2); font-style: italic; }

/* ═══════════════════════════════════════════════════════
   BACKUP
   ═══════════════════════════════════════════════════════ */
.backup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.bk-card { display: flex; flex-direction: column; gap: 10px; }
.bk-icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--bg3); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--t1);
}
.bk-card h3 { font-size: 14px; font-weight: 700; color: var(--t0); }
.bk-card p  { font-size: 12px; color: var(--t2); line-height: 1.55; }
.bk-meta    { font-family: var(--mono); font-size: 11px; color: var(--t3); }
.radio-group { display: flex; flex-direction: column; gap: 6px; }
.radio-opt {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--t2); cursor: pointer; font-weight: 500;
}
.radio-opt input { accent-color: var(--t0); }

.audit-list { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; }
.audit-entry {
  display: flex; align-items: baseline; gap: 12px;
  padding: 7px 0; border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.audit-entry:last-child { border-bottom: none; }
.audit-ts { font-family: var(--mono); font-size: 10px; color: var(--t3); white-space: nowrap; flex-shrink: 0; }
.audit-msg { color: var(--t2); }

/* ═══════════════════════════════════════════════════════
   SETTINGS
   ═══════════════════════════════════════════════════════ */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 4px;
  font-size: 14px; font-weight: 500; color: var(--t1);
}
.toggle { position: relative; display: inline-block; width: 42px; height: 23px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; border-radius: 23px;
  background: var(--bg4); border: 1px solid var(--line2);
  cursor: pointer; transition: background 0.2s;
}
.slider::before {
  content: ''; position: absolute;
  left: 3px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--t2); transition: left 0.2s, background 0.2s;
}
.toggle input:checked + .slider { background: var(--t0); border-color: var(--t0); }
.toggle input:checked + .slider::before { left: 22px; background: var(--bg); }

.curr-row { display: flex; gap: 8px; align-items: center; }
.curr-row input { width: 80px; padding: 8px 12px; border-radius: var(--r); background: var(--bg3); border: 1px solid var(--line); outline: none; transition: border-color 0.15s; }
.curr-row input:focus { border-color: var(--t0); }

.danger-card .card-title { color: var(--red); }

/* ═══════════════════════════════════════════════════════
   VOUCHER VIEW
   ═══════════════════════════════════════════════════════ */
.vv-meta { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 16px; }
.vv-field { font-size: 12px; color: var(--t2); font-weight: 500; }
.vv-field strong { display: block; font-size: 14px; font-weight: 700; color: var(--t0); margin-top: 2px; }
.vv-id { font-family: var(--mono) !important; color: var(--t0) !important; }
.vv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.vv-table th {
  background: var(--bg3); padding: 8px 12px; text-align: left;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--t3);
  border-bottom: 1px solid var(--line);
}
.vv-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.vv-table tr:last-child td { border-bottom: none; }
.vv-table tfoot td { background: var(--bg3); font-weight: 700; color: var(--t0); }
.vv-num { font-family: var(--mono); text-align: right !important; font-size: 12px; }

/* ═══════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 9999; padding: 10px 20px; border-radius: var(--r);
  font-size: 13px; font-weight: 600; max-width: 340px; text-align: center;
  white-space: nowrap; pointer-events: none;
  animation: toast-up 0.22s ease both;
}
.toast.hidden { display: none; }
.toast.success { background: var(--green-bg); border: 1px solid var(--green); color: var(--green); }
.toast.error   { background: var(--red-bg);   border: 1px solid var(--red);   color: var(--red);   }
.toast.info    { background: var(--bg3);       border: 1px solid var(--line2); color: var(--t1);   }
@keyframes toast-up {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%); }
}

/* ═══════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════ */
@media print {
  body { background: #fff; color: #000; overflow: visible; height: auto; }
  .sidebar, .topbar, .bottom-nav, .report-controls, .page-header button { display: none !important; }
  .main-content { margin: 0; }
  .tab-content { padding: 0; overflow: visible; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  .rtable th, .rtable tfoot td { background: #f2f2f2; color: #333; }
  .rtable td { color: #111; border-color: #ddd; }
}

/* ═══════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════ */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.shake { animation: shake 0.32s ease; }

@keyframes pulse-in {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — TABLET
   ═══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  :root { --sidebar: 200px; }
  .tab-content { padding: 22px 24px 32px; }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — MOBILE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 680px) {
  body { overflow: auto; }
  .sidebar { display: none; }
  .topbar  { display: flex; }
  .main-content { margin-left: 0; padding-bottom: var(--bnav); }
  .bottom-nav { display: flex; }
  .tab-content { padding: 16px 16px 24px; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-hero { grid-column: 1 / -1; }
  .stat-hero .stat-num { font-size: 26px; }

  /* Backup */
  .backup-grid { grid-template-columns: 1fr; }

  /* Settings */
  .settings-grid { grid-template-columns: 1fr; }

  /* Forms */
  .form-row { flex-direction: column; gap: 10px; }

  /* Entries table mobile */
  .entries-head { display: none; }
  .entry-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    border-bottom: 2px solid var(--line);
  }
  .entry-row select     { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .entry-row .e-narr    { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .entry-row .del-row   { grid-column: 2; border-left: 1px solid var(--line); }

  /* Modals full-screen on mobile */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    max-width: 100%; border-radius: var(--r-lg) var(--r-lg) 0 0;
    max-height: 92vh;
  }

  /* Toast above bottom nav */
  .toast { bottom: calc(var(--bnav) + 12px); }

  /* Headers */
  .page-header h2 { font-size: 22px; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-hero { grid-column: auto; }
  .pin-keypad { width: 220px; }
  .key { height: 56px; font-size: 20px; }
}


/* ═══════════════════════════════════════════════════════
   OVERRIDES & NEW FEATURES
   ═══════════════════════════════════════════════════════ */

/* ── No install button ── */
.btn-install { display: none !important; }

/* ── Page header layout ── */
.page-header {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.ph-left  { display: flex; align-items: center; gap: 12px; flex: 1; }
.ph-actions { display: flex; align-items: center; gap: 8px; }

/* ── Refresh button ── */
.btn-refresh {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: var(--bg3); border: 1px solid var(--line);
  border-radius: 8px; color: var(--t2);
  transition: color .15s, background .15s, transform .2s;
  flex-shrink: 0;
}
.btn-refresh:hover { color: var(--t0); background: var(--bg4); }
.btn-refresh svg.spin { animation: spin 0.5s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Stats grid — 2 columns only, no hero ── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 20px;
}
.stat-hero { display: none !important; }

/* ── Scrollable list areas ── */
.scrollable {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.scrollable::-webkit-scrollbar { width: 3px; }
.scrollable::-webkit-scrollbar-track { background: transparent; }
.scrollable::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 3px; }

/* ── Account row — no ID shown ── */
.acc-id { display: none !important; }

/* ── Serial number badges in lists ── */
.acc-sn, .vou-sn, .recent-sn, .audit-sn {
  display: flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px;
  background: var(--bg3); border-radius: 6px;
  font-size: 11px; font-weight: 700; color: var(--t3);
  font-family: var(--mono); flex-shrink: 0;
}

/* Account row: serial + left + right */
.acc-row {
  display: flex; align-items: center;
  gap: 10px;
}
.acc-left { flex: 1; min-width: 0; }
.acc-bal.neg { color: var(--red); }

/* Voucher row: serial number */
.vou-row  { display: flex; align-items: flex-start; gap: 10px; }
.vou-left { flex: 1; min-width: 0; }
.vou-narr {
  font-size: 11px; color: var(--t2); font-style: italic;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}

/* Recent row: serial + mid + amount */
.recent-row { display: flex; align-items: center; gap: 10px; }
.recent-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.recent-mid  { flex: 1; min-width: 0; }

/* Audit row serial */
.audit-entry { display: flex; align-items: flex-start; gap: 8px; }
.audit-sn { margin-top: 1px; }

/* ── Account combo: type + datalist ── */
.acc-combo {
  position: relative; width: 100%;
}
.acc-combo .e-acc-text {
  width: 100%; box-sizing: border-box;
  padding: 8px 10px;
  background: var(--bg1); border: 1px solid var(--line);
  border-radius: 8px; color: var(--t1); font-size: 13px; outline: none;
  transition: border-color .15s;
}
.acc-combo .e-acc-text:focus   { border-color: var(--acc); }
.acc-combo .e-acc-text.acc-nomatch { border-color: var(--red); }

/* Report account combo (full width) */
.report-acc-combo .e-acc-text { font-size: 14px; padding: 9px 12px; }

/* ── Voucher entry row ── */
.entries-head {
  display: grid;
  grid-template-columns: 24px 160px 1fr 80px 80px 32px;
  gap: 6px; padding: 0 4px 6px;
  font-size: 11px; font-weight: 600; color: var(--t3);
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--line); margin-bottom: 6px;
}
.eh-sn { text-align: center; }

.entry-row {
  display: grid;
  grid-template-columns: 160px 1fr 80px 80px 32px;
  gap: 6px; align-items: center; margin-bottom: 6px;
  counter-increment: entry-counter;
}

/* ── Voucher ID hint ── */
.req-hint { font-size: 11px; font-weight: 400; color: var(--t3); margin-left: 4px; }

/* ── Pinned accounts grid ── */
.pinned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px; margin-bottom: 20px;
}
.pinned-card {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 12px 12px;
  cursor: pointer; transition: border-color .2s, transform .15s;
}
.pinned-card:hover { border-color: var(--acc); transform: translateY(-2px); }
.pinned-name {
  font-size: 12px; font-weight: 600; color: var(--t1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 6px;
}
.pinned-bal { font-size: 13px; font-weight: 700; color: var(--green); }
.pinned-bal.neg { color: var(--red); }

/* ── Pin button on account rows ── */
.pin-btn { color: var(--t3); }
.pin-btn.pinned svg { stroke: var(--acc); fill: var(--acc-bg2); }
.pin-btn.pinned     { color: var(--acc); }

/* ── Report table serial column ── */
.sn-col { width: 32px; text-align: center; font-family: var(--mono); font-size: 11px; color: var(--t3); }

/* ── Security question panel on PIN screen ── */
.pin-sec-label {
  font-size: 14px; font-weight: 600; color: var(--t1);
  text-align: center; margin-bottom: 12px; line-height: 1.5;
}
.pin-sec-row {
  display: flex; gap: 8px; width: 100%;
}
.pin-sec-input {
  flex: 1; padding: 10px 14px;
  background: var(--bg2); border: 1px solid var(--line2);
  border-radius: 10px; color: var(--t1); font-size: 14px;
  outline: none; transition: border-color .15s;
}
.pin-sec-input:focus { border-color: var(--acc); }
.pin-sec-btn {
  padding: 10px 16px;
  background: var(--acc); color: var(--bg);
  border-radius: 10px; font-size: 13px; font-weight: 700;
  white-space: nowrap; transition: opacity .15s;
}
.pin-sec-btn:hover { opacity: .85; }

/* ── Forgot PIN button ── */
.pin-forgot {
  font-size: 13px; color: var(--t3); text-decoration: underline;
  background: none; border: none; cursor: pointer; margin-top: -12px;
  transition: color .15s;
}
.pin-forgot:hover { color: var(--t1); }

/* ── Mobile responsive fixes ── */
@media (max-width: 600px) {
  .entries-head { display: none; }
  .entry-row {
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }
  .acc-combo { grid-column: 1 / -1; }
  .e-narr    { grid-column: 1 / -1; }
  .del-row   { grid-column: 2; justify-self: end; }

  .pinned-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid  { grid-template-columns: 1fr 1fr; }
  .ph-actions  { gap: 6px; }
}

/* ═══════════════════════════════════════════════════════
   AUTH SCREEN
   ═══════════════════════════════════════════════════════ */
.auth-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.35s, visibility 0.35s;
}
.auth-screen.hidden { display: none; }

.auth-container {
  display: flex; flex-direction: column; align-items: center;
  gap: 28px; padding: 40px 24px; width: 100%; max-width: 380px;
}

.auth-logo {
  text-align: center; margin-bottom: 16px;
}
.auth-logo-mark {
  width: 60px; height: 60px; background: var(--t0); border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 0 1px var(--line2), 0 8px 24px rgba(255,255,255,0.08);
}
[data-theme="light"] .auth-logo-mark { box-shadow: 0 0 0 1px var(--line2), 0 8px 24px rgba(0,0,0,0.1); }
.auth-logo h1 {
  font-size: 28px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--t0);
}
.auth-logo p { font-size: 13px; color: var(--t2); margin-top: 4px; font-weight: 400; }

.auth-title {
  font-size: 20px; font-weight: 700; color: var(--t0); text-align: center;
  margin-bottom: 8px;
}

.auth-form {
  display: flex; flex-direction: column; gap: 14px; width: 100%;
}

.auth-error {
  color: var(--red); font-size: 13px; text-align: center;
  min-height: 18px; font-weight: 500;
  animation: shake 0.3s ease;
}

.btn-auth-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: var(--r);
  background: var(--t0); color: var(--bg);
  font-size: 14px; font-weight: 700; letter-spacing: -0.01em;
  transition: background 0.12s, transform 0.08s;
  white-space: nowrap; width: 100%; border: none; cursor: pointer;
}
.btn-auth-submit:hover { background: var(--t1); }
.btn-auth-submit:active { transform: scale(0.97); }

.auth-links {
  display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: center;
}

.link-btn {
  background: none; border: none; color: var(--acc); cursor: pointer;
  text-decoration: underline; font-size: 12px; font-weight: 600;
  transition: color 0.15s;
}
.link-btn:hover { color: var(--t0); }

/* ─── Auth form groups ─── */
.auth-form .form-group {
  display: flex; flex-direction: column; gap: 6px;
}

.auth-form label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--t3);
}

.auth-form input {
  padding: 11px 12px; border-radius: var(--r);
  background: var(--bg3); border: 1px solid var(--line);
  color: var(--t1); font-size: 14px; outline: none;
  transition: border-color 0.15s, background 0.12s;
}

.auth-form input:focus {
  border-color: var(--t0); background: var(--bg2);
}

/* ═══════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════ */
@media print {
  body { background: #fff; color: #000; overflow: visible; height: auto; }
  .sidebar, .topbar, .bottom-nav, .report-controls, .page-header button { display: none !important; }
  .main-content { margin: 0; }
  .tab-content { padding: 0; overflow: visible; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  .rtable th, .rtable tfoot td { background: #f2f2f2; color: #333; }
  .rtable td { color: #111; border-color: #ddd; }
}

/* ═══════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════ */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.shake { animation: shake 0.32s ease; }

@keyframes pulse-in {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — TABLET
   ═══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  :root { --sidebar: 200px; }
  .tab-content { padding: 22px 24px 32px; }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — MOBILE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 680px) {
  body { overflow: auto; }
  .sidebar { display: none; }
  .topbar  { display: flex; }
  .main-content { margin-left: 0; padding-bottom: var(--bnav); }
  .bottom-nav { display: flex; }
  .tab-content { padding: 16px 16px 24px; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-hero { grid-column: 1 / -1; }
  .stat-hero .stat-num { font-size: 26px; }

  /* Backup */
  .backup-grid { grid-template-columns: 1fr; }

  /* Settings */
  .settings-grid { grid-template-columns: 1fr; }

  /* Forms */
  .form-row { flex-direction: column; gap: 10px; }

  /* Entries table mobile */
  .entries-head { display: none; }
  .entry-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    border-bottom: 2px solid var(--line);
  }
  .entry-row select     { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .entry-row .e-narr    { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .entry-row .del-row   { grid-column: 2; border-left: 1px solid var(--line); }

  /* Modals full-screen on mobile */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    max-width: 100%; border-radius: var(--r-lg) var(--r-lg) 0 0;
    max-height: 92vh;
  }

  /* Toast above bottom nav */
  .toast { bottom: calc(var(--bnav) + 12px); }

  /* Headers */
  .page-header h2 { font-size: 22px; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-hero { grid-column: auto; }
  .pin-keypad { width: 220px; }
  .key { height: 56px; font-size: 20px; }
}

/* ═══════════════════════════════════════════════════════
   AUTH SCREEN
   ═══════════════════════════════════════════════════════ */
.auth-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.35s, visibility 0.35s;
}
.auth-screen.hidden { display: none; }

.auth-container {
  display: flex; flex-direction: column; align-items: center;
  gap: 28px; padding: 40px 24px; width: 100%; max-width: 380px;
}

.auth-logo {
  text-align: center; margin-bottom: 16px;
}
.auth-logo-mark {
  width: 60px; height: 60px; background: var(--t0); border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 0 1px var(--line2), 0 8px 24px rgba(255,255,255,0.08);
}
[data-theme="light"] .auth-logo-mark { box-shadow: 0 0 0 1px var(--line2), 0 8px 24px rgba(0,0,0,0.1); }
.auth-logo h1 {
  font-size: 28px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--t0);
}
.auth-logo p { font-size: 13px; color: var(--t2); margin-top: 4px; font-weight: 400; }

.auth-title {
  font-size: 20px; font-weight: 700; color: var(--t0); text-align: center;
  margin-bottom: 8px;
}

.auth-form {
  display: flex; flex-direction: column; gap: 14px; width: 100%;
}

.auth-error {
  color: var(--red); font-size: 13px; text-align: center;
  min-height: 18px; font-weight: 500;
  animation: shake 0.3s ease;
}

.btn-auth-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: var(--r);
  background: var(--t0); color: var(--bg);
  font-size: 14px; font-weight: 700; letter-spacing: -0.01em;
  transition: background 0.12s, transform 0.08s;
  white-space: nowrap; width: 100%; border: none; cursor: pointer;
}
.btn-auth-submit:hover { background: var(--t1); }
.btn-auth-submit:active { transform: scale(0.97); }

.auth-links {
  display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: center;
}

.link-btn {
  background: none; border: none; color: var(--acc); cursor: pointer;
  text-decoration: underline; font-size: 12px; font-weight: 600;
  transition: color 0.15s;
}
.link-btn:hover { color: var(--t0); }

/* ─── Auth form groups ─── */
.auth-form .form-group {
  display: flex; flex-direction: column; gap: 6px;
}

.auth-form label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--t3);
}

.auth-form input {
  padding: 11px 12px; border-radius: var(--r);
  background: var(--bg3); border: 1px solid var(--line);
  color: var(--t1); font-size: 14px; outline: none;
  transition: border-color 0.15s, background 0.12s;
}

.auth-form input:focus {
  border-color: var(--t0); background: var(--bg2);
}
