/* ============================================================
   Holy Child — Premium Design System
   Inspired by: Apple · Stripe · Notion · Linear · Framer
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand */
  --navy-900: #0A2540;
  --navy-800: #12305A;
  --navy-700: #1A3E75;
  --navy-600: #2A5298;
  --gold-500: #D4A574;
  --gold-400: #E8B84C;
  --gold-300: #F4D58D;

  /* Neutrals */
  --gray-50:  #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  /* Semantic */
  --success: #10B981;
  --warning: #F59E0B;
  --danger:  #EF4444;
  --info:    #3B82F6;

  /* Surfaces */
  --surface: #FFFFFF;
  --surface-2: #FAFBFC;
  --bg: #F6F8FB;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 30px 80px rgba(10, 37, 64, 0.18);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms;
  --dur: 300ms;
  --dur-slow: 500ms;

  /* Layout */
  --container: 1240px;
  --sidebar-w: 260px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
h1,h2,h3,h4,h5 { margin: 0; font-weight: 700; letter-spacing: -0.02em; color: var(--gray-900); }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.15; }
h3 { font-size: 1.35rem; }
p  { margin: 0 0 1rem; color: var(--gray-600); }

/* ---------- Utilities ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section   { padding: 96px 0; }
.section-sm{ padding: 56px 0; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-700);
  background: rgba(42, 82, 152, 0.08);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}
.text-center { text-align: center; }
.text-gold   { color: var(--gold-500); }
.text-muted  { color: var(--gray-500); }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-weight: 600; font-size: 0.92rem;
  transition: all var(--dur) var(--ease);
  position: relative; overflow: hidden;
  white-space: nowrap;
}
.btn-primary {
  background: var(--navy-900);
  color: #fff;
  box-shadow: 0 4px 14px rgba(10, 37, 64, 0.25);
}
.btn-primary:hover {
  background: var(--navy-700);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(10, 37, 64, 0.3);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--navy-900);
  box-shadow: 0 4px 14px rgba(212, 165, 116, 0.4);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(212, 165, 116, 0.5); }
.btn-ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.18); }
.btn-outline {
  background: transparent;
  color: var(--navy-900);
  border: 1.5px solid var(--gray-200);
}
.btn-outline:hover { border-color: var(--navy-900); background: var(--navy-900); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; }
.btn-lg { padding: 16px 30px; font-size: 1rem; }

/* Ripple effect */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transform: scale(0);
  animation: ripple 600ms linear;
  pointer-events: none;
}
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(15, 23, 42, 0.04);
  transition: all var(--dur) var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(42, 82, 152, 0.12);
}
.card-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(42,82,152,0.08), rgba(212,165,116,0.15));
  display: grid; place-items: center;
  color: var(--navy-700);
  margin-bottom: 18px;
  font-size: 1.4rem;
}

/* ---------- Navigation ---------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.75);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(15,23,42,0.06);
  transition: all var(--dur) var(--ease);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--container); margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 800; font-size: 1.15rem;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: var(--gold-400);
  display: grid; place-items: center;
  font-family: 'Georgia', serif;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
}
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--gray-700);
  transition: all var(--dur-fast) var(--ease);
  position: relative;
}
.nav-links a:hover { color: var(--navy-900); background: var(--gray-100); }
.nav-links a.active { color: var(--navy-900); background: var(--gray-100); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.hamburger {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  align-items: center; justify-content: center;
}
.hamburger span {
  width: 20px; height: 2px;
  background: var(--gray-800);
  position: relative;
  transition: all var(--dur) var(--ease);
}
.hamburger span::before, .hamburger span::after {
  content: ''; position: absolute; left: 0; width: 20px; height: 2px;
  background: var(--gray-800);
  transition: all var(--dur) var(--ease);
}
.hamburger span::before { top: -6px; }
.hamburger span::after  { top:  6px; }
@media (max-width: 900px) {
  .nav-links, .nav-cta .btn-outline { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; padding: 16px;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--gray-100);
    animation: slideDown var(--dur) var(--ease);
  }
  .nav-links.open a { width: 100%; }
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 100px 0 120px;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(212,165,116,0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(42,82,152,0.18), transparent 60%),
    linear-gradient(180deg, #FBFCFE 0%, #F6F8FB 100%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: 60px; align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 span {
  background: linear-gradient(120deg, var(--navy-900) 0%, var(--navy-700) 40%, var(--gold-500) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead { font-size: 1.12rem; max-width: 540px; margin: 20px 0 32px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
  transition: transform var(--dur-slow) var(--ease);
}
.hero-visual:hover { transform: perspective(1000px) rotateY(0) rotateX(0); }
.hero-visual::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(212,165,116,0.3), transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(42,82,152,0.4), transparent 40%);
}
.hero-badge {
  position: absolute;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 12px;
  font-size: 0.85rem; font-weight: 600;
  animation: float 6s ease-in-out infinite;
}
.hero-badge.b1 { top: 24px; left: -24px; }
.hero-badge.b2 { bottom: 24px; right: -24px; animation-delay: -3s; }
.hero-badge .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(16,185,129,0.2); }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  background: #fff;
  padding: 40px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin-top: -60px;
  position: relative; z-index: 2;
}
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, 1fr); padding: 24px; } }
.stat { text-align: center; }
.stat-num {
  font-size: 2.4rem; font-weight: 800;
  background: linear-gradient(135deg, var(--navy-900), var(--gold-500));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}
.stat-label { color: var(--gray-500); font-size: 0.88rem; font-weight: 500; margin-top: 4px; }

/* ---------- Section Header ---------- */
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head h2 { margin-bottom: 14px; }
.section-head p { font-size: 1.05rem; }

/* ---------- Footer ---------- */
.footer {
  background: var(--navy-900);
  color: rgba(255,255,255,0.7);
  padding: 80px 0 30px;
  margin-top: 80px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 18px; letter-spacing: 0.02em; }
.footer a { display: block; padding: 6px 0; font-size: 0.9rem; transition: color var(--dur-fast); }
.footer a:hover { color: var(--gold-400); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: 0.85rem;
}

/* ============================================================
   APP SHELL (Dashboards)
   ============================================================ */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  background: #fff;
  border-right: 1px solid var(--gray-100);
  padding: 24px 16px;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 4px 12px 24px; border-bottom: 1px solid var(--gray-100); margin-bottom: 18px; }
.side-section { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-400); padding: 14px 12px 6px; }
.side-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--gray-600);
  font-weight: 500; font-size: 0.9rem;
  margin-bottom: 2px;
  transition: all var(--dur-fast) var(--ease);
}
.side-link:hover { background: var(--gray-100); color: var(--navy-900); }
.side-link.active {
  background: linear-gradient(135deg, rgba(42,82,152,0.08), rgba(212,165,116,0.12));
  color: var(--navy-900);
  font-weight: 600;
}
.side-link .ico { width: 18px; height: 18px; }

.app-main { padding: 28px 32px; }
.app-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; gap: 16px; flex-wrap: wrap;
}
.page-title h1 { font-size: 1.6rem; margin-bottom: 4px; }
.page-title p { font-size: 0.9rem; margin: 0; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); padding: 9px 14px;
  min-width: 260px;
  transition: all var(--dur-fast);
}
.search-box:focus-within { border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(42,82,152,0.1); }
.search-box input { border: 0; outline: 0; flex: 1; font-size: 0.88rem; background: transparent; }
.icon-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: #fff; border: 1px solid var(--gray-200);
  display: grid; place-items: center;
  transition: all var(--dur-fast);
  position: relative;
}
.icon-btn:hover { background: var(--gray-100); }
.icon-btn .badge-dot {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger);
  border: 2px solid #fff;
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-700), var(--gold-500));
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 0.9rem;
}

/* KPI Cards */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  background: #fff; border-radius: var(--radius-lg);
  padding: 22px; border: 1px solid var(--gray-100);
  transition: all var(--dur) var(--ease);
  position: relative; overflow: hidden;
}
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.kpi-label { font-size: 0.82rem; color: var(--gray-500); font-weight: 500; }
.kpi-ico {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(42,82,152,0.1), rgba(212,165,116,0.15));
  color: var(--navy-700);
}
.kpi-value { font-size: 1.9rem; font-weight: 800; color: var(--gray-900); letter-spacing: -0.02em; }
.kpi-trend { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; font-weight: 600; margin-top: 6px; padding: 3px 8px; border-radius: var(--radius-full); }
.trend-up { color: var(--success); background: rgba(16,185,129,0.1); }
.trend-down { color: var(--danger); background: rgba(239,68,68,0.1); }

/* Tables */
.table-wrap {
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}
.table-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; border-bottom: 1px solid var(--gray-100);
  flex-wrap: wrap; gap: 12px;
}
.table-head h3 { font-size: 1.05rem; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 22px; text-align: left; font-size: 0.88rem; }
th { font-weight: 600; color: var(--gray-500); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.08em; background: var(--gray-50); border-bottom: 1px solid var(--gray-100); }
tbody tr { border-bottom: 1px solid var(--gray-100); transition: background var(--dur-fast); }
tbody tr:last-child { border-bottom: 0; }
tbody tr:hover { background: var(--gray-50); }
.chip {
  display: inline-block; padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem; font-weight: 600;
}
.chip-success { background: rgba(16,185,129,0.12); color: var(--success); }
.chip-warning { background: rgba(245,158,11,0.12); color: var(--warning); }
.chip-danger  { background: rgba(239,68,68,0.12);  color: var(--danger); }
.chip-info    { background: rgba(59,130,246,0.12); color: var(--info); }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  background: #fff;
  transition: all var(--dur-fast);
  font-family: inherit;
}
.form-control:focus { outline: 0; border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(42,82,152,0.1); }

/* Alerts & Toasts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border-left: 4px solid;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.alert-info    { background: rgba(59,130,246,0.08); border-color: var(--info); color: #1E40AF; }
.alert-success { background: rgba(16,185,129,0.08); border-color: var(--success); color: #065F46; }
.alert-warning { background: rgba(245,158,11,0.08); border-color: var(--warning); color: #92400E; }

.toast-container {
  position: fixed; top: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: #fff; padding: 14px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--success);
  min-width: 280px;
  display: flex; align-items: center; gap: 12px;
  animation: toastIn var(--dur) var(--ease);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 37, 64, 0.5);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn var(--dur) var(--ease);
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-xl);
  max-width: 520px; width: 100%;
  padding: 28px;
  box-shadow: var(--shadow-xl);
  animation: modalIn var(--dur-slow) var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Scroll Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: all var(--dur-slow) var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* Progress */
.progress { height: 8px; background: var(--gray-100); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--navy-700), var(--gold-500));
  border-radius: var(--radius-full);
  transition: width 1s var(--ease);
}

/* Accordion */
.accordion-item { background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius-md); margin-bottom: 10px; overflow: hidden; }
.accordion-head { padding: 16px 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height var(--dur) var(--ease); padding: 0 20px; }
.accordion-item.open .accordion-body { max-height: 400px; padding: 0 20px 18px; }
.accordion-item.open .accordion-head .chev { transform: rotate(180deg); }
.chev { transition: transform var(--dur); }

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrap {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
  background: #fff;
}
@media (max-width: 900px) { .login-wrap { grid-template-columns: 1fr; } }
.login-visual {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #fff; padding: 60px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-visual::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(212,165,116,0.25), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(42,82,152,0.4), transparent 40%);
}
.login-visual > * { position: relative; z-index: 1; }
.login-form-wrap { padding: 60px; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 600px) { .login-form-wrap, .login-visual { padding: 40px 24px; } }
.role-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--gray-100); padding: 6px; border-radius: var(--radius-md); margin-bottom: 28px; }
.role-tab { padding: 10px; text-align: center; border-radius: 8px; font-weight: 600; font-size: 0.85rem; color: var(--gray-600); cursor: pointer; transition: all var(--dur-fast); }
.role-tab.active { background: #fff; color: var(--navy-900); box-shadow: var(--shadow-sm); }

/* ============================================================
   RESULT SHEET (Printable)
   ============================================================ */
.result-sheet {
  background: #fff; padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  max-width: 900px; margin: 0 auto;
}
.result-sheet::before {
  content: 'Holy Child';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-20deg);
  font-size: 5rem; font-weight: 900;
  color: rgba(10, 37, 64, 0.04);
  letter-spacing: 0.1em;
  pointer-events: none;
  white-space: nowrap;
}
.result-head { text-align: center; border-bottom: 3px double var(--navy-900); padding-bottom: 18px; margin-bottom: 24px; }
.result-head .school-name { font-size: 1.8rem; font-weight: 800; color: var(--navy-900); letter-spacing: 0.05em; }
.result-head .motto { font-style: italic; color: var(--gray-600); margin-top: 4px; }
.result-head h3 { margin-top: 12px; color: var(--navy-700); }
.result-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.result-meta .passport {
  width: 100px; height: 120px;
  background: linear-gradient(135deg, var(--gray-200), var(--gray-100));
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--gray-500); font-size: 0.8rem;
}
.result-meta dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 0.9rem; }
.result-meta dt { font-weight: 600; color: var(--gray-600); }
.result-meta dd { margin: 0; color: var(--gray-900); }
.result-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 0.85rem; }
.result-table th, .result-table td { border: 1px solid var(--gray-300); padding: 8px 10px; text-align: center; }
.result-table th { background: var(--navy-900); color: #fff; font-weight: 600; }
.result-table td:first-child, .result-table th:first-child { text-align: left; }
.remarks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; font-size: 0.88rem; }
.remarks div { padding: 12px; background: var(--gray-50); border-radius: 8px; }
.remarks strong { display: block; color: var(--navy-900); margin-bottom: 4px; }
.signature-line { display: flex; justify-content: space-between; margin-top: 40px; font-size: 0.85rem; color: var(--gray-600); }
.signature-line div { text-align: center; }
.signature-line .line { width: 180px; border-top: 1px solid var(--gray-400); margin: 30px auto 6px; }

@media print {
  body * { visibility: hidden; }
  .result-sheet, .result-sheet * { visibility: visible; }
  .result-sheet { position: absolute; inset: 0; box-shadow: none; padding: 20px; max-width: none; }
  .no-print { display: none !important; }
}

/* ============================================================
   MISC
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 0%, var(--gray-200) 50%, var(--gray-100) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.chip-tab { display: inline-flex; gap: 6px; padding: 6px 14px; border-radius: var(--radius-full); background: var(--gray-100); font-size: 0.82rem; font-weight: 500; cursor: pointer; transition: all var(--dur-fast); }
.chip-tab.active { background: var(--navy-900); color: #fff; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-500); }
.empty-state .ico { font-size: 3rem; margin-bottom: 12px; opacity: 0.4; }

/* ============================================================
   RESPONSIVE TABLES — Stack on mobile
   ============================================================ */

/* Mobile: transform table rows into cards */
@media (max-width: 768px) {
  .table-responsive-stack thead {
    display: none;
  }

  .table-responsive-stack,
  .table-responsive-stack tbody,
  .table-responsive-stack tr,
  .table-responsive-stack td {
    display: block;
    width: 100%;
  }

  .table-responsive-stack tr {
    background: #fff;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-xs);
  }

  .table-responsive-stack td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9rem;
    text-align: right;
    gap: 12px;
  }

  .table-responsive-stack td:last-child {
    border-bottom: 0;
  }

  .table-responsive-stack td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    flex-shrink: 0;
    min-width: 120px;
  }

  .table-responsive-stack td strong {
    color: var(--navy-900);
  }

  /* Special handling for "Includes" row — make it full width */
  .table-responsive-stack td.includes-cell {
    flex-direction: column;
    align-items: flex-start;
    background: var(--gray-50);
    margin: 8px -16px -8px;
    padding: 12px 16px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border-bottom: 0;
  }

  .table-responsive-stack td.includes-cell::before {
    margin-bottom: 6px;
    color: var(--navy-700);
  }
}

/* Tablet: allow horizontal scroll with nice styling */
@media (min-width: 769px) and (max-width: 1024px) {
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-wrap table {
    min-width: 640px;
  }
}