/* ============================================================
   PENGUMUMAN KELULUSAN MA — Premium Islamic Educational Theme
   Aesthetic: Refined Arabesque × Modern Dashboard Luxury
   Palette: Deep Emerald · Warm Gold · Ivory · Obsidian
   Fonts: Cormorant Garamond (display) × DM Sans (body)
   ============================================================ */

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

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  /* Emerald palette */
  --em-950: #021a08;
  --em-900: #052e12;
  --em-800: #0a4a1e;
  --em-700: #0f6429;
  --em-600: #167d34;
  --em-500: #1e9940;
  --em-400: #30b857;
  --em-300: #5dd07c;
  --em-200: #a3e8b5;
  --em-100: #d6f5df;
  --em-50:  #edfaf2;

  /* Gold palette */
  --gd-900: #3d2800;
  --gd-800: #6b4500;
  --gd-700: #9a6300;
  --gd-600: #c47f00;
  --gd-500: #e89c00;
  --gd-400: #f5b619;
  --gd-300: #fdd04d;
  --gd-200: #fee89a;
  --gd-100: #fff5cc;
  --gd-50:  #fffce8;

  /* Neutral — warm ivory cast */
  --n-950: #0c0f0c;
  --n-900: #161a16;
  --n-800: #252a25;
  --n-700: #3a413a;
  --n-600: #535c53;
  --n-500: #6e796e;
  --n-400: #8f9c8f;
  --n-300: #b4beb4;
  --n-200: #d5dbd5;
  --n-100: #eaeeea;
  --n-50:  #f5f7f5;
  --n-0:   #fafcfa;
  --white: #ffffff;

  /* Semantic */
  --danger:       #d92b3a;
  --danger-light: #fde8ea;
  --info:         #1a6fa8;
  --info-light:   #dbeeff;
  --success:      var(--em-700);
  --success-light:var(--em-100);
  --warning:      var(--gd-600);
  --warning-light:var(--gd-100);

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Spacing scale */
  --s1: 4px;  --s2: 8px;  --s3: 12px;  --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px;  --s8: 48px;

  /* Radii */
  --r-xs: 4px;   --r-sm: 8px;  --r-md: 12px;
  --r-lg: 18px;  --r-xl: 26px; --r-pill: 999px;

  /* Elevation */
  --elev-1: 0 1px 4px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --elev-2: 0 4px 14px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --elev-3: 0 10px 32px rgba(0,0,0,.11), 0 4px 12px rgba(0,0,0,.06);
  --elev-4: 0 24px 64px rgba(0,0,0,.16), 0 8px 24px rgba(0,0,0,.09);
  --elev-glow-em: 0 4px 24px rgba(15,100,41,.28);
  --elev-glow-gd: 0 4px 24px rgba(196,127,0,.32);

  /* Transitions */
  --t-fast:   150ms cubic-bezier(.4,0,.2,1);
  --t-normal: 240ms cubic-bezier(.4,0,.2,1);
  --t-slow:   400ms cubic-bezier(.4,0,.2,1);
  --t-spring: 360ms cubic-bezier(.34,1.56,.64,1);
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--n-50);
  color: var(--n-800);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--em-700); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--em-500); }
img { max-width: 100%; display: block; }

/* ── TYPOGRAPHY ──────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--em-900);
  line-height: 1.25;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   ADMIN LAYOUT
═══════════════════════════════════════════════════════════ */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: 256px;
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  /* Rich layered background */
  background:
    linear-gradient(180deg, var(--em-950) 0%, var(--em-900) 45%, #041c0c 100%);
  /* Subtle geometric texture via pseudo — done with box-shadow trick */
  border-right: 1px solid rgba(255,255,255,.04);
  transition: transform var(--t-slow);
}

/* Arabesque-inspired decorative top strip */
.sidebar::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg,
    transparent, var(--gd-400) 20%, var(--gd-300) 50%, var(--gd-400) 80%, transparent);
  flex-shrink: 0;
}

.sidebar-header {
  padding: var(--s6) var(--s5) var(--s5);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.sidebar-logo-icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  background: linear-gradient(145deg, var(--gd-400), var(--gd-600));
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: var(--elev-glow-gd), inset 0 1px 0 rgba(255,255,255,.25);
}

.sidebar-logo-text .school-name {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  letter-spacing: .01em;
}
.sidebar-logo-text .school-sub {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gd-300);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: var(--s4) var(--s3);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-section-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
  padding: var(--s4) var(--s3) var(--s2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 9px var(--s3);
  border-radius: var(--r-sm);
  color: rgba(255,255,255,.65);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--t-fast);
  cursor: pointer;
  position: relative;
}

.nav-item:hover {
  background: rgba(255,255,255,.07);
  color: var(--white);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--gd-600) 0%, var(--gd-500) 100%);
  color: var(--white);
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(196,127,0,.4), inset 0 1px 0 rgba(255,255,255,.2);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--gd-300);
  border-radius: 0 2px 2px 0;
}

.nav-icon { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }

.sidebar-footer {
  padding: var(--s4) var(--s3);
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 10px var(--s3);
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.06);
}

.user-avatar {
  width: 32px; height: 32px;
  background: linear-gradient(145deg, var(--gd-400), var(--gd-600));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.user-info .user-name {
  font-size: 12.5px; font-weight: 600; color: var(--white); line-height: 1.2;
}
.user-info .user-role {
  font-size: 10px; color: var(--gd-300); font-weight: 500;
}

.btn-logout {
  display: flex; align-items: center; gap: var(--s2);
  width: 100%;
  padding: 9px var(--s3);
  border-radius: var(--r-sm);
  background: rgba(217,43,58,.12);
  border: 1px solid rgba(217,43,58,.2);
  color: #ff8a8a;
  font-size: 13px; font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--t-fast);
}
.btn-logout:hover {
  background: rgba(217,43,58,.22);
  color: #ffb0b0;
}

/* ── MAIN CONTENT ────────────────────────────────────────── */
.main-content {
  margin-left: 256px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin var(--t-slow);
}

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
  height: 60px;
  background: var(--white);
  border-bottom: 1px solid var(--n-100);
  padding: 0 var(--s7);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 0 var(--n-100), 0 2px 8px rgba(0,0,0,.04);
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--em-900);
  letter-spacing: -.01em;
}

.topbar-right { display: flex; align-items: center; gap: var(--s3); }

.topbar-badge {
  background: var(--em-50);
  color: var(--em-700);
  border: 1px solid var(--em-200);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
}

/* ── PAGE CONTENT ────────────────────────────────────────── */
.page-content {
  padding: var(--s7);
  flex: 1;
}

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--r-lg);
  border: 1px solid var(--n-100);
  box-shadow: var(--elev-1);
  overflow: hidden;
  transition: box-shadow var(--t-normal);
}
.card:hover { box-shadow: var(--elev-2); }

.card-header {
  padding: var(--s5) var(--s6);
  border-bottom: 1px solid var(--n-100);
  display: flex; align-items: center; justify-content: space-between;
  /* Subtle left accent */
  background: linear-gradient(90deg, rgba(15,100,41,.03) 0%, transparent 40%);
}

.card-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--em-900);
  letter-spacing: -.01em;
}

.card-body { padding: var(--s6); }

/* ── STAT CARDS ──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--s5);
  margin-bottom: var(--s7);
}

.stat-card {
  background: var(--white);
  border-radius: var(--r-lg);
  border: 1px solid var(--n-100);
  padding: var(--s6) var(--s6);
  position: relative;
  overflow: hidden;
  transition: transform var(--t-normal), box-shadow var(--t-normal);
  cursor: default;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--elev-3);
}

/* Decorative circle accent */
.stat-card::after {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  opacity: .07;
  transition: transform var(--t-slow);
}
.stat-card:hover::after { transform: scale(1.15); }

.stat-card.green::after   { background: var(--em-500); }
.stat-card.gold::after    { background: var(--gd-400);  }
.stat-card.red::after     { background: var(--danger);  }
.stat-card.blue::after    { background: var(--info);    }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: var(--s4);
}
.stat-card.green .stat-icon { background: var(--em-100);       color: var(--em-700); }
.stat-card.gold  .stat-icon { background: var(--gd-100);       color: var(--gd-700); }
.stat-card.red   .stat-icon { background: var(--danger-light);  color: var(--danger); }
.stat-card.blue  .stat-icon { background: var(--info-light);    color: var(--info);   }

.stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -.02em;
}
.stat-card.green .stat-value { color: var(--em-800); }
.stat-card.gold  .stat-value { color: var(--gd-700); }
.stat-card.red   .stat-value { color: var(--danger); }
.stat-card.blue  .stat-value { color: var(--info);   }

.stat-label {
  font-size: 13px;
  color: var(--n-500);
  font-weight: 500;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer; border: none;
  transition: all var(--t-normal);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

/* Ripple shimmer on hover */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.15), transparent 60%);
  opacity: 0;
  transition: opacity var(--t-fast);
}
.btn:hover::after { opacity: 1; }

.btn-primary {
  background: linear-gradient(145deg, var(--em-700), var(--em-600));
  color: var(--white);
  box-shadow: 0 2px 10px rgba(15,100,41,.3), inset 0 1px 0 rgba(255,255,255,.15);
}
.btn-primary:hover {
  background: linear-gradient(145deg, var(--em-800), var(--em-700));
  box-shadow: 0 4px 18px rgba(15,100,41,.4);
  color: var(--white);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-gold {
  background: linear-gradient(145deg, var(--gd-500), var(--gd-600));
  color: var(--white);
  box-shadow: 0 2px 10px rgba(196,127,0,.3), inset 0 1px 0 rgba(255,255,255,.2);
}
.btn-gold:hover {
  box-shadow: 0 4px 18px rgba(196,127,0,.45);
  transform: translateY(-1px);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--em-700);
  border: 1.5px solid var(--em-200);
  box-shadow: none;
}
.btn-outline:hover {
  background: var(--em-50);
  border-color: var(--em-400);
  color: var(--em-800);
}

.btn-danger {
  background: linear-gradient(145deg, var(--danger), #b71c2b);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(217,43,58,.25);
}
.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(217,43,58,.35);
  color: var(--white);
}

.btn-sm  { padding: 6px 13px; font-size: 12.5px; }
.btn-lg  { padding: 13px 28px; font-size: 15.5px; }
.btn-icon{ padding: 8px; border-radius: var(--r-xs); }
.w-full  { width: 100%; justify-content: center; }

/* ── TABLES ──────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

thead {
  background: linear-gradient(90deg, var(--em-900) 0%, var(--em-800) 100%);
}
thead th {
  padding: 13px var(--s5);
  text-align: left;
  color: rgba(255,255,255,.9);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--n-100);
  transition: background var(--t-fast);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--em-50); }
tbody td {
  padding: 12px var(--s5);
  color: var(--n-700);
  vertical-align: middle;
}

/* ── FORMS ───────────────────────────────────────────────── */
.form-group { margin-bottom: var(--s5); }

label {
  display: block;
  font-size: 12.5px; font-weight: 700;
  color: var(--em-800);
  margin-bottom: 6px;
  letter-spacing: .2px;
  text-transform: uppercase;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], input[type="datetime-local"],
select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--n-200);
  border-radius: var(--r-sm);
  font-size: 14px; font-family: var(--font-body);
  color: var(--n-900);
  background: var(--white);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--em-500);
  box-shadow: 0 0 0 3px rgba(30,153,64,.12);
}
input::placeholder { color: var(--n-400); }

input[type="file"] {
  width: 100%; padding: var(--s3);
  border: 2px dashed var(--n-200);
  border-radius: var(--r-sm);
  cursor: pointer; background: var(--n-50);
  font-size: 13px; transition: all var(--t-fast);
  font-family: var(--font-body);
}
input[type="file"]:hover {
  border-color: var(--em-400); background: var(--em-50);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s4);
}
.form-hint { font-size: 11.5px; color: var(--n-400); margin-top: 5px; }

/* ── ALERTS ──────────────────────────────────────────────── */
.alert {
  padding: 12px var(--s5);
  border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 500;
  display: flex; align-items: flex-start; gap: var(--s3);
  margin-bottom: var(--s5);
  border: 1px solid transparent;
}
.alert-success {
  background: var(--em-50); color: var(--em-800);
  border-color: var(--em-200);
  border-left: 4px solid var(--em-500);
}
.alert-danger {
  background: var(--danger-light); color: #7f1d1d;
  border-color: rgba(217,43,58,.2);
  border-left: 4px solid var(--danger);
}
.alert-warning {
  background: var(--gd-50); color: var(--gd-800);
  border-color: var(--gd-200);
  border-left: 4px solid var(--gd-500);
}
.alert-info {
  background: var(--info-light); color: #0c3d6b;
  border-color: rgba(26,111,168,.2);
  border-left: 4px solid var(--info);
}

/* ── BADGES ──────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 700; letter-spacing: .3px;
}
.badge-success   { background: var(--em-100); color: var(--em-700); border: 1px solid var(--em-200); }
.badge-danger    { background: var(--danger-light); color: #7f1d1d; border: 1px solid rgba(217,43,58,.2); }
.badge-warning   { background: var(--gd-100); color: var(--gd-700); border: 1px solid var(--gd-200); }
.badge-secondary { background: var(--n-100); color: var(--n-600); border: 1px solid var(--n-200); }

/* ── SEARCH BAR ──────────────────────────────────────────── */
.search-bar {
  display: flex; align-items: center;
  border: 1.5px solid var(--n-200);
  border-radius: var(--r-sm);
  overflow: hidden; background: var(--white);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.search-bar:focus-within {
  border-color: var(--em-500);
  box-shadow: 0 0 0 3px rgba(30,153,64,.1);
}
.search-bar input {
  border: none; box-shadow: none; padding: 9px 14px; flex: 1; font-size: 13.5px;
}
.search-bar input:focus { box-shadow: none; border: none; }
.search-icon { padding: 0 12px; color: var(--n-400); font-size: 15px; }

/* ── PAGINATION ──────────────────────────────────────────── */
.pagination {
  display: flex; gap: 4px; justify-content: center;
  padding: var(--s5) 0 var(--s2);
}
.page-btn {
  padding: 7px 13px; border-radius: var(--r-xs);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--n-200);
  background: var(--white); color: var(--n-600);
  transition: all var(--t-fast);
}
.page-btn:hover { background: var(--em-50); border-color: var(--em-300); color: var(--em-700); }
.page-btn.active { background: var(--em-700); color: var(--white); border-color: var(--em-700); }

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(5,22,10,.6);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: var(--s5);
  backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-normal), visibility var(--t-normal);
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--white);
  border-radius: var(--r-xl);
  max-width: 540px; width: 100%;
  box-shadow: var(--elev-4);
  transform: scale(.94) translateY(12px);
  transition: transform var(--t-spring);
  max-height: 90vh; overflow-y: auto;
  border: 1px solid var(--n-100);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }

.modal-header {
  padding: var(--s5) var(--s6);
  border-bottom: 1px solid var(--n-100);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(90deg, rgba(15,100,41,.04), transparent);
}
.modal-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600; color: var(--em-900);
}
.modal-close {
  width: 32px; height: 32px; border-radius: var(--r-xs);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; background: var(--n-100); color: var(--n-600);
  border: none; font-size: 16px; transition: all var(--t-fast);
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); }

.modal-body { padding: var(--s6); }
.modal-footer {
  padding: var(--s4) var(--s6);
  border-top: 1px solid var(--n-100);
  display: flex; justify-content: flex-end; gap: var(--s3);
  background: var(--n-50);
}

/* ── IMPORT ZONE ─────────────────────────────────────────── */
.import-zone {
  border: 2px dashed var(--em-300);
  border-radius: var(--r-lg);
  padding: var(--s7);
  text-align: center;
  background: var(--em-50);
  cursor: pointer;
  transition: all var(--t-normal);
}
.import-zone:hover {
  border-color: var(--em-500);
  background: var(--em-100);
  transform: scale(1.01);
}
.import-icon { font-size: 38px; margin-bottom: var(--s3); display: block; }

/* ── COUNTDOWN ───────────────────────────────────────────── */
.countdown-box {
  display: flex; gap: var(--s5);
  justify-content: center; flex-wrap: wrap;
}
.countdown-unit { text-align: center; }
.countdown-number {
  font-family: var(--font-display);
  font-size: 40px; font-weight: 700;
  color: var(--em-800); line-height: 1;
  background: var(--em-50);
  border: 2px solid var(--em-200);
  border-radius: var(--r-md);
  padding: 10px 14px;
  display: block; min-width: 72px;
  box-shadow: var(--elev-1);
}
.countdown-label {
  font-size: 10.5px; font-weight: 700;
  color: var(--n-500); text-transform: uppercase;
  letter-spacing: 1.2px; margin-top: 8px;
}

/* ── MISC UTILITIES ──────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--n-100); margin: var(--s5) 0; }
.text-center  { text-align: center; }
.text-muted   { color: var(--n-500); font-size: 13px; }
.font-bold    { font-weight: 700; }
.mt-1 { margin-top: var(--s2); } .mt-2 { margin-top: var(--s4); } .mt-3 { margin-top: var(--s6); }
.mb-1 { margin-bottom: var(--s2); } .mb-2 { margin-bottom: var(--s4); } .mb-3 { margin-bottom: var(--s6); }
.fade-in { animation: fadeUp .35s ease both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  background: var(--em-950);
  overflow: hidden;
  position: relative;
}

/* Geometric arabesque bg */
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60% 80% at 25% 40%, rgba(30,153,64,.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 75% 70%, rgba(196,127,0,.1) 0%, transparent 55%);
  pointer-events: none;
}

/* Decorative grid lines */
.login-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.login-left {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--s8) var(--s7);
  position: relative; z-index: 1;
}

.login-emblem {
  width: 88px; height: 88px;
  background: linear-gradient(145deg, var(--gd-400), var(--gd-600));
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; margin-bottom: var(--s6);
  box-shadow: var(--elev-glow-gd), inset 0 2px 0 rgba(255,255,255,.3);
  animation: floatEmb 4s ease-in-out infinite;
}
@keyframes floatEmb {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}

.login-branding { text-align: center; max-width: 400px; }
.login-branding h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 700; color: var(--white);
  line-height: 1.15; letter-spacing: -.02em;
}
.login-branding .gold-word { color: var(--gd-300); }
.login-branding p {
  color: rgba(255,255,255,.55); font-size: 15px;
  line-height: 1.7; margin-top: var(--s3); max-width: 340px;
}

.login-features {
  display: flex; gap: var(--s5); margin-top: var(--s7); flex-wrap: wrap; justify-content: center;
}
.login-feature-pill {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  color: rgba(255,255,255,.7);
  font-size: 12.5px; font-weight: 500;
}

.login-right {
  width: 420px; flex-shrink: 0;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  padding: var(--s8) var(--s7);
  position: relative; z-index: 1;
  box-shadow: -32px 0 80px rgba(0,0,0,.25);
}

/* Decorative border-top on right panel */
.login-right::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--em-600), var(--gd-400), var(--em-600));
}

.login-form-wrapper { width: 100%; }
.login-form-title {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700;
  color: var(--em-900); margin-bottom: 4px;
}
.login-form-sub {
  font-size: 13.5px; color: var(--n-500); margin-bottom: var(--s7);
}

/* Input with icon inside */
.input-with-icon {
  position: relative;
}
.input-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--n-400); font-size: 16px;
  pointer-events: none;
}
.input-with-icon input { padding-left: 38px; }

/* ═══════════════════════════════════════════════════════════
   STUDENT PAGE
═══════════════════════════════════════════════════════════ */
.student-page {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--em-950);
  position: relative;
  overflow-x: hidden;
}

/* Layered background */
.student-page::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 10% 20%, rgba(30,153,64,.2) 0%, transparent 55%),
    radial-gradient(ellipse 60% 60% at 90% 80%, rgba(196,127,0,.1) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(15,100,41,.15) 0%, transparent 60%);
  pointer-events: none;
}

/* Subtle grid */
.student-page::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.student-header {
  padding: 48px var(--s5) var(--s7);
  text-align: center;
  position: relative; z-index: 1;
}

.school-badge {
  display: inline-flex; align-items: center; gap: var(--s3);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-pill);
  padding: 8px 20px;
  color: var(--gd-300);
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  margin-bottom: var(--s5);
}

.student-header h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 52px);
  font-weight: 700; color: var(--white);
  line-height: 1.15; letter-spacing: -.02em;
}
.student-header h1 em {
  font-style: italic; color: var(--gd-300);
}
.student-header p {
  color: rgba(255,255,255,.55); font-size: 15px; margin-top: var(--s3);
}

.student-main {
  flex: 1;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 0 var(--s5) var(--s7);
  position: relative; z-index: 1;
}

.student-card {
  width: 100%; max-width: 520px;
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: 0 32px 80px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.15);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
}

.student-card-header {
  background: linear-gradient(135deg, var(--em-800) 0%, var(--em-700) 100%);
  padding: var(--s5) var(--s7);
  display: flex; align-items: center; gap: var(--s4);
  position: relative; overflow: hidden;
}
/* Gold strip at top */
.student-card-header::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gd-400), transparent);
}

.student-card-icon {
  width: 44px; height: 44px;
  background: rgba(255,255,255,.15);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  backdrop-filter: blur(8px);
}
.student-card-header h2 {
  font-size: 17px; font-weight: 700;
  color: var(--white); font-family: var(--font-body);
}
.student-card-header p {
  font-size: 12px; color: rgba(255,255,255,.65); margin: 0;
}

.student-card-body { padding: var(--s7); }

/* ── Result Card ──────────────────────────────────────────── */
.result-card {
  border-radius: var(--r-lg);
  overflow: hidden; margin-top: var(--s5);
  animation: slideUp .4s cubic-bezier(.34,1.1,.64,1) both;
  border: 1px solid var(--n-100);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.result-header {
  padding: var(--s5) var(--s6);
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: var(--s3);
}
.result-header.lulus {
  background: linear-gradient(135deg, #064e27, #0a7a3d);
}
.result-header.tidak-lulus {
  background: linear-gradient(135deg, #5c1a1a, #831f1f);
}

.result-status {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 700; color: var(--white);
}
.result-sub {
  font-size: 12px; color: rgba(255,255,255,.65); margin-top: 2px;
}
.result-emoji {
  font-size: 40px;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,.25));
}

.result-body {
  background: var(--n-50); padding: var(--s5) var(--s6);
}
.result-info-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--n-100);
}
.result-info-item:last-child { border-bottom: none; }
.result-info-label { font-size: 12.5px; color: var(--n-500); font-weight: 500; }
.result-info-value { font-size: 13.5px; font-weight: 700; color: var(--n-800); text-align: right; }

.congrats-box {
  background: linear-gradient(135deg, var(--gd-50), var(--gd-100));
  border: 1.5px solid var(--gd-200);
  border-radius: var(--r-md);
  padding: var(--s5) var(--s6);
  text-align: center; margin: var(--s5) var(--s5) 0;
}
.congrats-box p {
  font-size: 13.5px; color: var(--gd-800);
  font-weight: 500; line-height: 1.65;
}

/* ── Countdown student ────────────────────────────────────── */
.countdown-number-student {
  font-family: var(--font-display);
  font-size: clamp(36px, 8vw, 62px); font-weight: 700;
  color: var(--gd-400);
  background: rgba(255,255,255,.07);
  border: 2px solid rgba(245,182,25,.25);
  border-radius: var(--r-md);
  padding: 12px 18px; min-width: 90px;
  display: block; text-align: center;
  backdrop-filter: blur(6px);
}

/* ── Student Footer ───────────────────────────────────────── */
.student-footer {
  text-align: center;
  padding: var(--s6) var(--s5);
  color: rgba(255,255,255,.3);
  font-size: 12px;
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,.06);
}
.student-footer a {
  color: rgba(255,255,255,.2);
  font-size: 11px;
  transition: color var(--t-fast);
}
.student-footer a:hover { color: rgba(255,255,255,.45); }

/* ═══════════════════════════════════════════════════════════
   SKL PRINT
═══════════════════════════════════════════════════════════ */
@media print {
  body { background: white !important; }
  .no-print { display: none !important; }
  .skl-page { page-break-inside: avoid; }
}

.skl-container {
  max-width: 794px; margin: 30px auto;
  background: white;
  box-shadow: var(--elev-3);
}

.skl-page {
  width: 794px; min-height: 1123px;
  padding: 40px 60px;
  font-family: 'Times New Roman', Times, serif;
  background: white; position: relative;
}

.skl-border {
  position: absolute; inset: 12px;
  border: 3px solid var(--em-800);
  pointer-events: none;
}
.skl-border::after {
  content: '';
  position: absolute; inset: 5px;
  border: 1px solid var(--gd-500);
  pointer-events: none;
}

.skl-header {
  display: flex; align-items: center; gap: var(--s5);
  border-bottom: 3px double var(--em-800);
  padding-bottom: var(--s4); margin-bottom: var(--s5);
}
.skl-logo { width: 80px; height: 80px; object-fit: contain; }
.skl-logo-placeholder {
  width: 80px; height: 80px;
  background: var(--em-100); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; flex-shrink: 0;
}
.skl-kop { text-align: center; flex: 1; }
.skl-kop h2 {
  font-size: 20px; font-weight: bold;
  color: var(--em-900); font-family: 'Times New Roman', serif;
  margin-bottom: 2px;
}
.skl-kop p { font-size: 12px; color: #444; margin: 1px 0; }

.skl-title { text-align: center; margin: var(--s5) 0; }
.skl-title h3 {
  font-size: 22px; font-weight: bold;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--em-900); text-decoration: underline;
  font-family: 'Times New Roman', serif;
}
.skl-title .nomor {
  font-size: 13px; color: #666; margin-top: 4px;
  font-family: 'Times New Roman', serif;
}

.skl-intro, .skl-isi {
  font-size: 13px; text-align: justify;
  line-height: 1.8; margin-bottom: var(--s4);
  font-family: 'Times New Roman', serif;
}

.skl-data { margin: var(--s4) 0 var(--s5); }
.skl-data table {
  width: 100%; font-size: 13px; border-collapse: collapse;
  font-family: 'Times New Roman', serif;
}
.skl-data td {
  padding: 5px 8px 5px 0; vertical-align: top;
  border: none; background: none; color: #000;
}
.skl-data td:first-child { width: 180px; }
.skl-data td:nth-child(2) { width: 10px; font-weight: bold; }
.skl-data td:last-child { font-weight: bold; }

.skl-ttd { display: flex; justify-content: flex-end; margin-top: var(--s7); }
.skl-ttd-box { text-align: center; min-width: 220px; }
.skl-ttd-box p { font-size: 13px; font-family: 'Times New Roman', serif; }
.skl-ttd-space {
  height: 80px; display: flex;
  align-items: center; justify-content: center;
}
.skl-ttd-space img { max-height: 75px; max-width: 160px; object-fit: contain; }
.skl-ttd-nama {
  font-weight: bold; font-size: 14px;
  font-family: 'Times New Roman', serif;
  border-top: 1px solid #000; padding-top: 4px;
}
.skl-ttd-nip { font-size: 12px; font-family: 'Times New Roman', serif; }

/* ── Quick menu hover cards ───────────────────────────────── */
.quick-menu-item {
  display: flex; flex-direction: column; align-items: center;
  padding: var(--s5) var(--s4);
  border-radius: var(--r-md);
  border: 1.5px solid var(--n-100);
  text-align: center; color: var(--n-700);
  font-size: 13px; font-weight: 600;
  transition: all var(--t-normal);
  text-decoration: none;
  background: var(--white);
}
.quick-menu-item:hover {
  border-color: var(--em-300);
  background: var(--em-50);
  color: var(--em-800);
  transform: translateY(-3px);
  box-shadow: var(--elev-2);
}
.quick-menu-item .qm-icon {
  font-size: 28px; margin-bottom: var(--s3);
  transition: transform var(--t-spring);
}
.quick-menu-item:hover .qm-icon { transform: scale(1.15); }

/* ── Code snippet styling ─────────────────────────────────── */
code {
  background: var(--em-50);
  color: var(--em-700);
  padding: 2px 7px;
  border-radius: var(--r-xs);
  font-size: 12px;
  font-family: 'Menlo', 'Consolas', monospace;
  border: 1px solid var(--em-200);
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--n-100); }
::-webkit-scrollbar-thumb { background: var(--n-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--n-400); }

/* ── Shimmer animation for stat cards ────────────────────── */
.gold-shimmer { position: relative; overflow: hidden; }
.gold-shimmer::before {
  content: '';
  position: absolute; top: -50%; left: -80%;
  width: 50%; height: 200%;
  background: linear-gradient(105deg, transparent, rgba(245,182,25,.12), transparent);
  transform: skewX(-20deg);
  animation: shimmer 3.5s infinite;
}
@keyframes shimmer {
  0%   { left: -80%; }
  100% { left: 180%; }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .login-left { padding: var(--s7) var(--s5); }
  .login-right { width: 380px; padding: var(--s7) var(--s6); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--elev-4);
  }
  .main-content { margin-left: 0; }
  .topbar { padding: 0 var(--s5); }
  .page-content { padding: var(--s5); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s4); }
  .form-row { grid-template-columns: 1fr; }
  .skl-page { width: 100%; padding: var(--s6) var(--s5); }
  .skl-container { margin: 0; }

  /* Login stacked */
  .login-page { flex-direction: column; }
  .login-left { padding: var(--s7) var(--s5) var(--s6); }
  .login-right { width: 100%; padding: var(--s7) var(--s5); }
}

@media (max-width: 500px) {
  .stats-grid { grid-template-columns: 1fr; }
  .countdown-box { gap: var(--s3); }
  .countdown-number-student { font-size: 32px; min-width: 72px; padding: 10px 12px; }
  .student-header h1 { font-size: 28px; }
}
