/* ========================================================
   LVS Petty Cash Manager — Styles
   Design: Clean financial dashboard, Inter typography
   ======================================================== */

:root {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --sidebar-bg: #0f1923;
  --sidebar-text: #8a9bb0;
  --sidebar-active: #ffffff;
  --sidebar-active-bg: rgba(255,255,255,0.08);
  --sidebar-hover-bg: rgba(255,255,255,0.05);
  --border: #e4e8ef;
  --text-primary: #0f1923;
  --text-secondary: #6b7a90;
  --text-muted: #9ba8bc;
  --accent: #1a56db;
  --accent-light: #ebf0ff;
  --accent-hover: #1447c7;
  --success: #0e9f6e;
  --success-light: #e8f8f3;
  --warning: #e3a008;
  --warning-light: #fdf3d8;
  --danger: #e02424;
  --danger-light: #fde8e8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --sidebar-width: 240px;
  --topbar-h: 64px;
  --font: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: 0.18s ease;
}

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

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

[data-theme="dark"] {
  --bg: #0b0f16;
  --surface: #131921;
  --surface-raised: #1a2230;
  --sidebar-bg: #080c12;
  --sidebar-text: #6b7a90;
  --sidebar-active: #e8edf5;
  --sidebar-active-bg: rgba(255,255,255,0.1);
  --sidebar-hover-bg: rgba(255,255,255,0.04);
  --border: #1e2a3a;
  --text-primary: #e8edf5;
  --text-secondary: #8a9bb0;
  --text-muted: #4a5a6e;
  --accent: #3b82f6;
  --accent-light: rgba(59,130,246,0.12);
  --accent-hover: #2563eb;
  --success: #10b981;
  --success-light: rgba(16,185,129,0.12);
  --warning: #f59e0b;
  --warning-light: rgba(245,158,11,0.12);
  --danger: #ef4444;
  --danger-light: rgba(239,68,68,0.12);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
}

/* ===== LOGIN ===== */
.login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f1923 0%, #1a2a42 50%, #0f1923 100%);
  z-index: 9999;
}

.login-card {
  width: 400px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.login-logo {
  background: linear-gradient(135deg, #0f1923, #1e3a5f);
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  color: white;
}

.logo-mark {
  font-size: 2.5rem;
  font-weight: 700;
  color: #3b82f6;
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}

.login-logo h1 { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.25rem; }
.login-logo p { font-size: 0.8rem; color: rgba(255,255,255,0.5); }

.login-form { padding: 2rem; }

.login-error {
  background: var(--danger-light);
  color: var(--danger);
  padding: 0.6rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

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

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  transition: width var(--transition), min-width var(--transition);
  position: relative;
  z-index: 100;
}

.sidebar.collapsed { width: 64px; min-width: 64px; }
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .user-info { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 0.7rem; }
.sidebar.collapsed .user-badge { justify-content: center; }
.sidebar.collapsed .logout-btn { display: none; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-mark-sm {
  font-size: 1.3rem;
  font-weight: 700;
  color: #3b82f6;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.sidebar-title { color: white; font-weight: 600; font-size: 0.9rem; }

.sidebar-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--sidebar-text);
  padding: 0.3rem; border-radius: 4px;
  display: flex; align-items: center;
  transition: color var(--transition), background var(--transition);
}
.sidebar-toggle:hover { color: white; background: rgba(255,255,255,0.08); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--sidebar-text);
  padding: 1rem 1rem 0.4rem;
  opacity: 0.6;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1rem;
  color: var(--sidebar-text);
  cursor: pointer;
  border-radius: 0;
  transition: all var(--transition);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin: 1px 0;
  user-select: none;
}
.nav-item:hover { background: var(--sidebar-hover-bg); color: white; }
.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active);
  border-left-color: #3b82f6;
}
.nav-item svg { flex-shrink: 0; }
.nav-item span { font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 0.8rem;
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name { color: white; font-size: 0.82rem; font-weight: 600; }
.user-role { color: var(--sidebar-text); font-size: 0.72rem; }

.logout-btn {
  background: none; border: none; cursor: pointer;
  color: var(--sidebar-text);
  padding: 0.3rem; border-radius: 4px;
  display: flex; align-items: center;
  transition: color var(--transition);
}
.logout-btn:hover { color: var(--danger); }

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  flex-shrink: 0;
}

.topbar-left { display: flex; align-items: center; gap: 0.5rem; }
.page-title { font-size: 1.1rem; font-weight: 500; }

.topbar-right { display: flex; gap: 0.75rem; align-items: center; }

.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* ===== PAGES ===== */
.page { display: none; }
.page.active { display: block; }

/* ===== CHIP CARDS ===== */
.chip-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.chip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.chip-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--chip-color, var(--accent));
}
.chip-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.chip-label { font-size: 0.75rem; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.6rem; }
.chip-value { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); font-family: var(--font-mono); margin-bottom: 0.25rem; }
.chip-sub { font-size: 0.72rem; color: var(--text-muted); }

.chip-card--combined {
  background: linear-gradient(135deg, #0f1923, #1e3a5f);
  border-color: transparent;
  cursor: default;
}
.chip-card--combined.chip-card--error {
  background: linear-gradient(135deg, #7f1d1d, #e02424);
  border-color: transparent;
}
.chip-card--error:not(.chip-card--combined) {
  background: linear-gradient(135deg, #7f1d1d, #991b1b);
  border-color: #e02424;
}
.chip-card--error:not(.chip-card--combined) .chip-label { color: rgba(255,255,255,0.7); }
.chip-card--error:not(.chip-card--combined) .chip-value { color: #ffffff; }
.chip-card--error:not(.chip-card--combined) .chip-sub { color: rgba(255,200,200,0.9); }
.chip-card--combined .chip-label { color: rgba(255,255,255,0.6); }
.chip-card--combined .chip-value { color: #ffffff; }
.chip-card--combined .chip-sub { color: rgba(255,255,255,0.7); }

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

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

.card-header h3 { font-size: 0.9rem; font-weight: 500; }

/* ===== SECTION LABEL ===== */
.section-label {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  margin-top: 0.25rem;
}

/* ===== CHARTS GRID ===== */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.chart-card-mini {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.chart-card-mini-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem 0.5rem;
}

.chart-mini-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chart-mini-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-mini-latest {
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  flex-shrink: 0;
}

.chart-wrap-mini {
  position: relative;
  height: 110px;
  padding: 0 0.75rem 0.75rem;
}

.chart-wrap-mini canvas {
  position: absolute;
  inset: 0 0.75rem 0.75rem;
  width: calc(100% - 1.5rem) !important;
  height: calc(100% - 0.75rem) !important;
}

/* ===== CHART CARD (old single - kept for compat) ===== */
.chart-wrap {
  position: relative;
  height: 260px;
  padding: 1rem 1.25rem 1.25rem;
}
.chart-wrap canvas { position: absolute; inset: 1rem 1.25rem 1.25rem; width: calc(100% - 2.5rem) !important; height: calc(100% - 2.25rem) !important; }
.chart-card select { font-size: 0.8rem; padding: 0.3rem 0.5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-primary); }

@media (max-width: 1100px) {
  .charts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .charts-grid { grid-template-columns: repeat(2, 1fr); }
}

.dashboard-charts { margin-bottom: 1.5rem; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%; border-collapse: collapse;
}

.data-table th {
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-secondary);
  padding: 0.625rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-primary);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg); }

.amount-cell { font-family: var(--font-mono); font-weight: 600; }

/* ===== BIN PAGE ===== */
.bin-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.bin-total-display {}
.total-label { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.total-value { font-size: 2rem; font-weight: 700; font-family: var(--font-mono); color: var(--text-primary); }

/* ===== SETTINGS ===== */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
}

.setting-label { font-size: 0.85rem; font-weight: 500; margin-bottom: 0.2rem; }
.setting-desc { font-size: 0.78rem; color: var(--text-secondary); }

/* Theme toggle */
.theme-toggle {
  width: 44px; height: 24px;
  background: var(--border);
  border-radius: 100px;
  cursor: pointer;
  position: relative;
  transition: background var(--transition);
  flex-shrink: 0;
}
.theme-toggle.active { background: var(--accent); }
.theme-thumb {
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  position: absolute; top: 3px; left: 3px;
  transition: transform var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.theme-toggle.active .theme-thumb { transform: translateX(20px); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  border: none; cursor: pointer;
  font-family: var(--font); font-size: 0.84rem; font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text-primary); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.76rem; }
.btn-full { width: 100%; justify-content: center; }

/* ===== FORM FIELDS ===== */
.field-group { margin-bottom: 1rem; }
.field-group label { display: block; font-size: 0.78rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.04em; }

input[type="text"], input[type="password"], input[type="number"], input[type="date"],
select, textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font); font-size: 0.85rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

textarea { resize: vertical; }

/* ===== DENOMINATION GRID ===== */
.denomination-grid {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1rem;
}

.denom-header {
  display: grid; grid-template-columns: 1fr 120px 120px;
  background: var(--bg);
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.denom-row {
  display: grid; grid-template-columns: 1fr 120px 120px;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
}
.denom-row:last-child { border-bottom: none; }

.denom-label { font-size: 0.85rem; font-weight: 600; font-family: var(--font-mono); }
.denom-input { width: 100%; }
.denom-input input { padding: 0.35rem 0.5rem; font-family: var(--font-mono); font-size: 0.85rem; }
.denom-subtotal { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-secondary); text-align: right; }

.count-total-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 0;
  border-top: 2px solid var(--border);
  font-weight: 700;
  margin-bottom: 1rem;
}
.count-total-display { font-family: var(--font-mono); font-size: 1.1rem; color: var(--accent); }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.15s ease;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 600px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: slideUp 0.2s ease;
}

.modal-sm { max-width: 420px; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 { font-size: 1rem; font-weight: 600; }

.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem; border-radius: 4px;
  display: flex; align-items: center;
  transition: color var(--transition), background var(--transition);
}
.modal-close:hover { color: var(--text-primary); background: var(--bg); }

.modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex; gap: 0.75rem; justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.72rem; font-weight: 600;
  background: var(--accent-light); color: var(--accent);
}

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  background: var(--text-primary); color: var(--surface);
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.84rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9000;
  animation: slideInRight 0.25s ease;
  max-width: 320px;
}

.toast.success { background: var(--success); color: white; }
.toast.error { background: var(--danger); color: white; }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== BIN PAGE DENOMINATION DETAIL ===== */
.count-denom-row td {
  padding: 0 1.25rem 0.75rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.denom-detail-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  padding: 0.5rem 0;
}
.denom-detail-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.6rem;
}
.denom-detail-label { font-weight: 600; font-family: var(--font-mono); color: var(--text-primary); }
.denom-detail-qty   { color: var(--text-secondary); }
.denom-detail-sub   { font-family: var(--font-mono); color: var(--success); font-weight: 600; }
.denom-detail-empty { font-size: 0.78rem; color: var(--text-muted); font-style: italic; }

/* ===== EXPORT MODAL ===== */
.date-range-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}
.date-range-sep {
  color: var(--text-muted);
  font-size: 1rem;
  padding-bottom: 0.65rem;
  flex-shrink: 0;
}
.export-bin-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  max-height: 220px;
  overflow-y: auto;
}
.export-bin-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0;
  cursor: pointer;
  user-select: none;
}
.export-bin-item input[type="checkbox"] {
  width: 16px; height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.export-bin-item label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}
.export-bin-item .bin-currency-tag {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.export-select-all {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.bin-default-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--success-light);
  color: var(--success);
}

.txn-bin-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  white-space: nowrap;
}

/* ===== DISCREPANCY ALERT ===== */
.discrepancy-alert {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  background: var(--danger-light);
  border: 1.5px solid var(--danger);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.discrepancy-icon {
  color: var(--danger);
  flex-shrink: 0;
  margin-top: 1px;
}

.discrepancy-body { flex: 1; }

.discrepancy-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 0.35rem;
}

.discrepancy-list {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
}

.discrepancy-list li {
  font-size: 0.82rem;
  color: var(--danger);
  line-height: 1.5;
  margin-bottom: 0.2rem;
}
.discrepancy-list li:last-child { margin-bottom: 0; }

/* ===== BIN REORDER BUTTONS ===== */
.bin-reorder-btns {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.btn-reorder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0;
  transition: all var(--transition);
}
.btn-reorder:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.btn-reorder:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* ===== REPORT FILTER BAR ===== */
.report-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.report-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.report-filter-group label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.report-filter-group input[type="date"] {
  width: auto;
  padding: 0.45rem 0.65rem;
  font-size: 0.84rem;
}

.report-filter-sep {
  color: var(--text-muted);
  padding-bottom: 0.5rem;
  font-size: 1rem;
}

/* ===== TRANSACTIONS PAGE ===== */
.txn-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.txn-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.txn-summary-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.txn-summary-value {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.txn-summary-in  .txn-summary-value { color: var(--success); }
.txn-summary-out .txn-summary-value { color: var(--danger); }
.txn-summary-bal .txn-summary-value { color: var(--accent); }

.txn-amount-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.txn-amount-or {
  color: var(--text-muted);
  font-size: 0.8rem;
  padding-bottom: 0.65rem;
  flex-shrink: 0;
}

.amount-in  { color: var(--success); font-family: var(--font-mono); font-weight: 600; text-align: right; }
.amount-out { color: var(--danger);  font-family: var(--font-mono); font-weight: 600; text-align: right; }
.amount-bal { font-family: var(--font-mono); text-align: right; }

@media (max-width: 768px) {
  .txn-summary-strip { grid-template-columns: 1fr 1fr; }
}

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

/* ===== MOBILE HAMBURGER ===== */
.mobile-menu-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary);
  padding: 0.4rem; border-radius: var(--radius-sm);
  align-items: center; justify-content: center;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.mobile-menu-btn:hover { color: var(--text-primary); background: var(--bg); }

/* ===== MOBILE SIDEBAR OVERLAY ===== */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 150;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.visible { display: block; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }
  .btn-label { display: none; }

  .sidebar {
    position: fixed;
    z-index: 200;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    width: var(--sidebar-width) !important;
    min-width: var(--sidebar-width) !important;
  }
  .sidebar.mobile-open { transform: translateX(0); }
  /* Reset collapsed styles on mobile */
  .sidebar.collapsed { width: var(--sidebar-width) !important; min-width: var(--sidebar-width) !important; }
  .sidebar.collapsed .sidebar-title,
  .sidebar.collapsed .nav-section-label,
  .sidebar.collapsed .nav-item span,
  .sidebar.collapsed .user-info { display: unset; }
  .sidebar.collapsed .nav-item { justify-content: flex-start; padding: 0.6rem 1rem; }
  .sidebar.collapsed .user-badge { justify-content: flex-start; }
  .sidebar.collapsed .logout-btn { display: flex; }

  .chip-cards { grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .modal { max-width: 100%; margin: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; align-self: flex-end; }
  .modal-overlay { align-items: flex-end; }
  .page-content { padding: 1rem; }
  .topbar { padding: 0 1rem; }
}

/* Empty state */
.empty-row td {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 2rem;
}
