/* ═══════════════════════════════════════════════════════════════════
   Kapital Bank Demo — Professional Design System
   Brand: #D0021B primary red  |  #FFFFFF white  |  #1A1A2E dark
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
  /* Brand colours */
  --red:         #D0021B;
  --red-hover:   #B00217;
  --red-deep:    #8B0112;
  --red-mid:     #E8001F;
  --red-tint:    #FFF3F4;
  --gold:        #F5A623;
  --gold-light:  #FFF8EC;

  /* Neutrals */
  --white:       #FFFFFF;
  --bg:          #F7F8FA;
  --surface:     #FFFFFF;
  --border:      #E8EAF0;
  --muted:       #8892A4;
  --body:        #2C3347;
  --heading:     #0F1628;

  /* Semantic */
  --success:     #00875A;
  --danger:      #DE350B;
  --info:        #0052CC;

  /* Shadows */
  --shadow-xs:   0 1px 3px rgba(15,22,40,.06);
  --shadow-sm:   0 2px 8px rgba(15,22,40,.08);
  --shadow:      0 4px 20px rgba(15,22,40,.10);
  --shadow-lg:   0 12px 40px rgba(15,22,40,.14);
  --shadow-red:  0 8px 24px rgba(208,2,27,.30);

  /* Layout */
  --radius-xs:   6px;
  --radius-sm:   10px;
  --radius:      14px;
  --radius-lg:   20px;
  --navbar-h:    68px;
  --transition:  all .2s cubic-bezier(.4,0,.2,1);
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--body);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 99px; }

/* ── Typography base (NO colour override — context sets colour) ── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; letter-spacing: -.3px; color: var(--heading); }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }
p  { color: var(--body); }

/* ── Utility: force white text on dark/red containers ──────────── */
.on-dark, .on-dark *,
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4,
.on-dark p, .on-dark span, .on-dark li, .on-dark label {
  color: #FFFFFF !important;
}
.on-dark p, .on-dark .sub { color: rgba(255,255,255,.80) !important; }
.on-dark .muted            { color: rgba(255,255,255,.60) !important; }

/* ═══════════════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════════════ */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: var(--navbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-xs);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--heading);
  letter-spacing: -.4px;
}

.navbar-logo {
  width: 40px; height: 40px;
  background: var(--red);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(208,2,27,.35);
}

.navbar-brand-text { color: var(--heading); }
.navbar-brand-text span { color: var(--red); }

.navbar-badge {
  background: var(--red-tint);
  color: var(--red);
  font-size: .65rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .6px;
  border: 1px solid rgba(208,2,27,.2);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
}

.navbar-nav a {
  color: var(--body);
  font-weight: 500;
  font-size: .88rem;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: .4rem;
}

.navbar-nav a:hover { background: var(--bg); color: var(--red); }
.navbar-nav a.active { background: var(--red-tint); color: var(--red); font-weight: 600; }

.navbar-right {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.navbar-user-info { text-align: right; }
.navbar-user-name { font-size: .85rem; font-weight: 600; color: var(--heading); line-height: 1.2; }
.navbar-user-role { font-size: .72rem; color: var(--muted); }

.navbar-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
  flex-shrink: 0;
}

.btn-logout {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .83rem;
  font-weight: 500;
  transition: var(--transition);
  font-family: inherit;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); background: var(--red-tint); }

/* ═══════════════════════════════════════════════════════════════════
   VULNERABILITY BANNERS
   ═══════════════════════════════════════════════════════════════════ */
.vuln-banner {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .85rem 1.5rem;
  font-size: .82rem;
  line-height: 1.55;
  font-weight: 500;
}

.vuln-banner.bola {
  background: #0F1628;
  border-left: 4px solid var(--gold);
  color: rgba(255,255,255,.88);
}

.vuln-banner.bfla {
  background: #0A1F12;
  border-left: 4px solid #22c55e;
  color: rgba(255,255,255,.88);
}

.vuln-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: 3px 10px;
  border-radius: 5px;
  font-weight: 800;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .7px;
  line-height: 1.8;
  white-space: nowrap;
  flex-shrink: 0;
}

.vuln-tag.bola { background: var(--gold); color: #1a1a2e; }
.vuln-tag.bfla { background: #22c55e; color: #052e16; }
.vuln-tag.danger { background: #ef4444; color: #fff; }

.vuln-banner strong { color: #fff; }
.vuln-banner code {
  background: rgba(255,255,255,.12);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: .8em;
}

/* ═══════════════════════════════════════════════════════════════════
   PAGE HEADER (red gradient bar under navbar)
   ═══════════════════════════════════════════════════════════════════ */
.page-header {
  background: linear-gradient(100deg, var(--red-deep) 0%, var(--red) 50%, var(--red-mid) 100%);
  padding: 2rem 0 2.25rem;
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}

/* All text inside page-header must be white */
.page-header h1,
.page-header h2,
.page-header h3,
.page-header p,
.page-header span {
  color: #fff;
}
.page-header p { color: rgba(255,255,255,.75); margin-top: .3rem; font-size: .93rem; }

/* ═══════════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════════ */
.page { min-height: calc(100vh - var(--navbar-h)); padding-bottom: 3rem; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }

/* ═══════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  transition: var(--transition);
}

.card:hover { box-shadow: var(--shadow); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════════
   ACCOUNT CARDS (bank card style)
   ═══════════════════════════════════════════════════════════════════ */
.account-card {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  border-radius: var(--radius);
  padding: 1.6rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-red);
  position: relative;
  overflow: hidden;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: none;
}

.account-card::before {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  top: -70px; right: -50px;
  pointer-events: none;
}

.account-card::after {
  content: '';
  position: absolute;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  bottom: -60px; left: -30px;
  pointer-events: none;
}

.account-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(208,2,27,.40);
}

/* ALL text on account cards must be white */
.account-card,
.account-card *,
.account-card .type,
.account-card .balance,
.account-card .currency,
.account-card .iban {
  color: #ffffff !important;
}

.account-card .card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.account-card .type { font-size: .73rem; text-transform: uppercase; letter-spacing: 1.2px; opacity: .75; font-weight: 600; }
.account-card .id-chip {
  background: rgba(255,255,255,.18);
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .68rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.account-card .card-bottom { position: relative; }
.account-card .balance { font-size: 1.9rem; font-weight: 800; letter-spacing: -.5px; }
.account-card .balance-label { font-size: .72rem; opacity: .65; margin-bottom: .2rem; }
.account-card .iban {
  font-family: 'Courier New', monospace;
  font-size: .72rem;
  opacity: .55;
  letter-spacing: .5px;
  margin-top: .6rem;
}

/* ═══════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn-primary {
  background: var(--red);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(208,2,27,.35);
}
.btn-primary:hover:not(:disabled) {
  background: var(--red-hover);
  box-shadow: 0 6px 20px rgba(208,2,27,.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg);
  color: var(--body) !important;
  border: 1.5px solid var(--border);
}
.btn-secondary:hover:not(:disabled) { background: var(--border); }

.btn-danger {
  background: var(--danger);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(222,53,11,.30);
}
.btn-danger:hover:not(:disabled) { filter: brightness(1.1); }

.btn-ghost {
  background: transparent;
  color: var(--red) !important;
  border: 1.5px solid var(--red);
}
.btn-ghost:hover:not(:disabled) { background: var(--red-tint); }

.btn-light {
  background: rgba(255,255,255,.15);
  color: #ffffff !important;
  border: 1.5px solid rgba(255,255,255,.3);
  backdrop-filter: blur(4px);
}
.btn-light:hover:not(:disabled) { background: rgba(255,255,255,.25); }

.btn-sm { padding: .4rem .9rem; font-size: .8rem; }
.btn-lg { padding: .85rem 2rem; font-size: .95rem; }
.btn-full { width: 100%; }

/* ═══════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 1.2rem; }

.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: .4rem;
  letter-spacing: .1px;
}

.form-input {
  width: 100%;
  padding: .72rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .9rem;
  color: var(--heading);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(208,2,27,.10);
}
.form-input::placeholder { color: var(--muted); }

.form-hint { font-size: .76rem; color: var(--muted); margin-top: .3rem; }

/* ═══════════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════════ */
.table-wrapper {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

table { width: 100%; border-collapse: collapse; }

thead { background: var(--heading); }
thead th {
  color: #ffffff !important;
  padding: .85rem 1.2rem;
  text-align: left;
  font-size: .76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .7px;
}

tbody tr { transition: background .12s; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--red-tint); }
td { padding: .85rem 1.2rem; font-size: .875rem; border-bottom: 1px solid var(--border); color: var(--body); vertical-align: middle; }

/* ═══════════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.badge-credit  { background: #D1FAE5; color: #065F46; }
.badge-debit   { background: #FEE2E2; color: #991B1B; }
.badge-admin   { background: #FEF3C7; color: #92400E; }
.badge-user    { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.badge-red     { background: var(--red-tint); color: var(--red); }

/* ═══════════════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════════════ */
.alert {
  border-radius: var(--radius-sm);
  padding: .9rem 1.1rem;
  margin-bottom: 1rem;
  font-size: .86rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  border: 1px solid transparent;
}

.alert-error   { background: #FFF1F0; color: #7F1D1D; border-color: #FECACA; }
.alert-success { background: #F0FDF4; color: #14532D; border-color: #BBF7D0; }
.alert-warning { background: #FFFBEB; color: #78350F; border-color: #FDE68A; }
.alert-info    { background: #EFF6FF; color: #1E3A8A; border-color: #BFDBFE; }

/* ═══════════════════════════════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════════════════════════════ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.75rem 0 .75rem;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--red);
}

.stat-card .stat-label {
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .9px;
  font-weight: 600;
}
.stat-card .stat-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--heading);
  margin-top: .3rem;
  letter-spacing: -.5px;
}
.stat-card .stat-sub { font-size: .75rem; color: var(--muted); margin-top: .15rem; }

/* ═══════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
}

/* Left panel */
.login-left {
  flex: 1;
  background: linear-gradient(155deg, var(--red-deep) 0%, var(--red) 55%, #E8001F 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3.5rem;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  width: 450px; height: 450px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.10);
  top: -150px; right: -150px;
  pointer-events: none;
}
.login-left::after {
  content: '';
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.07);
  bottom: -100px; left: -80px;
  pointer-events: none;
}

/* ⬇ ALL text inside login-left is white */
.login-left,
.login-left h1, .login-left h2, .login-left h3,
.login-left p, .login-left span, .login-left li, .login-left div {
  color: #ffffff;
}

.login-left .tagline {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 1.1rem;
  color: #ffffff;
}

.login-left .sub { opacity: .78; font-size: .95rem; max-width: 380px; line-height: 1.65; color: #ffffff; }

.login-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 3rem;
}

.login-brand .logo-box {
  width: 48px; height: 48px;
  background: rgba(255,255,255,.20);
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.2rem; color: #fff;
  backdrop-filter: blur(8px);
}

.login-brand .brand-name { font-size: 1.35rem; font-weight: 800; color: #fff; letter-spacing: -.3px; }

.login-features {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .88rem;
  color: rgba(255,255,255,.85);
}

.login-feature .feat-icon {
  width: 32px; height: 32px;
  background: rgba(255,255,255,.15);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}

.demo-creds {
  margin-top: 2.75rem;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.20);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  backdrop-filter: blur(8px);
}

.demo-creds .creds-title { font-size: .78rem; font-weight: 700; color: var(--gold); letter-spacing: .5px; margin-bottom: .75rem; text-transform: uppercase; }
.demo-creds table { border: none; }
.demo-creds thead { background: transparent; }
.demo-creds thead th { color: rgba(255,255,255,.55) !important; font-size: .69rem; padding: 0 .5rem .5rem 0; border: none; text-transform: uppercase; letter-spacing: .5px; }
.demo-creds tbody tr { background: transparent !important; }
.demo-creds tbody tr:hover { background: transparent !important; }
.demo-creds td { padding: .2rem .5rem .2rem 0; border: none; font-size: .8rem; color: rgba(255,255,255,.85) !important; }
.demo-creds td strong { color: #ffffff !important; }
.demo-creds td .role-chip { background: rgba(255,255,255,.15); padding: 1px 7px; border-radius: 99px; font-size: .67rem; color: rgba(255,255,255,.75) !important; }
.demo-creds td .role-chip.admin { background: rgba(245,166,35,.25); color: var(--gold) !important; }

/* Right panel */
.login-right {
  width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem;
  background: var(--white);
  overflow-y: auto;
}

.login-right-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 2.25rem;
}

.login-right-logo .logo-box {
  width: 40px; height: 40px;
  background: var(--red);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; color: #fff; font-size: 1rem;
  box-shadow: 0 3px 8px rgba(208,2,27,.30);
}

.login-right-logo .logo-text { font-size: 1.2rem; font-weight: 800; color: var(--heading); }
.login-right-logo .logo-text span { color: var(--red); }

.tab-bar {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.75rem;
}

.tab-btn {
  flex: 1;
  padding: .7rem 1rem;
  border: none;
  background: none;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  text-align: center;
}

.tab-btn.active { color: var(--red); }
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--red);
  border-radius: 2px 2px 0 0;
}

.form-title { font-size: 1.35rem; font-weight: 800; color: var(--heading); margin-bottom: 1.5rem; }

/* ═══════════════════════════════════════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════════════════════════════════════ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2rem 0 1.1rem;
  flex-wrap: wrap;
  gap: .75rem;
}

.section-title { font-size: 1.1rem; font-weight: 700; color: var(--heading); }

/* ═══════════════════════════════════════════════════════════════════
   ATTACK DEMO CARD (the transfer / bola test boxes)
   ═══════════════════════════════════════════════════════════════════ */
.attack-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
}

.attack-card .attack-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.2rem;
}

.attack-card .attack-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.attack-icon.bola { background: #FFF8EC; color: var(--gold); }
.attack-icon.bfla { background: #F0FDF4; color: #16a34a; }

.attack-card .attack-title { font-weight: 700; color: var(--heading); font-size: .95rem; }
.attack-card .attack-sub { font-size: .79rem; color: var(--muted); margin-top: .1rem; }

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

.spinner-dark {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .65s linear infinite;
}

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

/* ═══════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════ */
footer {
  background: var(--heading);
  color: rgba(255,255,255,.5);
  padding: 1.5rem 2rem;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 3rem;
}

footer .footer-brand { color: #fff; font-weight: 700; font-size: .88rem; }
footer .footer-brand span { color: var(--red); }
footer .footer-warn { color: var(--gold); font-weight: 500; }

/* ═══════════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════════ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.flex-wrap { flex-wrap: wrap; }

.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }

.text-sm { font-size: .82rem; }
.text-xs { font-size: .73rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--muted) !important; }
.text-red { color: var(--red) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-white { color: #fff !important; }
.text-heading { color: var(--heading) !important; }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.hidden { display: none !important; }
.w-full { width: 100%; }

/* Divider */
.divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* Code */
code {
  font-family: 'Courier New', monospace;
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .83em;
  color: var(--red);
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .login-left { display: none; }
  .login-right { width: 100%; min-height: 100vh; }
  .card-grid { grid-template-columns: 1fr; }
  .navbar { padding: 0 1rem; }
  .container { padding: 0 1rem; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .navbar-nav { display: none; }
  h1 { font-size: 1.6rem; }
}