/* ============================================================
   LVGPS — Little Vessels of God Preparatory School
   Premium UI Design System v4.0
   Colors: Deep Crimson · Warm Gold · Cream
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Playfair+Display:wght@700;800;900&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  --red:          #b82020;
  --red-dark:     #7d1212;
  --red-mid:      #cc3030;
  --red-light:    #fdf0f0;
  --red-xlight:   #fff7f7;
  --red-glow:     rgba(184,32,32,.22);

  --gold:         #b06820;
  --gold-bright:  #d4904a;
  --gold-light:   #fdf3e7;
  --gold-glow:    rgba(212,144,74,.25);

  --cream:        #fdf8f3;
  --bg:           #f8f3ef;

  --dark:         #1e0808;
  --dark-mid:     #2e1010;
  --dark-lite:    #3e1c1c;

  --slate:        #6b4040;
  --muted:        #9a7070;
  --border:       #ead8d4;
  --white:        #ffffff;

  /* Admin sidebar */
  --sidebar-w:    260px;
  --sidebar-bg:   #160606;
  --sidebar-mid:  #1e0a0a;

  /* Shape */
  --radius:       16px;
  --radius-sm:    10px;
  --radius-xs:    8px;

  /* Shadows */
  --shadow-xs:    0 1px 4px rgba(184,32,32,.06);
  --shadow-sm:    0 2px 12px rgba(184,32,32,.08);
  --shadow:       0 4px 24px rgba(184,32,32,.10);
  --shadow-md:    0 8px 40px rgba(184,32,32,.15);
  --shadow-lg:    0 16px 56px rgba(184,32,32,.18);

  /* Legacy aliases */
  --maroon:       #b82020;
  --maroon-dark:  #7d1212;
  --maroon-mid:   #cc3030;
  --maroon-light: #fdf0f0;
  --maroon-glow:  rgba(184,32,32,.22);
  --navy:         #1e0808;
  --navy-mid:     #2e1010;
  --teal:         #b82020;
  --teal-dark:    #7d1212;
  --teal-light:   #fde8e8;
  --teal-xlight:  #fff7f7;

  /* Transitions */
  --ease:         cubic-bezier(.34,1.56,.64,1);
  --ease-out:     cubic-bezier(.2,0,.2,1);
}

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

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(184,32,32,.25); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(184,32,32,.45); }

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
  background: var(--bg);
  color: #2e1a1a;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,h2 { font-family: 'Playfair Display', serif; }
h3,h4,h5,h6 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; }
h1,h2,h3,h4,h5,h6 { color: var(--dark); line-height: 1.25; }

a { color: var(--red); text-decoration: none; transition: color .18s; }
a:hover { color: var(--red-dark); }

img { display: block; }

/* ============================================================
   NAVBAR
   ============================================================ */
.lvg-navbar {
  background: linear-gradient(110deg, var(--dark) 0%, #350d0d 40%, var(--red-dark) 75%, #8b1a1a 100%);
  padding: .55rem 0;
  box-shadow: 0 4px 28px rgba(30,8,8,.55);
  position: sticky; top: 0; z-index: 1040;
  border-bottom: 1px solid rgba(212,144,74,.18);
}
.lvg-navbar::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(212,144,74,.5) 25%, rgba(245,197,24,.7) 50%, rgba(212,144,74,.5) 75%, transparent 100%);
}

.lvg-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.lvg-brand-logo {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(212,144,74,.5);
  box-shadow: 0 0 14px rgba(212,144,74,.25);
  transition: box-shadow .2s;
}
.lvg-brand:hover .lvg-brand-logo { box-shadow: 0 0 22px rgba(212,144,74,.5); }
.lvg-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.lvg-brand-name { font-size: .87rem; font-weight: 800; color: #fff; letter-spacing: .2px; }
.lvg-brand-sub  { font-size: .62rem; color: var(--gold-bright); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-top: 1px; }

.lvg-nav-center { gap: 2px; }
.lvg-nav-link {
  color: rgba(255,255,255,.75); font-size: 12.5px; font-weight: 600;
  padding: .38rem .95rem; border-radius: 50px;
  transition: all .2s var(--ease-out); white-space: nowrap; display: flex; align-items: center; gap: 5px;
}
.lvg-nav-link:hover { background: rgba(255,255,255,.12); color: #fff; transform: translateY(-1px); }
.lvg-nav-link.active {
  background: rgba(212,144,74,.22); color: var(--gold-bright);
  border: 1px solid rgba(212,144,74,.35);
}

.lvg-btn-solid {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--gold-bright), #e8a860);
  color: var(--dark) !important; padding: .42rem 1.15rem;
  border-radius: 50px; font-size: 12.5px; font-weight: 800;
  border: none; cursor: pointer;
  box-shadow: 0 3px 14px var(--gold-glow); transition: all .2s;
}
.lvg-btn-solid:hover { transform: translateY(-2px); box-shadow: 0 6px 22px var(--gold-glow); }

.lvg-btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid rgba(255,255,255,.35); color: rgba(255,255,255,.85);
  padding: .4rem .95rem; border-radius: 50px; font-size: 12.5px; font-weight: 600;
  transition: all .2s; background: transparent;
}
.lvg-btn-outline:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.7); color: #fff; }

.lvg-toggler {
  background: rgba(255,255,255,.1); border: 1.5px solid rgba(255,255,255,.25);
  color: #fff; border-radius: 10px; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer;
  transition: background .2s;
}
.lvg-toggler:hover { background: rgba(255,255,255,.2); }

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */
.admin-layout { display: flex; min-height: calc(100vh - 62px); align-items: flex-start; }

/* ============================================================
   SIDEBAR — Premium Dark Red
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(175deg, var(--sidebar-bg) 0%, var(--sidebar-mid) 60%, #120404 100%);
  padding: 1.25rem .75rem 2rem;
  position: sticky; top: 62px;
  height: calc(100vh - 62px);
  overflow-y: auto; flex-shrink: 0;
  border-right: 1px solid rgba(212,144,74,.1);
  transition: width .3s var(--ease-out);
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(212,144,74,.2); }

/* Sidebar logo block */
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: .6rem .65rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: 1rem;
}
.sidebar-brand-logo {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 2px solid rgba(212,144,74,.35);
}
.sidebar-brand-name { font-size: 12px; font-weight: 800; color: #fff; line-height: 1.3; }
.sidebar-brand-sub  { font-size: 9.5px; color: rgba(212,144,74,.7); letter-spacing: .6px; }

.sidebar-section-label {
  font-size: 9px; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; color: rgba(255,255,255,.2);
  padding: 0 .65rem; margin: .9rem 0 .35rem;
}

.sidebar .nav-link {
  display: flex; align-items: center; gap: 10px;
  border-radius: 12px; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.55) !important;
  padding: .62rem .85rem; margin-bottom: 2px;
  transition: all .2s var(--ease-out);
  position: relative; overflow: hidden;
}
.sidebar .nav-link i { font-size: 15px; min-width: 18px; flex-shrink: 0; transition: transform .2s; }
.sidebar .nav-link span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar .nav-link::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 0; border-radius: 0 3px 3px 0;
  background: var(--gold-bright); transition: height .2s var(--ease);
}

.sidebar .nav-link:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.9) !important;
  padding-left: 1.05rem;
}
.sidebar .nav-link:hover i { transform: scale(1.1); }
.sidebar .nav-link:hover::before { height: 60%; }

.sidebar .nav-link.active {
  background: linear-gradient(135deg, rgba(184,32,32,.65), rgba(204,48,48,.45));
  color: #fff !important;
  box-shadow: 0 4px 18px rgba(184,32,32,.3);
  border: 1px solid rgba(212,144,74,.15);
}
.sidebar .nav-link.active::before { height: 70%; }
.sidebar .nav-link.active i { color: var(--gold-bright); transform: scale(1.05); }

.sidebar .nav-link .badge-pill {
  margin-left: auto; font-size: 9px; font-weight: 800;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff; border-radius: 50px; padding: 2px 7px;
  flex-shrink: 0;
}

.sidebar .nav-link.logout-link {
  color: rgba(248,113,113,.65) !important;
  margin-top: .25rem;
}
.sidebar .nav-link.logout-link:hover {
  background: rgba(220,38,38,.12); color: #fca5a5 !important;
}

/* ============================================================
   MOBILE TOPBAR / OFFCANVAS
   ============================================================ */
.mobile-topbar {
  background: linear-gradient(135deg, var(--dark), var(--dark-mid));
  border-bottom: 1px solid rgba(212,144,74,.12);
  position: sticky; top: 0; z-index: 100;
}

.lvg-offcanvas {
  background: linear-gradient(175deg, var(--sidebar-bg) 0%, var(--sidebar-mid) 100%) !important;
  width: 250px !important;
}
.lvg-offcanvas .offcanvas-body { padding: 0 .75rem 2rem; }

/* Offcanvas nav links — same style as desktop sidebar */
.lvg-offcanvas .nav-link {
  display: flex; align-items: center; gap: 10px;
  border-radius: 12px; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.55) !important;
  padding: .62rem .85rem; margin-bottom: 2px;
  transition: all .2s; position: relative; overflow: hidden;
  text-decoration: none;
}
.lvg-offcanvas .nav-link i { font-size: 15px; min-width: 18px; flex-shrink: 0; }
.lvg-offcanvas .nav-link span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lvg-offcanvas .nav-link:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.9) !important;
  padding-left: 1.05rem;
}
.lvg-offcanvas .nav-link.active {
  background: linear-gradient(135deg,rgba(184,32,32,.65),rgba(204,48,48,.45));
  color: #fff !important;
  box-shadow: 0 4px 18px rgba(184,32,32,.3);
  border: 1px solid rgba(212,144,74,.15);
}
.lvg-offcanvas .nav-link.active i { color: var(--gold-bright); }
.lvg-offcanvas .nav-link.logout-link { color: rgba(248,113,113,.65) !important; }
.lvg-offcanvas .nav-link.logout-link:hover { background: rgba(220,38,38,.12); color: #fca5a5 !important; }

/* ============================================================
   PAGE STRUCTURE
   ============================================================ */
.admin-main {
  flex: 1; min-width: 0;
  padding: 1.75rem 1.75rem 2.5rem;
  background: var(--bg);
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.6rem; flex-wrap: wrap; gap: .75rem;
}
.page-header-left {}
.page-title {
  font-size: 1.35rem; font-weight: 900; color: var(--dark);
  margin: 0; display: flex; align-items: center; gap: 10px;
}
.page-title-icon {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px var(--red-glow);
}
.page-title-icon i { color: var(--gold-bright); font-size: 16px; }
.page-subtitle { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.page-header-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Breadcrumb */
.page-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--muted); margin-bottom: 1.4rem;
}
.page-breadcrumb a { color: var(--muted); }
.page-breadcrumb a:hover { color: var(--red); }
.page-breadcrumb .sep { color: rgba(154,112,112,.4); }
.page-breadcrumb .cur { color: var(--red); font-weight: 700; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
  border-radius: var(--radius) !important;
  padding: 1.3rem 1.2rem 1.1rem;
  position: relative; overflow: hidden; cursor: default;
  transition: transform .25s var(--ease), box-shadow .25s;
  border: none !important;
}
.stat-card::after {
  content: ''; position: absolute;
  width: 100px; height: 100px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  bottom: -35px; right: -25px; pointer-events: none;
}
.stat-card:hover { transform: translateY(-5px); }
.stat-card .stat-icon-wrap {
  width: 46px; height: 46px; border-radius: 13px;
  background: rgba(255,255,255,.18); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .85rem;
}
.stat-card .stat-icon-wrap i { font-size: 20px; color: #fff; }
.stat-card .stat-value { font-size: 2.2rem; font-weight: 900; color: #fff; line-height: 1; margin-bottom: 3px; font-family: 'Plus Jakarta Sans', sans-serif; }
.stat-card .stat-label { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.82); text-transform: uppercase; letter-spacing: .6px; }
.stat-card .stat-trend { font-size: 10.5px; color: rgba(255,255,255,.55); margin-top: 4px; }
.stat-card .stat-icon { font-size: 3.2rem; opacity: .1; position: absolute; right: 10px; top: 8px; color: #fff; }

/* Stat variants */
.stat-red    { background: linear-gradient(135deg, #7d1212 0%, var(--red) 60%, #c83030 100%); box-shadow: 0 6px 28px rgba(184,32,32,.35) !important; }
.stat-gold   { background: linear-gradient(135deg, #7d4010 0%, var(--gold) 60%, var(--gold-bright) 100%); box-shadow: 0 6px 28px rgba(176,104,32,.35) !important; }
.stat-green  { background: linear-gradient(135deg, #14532d 0%, #16a34a 60%, #22c55e 100%); box-shadow: 0 6px 28px rgba(22,163,74,.3) !important; }
.stat-amber  { background: linear-gradient(135deg, #78350f 0%, #d97706 60%, #f59e0b 100%); box-shadow: 0 6px 28px rgba(217,119,6,.3) !important; }
.stat-blue   { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%); box-shadow: 0 6px 28px rgba(37,99,235,.3) !important; }
.stat-violet { background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 60%, #8b5cf6 100%); box-shadow: 0 6px 28px rgba(124,58,237,.3) !important; }
.stat-cyan   { background: linear-gradient(135deg, #164e63 0%, #0891b2 60%, #06b6d4 100%); box-shadow: 0 6px 28px rgba(8,145,178,.3) !important; }
.stat-rose   { background: linear-gradient(135deg, #881337 0%, #e11d48 60%, #f43f5e 100%); box-shadow: 0 6px 28px rgba(225,29,72,.3) !important; }
.stat-dark   { background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 60%, var(--dark-lite) 100%); box-shadow: 0 6px 28px rgba(30,8,8,.4) !important; }

/* Old stat aliases */
.stat-blue.stat-blue   { background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.stat-teal   { background: linear-gradient(135deg, var(--red), #d44040); box-shadow: 0 6px 24px var(--red-glow) !important; }
.stat-emerald{ background: linear-gradient(135deg, #5a2020, #9a3030); box-shadow: 0 6px 24px var(--red-glow) !important; }
.stat-navy   { background: linear-gradient(135deg, var(--dark), var(--dark-lite)); box-shadow: 0 6px 24px rgba(30,8,8,.3) !important; }

/* ============================================================
   PANEL CARD
   ============================================================ */
.panel-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  transition: box-shadow .25s;
}
.panel-card:hover { box-shadow: var(--shadow); }
.panel-card > .panel-card-accent {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--red), var(--gold-bright), var(--red));
  background-size: 200%; animation: shimmer 4s linear infinite;
}

/* Panel header */
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.2rem; padding-bottom: .8rem;
  border-bottom: 1px solid rgba(234,216,212,.5);
}
.panel-title {
  font-size: 13px; font-weight: 800; color: var(--red-dark);
  display: flex; align-items: center; gap: 7px;
  text-transform: uppercase; letter-spacing: .8px;
}
.panel-title i { font-size: 14px; color: var(--red); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  border-radius: var(--radius) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm) !important;
  background: var(--white);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.card:hover { box-shadow: var(--shadow) !important; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md) !important; }

/* Data table cards must not clip */
.card.table-card { overflow: visible !important; }
.card.table-card:hover { transform: none; }

/* ============================================================
   SECTION / GLASS CARD
   ============================================================ */
.glass-card {
  background: rgba(255,255,255,.85); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ============================================================
   SHIMMER ANIMATION
   ============================================================ */
@keyframes shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: .6; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ============================================================
   TABLES
   ============================================================ */
.table { font-size: 13.5px; }
.table thead th {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px;
  color: #fff;
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 100%);
  border: none; padding: .9rem 1rem; white-space: nowrap; vertical-align: middle;
}
.table thead th:first-child { border-radius: 10px 0 0 0; }
.table thead th:last-child  { border-radius: 0 10px 0 0; }
.table td {
  padding: .75rem 1rem; vertical-align: middle;
  border-bottom: 1px solid #f5ece8;
  white-space: nowrap; color: #2e1a1a;
}
.table td.wrap { white-space: normal; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover td { background: #fff5f2; }
.table tbody tr:last-child td { border-bottom: none; }

.table-responsive {
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  font-size: 10.5px; font-weight: 700;
  padding: .3em .85em; border-radius: 50px; letter-spacing: .2px;
}

/* Status badges */
.badge-present  { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-late     { background: #fef9c3; color: #a16207; border: 1px solid #fef08a; }
.badge-absent   { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-excused  { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-pending  { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }
.badge-approved { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-rejected { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.badge-active   { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-inactive { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }
.badge-sent     { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.badge-failed   { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-male     { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-female   { background: #fce7f3; color: #9d174d; border: 1px solid #fbcfe8; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-weight: 700; font-size: 13px;
  border-radius: 10px; transition: all .2s var(--ease-out);
  display: inline-flex; align-items: center; gap: 5px;
}
.btn:active { transform: scale(.97); }
.btn-sm { font-size: 12px; padding: .3rem .8rem; border-radius: 8px; }

.btn-primary {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-mid) 100%);
  border: none; color: #fff;
  box-shadow: 0 3px 14px var(--red-glow);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--red-dark), var(--red)); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 22px var(--red-glow); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  border: none; color: var(--dark); font-weight: 800;
  box-shadow: 0 3px 14px var(--gold-glow);
}
.btn-gold:hover { background: linear-gradient(135deg, var(--gold-bright), #e8a860); color: var(--dark); transform: translateY(-2px); box-shadow: 0 6px 22px var(--gold-glow); }

.btn-danger { background: linear-gradient(135deg, #991b1b, #dc2626); border: none; color: #fff; box-shadow: 0 3px 12px rgba(220,38,38,.3); }
.btn-danger:hover { background: linear-gradient(135deg, #7f1d1d, #b91c1c); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(220,38,38,.4); }

.btn-success { background: linear-gradient(135deg, #14532d, #16a34a); border: none; color: #fff; box-shadow: 0 3px 12px rgba(22,163,74,.25); }
.btn-success:hover { background: linear-gradient(135deg, #166534, #15803d); color: #fff; transform: translateY(-2px); }

.btn-warning { background: linear-gradient(135deg, #92400e, #d97706); border: none; color: #fff; box-shadow: 0 3px 12px rgba(217,119,6,.25); }
.btn-warning:hover { background: linear-gradient(135deg, #78350f, #b45309); color: #fff; transform: translateY(-2px); }

.btn-info { background: linear-gradient(135deg, #164e63, #0891b2); border: none; color: #fff; }
.btn-info:hover { background: linear-gradient(135deg, #155e75, #0e7490); color: #fff; transform: translateY(-2px); }

.btn-secondary { background: rgba(30,8,8,.07); border: 1.5px solid var(--border); color: var(--slate); }
.btn-secondary:hover { background: rgba(30,8,8,.12); border-color: rgba(184,32,32,.3); color: var(--dark); }

.btn-outline-primary { border: 1.5px solid var(--red); color: var(--red); background: none; }
.btn-outline-primary:hover { background: var(--red); color: #fff; transform: translateY(-1px); }

.btn-outline-secondary { border: 1.5px solid var(--border); color: var(--muted); background: none; }
.btn-outline-secondary:hover { background: rgba(30,8,8,.05); border-color: rgba(184,32,32,.2); color: var(--dark); }

.btn-outline-danger { border: 1.5px solid rgba(220,38,38,.4); color: #dc2626; background: none; }
.btn-outline-danger:hover { background: #dc2626; color: #fff; transform: translateY(-1px); }

.btn-light { background: #fff; color: var(--dark); font-weight: 800; border: 1px solid var(--border); box-shadow: var(--shadow-xs); }
.btn-light:hover { background: var(--gold-light); color: var(--red-dark); transform: translateY(-1px); }

.btn-outline-light { border: 1.5px solid rgba(255,255,255,.45); color: rgba(255,255,255,.9); background: transparent; }
.btn-outline-light:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.8); color: #fff; }

/* ============================================================
   FORMS
   ============================================================ */
.form-control, .form-select {
  border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  font-size: 13.5px; font-family: inherit; color: #2e1a1a;
  background: #fdfaf8; transition: all .18s;
  padding: .52rem .85rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--red); box-shadow: 0 0 0 3.5px rgba(184,32,32,.1); background: #fff;
  outline: none;
}
.form-control::placeholder { color: rgba(154,112,112,.55); font-size: 13px; }
.form-label { font-weight: 700; font-size: 12.5px; color: var(--dark); margin-bottom: .3rem; }
.form-text  { font-size: 11.5px; color: var(--muted); }
.input-group-text {
  border: 1.5px solid var(--border); background: #fdf5f0; color: var(--muted);
  border-radius: var(--radius-sm);
}

/* Floating filter bar */
.filter-bar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-xs);
  margin-bottom: 1.25rem;
  display: flex; flex-wrap: wrap; gap: .65rem; align-items: center;
}

/* Period pill tabs */
.period-pills { display: flex; gap: 5px; flex-wrap: wrap; }
.period-pill {
  padding: .35rem 1rem; border-radius: 50px; font-size: 12px; font-weight: 700;
  border: 1.5px solid var(--border); color: var(--muted); background: #fff;
  cursor: pointer; transition: all .18s; white-space: nowrap;
}
.period-pill:hover { border-color: rgba(184,32,32,.3); color: var(--red); background: var(--red-xlight); }
.period-pill.active {
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  border-color: transparent; color: #fff;
  box-shadow: 0 3px 12px var(--red-glow);
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert { border-radius: var(--radius-sm); font-size: 13.5px; border: none; font-weight: 600; }
.alert-success { background: #ecfdf5; color: #065f46; border-left: 4px solid #10b981 !important; }
.alert-danger  { background: #fef2f2; color: #991b1b; border-left: 4px solid #ef4444 !important; }
.alert-warning { background: #fffbeb; color: #92400e; border-left: 4px solid #f59e0b !important; }
.alert-info    { background: #eff6ff; color: #1e40af; border-left: 4px solid #3b82f6 !important; }

/* ============================================================
   LIVE FEED ITEMS
   ============================================================ */
.rfid-item {
  display: flex; align-items: center; gap: 11px;
  padding: .7rem 1rem;
  border-bottom: 1px solid #faf0ee;
  transition: background .15s; cursor: default;
}
.rfid-item:last-child { border-bottom: none; }
.rfid-item:hover { background: var(--red-xlight); }
.rfid-item-photo {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 2px solid rgba(184,32,32,.2);
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius) !important;
  cursor: pointer; display: block;
  border: none !important;
  box-shadow: var(--shadow) !important;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.gallery-card img { width: 100%; display: block; object-fit: cover; transition: transform .5s ease; }
.gallery-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md) !important; }
.gallery-card:hover img { transform: scale(1.08); }
.gallery-card .gallery-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(125,18,18,.95) 0%, rgba(184,32,32,.5) 55%, transparent 100%);
  color: #fff; padding: 2rem .9rem .85rem;
  transform: translateY(55%); transition: transform .38s var(--ease-out);
}
.gallery-card:hover .gallery-caption { transform: translateY(0); }
.gallery-card .gallery-caption .fw-semibold { font-size: 13.5px; font-weight: 800; }
.gallery-card .gallery-caption small { font-size: 11px; color: rgba(255,255,255,.7); display: block; margin-top: 3px; }

/* ============================================================
   NAVBAR (public)
   ============================================================ */
.lvg-mobile-menu { border-top: 1px solid rgba(255,255,255,.1); padding: .75rem 0; display: flex; flex-direction: column; gap: 3px; }
.lvg-mobile-link { color: rgba(255,255,255,.8); font-size: 13.5px; font-weight: 600; padding: .5rem .75rem; border-radius: 10px; transition: background .15s; }
.lvg-mobile-link:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ============================================================
   LOGIN MODAL
   ============================================================ */
.lvg-modal { border: none; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); }
.lvg-modal-header {
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  color: #fff; padding: 1.4rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid rgba(212,144,74,.2);
}
.lvg-modal-close {
  background: rgba(255,255,255,.15); border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s;
}
.lvg-modal-close:hover { background: rgba(255,255,255,.28); transform: rotate(90deg); }
.lvg-btn-modal {
  background: linear-gradient(135deg, var(--red), var(--red-mid));
  color: #fff; font-weight: 700; border: none; border-radius: 10px;
  padding: .65rem; box-shadow: 0 3px 14px var(--red-glow); transition: all .2s;
}
.lvg-btn-modal:hover { background: linear-gradient(135deg, var(--red-dark), var(--red)); color: #fff; transform: translateY(-2px); }

/* ============================================================
   MODAL OVERRIDES
   ============================================================ */
.modal-content {
  border: none !important; border-radius: 20px !important; overflow: hidden;
  box-shadow: var(--shadow-lg) !important;
}
.modal-header { border-bottom: none; padding: 1.25rem 1.5rem .5rem; }
.modal-footer { border-top: 1px solid var(--border); }
.modal-body   { padding: 1rem 1.5rem 1.5rem; }

/* Modal accent bar */
.modal-accent-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--red-dark), var(--gold-bright), var(--red-dark));
  background-size: 200%; animation: shimmer 3s linear infinite;
}
.modal-accent-bar-green  { background: linear-gradient(90deg, #059669, #10b981); }
.modal-accent-bar-blue   { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.modal-accent-bar-red    { background: linear-gradient(90deg, #991b1b, #dc2626); }
.modal-accent-bar-amber  { background: linear-gradient(90deg, #92400e, #d97706); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 100%) !important;
  color: rgba(255,255,255,.55); font-size: 13px;
  border-top: 3px solid var(--red);
}
footer h6  { color: var(--gold-bright); font-weight: 800; }
footer a   { color: rgba(255,255,255,.35); transition: color .15s; }
footer a:hover { color: var(--gold-bright); }
footer hr  { border-color: rgba(255,255,255,.07); }

/* ============================================================
   STUDENT CARD (kanban grid)
   ============================================================ */
.student-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform .25s var(--ease), box-shadow .25s;
  display: flex; flex-direction: column;
}
.student-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.student-card-top { height: 4px; }
.student-card-body { padding: 1.1rem; flex: 1; display: flex; flex-direction: column; }
.student-photo-wrap { position: relative; display: inline-block; margin: 0 auto .65rem; }
.student-photo-img {
  width: 70px; height: 70px; border-radius: 50%; object-fit: cover; display: block;
  border: 3px solid #fff; box-shadow: var(--shadow-sm);
}
.student-rfid-dot {
  position: absolute; bottom: 2px; right: 2px; width: 15px; height: 15px;
  border-radius: 50%; border: 2.5px solid #fff;
}

/* ============================================================
   ANNOUNCEMENT CARDS (public)
   ============================================================ */
.ann-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  border-top: 3px solid var(--red); padding: 1.5rem;
  height: 100%; display: flex; flex-direction: column; gap: .75rem;
  box-shadow: var(--shadow-sm); transition: all .28s var(--ease);
}
.ann-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.ann-icon-wrap {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px var(--red-glow);
}
.ann-icon-wrap i { color: var(--gold-bright); font-size: 18px; }
.ann-title  { font-size: 14px; font-weight: 800; color: var(--dark); margin: 0; line-height: 1.3; }
.ann-desc   { font-size: 12.5px; color: var(--muted); flex: 1; line-height: 1.6; margin: 0; }
.ann-footer { font-size: 11px; color: var(--muted); font-weight: 600; padding-top: .5rem; border-top: 1px solid var(--border); }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-mvv-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  border-top: 4px solid var(--accent, var(--red)); padding: 1.8rem 1.5rem;
  height: 100%; display: flex; flex-direction: column; gap: .8rem;
  box-shadow: var(--shadow-sm); transition: all .28s var(--ease);
}
.about-mvv-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.about-mvv-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px var(--red-glow);
}
.about-mvv-icon i { color: var(--gold-bright); font-size: 22px; }
.about-mvv-title { font-size: 16px; font-weight: 900; color: var(--dark); margin: 0; }
.about-mvv-text  { font-size: 13.5px; color: var(--muted); line-height: 1.75; flex: 1; margin: 0; }
.about-mvv-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; color: var(--red);
  background: var(--red-light); border: 1px solid rgba(184,32,32,.2);
  border-radius: 50px; padding: 4px 12px; width: fit-content;
}

/* ============================================================
   PUBLIC HOME — HERO
   ============================================================ */
.hero-section { min-height: 88vh; position: relative; overflow: hidden; }
.home-section { padding: 5rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-eyebrow {
  display: inline-block; font-size: 10.5px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase; color: var(--red);
  background: var(--red-light); border: 1px solid rgba(184,32,32,.2);
  border-radius: 50px; padding: 4px 14px; margin-bottom: .8rem;
}
.section-title {
  font-size: clamp(1.6rem,3vw,2.2rem); font-weight: 900; color: var(--dark);
  margin-bottom: .5rem; line-height: 1.2;
}
.section-sub { font-size: 14px; color: var(--muted); max-width: 480px; margin: 0 auto; line-height: 1.7; }

/* CTA Buttons */
.hero-btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, var(--red), var(--red-mid));
  color: #fff; font-size: 14px; font-weight: 800;
  padding: .72rem 2rem; border-radius: 50px; border: none; cursor: pointer;
  box-shadow: 0 6px 24px rgba(184,32,32,.45); transition: all .22s; text-decoration: none;
}
.hero-btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 32px rgba(184,32,32,.6); color: #fff; }
.hero-btn-outline {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.08); backdrop-filter: blur(8px);
  color: #fff; font-size: 14px; font-weight: 700;
  padding: .72rem 2rem; border-radius: 50px;
  border: 1.5px solid rgba(255,255,255,.35); transition: all .22s; text-decoration: none;
}
.hero-btn-outline:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.7); color: #fff; transform: translateY(-3px); }
.hero-btn-cta {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.15); backdrop-filter: blur(8px); color: #fff;
  font-size: 14px; font-weight: 800; padding: .75rem 2.2rem; border-radius: 50px;
  border: 2px solid rgba(255,255,255,.45); cursor: pointer; transition: all .22s;
}
.hero-btn-cta:hover { background: rgba(255,255,255,.25); border-color: #fff; transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.2); }

/* ============================================================
   MISC UTILITY
   ============================================================ */
.object-fit-cover { object-fit: cover; }
.text-maroon { color: var(--red) !important; }
.text-gold   { color: var(--gold) !important; }
.bg-maroon   { background: var(--red) !important; color: #fff; }
.card-accent      { border-top: 3px solid var(--red) !important; }
.card-accent-gold { border-top: 3px solid var(--gold-bright) !important; }

/* Animated entrance */
.anim-up { animation: fadeInUp .4s var(--ease) both; }
.anim-up-1 { animation-delay: .05s; }
.anim-up-2 { animation-delay: .1s; }
.anim-up-3 { animation-delay: .15s; }
.anim-up-4 { animation-delay: .2s; }
.anim-up-5 { animation-delay: .25s; }
.anim-up-6 { animation-delay: .3s; }

/* Empty state */
.empty-state { text-align: center; padding: 3.5rem 1rem; }
.empty-state-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--red-light); border: 2px solid rgba(184,32,32,.1);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.2rem;
}
.empty-state-icon i { font-size: 28px; color: var(--red); opacity: .45; }
.empty-state-title  { font-size: 15px; font-weight: 800; color: var(--dark); margin-bottom: .35rem; }
.empty-state-desc   { font-size: 13px; color: var(--muted); max-width: 340px; margin: 0 auto; }

/* Blob bg decoration */
.blob-bg {
  position: fixed; top: -150px; right: -150px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(184,32,32,.04) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none; z-index: 0;
  animation: blobFloat 14s ease-in-out infinite;
}
@keyframes blobFloat { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-20px,20px); } }

/* Login success animation */
@keyframes popIn {
  0%   { transform: scale(0); opacity: 0; }
  70%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
  :root { --sidebar-w: 220px; }
}

@media (max-width: 767px) {
  /* ── Layout ── */
  .sidebar { display: none !important; }
  .admin-main { padding: .85rem; }
  .stat-card { margin-bottom: .5rem; }
  .panel-card { padding: .85rem; }
  .blob-bg { display: none; }
  .table-responsive { -webkit-overflow-scrolling: touch; }

  /* ── Navbar ── */
  .lvg-brand-name { font-size: .78rem; }
  .lvg-brand-sub  { display: none; }
  .lvg-brand-logo { width: 36px; height: 36px; }
  .lvg-navbar .container-fluid { padding: 0 .75rem; }

  /* ── Page header ── */
  .page-header { flex-direction: column; align-items: flex-start; gap: .65rem; }
  .page-header-actions { flex-wrap: wrap; gap: .4rem; }
  .page-header-actions .btn { font-size: 12px; padding: .35rem .75rem; }

  /* ── Filter bar — stay horizontal, wrap nicely ── */
  .filter-bar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
  }
  .filter-bar input,
  .filter-bar select { font-size: 12px; padding: .35rem .6rem; min-width: 0; flex: 1; }
  .filter-bar .btn  { font-size: 12px; padding: .35rem .75rem; white-space: nowrap; }
  .filter-bar label { font-size: 11px; white-space: nowrap; }

  /* ── Tables ── */
  .table td, .table th { font-size: 12px; padding: .4rem .5rem; }

  /* ── Stat cards ── */
  .stat-value { font-size: 1.6rem; }

  /* ── Home ── */
  .home-section { padding: 3rem 0; }
  .section-title { font-size: 1.4rem; }
  .hero-section { min-height: 72vh; }
}

@media (min-width: 768px) {
  .admin-layout { display: flex; align-items: flex-start; }
  .sidebar { position: sticky; top: 62px; flex-shrink: 0; }
}

.container-fluid > .row { flex-wrap: nowrap; }
@media (max-width: 767px) { .container-fluid > .row { flex-wrap: wrap; } }
