:root {
  --primary: #1a3c6b;
  --primary-light: #2a5298;
  --primary-dark: #0f2445;
  --accent: #e8a020;
  --accent-light: #f5c855;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #17a2b8;
  --bg: #f0f2f5;
  --sidebar-width: 260px;
  --header-height: 64px;
  --white: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--gray-800); line-height: 1.5; }
a { color: inherit; text-decoration: none; }

/* Auth Pages */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%); }
.auth-card { background: var(--white); border-radius: 16px; padding: 48px 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo .logo-icon { width: 64px; height: 64px; background: var(--primary); border-radius: 16px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.auth-logo .logo-icon svg { width: 36px; height: 36px; fill: white; }
.auth-logo h1 { font-size: 22px; font-weight: 700; color: var(--primary); }
.auth-logo p { color: var(--gray-600); font-size: 13px; }
.btn-login { width: 100%; padding: 14px; background: var(--primary); color: white; border: none; border-radius: 10px; font-size: 16px; font-weight: 700; cursor: pointer; transition: background 0.2s; margin-top: 8px; }
.btn-login:hover { background: var(--primary-light); }
.btn-login:disabled { opacity: 0.65; cursor: not-allowed; }

/* Layout */
.app-layout { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-width); background: var(--primary-dark); color: white; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 100; transition: transform 0.3s; }
.sidebar-brand { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-brand h2 { font-size: 15px; font-weight: 700; color: white; }
.sidebar-brand p { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; }
.sidebar-user { padding: 16px 20px; background: rgba(255,255,255,0.05); }
.sidebar-user .user-name { font-size: 13px; font-weight: 600; color: white; }
.sidebar-user .user-role { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; }
.user-avatar { width: 36px; height: 36px; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.sidebar-nav { flex: 1; padding: 16px 0; }
.nav-section-title { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 1px; padding: 8px 20px 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 20px; color: rgba(255,255,255,0.7); font-size: 14px; cursor: pointer; transition: all 0.2s; border-left: 3px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,0.08); color: white; }
.nav-item.active { background: rgba(255,255,255,0.12); color: white; border-left-color: var(--accent); }
.nav-item svg { width: 18px; height: 18px; opacity: 0.8; flex-shrink: 0; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1); }

.main-content { margin-left: var(--sidebar-width); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { height: var(--header-height); background: var(--white); border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; gap: 16px; padding: 0 28px; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.topbar h1 { font-size: 20px; font-weight: 700; color: var(--primary); }
.page-content { padding: 28px; flex: 1; }

/* Cards */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.card-header h3 { font-size: 16px; font-weight: 600; color: var(--primary); }
.card-body { padding: 24px; }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 28px; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon svg { width: 24px; height: 24px; }
.stat-label { font-size: 12px; color: var(--gray-600); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--primary); line-height: 1; margin-top: 4px; }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-label span.req { color: var(--danger); margin-left: 2px; }
.form-control { width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm); font-size: 14px; color: var(--gray-800); transition: border-color 0.2s, box-shadow 0.2s; background: var(--white); }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,60,107,0.1); }
.form-control::placeholder { color: var(--gray-400); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; line-height: 1; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #218838; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #c82333; }
.btn-warning { background: var(--warning); color: var(--gray-800); }
.btn-info { background: var(--info); color: white; }
.btn-outline { background: transparent; border: 1.5px solid var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { background: var(--gray-100); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-block { width: 100%; justify-content: center; }

/* Tables */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { padding: 12px 16px; text-align: left; font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.7px; background: var(--gray-100); border-bottom: 1px solid var(--gray-200); }
tbody td { padding: 14px 16px; border-bottom: 1px solid var(--gray-100); font-size: 14px; color: var(--gray-700); }
tbody tr:hover { background: var(--gray-100); }
tbody tr:last-child td { border-bottom: none; }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: 0.3px; }
.badge-pending { background: #fff3cd; color: #856404; }
.badge-approved { background: #d4edda; color: #155724; }
.badge-rejected { background: #f8d7da; color: #721c24; }
.badge-reconciled { background: #cce5ff; color: #004085; }
.badge-admin { background: #e2d9f3; color: #6f42c1; }
.badge-hod { background: #d1ecf1; color: #0c5460; }
.badge-elder { background: #fff3cd; color: #856404; }
.badge-treasurer { background: #d4edda; color: #155724; }
.badge-clerk { background: #f8d7da; color: #721c24; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.modal { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; animation: modalIn 0.2s ease; }
.modal-lg { max-width: 800px; }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 18px; font-weight: 700; color: var(--primary); }
.modal-close { background: none; border: none; cursor: pointer; color: var(--gray-500); padding: 4px; border-radius: 4px; }
.modal-close:hover { color: var(--gray-800); background: var(--gray-100); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-200); display: flex; gap: 12px; justify-content: flex-end; }
@keyframes modalIn { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }

/* Minutes preview */
.minutes-item { border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; cursor: pointer; transition: all 0.2s; }
.minutes-item:hover { border-color: var(--primary); background: rgba(26,60,107,0.03); }
.minutes-item.selected { border-color: var(--primary); background: rgba(26,60,107,0.06); }
.minutes-item-info { display: flex; align-items: center; gap: 12px; }
.minutes-item-icon { width: 36px; height: 36px; background: #f8d7da; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.minutes-item-title { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.minutes-item-date { font-size: 12px; color: var(--gray-500); }
.minutes-actions { display: flex; gap: 8px; }

/* Timeline */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--gray-200); }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-dot { position: absolute; left: -20px; top: 4px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--white); box-shadow: 0 0 0 2px var(--gray-300); }
.timeline-dot.submitted { background: var(--info); box-shadow: 0 0 0 2px var(--info); }
.timeline-dot.approved { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.timeline-dot.rejected { background: var(--danger); box-shadow: 0 0 0 2px var(--danger); }
.timeline-dot.reconciled { background: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.timeline-content { background: var(--gray-100); border-radius: var(--radius-sm); padding: 12px 16px; }
.timeline-role { font-size: 12px; font-weight: 700; color: var(--primary); text-transform: uppercase; }
.timeline-name { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.timeline-time { font-size: 12px; color: var(--gray-500); }
.timeline-note { font-size: 13px; color: var(--gray-600); margin-top: 4px; font-style: italic; }

/* PDF preview */
.pdf-preview-frame { width: 100%; height: 500px; border: none; border-radius: var(--radius-sm); background: var(--gray-100); }

/* Alert */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-500); }
.empty-state svg { width: 64px; height: 64px; margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { font-size: 18px; color: var(--gray-600); margin-bottom: 8px; }

/* Loading */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: var(--gray-500); gap: 10px; }
.spinner { width: 20px; height: 20px; border: 2px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Page header */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-header h2 { font-size: 22px; font-weight: 700; color: var(--primary); }
.page-header p { color: var(--gray-600); font-size: 14px; margin-top: 2px; }

/* Requisition detail */
.req-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.req-detail-item { }
.req-detail-label { font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; }
.req-detail-value { font-size: 15px; color: var(--gray-800); font-weight: 500; margin-top: 2px; }
.req-amount { font-size: 24px; font-weight: 700; color: var(--primary); }

/* Tabs */
.tabs { display: flex; border-bottom: 2px solid var(--gray-200); margin-bottom: 24px; }
.tab { padding: 10px 20px; font-size: 14px; font-weight: 600; color: var(--gray-600); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Misc */
.divider { height: 1px; background: var(--gray-200); margin: 20px 0; }
.text-muted { color: var(--gray-500); }
.text-sm { font-size: 12px; }
.fw-bold { font-weight: 700; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mb-3 { margin-bottom: 16px; }
.w-100 { width: 100%; }

/* ===================== RESPONSIVE / MOBILE ===================== */

/* Hamburger - hidden on desktop */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  color: var(--gray-700);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
}
.menu-toggle:hover { background: var(--gray-100); }

/* Desktop topbar user section */
.topbar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Logout button in topbar */
.topbar-logout {
  display: none;
  background: transparent;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-700);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  min-height: 44px;
}
.topbar-logout:hover { background: var(--gray-100); }

/* Sidebar overlay backdrop */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 150;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.sidebar-overlay.active { display: block; }

/* ═══════════════════════════════════════════════════════════════
   PREMIUM MOBILE EXPERIENCE
   Inspired by: Airbnb · Spotify · Instagram · Uber · Pinterest
   ─ All rules below are mobile-only: desktop completely untouched ─
   ═══════════════════════════════════════════════════════════════ */

/* ── Google Fonts: Poppins for mobile headings (loaded only on mobile) ── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&display=swap');

/* ── Mobile card-list component ── */
.mobile-card-list { display: none; }

/* Base m-card — inspired by Airbnb listing cards */
.m-card {
  background: var(--white);
  border-radius: 20px;
  padding: 0;
  margin-bottom: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  border: none;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.m-card:active { transform: scale(0.985); box-shadow: 0 1px 8px rgba(0,0,0,0.06); }

/* Card inner padding */
.m-card-inner { padding: 16px 16px 0; }

.m-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}
.m-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.3;
  font-family: 'Poppins', system-ui, sans-serif;
}
.m-card-subtitle {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 3px;
  line-height: 1.4;
}

/* Data rows — Uber-style clean label/value pairs */
.m-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(0,0,0,0.05);
  font-size: 13.5px;
}
.m-card-label {
  color: var(--gray-500);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1px;
}
.m-card-value {
  color: var(--gray-800);
  font-weight: 600;
  text-align: right;
  max-width: 60%;
}

/* Action strip — Pinterest-style bold action row */
.m-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid rgba(0,0,0,0.07);
  margin-top: 0;
}
.m-card-actions > * {
  border-radius: 0 !important;
  border: none !important;
  border-right: 1px solid rgba(0,0,0,0.07) !important;
  min-height: 46px;
  font-size: 13px;
  font-weight: 600;
  justify-content: center;
}
.m-card-actions > *:last-child { border-right: none !important; }
.m-card-actions.three-col { grid-template-columns: 1fr 1fr 1fr; }
.m-card-actions.single { grid-template-columns: 1fr; }

/* Gradient accent strip at top of card */
.m-card-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
}

/* ── Bottom navigation bar — Instagram/Spotify pattern ── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0,0,0,0.08);
  z-index: 500;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}
.mobile-bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.mob-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 16px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  min-width: 56px;
  transition: color 0.2s;
}
.mob-nav-item svg { width: 22px; height: 22px; transition: transform 0.2s; }
.mob-nav-item.active { color: var(--primary); }
.mob-nav-item.active svg { transform: scale(1.15); }
.mob-nav-item:active svg { transform: scale(0.9); }

/* ── Status pills — bolder than badges ── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-pill.pending { background: #fff8e6; color: #b07800; }
.status-pill.approved { background: #e6f9ee; color: #0a7a3e; }
.status-pill.rejected { background: #fff0f0; color: #c0392b; }
.status-pill.reconciled { background: #e8f0fe; color: #1a3c6b; }

/* ═══════════════════════════════════════════════════════════════
   MOBILE BREAKPOINT — max-width: 768px
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Load Poppins for headings */
  body { -webkit-font-smoothing: antialiased; }

  /* ── Sidebar ── */
  .sidebar {
    transform: translateX(-100%);
    z-index: 500;
    width: 290px;
    box-shadow: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 20px 0 60px rgba(0,0,0,0.4);
  }
  .sidebar-brand {
    padding: 24px 20px 18px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  }
  .sidebar-brand h2 { font-size: 17px; font-family: 'Poppins', sans-serif; }
  .sidebar-user {
    padding: 16px 20px;
    background: rgba(255,255,255,0.07);
  }
  .user-avatar {
    width: 44px;
    height: 44px;
    font-size: 17px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    box-shadow: 0 4px 12px rgba(232,160,32,0.4);
  }
  .sidebar-user .user-name { font-size: 15px; font-weight: 700; }
  .nav-item {
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    min-height: 52px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
  }
  .nav-item svg { width: 21px; height: 21px; }
  .nav-item.active {
    background: rgba(255,255,255,0.14);
    border-left-color: var(--accent);
    font-weight: 700;
  }

  /* ── Sidebar overlay ── */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 450;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .sidebar-overlay.active { display: block; }

  /* ── Main content ── */
  .main-content {
    margin-left: 0;
    /* Reserve space for bottom nav */
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  /* ── Topbar — Spotify-inspired: gradient + bold title ── */
  .menu-toggle {
    display: flex;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    color: var(--primary);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
  }
  .menu-toggle:active { background: rgba(26,60,107,0.08); }

  .topbar {
    padding: 0 16px 0 8px;
    height: 60px;
    background: var(--white);
    border-bottom: none;
    box-shadow: 0 1px 0 rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .topbar h1 {
    font-size: 18px;
    font-weight: 800;
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    color: var(--primary);
    font-family: 'Poppins', system-ui, sans-serif;
    letter-spacing: -0.3px;
  }
  .topbar-logout {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    gap: 3px;
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
  }
  .topbar-logout span { display: none; } /* icon only */
  .topbar-logout svg { width: 20px; height: 20px; }
  .topbar-logout:active { background: rgba(26,60,107,0.08); }
  .topbar-user-info { display: none !important; }

  /* ── Page content ── */
  .page-content {
    padding: 16px 14px;
    padding-bottom: 16px;
    background: #f5f6f8;
    /* Prevent content from overflowing horizontally */
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
  }

  /* ── Page header — Airbnb style ── */
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 14px;
  }
  .page-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--gray-800);
    font-family: 'Poppins', system-ui, sans-serif;
    letter-spacing: -0.3px;
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .page-header p { font-size: 14px; color: var(--gray-500); margin-top: 3px; }
  .page-header > .btn,
  .page-header > div + .btn {
    width: 100%;
    justify-content: center;
    min-height: 50px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 14px;
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 16px rgba(26,60,107,0.25);
    letter-spacing: 0.1px;
  }
  .page-header > .btn:active { transform: scale(0.98); }

  /* ── Stats grid — Spotify big numbers ── */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }
  .stat-card {
    padding: 18px 14px;
    gap: 0;
    border-radius: 20px;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    border: none;
    overflow: hidden;
    position: relative;
  }
  .stat-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.07;
    background: var(--primary);
  }
  .stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    margin-bottom: 14px;
  }
  .stat-icon svg { width: 20px; height: 20px; }
  .stat-value {
    font-size: 28px;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.5px;
    line-height: 1;
    margin-bottom: 4px;
  }
  .stat-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
  }

  /* ── Forms — Airbnb/Uber field style ── */
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-group { margin-bottom: 20px; }
  .form-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 8px;
    letter-spacing: 0.1px;
  }
  .form-control {
    min-height: 52px;
    font-size: 16px;
    border-radius: 12px;
    border: 2px solid var(--gray-200);
    padding: 12px 16px;
    background: var(--gray-100);
    transition: border-color 0.2s, background 0.2s;
  }
  .form-control:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(26,60,107,0.1);
  }
  select.form-control { min-height: 52px; }
  textarea.form-control { min-height: 110px; font-size: 16px; }

  /* ── Cards ── */
  .card {
    border-radius: 20px;
    border: none;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    overflow: hidden;
    margin-bottom: 16px;
  }
  .card-header {
    padding: 16px 18px;
    background: var(--white);
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }
  .card-header h3 {
    font-size: 16px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
  }
  .card-body { padding: 16px 18px; }

  /* ── Tables: hide on mobile, show cards ── */
  .table-responsive-mobile .table-wrapper { display: none; }
  .table-responsive-mobile .mobile-card-list { display: block; }

  /* For tables not wrapped: horizontal scroll */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
  }
  table { min-width: 480px; }
  th { padding: 10px 14px; font-size: 11px; }
  td { padding: 12px 14px; font-size: 13px; }

  /* ── Bottom navigation — show on mobile ── */
  .mobile-bottom-nav { display: block; }

  /* ── Modals — Instagram bottom sheet ── */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .modal {
    max-width: 100%;
    width: 100%;
    border-radius: 28px 28px 0 0;
    max-height: 92vh;
    animation: sheetUp 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    padding-top: 0;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.2);
  }
  /* Drag handle — iOS sheet style */
  .modal::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--gray-300);
    border-radius: 2px;
    margin: 12px auto 4px;
  }
  .modal-lg { max-width: 100%; }
  .modal-header {
    padding: 10px 20px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  .modal-header h3 {
    font-size: 18px;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.3px;
  }
  .modal-close {
    width: 32px;
    height: 32px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .modal-body { padding: 16px 20px; }
  .modal-footer {
    padding: 14px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    flex-direction: column-reverse;
    gap: 10px;
    border-top: 1px solid rgba(0,0,0,0.06);
    background: var(--white);
  }
  .modal-footer .btn {
    width: 100%;
    justify-content: center;
    min-height: 52px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 14px;
    letter-spacing: 0.1px;
  }
  .modal-footer .btn-primary {
    box-shadow: 0 4px 16px rgba(26,60,107,0.3);
  }
  .modal-footer .btn-primary:active { transform: scale(0.98); }

  /* ── Auth page — Airbnb login: full-bleed bg, card from bottom ── */
  .auth-body {
    padding: 0;
    align-items: flex-end;
    min-height: 100svh;
    background: linear-gradient(160deg,
      var(--primary-dark) 0%,
      var(--primary) 40%,
      #3568c5 70%,
      #4a7fd4 100%);
  }
  .auth-card {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 32px 32px 0 0;
    padding: 32px 24px calc(32px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 50px rgba(0,0,0,0.2);
    border: none;
  }
  .auth-logo { margin-bottom: 28px; }
  .auth-logo .logo-icon {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 8px 24px rgba(26,60,107,0.3);
  }
  .auth-logo h1 {
    font-size: 22px;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.4px;
  }
  .auth-logo p { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
  .btn-login {
    min-height: 56px;
    font-size: 16px;
    font-weight: 800;
    border-radius: 16px;
    letter-spacing: 0.2px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 6px 20px rgba(26,60,107,0.35);
    transition: transform 0.15s, box-shadow 0.15s;
  }
  .btn-login:active {
    transform: scale(0.97);
    box-shadow: 0 2px 10px rgba(26,60,107,0.2);
  }

  /* ── Buttons — pill shape for CTAs ── */
  .btn { min-height: 44px; border-radius: 12px; }
  .btn-sm { min-height: 38px; padding: 0 16px; font-size: 13px; border-radius: 10px; }
  .btn-primary, .btn-success, .btn-danger {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  }
  .btn:active { transform: scale(0.97); }

  /* ── Badges → status pills ── */
  .badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    letter-spacing: 0.1px;
  }
  .badge-pending { background: #fff3cd; color: #96700a; }
  .badge-approved { background: #d6f5e3; color: #0a6640; }
  .badge-rejected { background: #fde8e8; color: #b01c1c; }
  .badge-reconciled { background: #deeaff; color: #1a3c6b; }

  /* ── PDF preview ── */
  .pdf-preview-frame { height: 62vh; border-radius: 16px; overflow: hidden; }

  /* ── Req detail ── */
  .req-detail-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .req-amount {
    font-size: 32px;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -1px;
  }
  .req-detail-label { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; }
  .req-detail-value { font-size: 15px; font-weight: 600; }

  /* ── Alert ── */
  .alert {
    font-size: 13px;
    padding: 14px 16px;
    border-radius: 14px;
    border: none;
    font-weight: 500;
  }
  .alert-success { background: #d6f5e3; color: #0a6640; }
  .alert-danger  { background: #fde8e8; color: #b01c1c; }
  .alert-info    { background: #deeaff; color: #1a3c6b; }
  .alert-warning { background: #fff3cd; color: #96700a; }

  /* ── Empty state ── */
  .empty-state {
    padding: 48px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .empty-state svg { width: 56px; height: 56px; opacity: 0.2; margin-bottom: 20px; }
  .empty-state h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--gray-700);
    font-family: 'Poppins', sans-serif;
    margin-bottom: 8px;
  }
  .empty-state p { font-size: 14px; color: var(--gray-500); line-height: 1.5; }

  /* ── Loading ── */
  .loading { padding: 48px; gap: 12px; }
  .spinner { width: 24px; height: 24px; border-width: 2.5px; }

  /* ── Tabs ── */
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
    border-bottom: none;
    padding: 0 0 8px;
    margin-bottom: 16px;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    white-space: nowrap;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 50px;
    border-bottom: none !important;
    font-size: 13px;
    font-weight: 600;
    background: var(--gray-100);
    color: var(--gray-600);
    transition: all 0.2s;
    flex-shrink: 0;
    margin-bottom: 0;
  }
  .tab.active {
    background: var(--primary);
    color: var(--white);
  }

  /* ── Timeline ── */
  .timeline { padding-left: 28px; }
  .timeline-content {
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.05);
  }
  .timeline-role { font-size: 11px; font-weight: 800; letter-spacing: 0.6px; }
  .timeline-name { font-size: 15px; font-weight: 700; }
  .timeline-time { font-size: 12px; margin-top: 2px; }
  .timeline-note {
    font-size: 13px;
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--gray-100);
    border-radius: 10px;
    font-style: normal;
    border-left: 3px solid var(--accent);
  }

  /* ── Minutes item ── */
  .minutes-item {
    border-radius: 16px;
    padding: 14px 16px;
    border: none;
    background: var(--white);
    box-shadow: 0 1px 8px rgba(0,0,0,0.07);
    margin-bottom: 10px;
  }
  .minutes-item:active { transform: scale(0.98); }
  .minutes-item-title { font-size: 15px; font-weight: 700; }

  /* ── Minutes actions ── */
  .minutes-actions { flex-wrap: wrap; gap: 8px; }
  .minutes-actions .btn { min-height: 42px; border-radius: 12px; font-size: 13px; font-weight: 600; }

}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; }
  .stat-card { padding: 10px 8px; gap: 8px; }
  .stat-value { font-size: 20px; }
  .stat-icon { width: 32px; height: 32px; }
  .stat-value { font-size: 22px; }
  .topbar h1 { font-size: 16px; }
  .page-content { padding: 12px; }
  .req-detail-grid { grid-template-columns: 1fr; }
  .page-header h2 { font-size: 22px; }
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
