/* ═══════════════════════════════════════════════════════
   RUGAMBAGYE FAMILY SACCO — Global Stylesheet
   Theme: Navy + Teal + Amber  |  Fraunces + DM Sans
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── VARIABLES ─────────────────────────────────────── */
:root {
  --forest:    #0b1f3a;
  --forest2:   #122c4b;
  --moss:      #155e75;
  --sage:      #38bdf8;
  --mint:      #e0f2fe;
  --cream:     #f3f7fb;
  --parchment: #e7edf4;
  --gold:      #f2b94b;
  --gold-lt:   #fff4d6;
  --white:     #ffffff;
  --ink:       #0f172a;
  --ink2:      #334155;
  --muted:     #5d6b82;
  --border:    #dfe7ef;
  --red:       #dc2626;
  --red-bg:    #fef2f2;
  --blue:      #2563eb;
  --blue-bg:   #eaf3ff;
  --radius:    12px;
  --radius-lg: 18px;
  --shadow:    0 2px 12px rgba(11,31,58,.08);
  --shadow-md: 0 10px 28px rgba(11,31,58,.12);
  --shadow-lg: 0 18px 56px rgba(11,31,58,.18);
  --nav-w:     250px;
}

/* ── RESET ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: linear-gradient(180deg, #edf4fa 0%, var(--cream) 100%);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--moss); text-decoration: none; transition: color .18s; }
a:hover { color: var(--forest); }
img { max-width: 100%; }

h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.02em;
}

/* ── PAGE LAYOUT ───────────────────────────────────── */
.page-wrapper { display: flex; min-height: 100vh; }
.main-content { margin-left: var(--nav-w); flex: 1; display: flex; flex-direction: column; }

/* ── SIDEBAR ───────────────────────────────────────── */
.sidebar {
  width: var(--nav-w);
  background: linear-gradient(180deg, var(--forest) 0%, var(--forest2) 100%);
  position: fixed; top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  z-index: 200; overflow-y: auto;
  transition: transform .28s ease;
  box-shadow: 10px 0 28px rgba(11,31,58,.12);
}
.sidebar-brand {
  padding: 26px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-logo {
  display: block; width: 60px; height: 60px; object-fit: contain;
  margin: 0 auto 12px; border-radius: 50%;
}
.brand-sub {
  font-size: 10px; color: rgba(255,255,255,.38);
  text-transform: uppercase; letter-spacing: 1.6px; margin-top: 3px;
}
.nav-section { padding: 16px 10px 4px; }
.nav-section-label {
  font-size: 9.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 2px;
  color: rgba(255,255,255,.26); padding: 0 10px; margin-bottom: 5px;
}
.nav-item-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  font-size: 13.5px; font-weight: 500;
  color: rgba(255,255,255,.58);
  transition: all .17s; margin-bottom: 2px;
  cursor: pointer;
}
.nav-item-link:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.9); }
.nav-item-link.active {
  background: linear-gradient(135deg,var(--sage),var(--moss));
  color: #fff; font-weight: 600;
  box-shadow: 0 8px 18px rgba(56,189,248,.28);
}
.nav-icon { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-icon i { width: 18px; }
.nav-badge {
  margin-left: auto; background: var(--gold); color: var(--forest);
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px; min-width: 20px; text-align: center;
}
.sidebar-footer {
  margin-top: auto; padding: 12px 10px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.user-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  background: rgba(255,255,255,.05);
}
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg,var(--gold),var(--sage));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; color: #fff; flex-shrink: 0;
}
.user-name  { color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.user-role  { color: rgba(255,255,255,.38); font-size: 10.5px; }
.sidebar-logout {
  display: flex; align-items: center; gap: 7px;
  color: rgba(255,255,255,.42); font-size: 12.5px;
  padding: 8px 12px; border-radius: 8px; margin-top: 5px;
  transition: all .17s; border: none; background: none;
  font-family: 'DM Sans',sans-serif; width: 100%; cursor: pointer;
}
.sidebar-logout:hover { color: #fff; background: rgba(255,255,255,.07); }

/* ── TOPBAR ────────────────────────────────────────── */
.topbar {
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1.5px solid var(--border);
  padding: 18px 30px; display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 8px 22px rgba(15,23,42,.05);
}
.topbar-title {
  font-family: 'Fraunces', serif;
  font-size: 19px; font-weight: 700; color: var(--forest); flex: 1;
  letter-spacing: -0.02em;
}
.topbar-menu-btn {
  display: none; background: none; border: none;
  font-size: 20px; cursor: pointer; color: var(--forest);
}

/* ── RESPONSIVE DESIGN ───────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 300;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar-menu-btn { display: block; }
  .page-body { padding: 20px 15px; }
  .topbar { padding: 14px 20px; }
  .stats-row { grid-template-columns: 1fr; }
  .stat-card { margin-bottom: 0; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .quick-actions-grid { grid-template-columns: 1fr; }
  table { font-size: 14px; }
  .btn { padding: 8px 16px; font-size: 14px; }
}

/* ── DARK MODE ────────────────────────────────────── */
:root {
  --bg-dark: #1a1a18;
  --text-dark: #f5f1e8;
  --card-dark: #2a2a28;
  --border-dark: #3d3d38;
}

body.dark {
  --cream: var(--bg-dark);
  --white: var(--card-dark);
  --ink: var(--text-dark);
  --ink2: var(--text-dark);
  --border: var(--border-dark);
  --forest: #c8e6d0;
  --moss: #6aab84;
}

/* ── ANIMATIONS ───────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.page-transition { animation: fadeIn 0.3s ease; }

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

/* ── ACCESSIBILITY ────────────────────────────────── */
.nav-item-link:focus,
.btn:focus { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── LOADING SPINNER ──────────────────────────────── */
.spinner {
  width: 20px; height: 20px; border: 2px solid var(--border);
  border-top: 2px solid var(--moss); border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ── LOGIN PAGE ─────────────────────────────────── */
.login-page {
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest2) 46%, #1d4f80 100%);
  background-image:
    radial-gradient(circle at 20% 50%, rgba(56,189,248,.18) 0%, transparent 45%),
    radial-gradient(circle at 82% 22%, rgba(242,185,75,.14) 0%, transparent 35%);
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-wrap { width: 100%; max-width: 420px; }
.login-card {
  background: var(--white); border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.22); padding: 40px 30px; text-align: center;
}
.login-logo { margin-bottom: 30px; }
.login-brand-logo {
  display: block; width: 65px; height: 65px; object-fit: contain;
  margin: 0 auto 15px; border-radius: 50%;
}
.login-card h1 {
  font-family: 'Fraunces', serif; font-size: 20px; font-weight: 700;
  color: var(--forest); margin-bottom: 5px;
}
.login-card p { color: var(--muted); font-size: 14px; }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { font-weight: 600; margin-bottom: 5px; display: block; }
.input-group {
  position: relative; display: flex; align-items: center;
}
.input-icon {
  position: absolute; left: 12px; color: var(--muted); font-size: 16px;
}
.form-control {
  width: 100%; padding: 12px 12px 12px 40px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 15px; transition: border-color .2s;
}
.form-control:focus { border-color: var(--moss); outline: none; }
.btn {
  background: linear-gradient(135deg, #0b1f3a 0%, #1b4d79 100%);
  color: #fff; border: none; padding: 12px 24px; border-radius: var(--radius);
  font-weight: 700; cursor: pointer; transition: all .2s; display: inline-block;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(11,31,58,.22); }
.btn-success { background: linear-gradient(135deg, #0f766e 0%, #0ea5e9 100%); }
.alert {
  padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px;
  border-left: 4px solid; font-size: 14px;
}
.alert-danger { background: var(--red-bg); border-left-color: var(--red); color: var(--red); }
.alert-success { background: #d4edda; border-left-color: #28a745; color: #155724; }

@media (max-width: 480px) {
  .login-card { padding: 30px 20px; }
  .login-badge { width: 50px; height: 50px; font-size: 24px; }
}

.page-header { margin-bottom: 28px; }
.page-header h1 {
  font-family: 'Fraunces', serif;
  font-size: 28px; color: var(--forest); margin-bottom: 4px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.page-header p { color: var(--muted); font-size: 13.5px; }
.page-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ── CARDS ─────────────────────────────────────────── */
.card {
  background: linear-gradient(135deg, var(--white) 0%, #f9fbff 100%);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 34px rgba(11,31,58,.08);
  border: 1.5px solid var(--border);
  overflow: hidden; margin-bottom: 20px;
}
.card-header {
  padding: 16px 22px; border-bottom: 1.5px solid var(--parchment);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title {
  font-family: 'Fraunces', serif;
  font-size: 15px; color: var(--forest); font-weight: 600;
}
.card-body   { padding: 22px; }
.card-footer { padding: 14px 22px; border-top: 1.5px solid var(--parchment); background: var(--cream); }

/* ── STAT CARDS ────────────────────────────────────── */
.stats-row { display: grid; gap: 16px; margin-bottom: 24px; align-items: stretch; }
.stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-card {
  background: linear-gradient(135deg, var(--white) 0%, #f8f3e8 100%);
  border-radius: var(--radius-lg);
  padding: 20px 22px; box-shadow: 0 10px 24px rgba(27,58,40,.08);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--moss);
  transition: box-shadow .2s, transform .2s;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 150px;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 14px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(27,58,40,.05);
}
.ic-green { background: var(--mint); }
.ic-gold  { background: var(--gold-lt); }
.ic-blue  { background: var(--blue-bg); }
.ic-red   { background: var(--red-bg); }
.stat-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .9px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.stat-value { font-size: clamp(18px, 1.6vw, 23px); font-weight: 700; color: var(--forest); line-height: 1.1; }
.stat-sub   { font-size: 11.5px; color: var(--muted); margin-top: auto; padding-top: 8px; }
.dashboard-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 20px; }
.dashboard-grid .card { margin-bottom: 0; height: 100%; }
.quick-actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

@media (max-width: 1200px) {
  .stats-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .stats-5, .stats-4, .stats-3, .stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .stats-5, .stats-4, .stats-3, .stats-2 { grid-template-columns: 1fr; }
  .quick-actions-grid { grid-template-columns: 1fr; }
}

/* ── BUTTONS ───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px; border-radius: 10px; border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px; font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer; transition: all .18s;
  text-decoration: none; white-space: nowrap; line-height: 1.3;
  box-shadow: 0 4px 12px rgba(15,23,42,.06);
}
.btn-primary { background: linear-gradient(135deg,#0b1f3a 0%, #1b4d79 100%); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(11,31,58,.22); color: #fff; }
.btn-success { background: linear-gradient(135deg,#0f766e 0%, #0ea5e9 100%); color: #fff; }
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(14,165,233,.24); color: #fff; }
.btn-warning { background: linear-gradient(135deg,#f2b94b 0%, #d98f0a 100%); color: #102033; }
.btn-warning:hover { background: #d98f0a; transform: translateY(-1px); color: #102033; }
.btn-danger  { background: linear-gradient(135deg,#fff1f2 0%, #fee2e2 100%); color: var(--red); border: 1.5px solid #f5c0bb; }
.btn-danger:hover  { background: var(--red); color: #fff; }
.btn-secondary { background: var(--white); color: var(--ink2); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--sage); color: var(--forest); background: #f0f9ff; }
.btn-info    { background: linear-gradient(135deg,#eff6ff 0%, #dbeafe 100%); color: var(--blue); border: 1.5px solid #b9d3ff; }
.btn-info:hover { background: var(--blue); color: #fff; }
.btn-sm  { padding: 7px 13px; font-size: 12px; }
.btn-lg  { padding: 13px 26px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .52; cursor: not-allowed; transform: none !important; }

/* ── FORMS ─────────────────────────────────────────── */
.form-section { margin-bottom: 26px; }
.form-section-title {
  font-family: 'Fraunces', serif;
  font-size: 14.5px; color: var(--forest);
  margin-bottom: 16px; padding-bottom: 9px;
  border-bottom: 2px solid var(--mint);
}
.form-grid { display: grid; gap: 16px; }
.fg-2 { grid-template-columns: 1fr 1fr; }
.fg-3 { grid-template-columns: 1fr 1fr 1fr; }
.fg-1 { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1/-1; }
label, .form-label {
  font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px; color: var(--ink2);
}
label .req { color: var(--red); margin-left: 2px; }
.form-control, .form-select {
  padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: 9px; font-family: 'DM Sans',sans-serif;
  font-size: 14px; color: var(--ink); background: var(--cream);
  outline: none; transition: all .18s; width: 100%;
  appearance: none;
}
.form-control:focus, .form-select:focus {
  border-color: var(--moss); background: var(--white);
  box-shadow: 0 0 0 3px rgba(61,122,87,.1);
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 12 12'%3E%3Cpath fill='%237a7a72' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
  padding-right: 34px;
}
.form-control.is-invalid { border-color: var(--red); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-hint  { font-size: 11px; color: var(--muted); }
.form-error { font-size: 11.5px; color: var(--red); margin-top: 3px; }
.mb-3 { margin-bottom: 16px; }
.input-group { position: relative; }
.input-group .input-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 14px; pointer-events: none;
}
.input-group .form-control { padding-left: 36px; }

/* ── ALERTS ────────────────────────────────────────── */
.alert {
  padding: 13px 18px; border-radius: 10px;
  font-size: 13.5px; margin-bottom: 18px;
  display: flex; align-items: flex-start; gap: 10px; line-height: 1.5;
  border: 1px solid transparent;
}
.alert-success { background: var(--mint); border-color: #9dd4a8; color: var(--forest2); }
.alert-danger  { background: var(--red-bg); border-color: #f5c0bb; color: var(--red); }
.alert-warning { background: var(--gold-lt); border-color: #e8cc78; color: #7a5200; }
.alert-info    { background: var(--blue-bg); border-color: #b0ccf0; color: var(--blue); }
.alert-dismissible { position: relative; padding-right: 40px; }
.alert .btn-close { position: absolute; right: 13px; top: 13px; background: none; border: none; cursor: pointer; font-size: 14px; opacity: .5; }
.alert .btn-close:hover { opacity: 1; }

/* ── BADGES ────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
}
.badge.bg-success, .badge-success { background: var(--mint) !important; color: var(--forest2); }
.badge.bg-warning, .badge-warning { background: var(--gold-lt) !important; color: #7a5200; }
.badge.bg-danger,  .badge-danger  { background: var(--red-bg) !important; color: var(--red); }
.badge.bg-info,    .badge-info    { background: var(--blue-bg) !important; color: var(--blue); }
.badge.bg-primary, .badge-primary { background: var(--forest) !important; color: var(--white); }
.badge.bg-secondary,.badge-secondary{ background: var(--parchment) !important; color: var(--muted); border: 1px solid var(--border); }

/* ── TABLES ────────────────────────────────────────── */
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table thead th {
  font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .8px; color: var(--muted); font-weight: 600;
  padding: 11px 15px; text-align: left;
  border-bottom: 2px solid var(--parchment); white-space: nowrap;
  background: var(--cream);
}
.table tbody td {
  padding: 12px 15px; font-size: 13.5px;
  border-bottom: 1px solid var(--parchment); vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: rgba(200,230,208,.18); }
.table-striped tbody tr:nth-child(even) td { background: rgba(245,241,232,.5); }
.table-bordered { border: 1.5px solid var(--border); }
.table-bordered th, .table-bordered td { border: 1px solid var(--parchment); }
.table-sm thead th { padding: 8px 12px; }
.table-sm tbody td { padding: 9px 12px; font-size: 13px; }

/* ── TABS ──────────────────────────────────────────── */
.nav-tabs {
  display: flex; gap: 2px;
  background: var(--parchment); border-radius: 10px;
  padding: 4px; width: fit-content; margin-bottom: 22px;
  border: none;
}
.nav-tabs .nav-link {
  padding: 8px 20px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--muted); cursor: pointer; border: none;
  background: none; transition: all .17s;
  font-family: 'DM Sans', sans-serif;
}
.nav-tabs .nav-link.active, .nav-tabs .nav-link:hover.active {
  background: var(--white); color: var(--forest);
  font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.nav-tabs .nav-link:hover:not(.active) { color: var(--forest2); }
.tab-content .tab-pane { display: none; }
.tab-content .tab-pane.show.active { display: block; }

/* ── MODALS ────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(27,58,40,.48); backdrop-filter: blur(3px);
  z-index: 500; align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal { background: var(--white); border-radius: var(--radius-lg); max-width: 520px; width: 94%; box-shadow: var(--shadow-lg); }
.modal-header { padding: 22px 26px 16px; border-bottom: 1.5px solid var(--parchment); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-family: 'Fraunces', serif; font-size: 18px; color: var(--forest); }
.modal-header .btn-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted); }
.modal-body   { padding: 22px 26px; }
.modal-footer { padding: 16px 26px; border-top: 1.5px solid var(--parchment); display: flex; gap: 10px; justify-content: flex-end; }

/* Bootstrap modal compat */
.modal-dialog { margin: auto; padding: 20px; max-width: 560px; }
.modal-content { background: var(--white); border-radius: var(--radius-lg); border: 1.5px solid var(--border); box-shadow: var(--shadow-lg); }

/* ── PAGE-SPECIFIC: LOGIN ──────────────────────────── */
.login-page {
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest2) 45%, #1d4f80 100%);
  background-image:
    radial-gradient(circle at 20% 50%, rgba(56,189,248,.18) 0%, transparent 45%),
    radial-gradient(circle at 82% 22%, rgba(242,185,75,.14) 0%, transparent 35%);
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.login-wrap { width: 100%; max-width: 430px; }
.login-card { background: var(--white); border-radius: 20px; padding: 46px 42px; box-shadow: 0 24px 80px rgba(0,0,0,.32); }
.login-logo  { text-align: center; margin-bottom: 34px; }
.login-badge { width: 68px; height: 68px; background: linear-gradient(135deg,var(--sage),var(--gold)); border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 16px; }
.login-logo h1 { font-family: 'Fraunces', serif; font-size: 19px; color: var(--forest); line-height: 1.3; }
.login-logo p  { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 4px; }
.login-footer-text { text-align: center; margin-top: 22px; font-size: 12px; color: rgba(255,255,255,.35); }

/* ── LIST GROUPS ───────────────────────────────────── */
.list-group-item {
  padding: 14px 18px; border-bottom: 1.5px solid var(--parchment);
  background: var(--white); transition: background .15s;
}
.list-group-item:last-child { border-bottom: none; }
.list-group-item:hover { background: var(--cream); }
.list-group-item.unread { background: rgba(200,230,208,.18); }
.list-group-item-action { cursor: pointer; }

/* ── NOTIFICATION ITEMS ────────────────────────────── */
.notif-item { display: flex; gap: 14px; align-items: flex-start; }
.notif-icon-wrap {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--mint); display: flex; align-items: center;
  justify-content: center; font-size: 17px; flex-shrink: 0;
}
.notif-title { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.notif-msg   { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.notif-time  { font-size: 11px; color: var(--muted); margin-top: 5px; }
.unread-dot  { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-top: 6px; flex-shrink: 0; }

/* ── INFO GRID ─────────────────────────────────────── */
.info-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
.info-item .il { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.info-item .iv { font-size: 14px; font-weight: 500; color: var(--ink); }

/* ── PROGRESS ──────────────────────────────────────── */
.progress { height: 8px; background: var(--parchment); border-radius: 8px; overflow: hidden; margin-top: 6px; }
.progress-bar { height: 100%; border-radius: 8px; background: linear-gradient(90deg,var(--moss),var(--sage)); transition: width .4s; }

/* ── SAVINGS PASSBOOK ──────────────────────────────── */
.txn-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--parchment); }
.txn-row:last-child { border-bottom: none; }
.txn-icon { width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.txn-dep { background: var(--mint); }
.txn-wdr { background: var(--red-bg); }
.txn-int { background: var(--gold-lt); }
.txn-meta { flex: 1; }
.txn-desc { font-size: 13px; font-weight: 600; }
.txn-date { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.txn-amount { font-size: 15px; font-weight: 700; text-align: right; }
.txn-bal    { font-size: 11px; color: var(--muted); text-align: right; }
.text-credit { color: var(--moss); }
.text-debit  { color: var(--red); }

/* ── UTILITY ───────────────────────────────────────── */
.text-muted   { color: var(--muted) !important; }
.text-success { color: var(--moss) !important; }
.text-danger  { color: var(--red) !important; }
.text-warning { color: var(--gold) !important; }
.text-primary { color: var(--forest) !important; }
.text-forest  { color: var(--forest); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.w-100 { width: 100%; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 22px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.me-1 { margin-right: 4px; }
.me-2 { margin-right: 8px; }
.p-0  { padding: 0; }
.text-center { text-align: center; }
.text-end { text-align: right; }
.h5 { font-size: 15px; font-weight: 700; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ── EMPTY STATE ───────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 24px; color: var(--muted); }
.empty-state .es-icon { font-size: 46px; opacity: .28; margin-bottom: 14px; }
.empty-state p { font-size: 14px; }

/* ── DATATABLES ────────────────────────────────────── */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 8px 12px; font-family: 'DM Sans',sans-serif; font-size: 13px;
  background: var(--cream); outline: none;
}
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus { border-color: var(--moss); background: var(--white); }
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 7px; margin: 0 2px; padding: 6px 12px !important;
  border: 1.5px solid var(--border) !important; color: var(--ink) !important;
  cursor: pointer; transition: all .17s; font-size: 12.5px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover { background: var(--mint) !important; border-color: var(--sage) !important; color: var(--forest) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current { background: var(--forest) !important; border-color: var(--forest) !important; color: #fff !important; }
.dataTables_wrapper .dataTables_info { font-size: 12.5px; color: var(--muted); }

/* ── FOOTER ────────────────────────────────────────── */
.site-footer { background: var(--forest); color: rgba(255,255,255,.55); font-size: 12.5px; padding: 24px 30px; margin-top: auto; }
.site-footer a { color: rgba(255,255,255,.6); }
.site-footer a:hover { color: var(--sage); }

/* ── PRINT ─────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .btn:not(.btn-print), .no-print,
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_length { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-body { padding: 0 !important; }
  body { background: white !important; }
}

/* ── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 1200px) {
  .stats-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-content { margin-left: 0; }
  .topbar-menu-btn { display: block; }
  .stats-4, .stats-3, .stats-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fg-3, .fg-2 { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .stats-4, .stats-3, .stats-2, .stats-5 { grid-template-columns: 1fr; }
  .page-body { padding: 18px; }
  .topbar { padding: 13px 18px; }
  .login-card { padding: 32px 24px; }
}

/* Phone-first interaction layer */
@media (max-width: 600px) {
  html { font-size: 14px; }
  .page-body { padding: 16px 12px; min-width: 0; }
  .topbar { min-height: 58px; padding: 10px 12px; }
  .topbar-title { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page-header { margin-bottom: 16px; }
  .page-header h1 { font-size: 22px; line-height: 1.2; }
  .page-header-row > * { max-width: 100%; }
  .page-header-row .btn { width: 100%; justify-content: center; }
  .card { border-radius: 10px; }
  .card-header, .card-body, .card-footer { padding: 14px; }
  .card-title { font-size: 14px; }
  .stat-card { min-height: 126px; padding: 16px; }
  .stat-value { font-size: 19px !important; }
  .quick-actions-grid { gap: 9px; }
  .btn, .btn-sm, button, select, input, textarea { min-height: 44px; }
  .btn { width: 100%; justify-content: center; white-space: normal; }
  .btn-sm { width: auto; min-height: 40px; }
  .table-responsive { margin: 0 -2px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 650px; }
  .table thead th, .table tbody td { padding: 10px 11px; }
  .info-grid { grid-template-columns: 1fr !important; }
  .form-row, .fg-2, .fg-3 { grid-template-columns: 1fr !important; }
  .nav-tabs { width: 100%; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .nav-tabs .nav-link { min-height: 42px; }
  .dataTables_wrapper .dataTables_filter input { width: 100%; margin-left: 0; }
  .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter { float: none; text-align: left; margin-bottom: 10px; }
  .site-footer { padding: 18px 14px; }
}
