/* ─────────────────────────────────────────────────────────────────────────────
   RMU Staff Welfare Fund  –  Global Styles
───────────────────────────────────────────────────────────────────────────── */
:root {
  --primary:      #1e3a8a;
  --primary-light:#3b82f6;
  --accent:       #475569;
  --accent-dark:  #334155;
  --danger:       #dc2626;
  --warning:      #f59e0b;
  --info:         #0ea5e9;
  --bg:           #f8fafc;
  --card:         #ffffff;
  --border:       #e2e8f0;
  --text:         #0f172a;
  --text-muted:   #64748b;
  --sidebar-w:    260px;
  --header-h:     64px;
  --radius:       6px;
  --shadow:       0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px 0 rgba(0,0,0,.06);
  --transition:   .2s ease;
}

/* Dark Mode */
[data-theme="dark"] {
  --primary:      #3b82f6;
  --primary-light:#60a5fa;
  --accent:       #64748b;
  --accent-dark:  #475569;
  --danger:       #ef4444;
  --warning:      #fbbf24;
  --info:         #38bdf8;
  --bg:           #0f172a;
  --card:         #1e293b;
  --border:       #334155;
  --text:         #f1f5f9;
  --text-muted:   #94a3b8;
  --shadow:       0 1px 3px 0 rgba(0,0,0,.3), 0 1px 2px 0 rgba(0,0,0,.2);
}

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

body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Login Pages ─────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.login-card {
  background: var(--card);
  border-radius: 8px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 10px 25px rgba(0,0,0,.15);
}

.login-card .logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-card h1 { text-align: center; font-size: 20px; font-weight: 600; color: var(--primary); }
.login-card .subtitle { text-align: center; color: var(--text-muted); font-size: 13px; margin-top: 4px; font-weight: 500; }

/* ── App Shell ───────────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
  transform: translateX(-100%);
}

/* Sidebar open state */
.sidebar.open {
  transform: translateX(0);
}

/* Overlay when sidebar is open */
.sidebar.open::before {
  content: '';
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: -1;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
}

.sidebar-brand h2 {
  font-size: 15px; font-weight: 600; line-height: 1.2;
}

.sidebar-brand p { font-size: 11px; opacity: .75; font-weight: 500; }

.sidebar-user {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-size: 12px;
}

.sidebar-user .user-name { font-weight: 600; font-size: 13px; }
.sidebar-user .user-role { opacity: .7; font-size: 11px; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.nav-section {
  padding: 8px 20px 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: .5;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 0;
  transition: background var(--transition);
  font-size: 13px;
  color: rgba(255,255,255,.85);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }

.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.12);
}

/* Main content */
.main-content {
  margin-left: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition);
}

.topbar {
  height: var(--header-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.topbar-title { font-size: 18px; font-weight: 700; color: var(--primary); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.page-content {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}

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

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Stat Cards ──────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* Two column grid for cards */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Loan category stat boxes */
.loan-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0; /* Allow flex items to shrink below content size */
}

.stat-icon {
  width: 48px; height: 48px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon.green  { background: #dcfce7; color: #15803d; }
.stat-icon.blue   { background: #dbeafe; color: #1e40af; }
.stat-icon.orange { background: #fed7aa; color: #c2410c; }
.stat-icon.red    { background: #fee2e2; color: #dc2626; }
.stat-icon.purple { background: #e9d5ff; color: #7c3aed; }

.stat-value { font-size: 20px; font-weight: 600; color: var(--text); line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}

.form-control {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  background: var(--card);
  transition: border var(--transition), box-shadow var(--transition);
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,58,138,.1);
}

.form-control[readonly] { background: var(--bg); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  border: none; border-radius: 6px;
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 5px; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-light); }

.btn-success { background: #15803d; color: #fff; }
.btn-success:hover:not(:disabled) { background: #166534; }

.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled)  { background: #b91c1c; }

.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover:not(:disabled) { background: #d97706; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover:not(:disabled) { background: var(--primary); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg); color: var(--text); border-color: var(--primary); }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  background: var(--bg);
  padding: 12px 20px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

.table-empty { text-align: center; padding: 40px; color: var(--text-muted); font-size: 13px; }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-green   { background: #dcfce7; color: #15803d; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-blue    { background: #dbeafe; color: #1e40af; }
.badge-orange  { background: #fed7aa; color: #c2410c; }
.badge-red     { background: #fee2e2; color: #dc2626; }
.badge-grey    { background: #f1f5f9; color: #475569; }
.badge-gray    { background: #f1f5f9; color: #475569; }

/* ── Modals ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--card);
  border-radius: 8px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
  animation: modalIn .2s ease;
}

.modal-lg { max-width: 820px; }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

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

.modal-title { font-size: 18px; font-weight: 600; color: var(--text); }

.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 24px; color: var(--text-muted);
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}
.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-body  { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Alerts / Toasts ─────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--card);
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  border-left: 4px solid var(--accent);
  min-width: 280px;
  max-width: 380px;
  font-size: 13px;
  animation: toastIn .25s ease;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.toast.error   { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }
.toast.info    { border-color: var(--info); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: none; }
}

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab-btn {
  padding: 9px 18px;
  border: none; background: none;
  cursor: pointer;
  font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

.tab-btn:hover:not(.active) { color: var(--text); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Progress bar ────────────────────────────────────────────────────────── */
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width .4s ease;
}

/* ── Section pages ───────────────────────────────────────────────────────── */
.section { display: none; }
.section.active { display: block; }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.summary-box {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid;
}

.summary-box-blue {
  background: rgba(0, 168, 232, 0.1);
  border-color: rgba(0, 168, 232, 0.3);
}

.summary-box-blue .summary-box-label {
  color: #0369a1;
}

.summary-box-blue .summary-box-value {
  color: #0c4a6e;
}

.summary-box-yellow {
  background: rgba(255, 165, 0, 0.1);
  border-color: rgba(255, 165, 0, 0.3);
}

.summary-box-yellow .summary-box-label {
  color: #a16207;
}

.summary-box-yellow .summary-box-value {
  color: #78350f;
}

.summary-box-green {
  background: rgba(0, 201, 167, 0.1);
  border-color: rgba(0, 201, 167, 0.3);
}

.summary-box-green .summary-box-label {
  color: #15803d;
}

.summary-box-green .summary-box-value {
  color: #14532d;
}

.summary-box-red {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.3);
}

.summary-box-red .summary-box-label {
  color: #b91c1c;
}

.summary-box-red .summary-box-value {
  color: #7f1d1d;
}

.summary-box-orange {
  background: rgba(255, 165, 0, 0.1);
  border-color: rgba(255, 165, 0, 0.3);
}

.summary-box-orange .summary-box-label {
  color: #c2410c;
}

.summary-box-orange .summary-box-value {
  color: #7c2d12;
}

.summary-box-lightblue {
  background: rgba(79, 195, 247, 0.1);
  border-color: rgba(79, 195, 247, 0.3);
}

.summary-box-lightblue .summary-box-label {
  color: #0284c7;
}

.summary-box-lightblue .summary-box-value {
  color: #075985;
}

.summary-box-purple {
  background: rgba(142, 68, 173, 0.1);
  border-color: rgba(142, 68, 173, 0.3);
}

.summary-box-purple .summary-box-label {
  color: #7e22ce;
}

.summary-box-purple .summary-box-value {
  color: #581c87;
}

.summary-box-label {
  font-size: 12px;
  margin-bottom: 8px;
  font-weight: 600;
}

.summary-box-value {
  font-size: 20px;
  font-weight: 700;
}

.info-banner {
  margin-bottom: 24px;
  padding: 16px;
  border-left: 4px solid var(--warning);
  border-radius: 8px;
  background: rgba(255, 165, 0, 0.1);
}

.info-banner h4 {
  margin: 0 0 8px 0;
  color: var(--warning);
}

.info-banner p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.password-info {
  margin-top: 14px;
  padding: 10px;
  background: rgba(0, 201, 167, 0.1);
  border-radius: 8px;
  font-size: 13px;
  color: var(--accent);
  border: 1px solid rgba(0, 201, 167, 0.3);
}

.password-info strong {
  color: var(--accent-dark);
}

.text-right   { text-align: right; }
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.text-success { color: var(--accent); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.fw-bold      { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.gap-2 { gap: 10px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ── Loader ──────────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.spinner.dark {
  border-color: rgba(0,0,0,.15);
  border-top-color: var(--primary);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main-content { margin-left: 0; }
  .page-content { padding: 12px; }
  
  /* Two column layout for stats on mobile (fits 4 cards in 2x2) */
  .stats-grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px;
    margin-bottom: 16px;
  }
  
  /* Two column grids become single column on mobile */
  .two-col-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  /* Loan category stats also in 2x2 grid on mobile */
  .loan-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
  }
  
  /* Single column for forms */
  .form-grid { grid-template-columns: 1fr; }
  
  /* Ensure tables are scrollable on mobile */
  .table-wrap { 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch;
    margin: 0 -12px;
    padding: 0 12px;
  }
  
  /* Make tables more compact on mobile */
  table { font-size: 12px; }
  thead th { padding: 8px 10px; font-size: 10px; }
  tbody td { padding: 8px 10px; }
  
  /* Reduce font sizes on mobile */
  .topbar { padding: 0 12px; height: 56px; }
  .topbar-title { font-size: 15px; }
  .topbar-actions { gap: 8px; }
  .topbar-actions .btn { padding: 7px 10px; font-size: 11px; }
  .topbar-actions span:not(.badge) { display: none; } /* Hide user name text on mobile topbar */
  
  /* Show hamburger menu button on mobile */
  .topbar button { display: inline-flex !important; }
  
  .card { padding: 16px; margin-bottom: 16px; }
  .card-header { margin-bottom: 16px; padding-bottom: 12px; }
  .card-title { font-size: 14px; }
  
  .stat-card { padding: 14px; gap: 12px; }
  .stat-icon { width: 40px; height: 40px; font-size: 18px; }
  .stat-value { font-size: 16px; }
  .stat-label { font-size: 10px; }
  
  /* Make modals full width on small screens */
  .modal {
    max-width: calc(100vw - 24px);
    margin: 12px;
    max-height: calc(100vh - 24px);
  }
  
  .modal-header { padding: 16px; }
  .modal-body { padding: 16px; }
  .modal-footer { padding: 12px 16px; }
  
  /* Adjust buttons on mobile */
  .btn { font-size: 12px; padding: 8px 14px; }
  .btn-sm { padding: 5px 10px; font-size: 11px; }
  
  /* Stack form actions on mobile */
  .modal-footer { 
    flex-direction: column-reverse; 
    gap: 8px;
  }
  .modal-footer .btn { 
    width: 100%; 
    justify-content: center;
  }
  
  /* Tabs scroll horizontally on mobile */
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn { padding: 8px 14px; font-size: 12px; }
  
  /* Form controls */
  .form-control { font-size: 16px; } /* Prevents zoom on iOS */
  
  /* Sidebar adjustments */
  .sidebar-header { padding: 16px; }
  .sidebar-brand h2 { font-size: 14px; }
  .sidebar-brand p { font-size: 10px; }
  .sidebar-user { padding: 12px 16px; }
  .nav-item { padding: 9px 16px; font-size: 12px; }
  
  /* Badges */
  .badge { font-size: 10px; padding: 2px 8px; }
  
  /* Toast notifications */
  .toast-container { top: 12px; right: 12px; left: 12px; }
  .toast { min-width: auto; max-width: none; font-size: 12px; }
  
  /* Hide certain columns in tables on mobile */
  .hide-mobile { display: none !important; }
  
  /* Make action buttons stack vertically and wrap properly */
  .card-header { 
    flex-direction: column; 
    align-items: stretch; 
    gap: 12px;
  }
  
  .card-header > div {
    width: 100%;
  }
  
  .card-header .btn { 
    font-size: 11px; 
    padding: 8px 10px;
    flex: 1;
    min-width: 0;
    justify-content: center;
  }
  
  /* Button groups should stack vertically on mobile */
  .card-header > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  
  .card-header .btn { 
    font-size: 13px; 
    padding: 10px 12px;
    width: 100%;
    justify-content: center;
  }
  
  .card-header .btn-sm {
    font-size: 13px;
    padding: 10px 12px;
  }
}

/* Extra small screens (phones < 375px) */
@media (max-width: 375px) {
  /* Stack stat cards in single column on very small screens */
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  /* Loan stats also single column on very small screens */
  .loan-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-card { padding: 12px; }
  .stat-icon { width: 36px; height: 36px; font-size: 16px; }
  .stat-value { font-size: 15px; }
  .stat-label { font-size: 10px; }
  
  .topbar { height: 52px; }
  .topbar-title { font-size: 14px; }
  
  .card { padding: 12px; }
}

/* Prevent horizontal scroll */
body, html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Hide scrollbar but keep functionality */
* {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

*::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.app-shell {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Ensure all child elements don't overflow */
* {
  max-width: 100%;
}

/* Tables can overflow into their scrollable container */
.table-wrap, .table-wrap * {
  max-width: none;
}
