/* ============================================================
   BillMate - Household Expense Manager
   Main Stylesheet
   ============================================================ */

/* ============================================================
   CSS CUSTOM PROPERTIES (Light/Dark Theme)
   ============================================================ */
:root {
  /* Brand */
  --primary:        #6366f1;
  --primary-dark:   #4f46e5;
  --primary-light:  #818cf8;
  --primary-bg:     #eef2ff;

  /* Semantic Colors */
  --success:        #10b981;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --info:           #3b82f6;

  /* UI Colors (Light) */
  --bg-body:        #f1f5f9;
  --bg-card:        #ffffff;
  --bg-sidebar:     #1e1b4b;
  --text-primary:   #0f172a;
  --text-secondary: #64748b;
  --text-muted:     #94a3b8;
  --border-color:   #e2e8f0;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:         0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:      0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);

  /* Layout */
  --sidebar-width:  250px;
  --topbar-height:  60px;
  --bottomnav-h:    65px;
  --fab-size:       56px;
  --radius:         12px;
  --radius-sm:      8px;
  --radius-lg:      16px;

  /* Transitions */
  --transition:     all 0.2s ease;
}

[data-theme="dark"] {
  --bg-body:        #0f172a;
  --bg-card:        #1e293b;
  --bg-sidebar:     #0f172a;
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --border-color:   #334155;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.3);
  --shadow:         0 4px 6px -1px rgba(0,0,0,.4);
  --shadow-lg:      0 10px 15px -3px rgba(0,0,0,.5);
  --primary-bg:     #312e81;
}

/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; }

::selection { background: var(--primary); color: #fff; }

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

/* ============================================================
   LAYOUT STRUCTURE
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.main-wrapper {
  min-height: 100vh;
  transition: var(--transition);
}

@media (min-width: 992px) {
  .main-wrapper {
    margin-left: var(--sidebar-width);
  }
  .page-content {
    padding: 24px;
  }
}

@media (max-width: 991.98px) {
  .page-content {
    padding: 16px 12px calc(var(--bottomnav-h) + 70px);
    padding-top: calc(var(--topbar-height) + 12px);
  }
}

/* ============================================================
   SIDEBAR STYLES
   ============================================================ */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.brand-icon {
  width: 40px; height: 40px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(99,102,241,.3);
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.sidebar-nav {
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.65);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}

.sidebar-nav .nav-item:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.sidebar-nav .nav-item.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99,102,241,.4);
}

.sidebar-nav .nav-item i {
  font-size: 18px;
  width: 20px;
  flex-shrink: 0;
}

.nav-divider {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,.3);
  padding: 14px 14px 4px;
}

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

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.user-role {
  font-size: 11px;
  color: rgba(255,255,255,.5);
  text-transform: capitalize;
}

/* ============================================================
   MOBILE TOP BAR
   ============================================================ */
.mobile-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 0 16px;
  z-index: 99;
  box-shadow: var(--shadow-sm);
}

.mobile-brand-icon {
  width: 34px; height: 34px;
  background: var(--primary);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
}

.mobile-brand-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.user-avatar-small {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-body);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
}

.icon-btn:hover { background: var(--border-color); }

/* ============================================================
   BOTTOM NAVIGATION
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottomnav-h);
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding: 0 4px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  border-radius: var(--radius-sm);
  position: relative;
}

.bottom-nav-item i { font-size: 22px; }

.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-item.active i {
  transform: translateY(-2px);
}

.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 32px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

.bottom-nav-fab-space { flex: 1.2; }

/* ============================================================
   FLOATING ACTION BUTTON (FAB)
   ============================================================ */
.fab {
  position: fixed;
  bottom: calc(var(--bottomnav-h) - 28px);
  left: 50%;
  transform: translateX(-50%);
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 20px rgba(99,102,241,.5);
  z-index: 101;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  border: 3px solid var(--bg-body);
}

.fab:hover {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 6px 28px rgba(99,102,241,.6);
  color: #fff;
}

@media (min-width: 992px) {
  .fab {
    bottom: 32px;
    left: auto;
    right: 32px;
    transform: none;
  }
  .fab:hover {
    transform: scale(1.1);
  }
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.card-body { padding: 20px; }

/* Stat Cards */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-color, var(--primary));
}

.stat-card .stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--accent-color, var(--primary-bg));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: var(--accent-color, var(--primary));
  margin-bottom: 12px;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.3px;
}

.page-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control, .form-select {
  background-color: var(--bg-body);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  padding: 10px 14px;
  transition: var(--transition);
  font-family: inherit;
}

.form-control:focus, .form-select:focus {
  background-color: var(--bg-card);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
  color: var(--text-primary);
  outline: none;
}

.form-control::placeholder { color: var(--text-muted); }

/* Amount field */
.amount-input-wrapper {
  position: relative;
}

.amount-prefix {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  pointer-events: none;
  z-index: 1;
}

.amount-input-wrapper .form-control {
  padding-left: 34px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border: none;
  font-size: 14px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99,102,241,.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(99,102,241,.4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-outline-primary {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover { background: var(--bg-body); }

.btn-lg {
  padding: 13px 24px;
  font-size: 16px;
  border-radius: var(--radius);
}

.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

/* ============================================================
   TABLES
   ============================================================ */
.table-responsive { border-radius: var(--radius); overflow: hidden; }

.table {
  --bs-table-bg: var(--bg-card);
  --bs-table-striped-bg: var(--bg-body);
  --bs-table-hover-bg: var(--primary-bg);
  --bs-table-border-color: var(--border-color);
  color: var(--text-primary);
  margin: 0;
}

.table thead th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.table tbody td {
  padding: 13px 16px;
  font-size: 14px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
}

.table tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ============================================================
   EXPENSE ITEM (Mobile List)
   ============================================================ */
.expense-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.expense-item:last-child { border-bottom: none; }

.expense-item:hover { background: var(--bg-body); }

.expense-cat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.expense-info { flex: 1; min-width: 0; }

.expense-cat { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.expense-remark { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.expense-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--danger);
  white-space: nowrap;
}

.expense-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   FILTERS
   ============================================================ */
.filter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-tab.active, .filter-tab:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ============================================================
   CHART CONTAINER
   ============================================================ */
.chart-container {
  position: relative;
  height: 220px;
}

@media (min-width: 768px) {
  .chart-container { height: 280px; }
}

/* ============================================================
   TOASTS / NOTIFICATIONS
   ============================================================ */
.toast-notification {
  position: fixed;
  bottom: calc(var(--bottomnav-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  border: 1px solid var(--border-color);
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.offline-toast { border-left: 4px solid var(--danger); }
.online-toast  { border-left: 4px solid var(--success); }

@media (min-width: 992px) {
  .toast-notification {
    bottom: 32px;
    left: auto;
    right: 32px;
    transform: translateY(20px);
  }
  .toast-notification.show {
    transform: translateY(0);
  }
}

/* ============================================================
   INSTALL BANNER
   ============================================================ */
.install-banner {
  position: fixed;
  bottom: calc(var(--bottomnav-h) + 12px);
  left: 12px; right: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideUp 0.3s ease;
}

.install-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.install-icon {
  width: 44px; height: 44px;
  background: var(--primary-bg);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: var(--primary);
  flex-shrink: 0;
}

.install-title { font-size: 14px; font-weight: 600; }
.install-sub { font-size: 12px; color: var(--text-muted); }
.install-actions { display: flex; gap: 8px; align-items: center; }

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@media (min-width: 992px) {
  .install-banner {
    bottom: 32px;
    right: 32px;
    left: auto;
    width: 380px;
  }
}

/* ============================================================
   FLASH ALERTS
   ============================================================ */
.flash-container {
  padding: 0 0 16px;
}

.alert-custom {
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 500;
}

/* ============================================================
   BILL CARD
   ============================================================ */
.bill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 16px;
}

.bill-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

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

.bill-info { flex: 1; min-width: 0; }
.bill-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.bill-amount { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.bill-due { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   UTILITY PAGES (Water, WiFi, Electricity)
   ============================================================ */
.util-stat {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.util-stat-value { font-size: 28px; font-weight: 800; }
.util-stat-label { font-size: 12px; opacity: 0.8; margin-top: 4px; }

/* ============================================================
   SHARED EXPENSES
   ============================================================ */
.balance-card {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.balance-card.owe {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
}

.balance-amount { font-size: 36px; font-weight: 900; letter-spacing: -1px; }
.balance-label { font-size: 14px; opacity: 0.9; margin-top: 4px; }

/* ============================================================
   REPORTS
   ============================================================ */
.month-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 8px 16px;
}

/* ============================================================
   SEARCH BOX
   ============================================================ */
.search-box {
  position: relative;
}

.search-box .search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.search-box .form-control {
  padding-left: 38px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state-icon {
  font-size: 56px;
  color: var(--border-color);
  margin-bottom: 16px;
  display: block;
}

.empty-state h5 {
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-state p { color: var(--text-muted); font-size: 14px; }

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner-sm {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px;
  padding: 40px 32px;
  box-shadow: 0 25px 50px rgba(0,0,0,.5);
}

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

.login-logo-icon {
  width: 72px; height: 72px;
  background: var(--primary);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  color: #fff;
  margin: 0 auto 16px;
  box-shadow: 0 8px 32px rgba(99,102,241,.5);
}

.login-logo h1 {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.login-logo p {
  font-size: 14px;
  color: rgba(255,255,255,.6);
  margin-top: 4px;
}

.login-card .form-label { color: rgba(255,255,255,.8); }

.login-card .form-control {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.2);
  color: #fff;
  font-size: 15px;
  padding: 12px 16px;
}

.login-card .form-control:focus {
  background: rgba(255,255,255,.15);
  border-color: var(--primary);
  color: #fff;
}

.login-card .form-control::placeholder { color: rgba(255,255,255,.4); }

.login-btn {
  width: 100%;
  padding: 13px;
  font-size: 16px;
  font-weight: 700;
  background: var(--primary);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}

.login-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,.5);
}

/* ============================================================
   DARK MODE OVERRIDES
   ============================================================ */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background-color: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background-color: #1e293b;
}

[data-theme="dark"] .table {
  --bs-table-striped-bg: #0f172a;
}

[data-theme="dark"] .btn-outline-secondary {
  color: #94a3b8;
  border-color: #334155;
}

[data-theme="dark"] .btn-outline-secondary:hover {
  background: #334155;
  color: #f1f5f9;
}

[data-theme="dark"] .modal-content {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-color);
}

[data-theme="dark"] .modal-header {
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .modal-footer {
  border-top-color: var(--border-color);
}

[data-theme="dark"] .dropdown-menu {
  background: var(--bg-card);
  border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-item {
  color: var(--text-primary);
}

[data-theme="dark"] .dropdown-item:hover {
  background: var(--bg-body);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-primary-color { color: var(--primary) !important; }
.text-muted-color   { color: var(--text-muted) !important; }
.bg-primary-soft    { background: var(--primary-bg); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.gap-3 { gap: 12px; }

/* Receipt Preview */
.receipt-preview {
  width: 100%;
  max-width: 200px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-color);
  margin-top: 8px;
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */
@media (max-width: 576px) {
  .stat-value { font-size: 22px; }
  .page-title { font-size: 19px; }
  .hide-xs { display: none !important; }
}

@media (min-width: 576px) {
  .show-xs-only { display: none !important; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp 0.3s ease both;
}

/* Stagger children */
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.10s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.20s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.30s; }
