@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --sidebar-bg: #1e3a5f;
  --sidebar-text: rgba(255,255,255,0.75);
  --sidebar-active-bg: rgba(255,255,255,0.12);
  --sidebar-hover: rgba(255,255,255,0.06);
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1a202c;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --success: #059669;
  --success-light: #ecfdf5;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --sidebar-w: 230px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  display: flex;
  overflow: hidden;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ── Sidebar ─────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100vh;
}

.sidebar-logo {
  padding: 20px 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 11px;
}

.sidebar-logo-icon {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-logo-title {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.sidebar-logo-sub {
  color: rgba(255,255,255,0.38);
  font-size: 11px;
  letter-spacing: 0.2px;
  line-height: 1.3;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  border-radius: 7px;
  transition: background 0.12s, color 0.12s;
  margin-bottom: 2px;
}

.nav-item:hover { background: var(--sidebar-hover); color: rgba(255,255,255,0.9); }
.nav-item.active { background: var(--sidebar-active-bg); color: #fff; font-weight: 600; }
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-footer {
  padding: 14px 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-user { padding: 0 4px; }

.sidebar-username {
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 7px;
  color: rgba(255,255,255,0.5);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.12s;
  font-family: inherit;
}
.btn-logout:hover { background: rgba(255,255,255,0.11); color: rgba(255,255,255,0.8); }

.sidebar-copyright {
  font-size: 11px;
  color: rgba(255,255,255,0.22);
  text-align: center;
  padding-top: 6px;
  letter-spacing: 0.2px;
}

/* ── Main ────────────────────────────────── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100vh;
}

.view {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}
.view.active { display: flex; }

/* ── Timer bar ───────────────────────────── */
.timer-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.timer-desc {
  flex: 1;
  font-size: 15px;
  border: none;
  outline: none;
  color: var(--text);
  background: transparent;
  min-width: 0;
  font-family: inherit;
}
.timer-desc::placeholder { color: #c4c9d4; }

.timer-sep { color: #e5e7eb; font-size: 20px; flex-shrink: 0; }

.timer-select {
  font-size: 13px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  min-width: 120px;
  max-width: 160px;
  font-family: inherit;
}
.timer-select:focus { outline: none; border-color: var(--accent); }

.billable-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.13s;
  flex-shrink: 0;
  font-family: inherit;
}
.billable-btn.on { border-color: var(--success); color: var(--success); background: var(--success-light); }

.timer-display {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: 'SF Mono', Consolas, monospace;
  letter-spacing: 1px;
  color: var(--text);
  min-width: 88px;
  text-align: right;
  flex-shrink: 0;
  transition: color 0.2s;
}
.timer-display.running { color: var(--danger); }

/* ── Buttons ─────────────────────────────── */
.btn {
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.13s;
  white-space: nowrap;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #047857; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { background: transparent; color: var(--text-muted); padding: 7px 10px; }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-dark { background: #1e3a5f; color: #fff; }
.btn-dark:hover { background: #162d4a; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-icon { padding: 5px 8px; font-size: 14px; }

/* ── Content ─────────────────────────────── */
.content-area { padding: 24px 28px; flex: 1; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.page-title { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.page-actions { display: flex; gap: 8px; align-items: center; }

/* ── Card ────────────────────────────────── */
.card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.day-group .card { overflow: hidden; }
#timesheet-table { overflow-x: auto; }

/* ── Table ───────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-family: inherit; font-size: inherit; }

th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: #f9fafb; }

.total-row td {
  font-weight: 700;
  background: #f8fafc !important;
  border-top: 2px solid var(--border);
  border-bottom: none;
}

/* ── Entry rows ──────────────────────────── */
.entry-time { color: var(--text-muted); font-size: 12.5px; white-space: nowrap; }
.entry-desc { font-weight: 500; }
.entry-desc.empty { color: var(--text-muted); font-style: italic; font-weight: 400; }
.entry-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.entry-dur { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.entry-amt { font-weight: 500; color: var(--success); white-space: nowrap; }

.row-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.13s;
}
tr:hover .row-actions { opacity: 1; }

/* ── Day group ───────────────────────────── */
.day-group { margin-bottom: 16px; }

.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: #f3f6fa;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
}
.day-label { font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.day-total { font-size: 13px; font-weight: 700; }
.day-header .right { display: flex; align-items: center; gap: 12px; }
.day-group .card { border-radius: 0 0 10px 10px; }

/* ── Pay period bar ──────────────────────── */
.pay-period-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 16px;
  flex-wrap: nowrap;
  overflow-x: auto;
}

/* ── Filters ─────────────────────────────── */
.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filters::-webkit-scrollbar { height: 3px; }
.filters::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

.range-group { display: flex; flex-shrink: 0; }
.range-btn {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.13s;
  white-space: nowrap;
  font-family: inherit;
}
.range-btn:first-child { border-radius: 7px 0 0 7px; }
.range-btn:last-child  { border-radius: 0 7px 7px 0; }
.range-btn:not(:first-child) { border-left: none; }
.range-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); z-index: 1; }
.range-btn:hover:not(.active) { background: var(--bg); color: var(--text); }

.filter-select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
  background: #fff;
  color: var(--text);
  flex-shrink: 0;
  font-family: inherit;
}
.filter-select:focus { outline: none; border-color: var(--accent); }

.filter-date {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
  background: #fff;
  color: var(--text);
  flex-shrink: 0;
  font-family: inherit;
}
.filter-date:focus { outline: none; border-color: var(--accent); }

/* ── Totals bar ──────────────────────────── */
.totals-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.total-item {
  flex: 1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.total-item .lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.total-item .val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Badge ───────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-blue    { background: var(--accent-light); color: #1d4ed8; }
.badge-green   { background: var(--success-light); color: #065f46; }
.badge-gray    { background: #f3f4f6; color: var(--text-muted); }
.badge-red     { background: var(--danger-light); color: #991b1b; }
.badge-orange  { background: var(--warning-light); color: var(--warning); border: 1px solid #fcd34d; }

/* ── Status ──────────────────────────────── */
.status-active   { color: var(--success); font-weight: 600; }
.status-inactive { color: var(--text-muted); }

/* ── Empty state ─────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 44px; margin-bottom: 14px; opacity: 0.5; }
.empty-state p { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state .sub { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

/* ── Modal ───────────────────────────────── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s;
}
.overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: #fff;
  border-radius: 12px;
  width: 500px;
  max-width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  transform: translateY(12px);
  transition: transform 0.15s;
}
.overlay.open .modal { transform: translateY(0); }

.modal-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: #fff; z-index: 1;
  border-radius: 12px 12px 0 0;
}
.modal-title { font-size: 15px; font-weight: 700; }
.modal-x { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-muted); line-height: 1; padding: 0 2px; }
.modal-body { padding: 20px 22px; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
  position: sticky; bottom: 0; background: #fff;
  border-radius: 0 0 12px 12px;
}

/* ── Form ────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; color: var(--text); }
.form-control {
  width: 100%; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 7px;
  font-size: 14px; color: var(--text); background: #fff;
  transition: border-color 0.13s, box-shadow 0.13s;
  font-family: inherit;
}
.form-control:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ── Colour dot ──────────────────────────── */
.color-dot {
  display: inline-block;
  width: 10px; height: 10px; border-radius: 50%;
  margin-right: 5px; vertical-align: middle; flex-shrink: 0;
}

/* ── Colour picker ───────────────────────── */
.color-picker { display: flex; flex-direction: column; gap: 10px; }
.color-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch {
  width: 28px; height: 28px; border-radius: 6px;
  border: 2px solid transparent; cursor: pointer; padding: 0;
  outline: none; transition: transform 0.12s, border-color 0.12s;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.swatch:hover { transform: scale(1.1); }
.swatch.selected { border-color: rgba(0,0,0,0.45); box-shadow: 0 0 0 1px rgba(255,255,255,0.6) inset; }

.color-custom-row {
  display: flex; align-items: center; gap: 8px;
}
.color-preview-dot {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid var(--border); flex-shrink: 0;
  cursor: pointer; transition: transform 0.12s;
}
.color-preview-dot:hover { transform: scale(1.08); }
.color-hex-input {
  flex: 1; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 7px;
  font-size: 13px; color: var(--text); background: #fff;
  font-family: 'SF Mono', Consolas, monospace;
  transition: border-color 0.13s;
}
.color-hex-input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.color-hidden {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}

/* ── Reminder banner ─────────────────────── */
.reminder-banner {
  position: fixed; top: 0; left: var(--sidebar-w); right: 0; z-index: 900;
  display: flex; align-items: center; gap: 10px;
  background: #fffbeb; border-bottom: 1px solid #fcd34d;
  padding: 10px 20px; font-size: 13.5px; color: #92400e;
}
.reminder-banner.hidden { display: none; }
.reminder-icon { font-size: 16px; flex-shrink: 0; }
.reminder-banner span:nth-child(2) { flex: 1; }
.reminder-dismiss {
  flex-shrink: 0; background: none; border: 1px solid #fcd34d;
  border-radius: 6px; padding: 3px 10px; font-size: 12px;
  color: #92400e; cursor: pointer; font-family: inherit;
}
.reminder-dismiss:hover { background: #fef3c7; }

/* ── Toast ───────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  padding: 11px 18px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; color: #fff;
  background: var(--text);
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  transform: translateY(80px); opacity: 0;
  transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none; z-index: 2000;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* ── Scrollbar ───────────────────────────── */
.view::-webkit-scrollbar { width: 5px; }
.view::-webkit-scrollbar-track { background: transparent; }
.view::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

/* ── Utilities ───────────────────────────── */
.mono { font-family: inherit; }
.text-muted { color: var(--text-muted); }
.fw-bold { font-weight: 700; }
.hidden { display: none !important; }
.running-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--danger);
  animation: pulse 1.2s ease-in-out infinite;
  margin-right: 6px;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ── Role badges ─────────────────────────── */
.role-badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.role-badge--admin   { background: #dbeafe; color: #1e40af; }
.role-badge--user    { background: #d1fae5; color: #065f46; }
.role-badge--payroll { background: #fef3c7; color: #7c2d12; }

/* ── Action (three-dot) menu ─────────────── */
.action-menu { position: relative; display: inline-block; }

.action-menu-btn {
  background: none; border: none;
  padding: 5px 7px; border-radius: 6px; cursor: pointer;
  color: var(--text-muted); display: flex; align-items: center;
  transition: background 0.12s, color 0.12s;
}
.action-menu-btn:hover { background: var(--bg); color: var(--text); }

.action-menu-dropdown {
  position: absolute; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 180px; z-index: 200;
  display: none; overflow: hidden;
}
.action-menu.open .action-menu-dropdown { display: block; }

.action-menu-item {
  display: block; width: 100%; text-align: left;
  padding: 9px 14px; background: none; border: none;
  font-size: 13px; cursor: pointer; color: var(--text);
  font-family: inherit; transition: background 0.1s;
}
.action-menu-item:hover  { background: var(--bg); }
.action-menu-item.danger { color: var(--danger); }
.action-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ── Quick-add popup ─────────────────────── */
.quick-add-overlay {
  position: fixed; inset: 0;
  z-index: 1100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.2);
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s;
}
.quick-add-overlay.open { opacity: 1; pointer-events: all; }

.quick-add-popup {
  background: #fff;
  border-radius: 10px;
  width: 340px;
  max-width: 92vw;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
  transform: translateY(10px);
  transition: transform 0.15s;
}
.quick-add-overlay.open .quick-add-popup { transform: translateY(0); }

.quick-add-popup-header {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.quick-add-popup-title { font-size: 14px; font-weight: 700; }
.quick-add-popup-body  { padding: 16px 18px; }
.quick-add-popup-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
}

.swatch-sm { width: 22px; height: 22px; }

/* ── Rejection note ──────────────────────── */
.rejection-note {
  background: var(--danger-light);
  border: 1px solid #fecaca;
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: #991b1b;
  margin-bottom: 8px;
}

/* ── Auth pages ──────────────────────────── */
body.auth-body {
  display: block;
  overflow: auto;
  min-height: 100vh;
  background: var(--bg);
  padding: 0;
}

.auth-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.auth-logo h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--sidebar-bg);
  letter-spacing: -0.3px;
}

.auth-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
  padding: 36px 40px;
  width: 100%;
  max-width: 420px;
}

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

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.auth-error {
  background: var(--danger-light);
  border: 1px solid #fecaca;
  color: var(--danger);
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

.auth-card .form-group { margin-bottom: 18px; }

.auth-btn {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  margin-top: 4px;
  justify-content: center;
}

.auth-links {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
}
.auth-links a { color: var(--accent); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

/* ── Total card variants ─────────────────── */
.total-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.total-icon-wrap {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.total-icon-wrap--blue   { background: #eff6ff; color: #2563eb; }
.total-icon-wrap--teal   { background: #ecfeff; color: #0891b2; }
.total-icon-wrap--green  { background: #f0fdf4; color: #059669; }
.total-icon-wrap--purple { background: #f5f3ff; color: #7c3aed; }

.total-item--blue   { border-top: 3px solid #2563eb; }
.total-item--green  { border-top: 3px solid #059669; }
.total-item--teal   { border-top: 3px solid #0891b2; }
.total-item--purple { border-top: 3px solid #7c3aed; }

/* ── Filter row ──────────────────────────── */
.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 20px;
  flex-wrap: nowrap;
}

.filter-row::-webkit-scrollbar { height: 3px; }
.filter-row::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

/* Compact auto-width selects inside the filter row */
.filter-row select {
  width: auto;
  flex-shrink: 0;
  max-width: 160px;
  min-width: 0;
}

.filter-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}