/* ============================================================
   CSB Ceylon Saving Bank — Complete Stylesheet
   Theme: Deep Ocean Blue · Gold Accents · Refined Banking
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Playfair+Display:wght@600;700&display=swap');

/* Mobile base fixes */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }
}

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Core Blue Palette */
  --blue-950:  #040d1a;
  --blue-900:  #071428;
  --blue-800:  #0d2145;
  --blue-700:  #133060;
  --blue-600:  #1a4080;
  --blue-500:  #2155a3;
  --blue-400:  #3070cc;
  --blue-300:  #5b94e0;
  --blue-200:  #a3c4f3;
  --blue-100:  #dbeafe;
  --blue-50:   #eff6ff;

  /* Gold Accents */
  --gold:      #c9a84c;
  --gold-lt:   #e6c968;
  --gold-dk:   #9e7c29;
  --gold-glow: rgba(201, 168, 76, 0.25);

  /* Semantic */
  --primary:        var(--blue-900);
  --primary-light:  var(--blue-800);
  --primary-mid:    var(--blue-700);
  --accent:         var(--gold);
  --accent-light:   var(--gold-lt);
  --accent-glow:    var(--gold-glow);

  /* UI Colors */
  --success:   #10b981;
  --success-bg:#d1fae5;
  --danger:    #ef4444;
  --danger-bg: #fee2e2;
  --warning:   #f59e0b;
  --info:      #3b82f6;
  --info-bg:   #dbeafe;

  /* Surface */
  --bg:        #f0f4fc;
  --bg-2:      #e4ecf7;
  --card:      #ffffff;
  --card-2:    #f8faff;
  --text:      #0f172a;
  --text-mid:  #334155;
  --text-light:#64748b;
  --border:    #cbd5e1;
  --border-lt: #e2e8f0;

  /* Sidebar specific */
  --sidebar-w:     272px;
  --sidebar-w-mob: 260px;

  /* Effects */
  --shadow-sm:  0 1px 3px rgba(4, 13, 26, 0.08), 0 1px 2px rgba(4, 13, 26, 0.06);
  --shadow:     0 4px 16px rgba(4, 13, 26, 0.10), 0 2px 6px rgba(4, 13, 26, 0.06);
  --shadow-md:  0 8px 28px rgba(4, 13, 26, 0.13), 0 4px 10px rgba(4, 13, 26, 0.07);
  --shadow-lg:  0 20px 48px rgba(4, 13, 26, 0.18), 0 8px 18px rgba(4, 13, 26, 0.10);
  --shadow-gold:0 8px 28px rgba(201, 168, 76, 0.30);

  --radius-sm:  8px;
  --radius:     14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-14px) rotate(2deg); }
}
@keyframes ripple {
  to { transform: scale(3); opacity: 0; }
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.45); }
  70%  { box-shadow: 0 0 0 12px rgba(201, 168, 76, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0); }
}

.fade-in-up  { animation: fadeInUp 0.55s ease forwards; }
.fade-in     { animation: fadeIn 0.45s ease forwards; }
.slide-left  { animation: slideInLeft 0.45s ease forwards; }
.slide-right { animation: slideInRight 0.45s ease forwards; }
.scale-in    { animation: scaleIn 0.4s ease forwards; }

/* ── Staggered children ────────────────────────────────────── */
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.12s; }
.stagger > *:nth-child(3) { animation-delay: 0.19s; }
.stagger > *:nth-child(4) { animation-delay: 0.26s; }

/* ══════════════════════════════════════════════════════════════
   AUTH — Login & Register
══════════════════════════════════════════════════════════════ */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;

  /* Rich deep blue mesh background */
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(33, 85, 163, 0.45) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(7, 20, 40, 0.8) 0%, transparent 60%),
    linear-gradient(160deg, var(--blue-950) 0%, var(--blue-900) 40%, var(--blue-800) 100%);
}

/* Decorative blobs */
.auth-wrapper::before {
  content: '';
  position: absolute;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.12) 0%, transparent 65%);
  top: -140px; right: -140px;
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}
.auth-wrapper::after {
  content: '';
  position: absolute;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(48, 112, 204, 0.18) 0%, transparent 65%);
  bottom: -100px; left: -100px;
  border-radius: 50%;
  animation: float 11s ease-in-out infinite reverse;
  pointer-events: none;
}

/* Auth Card */
.auth-box {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-radius: var(--radius-xl);
  padding: 52px 44px;
  width: 100%;
  max-width: 472px;
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 1;
}

/* Gold top stripe */
.auth-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-500), var(--gold), var(--blue-300));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.auth-box .logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-box .logo h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--blue-900);
  letter-spacing: 4px;
  line-height: 1;
}
.auth-box .logo h1 span { color: var(--gold); }
.auth-box .logo p {
  color: var(--text-light);
  font-size: 0.82rem;
  margin-top: 7px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
}

/* Divider line under logo */
.auth-box .logo::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 16px auto 0;
}

.auth-box .links {
  text-align: center;
  margin-top: 22px;
  font-size: 0.875rem;
  color: var(--text-light);
}
.auth-box .links a {
  color: var(--blue-500);
  font-weight: 600;
  transition: var(--transition);
}
.auth-box .links a:hover { color: var(--gold-dk); }

/* ══════════════════════════════════════════════════════════════
   FORM ELEMENTS
══════════════════════════════════════════════════════════════ */
.form-group {
  margin-bottom: 18px;
  position: relative;
}
.form-group label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-mid);
  letter-spacing: 0.3px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border-lt);
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  color: var(--text);
  background: var(--card-2);
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(48, 112, 204, 0.15);
  outline: none;
  background: #fff;
}
.form-group input[readonly] {
  background: var(--bg-2);
  color: var(--text-light);
  cursor: default;
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group .input-icon {
  position: absolute;
  right: 14px;
  top: 40px;
  color: var(--text-light);
  font-size: 0.95rem;
  pointer-events: none;
}

/* 2-column form row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.2px;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
/* Ripple */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.18);
  opacity: 0;
  border-radius: inherit;
  transition: opacity 0.2s;
}
.btn:active::after { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-500) 100%);
  color: #fff;
  width: 100%;
  box-shadow: 0 4px 16px rgba(26, 64, 128, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--blue-700) 0%, var(--blue-600) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 64, 128, 0.45);
}
.btn-primary:active { transform: translateY(0); }

.btn-accent {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-lt) 100%);
  color: var(--blue-900);
  box-shadow: 0 4px 14px rgba(201, 168, 76, 0.30);
}
.btn-accent:hover {
  background: linear-gradient(135deg, var(--gold-dk) 0%, var(--gold) 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--blue-400);
  color: var(--blue-500);
}
.btn-outline:hover {
  background: var(--blue-500);
  color: #fff;
  border-color: var(--blue-500);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }

.btn-success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.btn-success:hover { background: #059669; transform: translateY(-1px); }

.btn-sm {
  padding: 8px 16px;
  font-size: 0.82rem;
  border-radius: 6px;
}
.btn-sm i { font-size: 0.85rem; }

/* ══════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
══════════════════════════════════════════════════════════════ */
.dashboard {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background:
    linear-gradient(180deg, var(--blue-950) 0%, var(--blue-900) 60%, var(--blue-800) 100%);
  color: #fff;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 200;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

/* Decorative side glow */
.sidebar::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(201,168,76,0.35) 40%, rgba(48,112,204,0.2) 70%, transparent);
}

/* Brand */
.sidebar .brand {
  padding: 28px 24px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.sidebar .brand h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: #fff;
}
.sidebar .brand h2 span { color: var(--gold); }
.sidebar .brand p {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.45);
  margin-top: 3px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

/* User Info */
.sidebar .user-info {
  padding: 22px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.sidebar .user-info .avatar {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold-dk), var(--gold-lt));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue-900);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(201, 168, 76, 0.4);
}
.sidebar .user-info .u-text { overflow: hidden; }
.sidebar .user-info h4 {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}
.sidebar .user-info p {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Nav Links */
.sidebar nav {
  padding: 16px 0;
  flex: 1;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 24px;
  color: rgba(255,255,255,0.60);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
  margin: 2px 0;
  border-radius: 0;
  position: relative;
}
.sidebar nav a i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.sidebar nav a:hover {
  color: rgba(255,255,255,0.90);
  background: rgba(255,255,255,0.06);
  border-left-color: rgba(201,168,76,0.5);
}
.sidebar nav a:hover i { color: var(--gold); }
.sidebar nav a.active {
  color: #fff;
  background: rgba(48, 112, 204, 0.25);
  border-left-color: var(--gold);
  font-weight: 600;
}
.sidebar nav a.active i { color: var(--gold); }

/* Logout styling */
.sidebar nav a[href*="logout"] {
  margin-top: auto;
  color: rgba(239, 68, 68, 0.65);
}
.sidebar nav a[href*="logout"]:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border-left-color: #ef4444;
}
.sidebar nav a[href*="logout"] i { color: inherit; }

/* Sidebar Footer */
.sidebar .sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.sidebar .sidebar-footer p {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.25);
  text-align: center;
  letter-spacing: 0.5px;
}

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 28px 32px;
  min-height: 100vh;
  transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeIn 0.4s ease;
}
.topbar > div {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.topbar h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--blue-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .date {
  color: var(--text-light);
  font-size: 0.82rem;
  white-space: nowrap;
  background: var(--card);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-lt);
  box-shadow: var(--shadow-sm);
}

/* Hamburger */
.hamburger {
  display: none;
  background: var(--card);
  border: 1.5px solid var(--border-lt);
  border-radius: var(--radius-sm);
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--blue-700);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  transition: var(--transition);
}
.hamburger:hover {
  background: var(--blue-50);
  border-color: var(--blue-200);
  color: var(--blue-500);
}

/* ── Sidebar Overlay ─────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 13, 26, 0.55);
  z-index: 199;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.sidebar-overlay.active {
  display: block;
}

/* ══════════════════════════════════════════════════════════════
   STAT CARDS
══════════════════════════════════════════════════════════════ */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-lt);
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-400), var(--gold));
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-200);
}

/* Decorative circle */
.stat-card::after {
  content: '';
  position: absolute;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(48, 112, 204, 0.04);
  right: -20px; bottom: -20px;
}

.stat-card .icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
}
.stat-card .icon.blue  { background: rgba(59,130,246,0.10); color: var(--info); }
.stat-card .icon.green { background: rgba(16,185,129,0.10); color: var(--success); }
.stat-card .icon.gold  { background: rgba(201,168,76,0.12); color: var(--gold); }
.stat-card .icon.red   { background: rgba(239,68,68,0.10);  color: var(--danger); }
.stat-card .icon.navy  { background: rgba(13,33,69,0.10);   color: var(--blue-700); }

.stat-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--blue-900);
  line-height: 1.2;
}
.stat-card p {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* Stagger animation for cards */
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.12s; }
.stat-card:nth-child(3) { animation-delay: 0.19s; }
.stat-card:nth-child(4) { animation-delay: 0.26s; }

/* ══════════════════════════════════════════════════════════════
   CARD BOX (Content panels)
══════════════════════════════════════════════════════════════ */
.card-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  border: 1px solid var(--border-lt);
  animation: fadeInUp 0.55s ease forwards;
  opacity: 0;
}
.card-box:nth-child(2) { animation-delay: 0.08s; }
.card-box:nth-child(3) { animation-delay: 0.16s; }

.card-box h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--blue-900);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-lt);
}
.card-box h3 i { color: var(--gold); font-size: 1rem; }

/* ══════════════════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════════════════ */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
table thead tr {
  background: var(--blue-50);
  border-bottom: 2px solid var(--blue-200);
}
table th {
  padding: 13px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blue-600);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
}
table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-lt);
  color: var(--text-mid);
  vertical-align: middle;
}
table tbody tr:last-child td { border-bottom: none; }
table tbody tr:hover {
  background: var(--blue-50);
  transition: background 0.15s ease;
}
table tbody tr:hover td { color: var(--text); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-light);
}
.empty-state i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
  opacity: 0.3;
  color: var(--blue-400);
}

/* ══════════════════════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.badge-success {
  background: var(--success-bg);
  color: #065f46;
}
.badge-danger {
  background: var(--danger-bg);
  color: #7f1d1d;
}
.badge-info {
  background: var(--info-bg);
  color: var(--blue-700);
}
.badge-gold {
  background: rgba(201,168,76,0.12);
  color: var(--gold-dk);
}
.badge-warning {
  background: #fef3c7;
  color: #78350f;
}

/* ══════════════════════════════════════════════════════════════
   ALERTS
══════════════════════════════════════════════════════════════ */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: slideInLeft 0.35s ease;
  border: 1px solid transparent;
}
.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.alert-danger {
  background: #fef2f2;
  color: #7f1d1d;
  border-color: #fecaca;
}
.alert-info {
  background: #eff6ff;
  color: var(--blue-700);
  border-color: var(--blue-200);
}
.alert-warning {
  background: #fffbeb;
  color: #78350f;
  border-color: #fde68a;
}

/* ══════════════════════════════════════════════════════════════
   QUICK ACTIONS
══════════════════════════════════════════════════════════════ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.quick-action {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  border: 1.5px solid var(--border-lt);
  position: relative;
  overflow: hidden;
}
.quick-action::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,64,128,0.04), rgba(48,112,204,0.04));
  opacity: 0;
  transition: var(--transition);
}
.quick-action:hover::before { opacity: 1; }
.quick-action:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-200);
}
.quick-action i {
  font-size: 1.8rem;
  color: var(--blue-500);
  margin-bottom: 10px;
  display: block;
  transition: var(--transition);
}
.quick-action:hover i {
  color: var(--gold);
  transform: scale(1.1);
}
.quick-action span {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-mid);
  letter-spacing: 0.2px;
}
.quick-action:hover span { color: var(--blue-700); }

/* ══════════════════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 13, 26, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 520px;
  width: 100%;
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.3, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-500), var(--gold));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--blue-900);
}

/* ══════════════════════════════════════════════════════════════
   BALANCE BAR (used in transfer, bills, reload pages)
══════════════════════════════════════════════════════════════ */
.balance-bar {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 100%);
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.balance-bar::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 200px; height: 100%;
  background: radial-gradient(ellipse at top right, rgba(201,168,76,0.15), transparent 60%);
}
.balance-bar .bl {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.balance-bar .ba {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--gold-lt);
}
.balance-bar .b-meta {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
}

/* ══════════════════════════════════════════════════════════════
   PROFILE DISPLAY
══════════════════════════════════════════════════════════════ */
.profile-avatar {
  width: 90px; height: 90px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold-lt);
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(13, 33, 69, 0.35);
}

/* ══════════════════════════════════════════════════════════════
   CUSTOMER VIEW — Info rows
══════════════════════════════════════════════════════════════ */
.info-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-lt);
  gap: 12px;
}
.info-row:last-child { border-bottom: none; }
.info-row .info-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 140px;
  flex-shrink: 0;
}
.info-row .info-value {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════
   BILL TYPE CARDS (bills.php)
══════════════════════════════════════════════════════════════ */
.bill-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.bill-type-card {
  border: 1.5px solid var(--border-lt);
  border-radius: var(--radius-sm);
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--card-2);
  user-select: none;
}
.bill-type-card:hover {
  border-color: var(--blue-300);
  background: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.bill-type-card.selected {
  border-color: var(--blue-400);
  background: var(--blue-50);
  box-shadow: 0 0 0 3px rgba(48,112,204,0.15);
}
.bill-type-card i {
  font-size: 1.6rem;
  margin-bottom: 8px;
  display: block;
}
.bill-type-card span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-mid);
  line-height: 1.35;
  display: block;
}

/* ══════════════════════════════════════════════════════════════
   FORM SECTION (inside card-box forms)
══════════════════════════════════════════════════════════════ */
.form-section {
  background: var(--blue-50);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--border-lt);
}
.form-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue-600);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-section-title i { color: var(--gold); }

/* ══════════════════════════════════════════════════════════════
   CUSTOMER PREVIEW (admin pay_bills)
══════════════════════════════════════════════════════════════ */
.customer-preview {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
  animation: fadeInUp 0.35s ease;
  display: none;
  border-left: 4px solid var(--gold);
}
.customer-preview .cp-label { font-size: 0.7rem; opacity: 0.55; text-transform: uppercase; letter-spacing: 1px; }
.customer-preview .cp-bal {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-lt);
  margin: 2px 0;
}
.customer-preview .cp-name { font-size: 0.8rem; opacity: 0.6; }

/* ══════════════════════════════════════════════════════════════
   SECTION DIVIDERS / HINTS
══════════════════════════════════════════════════════════════ */
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: block;
}
.no-selection-hint {
  text-align: center;
  padding: 36px 0;
  color: var(--text-light);
}
.no-selection-hint i {
  font-size: 2rem;
  display: block;
  margin-bottom: 10px;
  opacity: 0.2;
  color: var(--blue-400);
}
.no-selection-hint span { font-size: 0.85rem; }

/* ══════════════════════════════════════════════════════════════
   PRINT
══════════════════════════════════════════════════════════════ */
@media print {
  .sidebar, .topbar, .hamburger, .no-print,
  .sidebar-overlay, .quick-actions { display: none !important; }
  .main-content { margin-left: 0 !important; padding: 0 !important; }
  .card-box {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid;
  }
  body { background: #fff; }
  table th { background: #e9f0fb !important; }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (≤ 1024px)
══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 240px; }
  .main-content { padding: 24px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .bill-type-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile (≤ 768px)
══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Sidebar becomes a slide-over drawer */
  .sidebar {
    width: var(--sidebar-w-mob);
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.active {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(4, 13, 26, 0.35);
  }

  /* Main content takes full width */
  .main-content {
    margin-left: 0;
    padding: 16px;
  }

  /* Show hamburger */
  .hamburger { display: flex; }

  /* Topbar */
  .topbar {
    margin-bottom: 20px;
    flex-wrap: nowrap;
  }
  .topbar h2 {
    font-size: 1.2rem;
  }
  .topbar .date { display: none; } /* hide date on small screens */

  /* Single column form rows */
  .form-row { grid-template-columns: 1fr; gap: 0; }

  /* Stat cards stack */
  .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card { padding: 18px; }
  .stat-card h3 { font-size: 1.3rem; }

  /* Card box */
  .card-box { padding: 18px; }

  /* Quick actions — 2 columns on mobile */
  .quick-actions { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .quick-action { padding: 18px 12px; }
  .quick-action i { font-size: 1.5rem; }

  /* Bill type grid — 2 cols */
  .bill-type-grid { grid-template-columns: repeat(2, 1fr); }

  /* Auth box */
  .auth-box {
    padding: 36px 24px;
    border-radius: var(--radius-lg);
  }
  .auth-box .logo h1 { font-size: 2.2rem; }

  /* Tables — horizontal scroll */
  .table-responsive { border-radius: var(--radius-sm); }
  table th, table td { padding: 11px 12px; font-size: 0.82rem; }

  /* Buttons */
  .btn { padding: 12px 20px; }
  .btn-sm { padding: 7px 13px; font-size: 0.79rem; }

  /* Balance bar */
  .balance-bar { padding: 14px 18px; }
  .balance-bar .ba { font-size: 1.3rem; }

  /* Info rows */
  .info-row { flex-direction: column; align-items: flex-start; gap: 3px; }
  .info-row .info-label { width: auto; }

  /* Modal */
  .modal { padding: 24px 20px; }

  /* Form section */
  .form-section { padding: 14px; }

  /* Customer preview */
  .customer-preview { padding: 14px 16px; }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — Small phones (≤ 480px)
══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card h3 { font-size: 1.1rem; }
  .stat-card .icon { width: 38px; height: 38px; font-size: 1rem; margin-bottom: 10px; }

  .quick-actions { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .bill-type-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .auth-box { padding: 28px 18px; }
  .auth-box .logo h1 { font-size: 2rem; }

  .topbar h2 { font-size: 1.05rem; }

  .card-box { padding: 14px; }
  .card-box h3 { font-size: 0.95rem; }

  table th, table td { padding: 9px 10px; font-size: 0.78rem; }

  .btn { font-size: 0.875rem; }
}

/* ══════════════════════════════════════════════════════════════
   UTILITY CLASSES
══════════════════════════════════════════════════════════════ */
.text-gold    { color: var(--gold); }
.text-blue    { color: var(--blue-500); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-muted   { color: var(--text-light); }

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.text-right  { text-align: right; }
.text-center { text-align: center; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

.w-full { width: 100%; }

/* Scrollbar styling (Webkit) */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--blue-300); border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-400); }

/* Selection color */
::selection { background: rgba(48, 112, 204, 0.2); color: var(--blue-900); }

/* ══════════════════════════════════════════════════════════════
   MOBILE NAVBAR FIXES
══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* Navbar container */
  .navbar {
    padding: 12px 16px !important;
    gap: 10px;
  }

  /* Logo */
  .logo {
    gap: 10px;
    min-width: 0;
  }

  .logo-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 14px !important;
    border-radius: 10px;
    flex-shrink: 0;
  }

  .logo-text {
    font-size: 15px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Buttons wrapper */
  .nav-btns {
    display: flex;
    align-items: center;
    gap: 8px !important;
    margin-left: auto;
  }

  /* Login/Register buttons */
  .nav-btns .btn-outline,
  .nav-btns .btn-solid {
    padding: 8px 14px !important;
    font-size: 12px !important;
    border-radius: 8px;
    white-space: nowrap;
  }

  /* Navigation menu */
  .nav-links {
    padding: 80px 20px;
  }

  .nav-links a {
    font-size: 18px;
  }

  /* Hero section mobile spacing */
  .hero {
    padding-top: 110px !important;
  }
}

/* Small phones */
@media (max-width: 480px) {

  .navbar {
    padding: 10px 12px !important;
  }

  .logo-text {
    font-size: 13px !important;
    max-width: 110px;
  }

  .logo-icon {
    width: 34px !important;
    height: 34px !important;
    font-size: 12px !important;
  }

  .nav-btns {
    gap: 6px !important;
  }

  .nav-btns .btn-outline,
  .nav-btns .btn-solid {
    padding: 7px 10px !important;
    font-size: 11px !important;
  }

  /* Optional:
     Hide buttons completely on very tiny phones */
  /*
  .nav-btns {
      display: none;
  }
  */

  .hamburger {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}
@media (max-width: 380px) {

  html, body {
    overflow-x: hidden;
  }

  /* Main content */
  .main-content {
    margin-left: 0 !important;
    padding: 10px !important;
  }

  /* Topbar ultra compact */
  .topbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .topbar h2 {
    font-size: 13px !important;
    max-width: 55%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .date {
    display: none !important;
  }

  /* Stat cards → single column only */
  .stat-cards {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .stat-card {
    padding: 12px !important;
  }

  .stat-card h3 {
    font-size: 16px !important;
  }

  .stat-card p {
    font-size: 10px !important;
  }

  /* Table fix */
  table {
    min-width: 480px;
  }

  th, td {
    font-size: 11px !important;
    padding: 8px 6px !important;
  }

  /* Buttons touch friendly */
  .btn {
    padding: 9px 12px !important;
    font-size: 12px !important;
  }

  /* Card box spacing */
  .card-box {
    padding: 12px !important;
  }

  /* Hamburger bigger touch target */
  .hamburger {
    width: 40px;
    height: 40px;
  }
}