/**
 * ==============================================================================
 * SIM PESANTREN - TEMA ISLAMI MODERN RESMI
 * Lembaga: Pondok Pesantren Raudhatul Islam Attohiriyah
 * Alamat : Kp. Simpang Jambe, Desa Sukapura, Kec. Cidaun, Kab. Cianjur
 * ==============================================================================
 * Warna Utama Resmi : Hijau Emerald / Teal (#004D40)
 * Warna Aksen Resmi : Emas / Kuning (#D4AF37)
 * ==============================================================================
 */

:root {
  /* ==========================================================================
   * 1. IDENTITAS WARNA RESMI PESANTREN (EMERALD/TEAL & GOLD/KUNING)
   * ========================================================================== */
  --emerald-primary: #004D40;       /* Warna Utama Resmi (#004D40) */
  --emerald-deep: #00332a;          /* Hijau botol pekat */
  --emerald-darkest: #001f19;       /* Deepest obsidian teal */
  --emerald-medium: #00695c;        /* Teal medium seimbang */
  --emerald-vibrant: #00796b;       /* Teal vibrant */
  --emerald-bright: #00897b;        /* Teal cerah highlight */
  --emerald-light: #26a69a;         /* Teks & ikon cerah */
  --emerald-soft: #80cbc4;          /* Teks lembut */
  --emerald-surface: rgba(0, 77, 64, 0.35);
  --emerald-surface-hover: rgba(0, 105, 92, 0.5);
  --emerald-glow: rgba(0, 137, 123, 0.28);
  --emerald-glow-strong: rgba(0, 150, 136, 0.45);

  --gold-primary: #D4AF37;          /* Warna Aksen Emas Resmi (#D4AF37) */
  --gold-hover: #e5c158;            /* Emas terang saat hover */
  --gold-bright: #f59e0b;           /* Emas amber hangat */
  --gold-light: #fef3c7;            /* Emas sangat lembut */
  --gold-dark: #b45309;             /* Emas tua berbayang */
  --gold-border: rgba(212, 175, 55, 0.35);      /* Border gold tipis elegan */
  --gold-border-bright: rgba(212, 175, 55, 0.7); /* Border gold saat fokus/aktif */
  --gold-bg-badge: rgba(212, 175, 55, 0.14);     /* Background transparan badge gold */
  --gold-glow: rgba(212, 175, 55, 0.35);         /* Pendaran cahaya emas */
  --gold-gradient: linear-gradient(135deg, #D4AF37 0%, #f59e0b 50%, #c59b27 100%);
  --gold-gradient-hover: linear-gradient(135deg, #e5c158 0%, #fbbf24 50%, #D4AF37 100%);
  --gold-gradient-soft: linear-gradient(135deg, rgba(212, 175, 55, 0.18) 0%, rgba(0, 77, 64, 0.25) 100%);

  /* ==========================================================================
   * 2. LATAR BELAKANG (KONTRAS TINGGI NAMUN SEJUK & LEMBUT DI MATA)
   * ========================================================================== */
  --bg-main: #001210;
  --bg-gradient: radial-gradient(circle at 85% 8%, #00332a 0%, #001a16 48%, #000c0a 100%);
  --bg-sidebar: rgba(0, 24, 20, 0.94);
  --bg-topbar: rgba(0, 26, 22, 0.88);
  --bg-card: rgba(0, 36, 30, 0.82);
  --bg-card-hover: rgba(0, 48, 40, 0.92);
  --bg-card-elevated: rgba(0, 42, 35, 0.95);
  --bg-input: rgba(0, 18, 15, 0.75);

  /* ==========================================================================
   * 3. TIPOGRAFI & WARNA TEKS
   * ========================================================================== */
  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #8397a7;
  --text-gold: #f3d069;
  --text-emerald: #26a69a;

  /* ==========================================================================
   * 4. STATUS BADGES
   * ========================================================================== */
  --status-hadir-bg: rgba(0, 137, 123, 0.22);
  --status-hadir-text: #26a69a;
  --status-hadir-border: rgba(0, 137, 123, 0.55);
  
  --status-late-bg: rgba(245, 158, 11, 0.2);
  --status-late-text: #fbbf24;
  --status-late-border: rgba(245, 158, 11, 0.55);
  
  --status-danger-bg: rgba(239, 68, 68, 0.2);
  --status-danger-text: #f87171;
  --status-danger-border: rgba(239, 68, 68, 0.45);

  /* ==========================================================================
   * 5. CORNER RADIUS & BAYANGAN
   * ========================================================================== */
  --radius-pill: 9999px;
  --radius-2xl: 22px;               /* Sudut melengkung halus banner & hero */
  --radius-xl: 18px;                /* Sudut melengkung halus kartu utama */
  --radius-lg: 14px;                /* Sudut kartu reguler & logo slot */
  --radius-md: 10px;                /* Tombol, pill, & input */
  --radius-sm: 6px;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-gold-thin: 1px solid var(--gold-border);
  --border-emerald-thin: 1px solid rgba(0, 137, 123, 0.35);
  
  --shadow-soft: 0 10px 30px -8px rgba(0, 0, 0, 0.55), 0 4px 12px -2px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 14px 34px -10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 77, 64, 0.15);
  --shadow-gold: 0 8px 25px -4px rgba(212, 175, 55, 0.32);
  --shadow-emerald: 0 8px 25px -4px rgba(0, 77, 64, 0.4);
  --shadow-elevated: 0 20px 45px -12px rgba(0, 0, 0, 0.7);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* ==========================================================================
 * LAYOUT STRUKTUR
 * ========================================================================== */
.app-container {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* ==========================================================================
 * SIDEBAR BRANDING & LOGO SLOT (.PNG)
 * ========================================================================== */
.sidebar {
  width: 290px;
  background: var(--bg-sidebar);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--gold-border);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex-shrink: 0;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.45);
}

/* Slot Logo Pesantren .png di Pojok Atas Sidebar */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gold-border);
}

.brand-logo-slot {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(0, 77, 64, 0.85), rgba(0, 105, 92, 0.5));
  border: 1.5px solid var(--gold-border-bright);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.3), inset 0 0 10px rgba(0, 77, 64, 0.3);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.brand-logo-slot:hover {
  transform: scale(1.06);
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.5);
  border-color: var(--gold-hover);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-info h2 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.8px;
  background: linear-gradient(to right, #ffffff, var(--gold-hover));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-info p {
  font-size: 12px;
  color: var(--gold-hover);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.pesantren-tag {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--emerald-light);
  letter-spacing: 0.3px;
  display: inline-block;
  margin-top: 2px;
}

/* ==========================================================================
 * NAVIGASI MENU SIDEBAR
 * ========================================================================== */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.25s ease;
  position: relative;
}

.nav-item:hover {
  background: rgba(0, 77, 64, 0.28);
  color: #fff;
  border-color: rgba(212, 175, 55, 0.25);
  transform: translateX(4px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(0, 77, 64, 0.6) 0%, rgba(0, 51, 42, 0.3) 100%);
  color: #fff;
  border: 1px solid var(--gold-border-bright);
  border-left: 3.5px solid var(--gold-primary);
  box-shadow: var(--shadow-emerald), inset 0 0 15px rgba(0, 137, 123, 0.15);
}

.nav-item.active .label {
  color: var(--gold-light);
  font-weight: 700;
}

.nav-item.active .icon {
  filter: drop-shadow(0 0 8px var(--gold-primary));
}

.nav-item .pulse-indicator {
  position: absolute;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-primary);
  animation: radarPulse 1.8s infinite;
}

/* Sidebar Status Card */
.sidebar-status-card {
  background: rgba(0, 36, 30, 0.7);
  border: var(--border-gold-thin);
  padding: 16px;
  border-radius: var(--radius-lg);
  font-size: 12px;
  box-shadow: var(--shadow-soft);
}

.scanner-status-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.online {
  background: var(--emerald-bright);
  box-shadow: 0 0 8px var(--emerald-bright);
  animation: radarPulse 1.5s infinite;
}

.status-desc {
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
  font-size: 11.5px;
}

.audio-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  color: var(--text-secondary);
}

.btn-audio-toggle {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--gold-border);
  color: var(--gold-hover);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-audio-toggle:hover {
  background: var(--gold-gradient);
  color: #0b1a13;
  box-shadow: var(--shadow-gold);
}

/* ==========================================================================
 * MAIN WRAPPER & TOPBAR HEADER
 * ========================================================================== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  background: var(--bg-topbar);
  backdrop-filter: blur(16px);
  border-bottom: var(--border-gold-thin);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.page-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Banner Ucapan Salam Islami di Header Atas */
.islamic-greeting-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 16px;
  background: linear-gradient(135deg, rgba(0, 77, 64, 0.45), rgba(212, 175, 55, 0.15));
  border: var(--border-gold-thin);
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  width: fit-content;
  margin-bottom: 2px;
}

.greeting-icon {
  font-size: 13px;
  color: var(--gold-primary);
}

.greeting-arabic {
  font-family: 'Amiri', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--gold-hover);
  letter-spacing: 0.5px;
  direction: rtl;
  unicode-bidi: isolate;
}

.greeting-dot {
  color: var(--gold-border-bright);
  font-size: 12px;
}

.greeting-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-light);
}

.page-title h1 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #fff;
}

.page-title p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.clock-display {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 6px 14px;
  background: rgba(0, 36, 30, 0.7);
  border: var(--border-gold-thin);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.clock-time {
  font-family: monospace;
  font-size: 16px;
  font-weight: 800;
  color: var(--gold-hover);
  letter-spacing: 1px;
}

.clock-date {
  font-size: 11px;
  color: var(--emerald-light);
}

/* User Profile Pill */
.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  background: linear-gradient(135deg, rgba(0, 77, 64, 0.45), rgba(212, 175, 55, 0.15));
  border: var(--border-gold-thin);
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: all 0.25s ease;
}

.user-profile-pill:hover {
  background: linear-gradient(135deg, rgba(0, 105, 92, 0.6), rgba(212, 175, 55, 0.25));
  border-color: var(--gold-hover);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #001210;
  border: 1.5px solid #fff;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.badge-role {
  font-size: 10px;
  font-weight: 800;
  color: var(--gold-hover);
  letter-spacing: 0.5px;
}

.switch-icon {
  font-size: 14px;
  color: var(--gold-primary);
}

/* ==========================================================================
 * BANNER UCAPAN SALAM HALAMAN UTAMA SCANNER
 * ========================================================================== */
.scanner-welcome-banner {
  background: linear-gradient(135deg, rgba(0, 77, 64, 0.65) 0%, rgba(0, 36, 30, 0.85) 50%, rgba(0, 24, 20, 0.95) 100%);
  border: 1.5px solid var(--gold-border-bright);
  border-radius: var(--radius-2xl);
  padding: 26px 32px;
  text-align: center;
  box-shadow: var(--shadow-card), 0 0 25px rgba(212, 175, 55, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.scanner-welcome-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold-gradient);
}

.banner-bismillah-arabic {
  font-family: 'Amiri', serif;
  font-size: 26px;
  color: var(--gold-hover);
  letter-spacing: 1.5px;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.banner-greeting-arabic {
  font-family: 'Amiri', serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  direction: rtl;
  unicode-bidi: isolate;
}

.banner-institution-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  margin-top: 2px;
}

.banner-tagline {
  font-size: 13px;
  color: var(--emerald-soft);
  max-width: 650px;
}

.banner-address-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 18, 15, 0.6);
  border: var(--border-gold-thin);
  border-radius: var(--radius-pill);
  padding: 6px 18px;
  margin-top: 6px;
  font-size: 12px;
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.banner-address-badge .badge-icon {
  color: var(--gold-primary);
}

/* ==========================================================================
 * CONTENT AREA
 * ========================================================================== */
.content-area {
  padding: 26px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tab-pane {
  display: none;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: flex;
}

/* ==========================================================================
 * KARTU & CARD COMPONENTS (ROUNDED BORDER, SOFT SHADOW, BORDER GOLD TIPIS)
 * ========================================================================== */

/* 1. Session Control Panel */
.scanner-control-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: var(--border-gold-thin);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.select-styled, .input-styled {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  outline: none;
  transition: all 0.25s;
}

.select-styled:focus, .input-styled:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* 2. Hardware Scanner Listener Banner */
.hardware-listener-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(0, 77, 64, 0.45), rgba(0, 26, 22, 0.85));
  border: var(--border-gold-thin);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.radar-box {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-center {
  font-size: 24px;
  z-index: 2;
  filter: drop-shadow(0 0 8px var(--gold-primary));
}

.radar-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid var(--gold-primary);
  border-radius: 50%;
  opacity: 0.6;
  animation: radarSweep 2.2s infinite ease-out;
}

.radar-ring.ring2 {
  animation-delay: 1.1s;
  border-color: var(--emerald-bright);
}

.listener-info {
  flex: 1;
}

.listener-info h3 {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--gold-hover);
  letter-spacing: 0.5px;
}

.listener-info p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.scanner-input-fallback {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hw-buffer-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.manual-input-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  padding: 4px;
  border-radius: var(--radius-md);
  border: var(--border-gold-thin);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.manual-input {
  background: transparent;
  border: none;
  color: #fff;
  padding: 6px 12px;
  font-size: 12.5px;
  width: 210px;
  outline: none;
}

/* 3. Hero Scanner Card (Tampilan Hasil Presensi Interaktif) */
.scan-hero-card {
  min-height: 270px;
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  border: 1.5px solid var(--gold-border);
  border-radius: var(--radius-2xl);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.scan-hero-card.standby {
  background: radial-gradient(circle at center, rgba(0, 77, 64, 0.3) 0%, rgba(0, 20, 16, 0.88) 100%);
  border-color: var(--gold-border);
}

.scan-hero-card.hadir {
  border-color: var(--emerald-bright);
  box-shadow: 0 0 45px rgba(0, 137, 123, 0.35), var(--shadow-card);
  background: radial-gradient(circle at top right, rgba(0, 105, 92, 0.45) 0%, rgba(0, 24, 20, 0.95) 100%);
  animation: heroPulseGreen 0.6s ease;
}

.scan-hero-card.terlambat {
  border-color: var(--gold-bright);
  box-shadow: 0 0 45px rgba(245, 158, 11, 0.35), var(--shadow-card);
  background: radial-gradient(circle at top right, rgba(180, 83, 9, 0.35) 0%, rgba(0, 24, 20, 0.95) 100%);
  animation: heroPulseAmber 0.6s ease;
}

.scan-hero-card.error {
  border-color: var(--status-danger-border);
  box-shadow: 0 0 45px rgba(239, 68, 68, 0.35), var(--shadow-card);
  background: radial-gradient(circle at top right, rgba(153, 27, 27, 0.35) 0%, rgba(0, 24, 20, 0.95) 100%);
}

.hero-standby-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.standby-icon {
  font-size: 52px;
  animation: floatIcon 3.5s infinite ease-in-out;
  filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.35));
}

.hero-standby-view h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.hero-standby-view p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.5;
}

.arabic-bismillah {
  font-family: 'Amiri', serif;
  font-size: 32px;
  color: var(--gold-hover);
  margin-top: 10px;
  letter-spacing: 1.5px;
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* Active Result View */
.hero-result-view {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: slideUp 0.35s ease;
}

.hero-result-view.hidden {
  display: none;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gold-border);
  padding-bottom: 14px;
}

.result-badge {
  font-size: 13px;
  font-weight: 800;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.8px;
}

.result-badge.hadir {
  background: var(--status-hadir-bg);
  color: var(--status-hadir-text);
  border: 1px solid var(--status-hadir-border);
  box-shadow: 0 0 14px rgba(0, 137, 123, 0.3);
}

.result-badge.terlambat {
  background: var(--status-late-bg);
  color: var(--status-late-text);
  border: 1px solid var(--status-late-border);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.3);
}

.result-badge.error {
  background: var(--status-danger-bg);
  color: var(--status-danger-text);
  border: 1px solid var(--status-danger-border);
}

.result-time {
  font-family: monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-hover);
}

.result-body {
  display: flex;
  align-items: center;
  gap: 28px;
}

.santri-photo-wrapper {
  position: relative;
}

.santri-photo {
  width: 104px;
  height: 104px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 2px solid var(--gold-border-bright);
  box-shadow: var(--shadow-gold), var(--shadow-soft);
}

.method-tag {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-main);
  border: 1px solid var(--gold-primary);
  color: var(--gold-hover);
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.santri-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.arabic-greeting {
  font-family: 'Amiri', serif;
  font-size: 24px;
  color: var(--gold-hover);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.santri-name {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.santri-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.chip {
  background: rgba(0, 77, 64, 0.35);
  border: var(--border-gold-thin);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.chip.code {
  font-family: monospace;
  color: var(--gold-hover);
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold-border-bright);
}

.scan-message {
  font-size: 13px;
  color: #e2e8f0;
  margin-top: 4px;
}

/* 4. Quick Simulator Panel */
.simulator-panel {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: var(--border-gold-thin);
  padding: 18px 22px;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-card);
}

.simulator-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-hover);
  letter-spacing: 0.3px;
}

.simulator-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.btn-sim {
  padding: 8px 15px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s;
  background: rgba(0, 77, 64, 0.3);
  color: var(--text-main);
}

.btn-sim:hover {
  transform: translateY(-2px);
}

.btn-sim.rfid {
  border-color: var(--emerald-bright);
  background: rgba(0, 137, 123, 0.18);
  color: var(--emerald-light);
}

.btn-sim.rfid:hover {
  background: rgba(0, 137, 123, 0.35);
  box-shadow: 0 4px 15px rgba(0, 137, 123, 0.35);
}

.btn-sim.barcode {
  border-color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-hover);
}

.btn-sim.barcode:hover {
  background: rgba(212, 175, 55, 0.3);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-sim.unknown {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.btn-sim.unknown:hover {
  background: rgba(239, 68, 68, 0.3);
}

.btn-sim.late-toggle {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--gold-bright);
  color: #fbbf24;
}

/* 5. Metrics Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: var(--border-gold-thin);
  padding: 20px 24px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
}

.metric-card:hover {
  border-color: var(--gold-border-bright);
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated), 0 0 15px rgba(212, 175, 55, 0.15);
}

.metric-info p {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.metric-info h3 {
  font-size: 28px;
  font-weight: 800;
  margin-top: 4px;
  color: #fff;
}

.metric-icon {
  font-size: 34px;
  opacity: 0.9;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.text-success { color: var(--emerald-light) !important; }
.text-warning { color: var(--gold-hover) !important; }

/* 6. Card Sections (Data Table Containers) */
.card-section {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: var(--border-gold-thin);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow-card);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.title-with-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.title-with-badge h2 {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.live-pulse-badge {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  animation: pulseRed 2s infinite;
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-input, .filter-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  outline: none;
  transition: all 0.25s;
}

.search-input { width: 280px; }

.search-input:focus, .filter-select:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* 7. Tables */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: var(--border-gold-thin);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

thead th {
  background: rgba(0, 24, 20, 0.95);
  color: var(--gold-hover);
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gold-border);
  letter-spacing: 0.3px;
}

tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s ease;
}

tbody tr:hover {
  background: var(--bg-card-hover);
}

tbody tr.highlight-new {
  animation: highlightRow 2s ease;
}

tbody td {
  padding: 14px 18px;
  color: #e2e8f0;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-cell-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold-border-bright);
}

/* Status Badges */
.badge-status {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
  letter-spacing: 0.3px;
}

.badge-status.hadir {
  background: var(--status-hadir-bg);
  color: var(--status-hadir-text);
  border: 1px solid var(--status-hadir-border);
}

.badge-status.terlambat {
  background: var(--status-late-bg);
  color: var(--status-late-text);
  border: 1px solid var(--status-late-border);
}

.badge-status.aktif {
  background: rgba(0, 137, 123, 0.2);
  color: var(--emerald-light);
  border: 1px solid rgba(0, 137, 123, 0.45);
}

.badge-status.skorsing {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-status.alumni {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* ==========================================================================
 * TOMBOL-TOMBOL DENGAN AKSEN EMAS / GOLD
 * ========================================================================== */
.btn {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}

/* Tombol Utama (Aksen Emas Mengkilap) */
.btn-primary {
  background: var(--gold-gradient);
  color: #001f19;
  border: 1px solid rgba(255, 235, 140, 0.5);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  background: var(--gold-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.45);
}

.btn-secondary {
  background: rgba(0, 77, 64, 0.35);
  border: var(--border-gold-thin);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(0, 77, 64, 0.6);
  border-color: var(--gold-hover);
  color: var(--gold-hover);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ==========================================================================
 * FOOTER DASHBOARD RESMI LEMBAGA
 * ========================================================================== */
.dashboard-footer {
  margin-top: auto;
  background: var(--bg-topbar);
  border-top: var(--border-gold-thin);
  padding: 22px 32px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-institution {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 50%;
  border: 1.5px solid var(--gold-border-bright);
  padding: 2px;
  background: var(--emerald-primary);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.footer-info h4 {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--gold-hover);
  letter-spacing: 0.3px;
}

.footer-address {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.footer-address .pin-icon {
  color: var(--gold-primary);
}

.footer-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-hadits {
  font-family: 'Amiri', serif;
  font-size: 15px;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}

.footer-copyright {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================================================
 * KOP SURAT RESMI CETAK LAPORAN / KARTU SANTRI (PRINTABLE)
 * ========================================================================== */
.print-official-header {
  display: none; /* Sembunyikan di layar, hanya muncul saat cetak / print preview */
}

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .sidebar, .topbar, .scanner-control-bar, .hardware-listener-banner, .simulator-panel, .btn, .dashboard-footer {
    display: none !important;
  }

  .print-official-header {
    display: block !important;
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 3px double #000;
  }

  .kop-surat {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .kop-logo-img {
    width: 75px;
    height: 75px;
  }

  .kop-details {
    text-align: center;
    flex: 1;
  }

  .kop-details h2 {
    font-size: 18pt;
    font-weight: 800;
    color: #000;
    margin: 0;
  }

  .kop-details .kop-sub {
    font-size: 11pt;
    font-weight: 700;
    color: #333;
    margin: 4px 0;
  }

  .kop-details .kop-alamat {
    font-size: 9.5pt;
    color: #444;
    margin: 0;
  }

  .card-section, .table-wrapper {
    background: #fff !important;
    border: none !important;
    box-shadow: none !important;
  }

  table {
    color: #000 !important;
  }

  thead th {
    background: #eee !important;
    color: #000 !important;
    border: 1px solid #000 !important;
  }

  tbody td {
    border: 1px solid #ccc !important;
    color: #000 !important;
  }
}

/* ==========================================================================
 * RBAC TAB & MATRIKS HAK AKSES
 * ========================================================================== */
.rbac-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.role-matrix-card {
  background: var(--bg-card);
  border: var(--border-gold-thin);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
}

.role-matrix-card:hover {
  border-color: var(--gold-border-bright);
  transform: translateY(-2px);
}

.role-matrix-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gold-border);
}

.role-matrix-header h3 {
  font-size: 14.5px;
  font-weight: 800;
}

.role-matrix-header span {
  font-size: 11px;
  color: var(--text-muted);
}

.role-matrix-header.superadmin h3 { color: var(--gold-hover); }
.role-matrix-header.ustadz h3 { color: var(--emerald-light); }
.role-matrix-header.asrama h3 { color: #38bdf8; }
.role-matrix-header.wali h3 { color: #a78bfa; }
.role-matrix-header.santri h3 { color: #ec4899; }

.permission-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.permission-list li.allowed { color: var(--emerald-light); }
.permission-list li.denied { color: #64748b; }

.session-inspector-box {
  background: var(--bg-card);
  border: var(--border-gold-thin);
  border-radius: var(--radius-xl);
  padding: 20px;
  font-size: 12px;
  box-shadow: var(--shadow-card);
}

.session-inspector-box h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--gold-hover);
}

/* ==========================================================================
 * MODAL DIALOGS
 * ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 18, 15, 0.85);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #001f19;
  border: 1.5px solid var(--gold-border-bright);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-elevated), 0 0 30px rgba(212, 175, 55, 0.2);
}

.modal-auth {
  max-width: 620px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 26px;
  border-bottom: 1px solid var(--gold-border);
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--gold-hover);
}

.btn-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.btn-close:hover {
  color: #fff;
}

.auth-modal-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.demo-accounts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.demo-account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(0, 77, 64, 0.25);
  border: var(--border-gold-thin);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.25s;
}

.demo-account-card:hover {
  background: rgba(0, 105, 92, 0.45);
  border-color: var(--gold-hover);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.demo-account-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.demo-avatar {
  font-size: 24px;
}

.demo-text h4 {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
}

.demo-text p {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.btn-switch-account {
  background: var(--gold-gradient);
  border: none;
  color: #001f19;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: all 0.2s;
}

.btn-switch-account:hover {
  background: var(--gold-gradient-hover);
  transform: translateY(-1px);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 6px 0;
  color: var(--text-muted);
  font-size: 11px;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--gold-border);
}

.auth-divider span {
  padding: 0 12px;
  color: var(--gold-hover);
  font-weight: 700;
}

.form-manual-login .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}

.form-control:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--gold-border);
}

/* ==========================================================================
 * KEYFRAME ANIMASI
 * ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes radarSweep {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes radarPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes pulseRed {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

@keyframes heroPulseGreen {
  0% { transform: scale(0.98); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes heroPulseAmber {
  0% { transform: scale(0.98); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes highlightRow {
  0% { background: rgba(212, 175, 55, 0.35); }
  100% { background: transparent; }
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ==========================================================================
 * 8. KOP SURAT RESMI CETAK LAPORAN & DOKUMEN
 * ========================================================================== */
.print-official-header {
  display: none; /* Hanya tampil saat window.print() atau print mode */
}

.kop-surat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 10px 0 16px 0;
  text-align: center;
}

.kop-logo-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 10px;
}

.kop-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.kop-arabic {
  font-family: 'Amiri', serif;
  font-size: 22px;
  font-weight: 700;
  color: #004D40;
  direction: rtl;
  margin-bottom: 2px;
}

.kop-details h2 {
  font-size: 19px;
  font-weight: 800;
  color: #00261f;
  letter-spacing: 1px;
  margin: 0;
}

.kop-sub {
  font-size: 11.5px;
  font-weight: 700;
  color: #00695c;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin: 0;
}

.kop-alamat {
  font-size: 10.5px;
  color: #334155;
  margin: 0;
}

.kop-kontak {
  font-size: 10px;
  color: #475569;
  font-weight: 600;
  margin: 0;
}

.kop-divider-double {
  border-top: 3px solid #004D40;
  border-bottom: 1px solid #004D40;
  height: 5px;
  margin: 8px 0 20px 0;
}

/* ==========================================================================
 * 9. BRANDING HALAMAN LOGIN (MODAL AUTH RBAC)
 * ========================================================================== */
.auth-institution-banner {
  text-align: center;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(0, 77, 64, 0.4) 0%, rgba(0, 31, 25, 0.7) 100%);
  border-bottom: 1px solid var(--gold-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.auth-institution-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: var(--radius-lg);
  border: 2px solid var(--gold-border-bright);
  padding: 4px;
  background: rgba(0, 77, 64, 0.5);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.35);
}

.auth-arabic-text {
  font-family: 'Amiri', serif;
  font-size: 19px;
  color: var(--gold-primary);
  direction: rtl;
}

.auth-institution-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(to right, #ffffff, var(--gold-hover));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.auth-institution-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.auth-institution-badge {
  font-size: 11px;
  color: var(--emerald-soft);
  background: rgba(0, 77, 64, 0.4);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 137, 123, 0.3);
}

.auth-footer-contact {
  margin-top: 18px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.auth-contact-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.auth-contact-link {
  color: var(--gold-hover);
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.auth-contact-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* ==========================================================================
 * 10. PORTAL PPDB & HALAMAN KONTAK RESMI
 * ========================================================================== */
.ppdb-portal-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ppdb-hero-card {
  background: linear-gradient(135deg, rgba(0, 77, 64, 0.45) 0%, rgba(0, 31, 25, 0.85) 100%);
  border: 1.5px solid var(--gold-border);
  border-radius: var(--radius-2xl);
  padding: 32px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.ppdb-hero-card::after {
  content: 'بِسْمِ اللَّهِ';
  position: absolute;
  right: 20px;
  bottom: 10px;
  font-family: 'Amiri', serif;
  font-size: 85px;
  opacity: 0.05;
  color: var(--gold-primary);
  pointer-events: none;
}

.ppdb-hero-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: var(--radius-xl);
  border: 2.5px solid var(--gold-border-bright);
  padding: 6px;
  background: rgba(0, 77, 64, 0.6);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
  flex-shrink: 0;
}

.ppdb-hero-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ppdb-arabic-title {
  font-family: 'Amiri', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--gold-primary);
  direction: rtl;
}

.ppdb-hero-info h2 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  margin: 0;
}

.ppdb-hero-info p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 680px;
  margin: 0;
}

.ppdb-hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Kontak PPDB Grid Cards */
.contact-grid-ppdb {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.contact-card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-soft);
}

.contact-card-box:hover {
  transform: translateY(-4px);
  border-color: var(--gold-border-bright);
  box-shadow: var(--shadow-card);
  background: var(--bg-card-hover);
}

.contact-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 77, 64, 0.6), rgba(212, 175, 55, 0.2));
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.contact-card-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-card-text h4 {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--gold-hover);
  letter-spacing: 0.6px;
  font-weight: 700;
  margin: 0;
}

.contact-card-text .contact-main-val {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 2px 0;
}

.contact-card-text p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.contact-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-primary);
  text-decoration: none;
  padding: 5px 12px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  width: fit-content;
  transition: all 0.2s;
}

.contact-btn-action:hover {
  background: var(--gold-primary);
  color: #00241e;
}

/* PPDB Jenjang Info Grid */
.ppdb-jenjang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.jenjang-item-box {
  background: rgba(0, 31, 25, 0.5);
  border: 1px solid rgba(0, 137, 123, 0.25);
  border-radius: var(--radius-lg);
  padding: 18px;
  border-left: 3px solid var(--emerald-light);
}

.jenjang-item-box h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.jenjang-item-box p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

/* ==========================================================================
 * 11. KARTU SANTRI (KTS - KARTU TANDA SANTRI) DIGITAL & CETAK
 * ========================================================================== */
.kts-preview-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

.kts-cards-display {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Dimensi Kartu Standar CR80 (85.6mm x 53.98mm di skala preview layar) */
.kts-card-wrapper {
  width: 440px;
  min-height: 275px;
  border-radius: 16px;
  position: relative;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 15px rgba(212, 175, 55, 0.2);
  overflow: hidden;
  border: 2px solid #D4AF37;
  background: #002d24;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* KTS Muka Depan */
.kts-front {
  background: linear-gradient(135deg, #00382d 0%, #004D40 50%, #00241e 100%);
  position: relative;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kts-front::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 90% 10%, rgba(212, 175, 55, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.kts-front-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1.5px solid rgba(212, 175, 55, 0.45);
  padding-bottom: 8px;
  position: relative;
  z-index: 2;
}

.kts-front-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 2px;
  border: 1px solid #D4AF37;
  flex-shrink: 0;
}

.kts-front-header-text {
  flex: 1;
}

.kts-front-arabic {
  font-family: 'Amiri', serif;
  font-size: 13px;
  font-weight: 700;
  color: #fce79a;
  direction: rtl;
  line-height: 1.2;
}

.kts-front-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.kts-front-sub {
  font-size: 8.5px;
  color: #cbd5e1;
  line-height: 1.2;
}

.kts-front-body {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.kts-front-photo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.kts-front-photo {
  width: 78px;
  height: 98px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #D4AF37;
  background: #001f19;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.kts-smart-chip {
  width: 32px;
  height: 24px;
  background: linear-gradient(135deg, #e5c158, #b45309);
  border-radius: 4px;
  border: 1px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.kts-front-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.kts-santri-name {
  font-size: 14px;
  font-weight: 800;
  color: #fef08a;
  line-height: 1.2;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
  padding-bottom: 2px;
}

.kts-santri-detail-row {
  display: flex;
  font-size: 10px;
  line-height: 1.3;
}

.kts-detail-lbl {
  width: 60px;
  color: #94a3b8;
  font-weight: 600;
}

.kts-detail-val {
  color: #f1f5f9;
  font-weight: 700;
}

.kts-front-footer {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  padding-top: 6px;
  position: relative;
  z-index: 2;
}

.kts-barcode-area {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.kts-barcode-bars {
  letter-spacing: 2.5px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  line-height: 0.9;
}

.kts-barcode-text {
  font-family: monospace;
  font-size: 9px;
  color: #cbd5e1;
  letter-spacing: 1px;
}

.kts-rfid-indicator {
  font-size: 9.5px;
  color: #86efac;
  background: rgba(0, 77, 64, 0.8);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(134, 239, 172, 0.4);
  font-weight: 700;
}

/* KTS Bagian Belakang */
.kts-back {
  background: linear-gradient(135deg, #00261f 0%, #003d33 100%);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kts-back-header {
  text-align: center;
  border-bottom: 1.5px solid #D4AF37;
  padding-bottom: 6px;
}

.kts-back-header h4 {
  font-size: 11.5px;
  font-weight: 800;
  color: #D4AF37;
  letter-spacing: 0.8px;
  margin: 0;
}

.kts-back-rules {
  margin: 8px 0;
  padding-left: 16px;
  font-size: 9px;
  color: #e2e8f0;
  line-height: 1.45;
}

.kts-back-rules li {
  margin-bottom: 3px;
}

.kts-back-contact {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 8.5px;
  color: #cbd5e1;
  line-height: 1.35;
  text-align: center;
}

.kts-back-sign-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 6px;
  font-size: 8.5px;
  color: #94a3b8;
}

.kts-sign-box {
  text-align: center;
}

.kts-sign-name {
  font-weight: 700;
  color: #ffffff;
  text-decoration: underline;
  margin-top: 24px;
}

/* Action button inside Santri Table */
.btn-kts-action {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(0, 77, 64, 0.4));
  border: 1px solid var(--gold-border-bright);
  color: var(--gold-hover);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.btn-kts-action:hover {
  background: var(--gold-primary);
  color: #00221c;
  transform: scale(1.04);
}

/* ==========================================================================
 * 12. PRINT RULES (KOP SURAT & KTS PRINTER)
 * ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .sidebar,
  .topbar,
  .nav-menu,
  .scanner-control-bar,
  .hardware-listener-banner,
  .simulator-panel,
  .controls-row,
  .btn,
  .btn-audio-toggle,
  .btn-sim,
  .btn-kts-action,
  .dashboard-footer,
  .modal-overlay:not(.print-active) {
    display: none !important;
  }

  .print-official-header {
    display: block !important;
    page-break-after: avoid;
  }

  .main-wrapper,
  .content-area,
  .tab-pane.active {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .table-wrapper table {
    width: 100% !important;
    border-collapse: collapse !important;
    color: #000 !important;
  }

  .table-wrapper th,
  .table-wrapper td {
    border: 1px solid #ccc !important;
    color: #000 !important;
    padding: 6px !important;
    font-size: 10pt !important;
  }

  /* Jika mencetak KTS */
  body.printing-kts * {
    visibility: hidden;
  }

  body.printing-kts #modalKts,
  body.printing-kts #modalKts * {
    visibility: visible;
  }

  body.printing-kts #modalKts {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: transparent !important;
  }

  body.printing-kts .kts-cards-display {
    visibility: visible !important;
  }

  body.printing-kts .modal-header,
  body.printing-kts .modal-footer {
    display: none !important;
  }
}

/* ==========================================================================
 * 13. TOMBOL & LINK MEDIA SOSIAL RESMI LEMBAGA
 * ========================================================================== */
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 48, 40, 0.65);
  border: 1px solid var(--gold-border);
  color: #fff;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
  border-color: var(--gold-hover);
  color: #fff;
}

.social-btn.instagram:hover {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

.social-btn.facebook:hover {
  background: #1877f2;
}

.social-btn.youtube:hover {
  background: #ff0000;
}

/* ==========================================================================
 * 14. GALERI & CAROUSEL KEGIATAN SANTRI (SLIDESHOW OTOMATIS BERGERAK)
 * ========================================================================== */
.gallery-carousel-wrapper {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.gallery-carousel-viewport {
  overflow: hidden;
  position: relative;
  width: 100%;
  border-radius: var(--radius-2xl);
  padding: 12px 2px;
}

.gallery-carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.gallery-carousel-card {
  flex: 0 0 calc((100% - 48px) / 3);
  max-width: calc((100% - 48px) / 3);
  background: rgba(0, 32, 26, 0.88);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.3s, box-shadow 0.35s;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
}

.gallery-carousel-card:hover {
  transform: translateY(-8px);
  border-color: var(--gold-border-bright);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75), 0 0 25px rgba(212, 175, 55, 0.3);
}

.gallery-card-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.35;
  margin: 0;
  transition: color 0.2s ease;
}

.gallery-card-title.gradient-title {
  background: linear-gradient(to right, #ffffff, var(--gold-hover));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Tombol Panah Navigasi Carousel (Prev / Next) */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 24, 20, 0.9);
  backdrop-filter: blur(12px);
  border: 1.5px solid var(--gold-border);
  color: var(--gold-hover);
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 10;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.carousel-nav-btn:hover {
  background: var(--gold-gradient);
  color: #00221c;
  transform: translateY(-50%) scale(1.12);
  box-shadow: var(--shadow-gold);
  border-color: var(--gold-hover);
}

.carousel-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-nav-btn.prev {
  left: -20px;
}

.carousel-nav-btn.next {
  right: -20px;
}

/* Titik Indikator / Pagination Dots */
.carousel-dots-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: rgba(212, 175, 55, 0.25);
  border: 1px solid rgba(212, 175, 55, 0.4);
  cursor: pointer;
  transition: all 0.35s ease;
}

.carousel-dot:hover {
  background: rgba(212, 175, 55, 0.6);
  transform: scale(1.2);
}

.carousel-dot.active {
  width: 30px;
  background: var(--gold-gradient);
  border-color: var(--gold-hover);
  box-shadow: var(--shadow-gold);
}

/* Indikator Status Auto-Play / Pause on Hover */
.carousel-autoplay-status {
  text-align: center;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.carousel-autoplay-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  display: inline-block;
  animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

@media (max-width: 1024px) {
  .gallery-carousel-card {
    flex: 0 0 calc((100% - 24px) / 2);
    max-width: calc((100% - 24px) / 2);
  }
}

@media (max-width: 640px) {
  .gallery-carousel-card {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .carousel-nav-btn.prev {
    left: -8px;
  }
  .carousel-nav-btn.next {
    right: -8px;
  }
}

/* ==========================================================================
 * 14. SECTION UNIT PENDIDIKAN TERPADU YAYASAN
 * ========================================================================== */
.portal-unit-section {
  padding: 70px 24px;
  max-width: 1200px;
  margin: auto;
}

.unit-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 1100px) {
  .unit-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .unit-cards-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

.unit-card {
  background: rgba(0, 36, 30, 0.85);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: var(--shadow-soft);
  position: relative;
  height: 100%;
}

.unit-card:hover {
  transform: translateY(-8px);
  border-color: var(--gold-border-bright);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 25px rgba(212, 175, 55, 0.35), 0 0 40px rgba(46, 196, 182, 0.2);
}

.unit-card-header {
  padding: 22px 20px 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(0, 77, 64, 0.4) 0%, rgba(0, 24, 20, 0.6) 100%);
}

.unit-logo-frame {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--gold-border-bright);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.4), 0 0 24px rgba(46, 196, 182, 0.25);
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  overflow: hidden;
}

.unit-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  transition: transform 0.35s ease;
  background: #ffffff;
  display: block;
}

.unit-card:hover .unit-logo-frame,
.unit-logo-frame:hover {
  transform: scale(1.08);
  border-color: #ffd700;
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.85), 0 0 36px rgba(46, 196, 182, 0.5);
}

.unit-card:hover .unit-logo-img {
  transform: scale(1.05);
}

.unit-icon-box {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(0, 77, 64, 0.95), rgba(0, 24, 20, 0.98));
  border: 2px solid var(--gold-border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.4), 0 0 24px rgba(46, 196, 182, 0.25);
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.unit-card:hover .unit-icon-box {
  transform: scale(1.08);
  border-color: #ffd700;
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.85), 0 0 36px rgba(46, 196, 182, 0.5);
}

.unit-title-group {
  flex: 1;
  min-width: 0;
}

.unit-title-group h3 {
  font-size: 15.5px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.25;
}

.unit-title-group .unit-founded {
  font-size: 11.5px;
  color: var(--gold-hover);
  font-weight: 700;
  display: inline-block;
  margin-top: 4px;
  letter-spacing: 0.3px;
}

.unit-card-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.unit-card-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.unit-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.unit-features-list li {
  font-size: 12px;
  color: #cbd5e1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.unit-features-list li::before {
  content: '✓';
  color: var(--emerald-light);
  font-weight: 800;
  font-size: 12px;
}

.unit-card-footer {
  padding: 16px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 20, 16, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.unit-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gold-hover);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--gold-border);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.btn-unit-action {
  background: transparent;
  border: 1px solid var(--gold-border);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-unit-action:hover {
  background: var(--gold-primary);
  color: #00221c;
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

/* ==========================================================================
 * 15. SECTION VISI & MISI RESMI PESANTREN (ISLAMI MODERN - EMERALD & GOLD)
 * ========================================================================== */
.portal-visimisi-section {
  padding: 85px 24px 90px 24px;
  background: radial-gradient(circle at 50% 15%, rgba(0, 77, 64, 0.45) 0%, rgba(0, 24, 20, 0.95) 60%, rgba(0, 10, 8, 1) 100%);
  border-top: 1.5px solid var(--gold-border);
  border-bottom: 1.5px solid var(--gold-border);
  position: relative;
  overflow: hidden;
}

.visimisi-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

/* Kotak Utama Visi (Featured Card) */
.visi-featured-card {
  position: relative;
  background: linear-gradient(135deg, rgba(0, 77, 64, 0.85) 0%, rgba(0, 48, 40, 0.95) 50%, rgba(0, 24, 20, 0.9) 100%);
  border: 2px solid var(--gold-border-bright);
  border-radius: var(--radius-2xl);
  padding: 44px 38px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 35px rgba(212, 175, 55, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.visi-arabic-watermark {
  position: absolute;
  right: -25px;
  bottom: -20px;
  font-family: 'Amiri', serif;
  font-size: 88px;
  color: rgba(212, 175, 55, 0.08);
  pointer-events: none;
  direction: rtl;
  user-select: none;
  line-height: 1;
  font-weight: 700;
}

.visi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  padding-bottom: 16px;
  position: relative;
  z-index: 2;
}

.visi-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-gradient);
  color: #00221c;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  box-shadow: var(--shadow-gold);
}

.visi-arabic-heading {
  font-family: 'Amiri', serif;
  font-size: 26px;
  color: var(--gold-hover);
  direction: rtl;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.visi-quote-wrapper {
  position: relative;
  z-index: 2;
}

.visi-quote-mark {
  font-family: Georgia, serif;
  font-size: 42px;
  color: var(--gold-primary);
  line-height: 1;
  display: inline-block;
  vertical-align: top;
  margin-right: 6px;
}

.visi-quote-text {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.6;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.3px;
}

.visi-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
  position: relative;
  z-index: 2;
}

.visi-pillar-pill {
  background: rgba(0, 24, 20, 0.65);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  font-size: 12.5px;
  color: #e2e8f0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.visi-pillar-pill:hover {
  background: rgba(0, 77, 64, 0.8);
  border-color: var(--gold-hover);
  color: #fff;
  transform: translateY(-2px);
}

.visi-pillar-pill span.icon {
  color: var(--gold-primary);
  font-size: 16px;
}

/* Subheader & Grid Kartu Misi (Interactive List) */
.misi-header-group {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.misi-eyebrow {
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--gold-border);
  padding: 4px 16px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.misi-title {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.misi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}

.misi-card {
  background: rgba(0, 32, 26, 0.85);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
}

.misi-card:hover {
  background: rgba(0, 48, 40, 0.95);
  transform: translateY(-5px);
  border-color: var(--gold-border-bright);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65), 0 0 18px rgba(212, 175, 55, 0.25);
}

.misi-number-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 77, 64, 0.9), rgba(212, 175, 55, 0.3));
  border: 1.5px solid var(--gold-border);
  color: var(--gold-hover);
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s ease;
}

.misi-card:hover .misi-number-badge {
  background: var(--gold-gradient);
  color: #00221c;
  transform: scale(1.08);
  border-color: var(--gold-hover);
}

.misi-content-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.misi-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.misi-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 768px) {
  .visi-featured-card {
    padding: 28px 20px;
  }
  .visi-quote-text {
    font-size: 17px;
  }
  .misi-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
 * 16. SECTION MUASSIS (PENDIRI) & MUDARIS (DEWAN ASATIDZ) - ISLAMI MODERN
 * ========================================================================== */
.portal-scholars-section {
  padding: 85px 24px 95px 24px;
  background: radial-gradient(circle at 50% 20%, rgba(0, 60, 50, 0.5) 0%, rgba(0, 20, 16, 0.95) 55%, rgba(0, 10, 8, 1) 100%);
  border-top: 1.5px solid var(--gold-border);
  border-bottom: 1.5px solid var(--gold-border);
  position: relative;
  overflow: hidden;
}

.scholars-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 70px;
}

.scholars-arabic-title {
  font-family: 'Amiri', serif;
  font-size: 26px;
  color: var(--gold-hover);
  direction: rtl;
  line-height: 1.3;
  margin: 4px 0 8px 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* 1. Muassis (Tokoh Pendiri) Grid */
.muassis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 30px;
  margin-top: 10px;
}

.muassis-card {
  background: linear-gradient(145deg, rgba(0, 48, 40, 0.88) 0%, rgba(0, 28, 24, 0.95) 100%);
  border: 2px solid var(--gold-border-bright);
  border-radius: var(--radius-2xl);
  padding: 36px 32px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(212, 175, 55, 0.18);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.35s ease;
}

.muassis-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-hover);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(212, 175, 55, 0.32);
}

.muassis-avatar-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
}

.muassis-avatar-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, #f59e0b, #d4af37, #004d40, #d4af37);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.muassis-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: #00221c;
  display: block;
}

.muassis-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold-border);
  color: var(--gold-hover);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.muassis-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.muassis-arabic-prayer {
  font-family: 'Amiri', serif;
  font-size: 19px;
  color: var(--gold-hover);
  direction: rtl;
  line-height: 1.2;
}

.muassis-name {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
  margin: 0;
}

.muassis-name .highlight-gold {
  color: var(--gold-hover);
  display: block;
  font-size: 20px;
  margin-top: 2px;
}

.muassis-role-badge {
  display: inline-block;
  width: fit-content;
  background: linear-gradient(135deg, rgba(0, 77, 64, 0.9), rgba(212, 175, 55, 0.35));
  border: 1px solid var(--gold-border);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.muassis-title-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--emerald-soft);
}

.muassis-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 4px 0 10px 0;
}

.muassis-legacy-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.legacy-tag {
  background: rgba(0, 24, 20, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

/* 2. Mudaris (Dewan Asatidz) Grid - Simetris 4 Kolom x 2 Baris */
.mudaris-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 10px;
}

.mudaris-card {
  background: rgba(0, 32, 26, 0.88);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
}

.mudaris-card:hover {
  background: rgba(0, 48, 40, 0.95);
  transform: translateY(-5px);
  border-color: var(--gold-border-bright);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.65), 0 0 20px rgba(212, 175, 55, 0.25);
}

.mudaris-featured-card {
  border-color: rgba(212, 175, 55, 0.4);
  background: linear-gradient(145deg, rgba(0, 40, 32, 0.92) 0%, rgba(0, 24, 20, 0.95) 100%);
}

.mudaris-header-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mudaris-photo-frame {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--gold-primary), #004d40, var(--gold-primary));
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mudaris-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: #00221c;
  display: block;
}

.mudaris-main-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.mudaris-position-badge {
  display: inline-block;
  width: fit-content;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.mudaris-position-badge.leader {
  background: var(--gold-gradient);
  color: #00221c;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.mudaris-position-badge.teacher {
  background: rgba(0, 77, 64, 0.85);
  border: 1px solid var(--gold-border);
  color: var(--gold-hover);
}

.mudaris-position-badge.caregiver {
  background: rgba(147, 51, 234, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
}

.mudaris-name {
  font-size: 15.5px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.25;
}

.mudaris-field-box {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11.5px;
  color: var(--emerald-soft);
  font-weight: 600;
  line-height: 1.35;
}

.mudaris-field-box .field-icon {
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}

.mudaris-bio-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 1080px) {
  .mudaris-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .muassis-grid {
    grid-template-columns: 1fr;
  }
  .muassis-avatar-wrapper {
    flex-direction: column;
    text-align: center;
  }
  .muassis-card {
    padding: 24px 18px;
    text-align: center;
  }
  .muassis-role-badge {
    margin: 0 auto;
  }
  .muassis-legacy-tags {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .mudaris-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
 * 17. HEADER / NAVBAR PORTAL PUBLIK & HERO SECTION (2 KOLOM & ISLAMIC BG)
 * ========================================================================== */
.portal-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, rgba(11, 90, 46, 0.96) 0%, rgba(0, 122, 61, 0.93) 50%, rgba(0, 77, 64, 0.97) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 2px solid #D4AF37;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5), 0 2px 12px rgba(212, 175, 55, 0.25);
}

.portal-nav-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.portal-nav-link:hover {
  color: #fef08a;
  background: rgba(212, 175, 55, 0.16);
  border-bottom: 2px solid #D4AF37;
  transform: translateY(-1px);
}

/* ==========================================================================
 * 2. Hero Banner Utama (Tata Letak Proporsional, Bersih & Responsif)
 * ========================================================================== */
.portal-hero-section {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 2px solid var(--gold-border);
  background-color: #042010;
  background-image: url('/images/gedung-ponpes.jpg');
  background-size: cover;
  background-position: center;
}

@media (min-width: 1024px) {
  .portal-hero-section {
    min-height: 680px;
  }
}

.portal-hero-bg-img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}

.portal-hero-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(to right, rgba(4, 32, 16, 0.95) 0%, rgba(7, 61, 30, 0.88) 50%, rgba(9, 66, 32, 0.75) 100%);
  z-index: 2;
}

/* Container Konten Hero (max-w-7xl px-4 sm:px-6 lg:px-8 py-16) */
.portal-hero-container,
.portal-hero-content {
  position: relative;
  z-index: 10;
  max-width: 80rem; /* max-w-7xl */
  margin-left: auto;
  margin-right: auto;
  padding: 4rem 1rem;
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem; /* gap-10 */
  box-sizing: border-box;
  animation: fadeIn 0.8s ease-out;
}

@media (min-width: 640px) {
  .portal-hero-container,
  .portal-hero-content {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .portal-hero-container,
  .portal-hero-content {
    flex-direction: row;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Kolom Teks (Kiri di Desktop, Bawah di Mobile) */
.portal-hero-col-text {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.25rem; /* space-y-5 */
}

@media (min-width: 1024px) {
  .portal-hero-col-text {
    width: 58.333333%; /* lg:w-7/12 */
    text-align: left;
    align-items: flex-start;
  }
}

/* Kolom Logo Utama (Kanan di Desktop, Atas di Mobile) */
.portal-hero-col-logo {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (min-width: 1024px) {
  .portal-hero-col-logo {
    width: 41.666667%; /* lg:w-5/12 */
  }
}

.portal-nav-logo {
  width: 52px !important;
  height: 52px !important;
  max-width: 52px;
  max-height: 52px;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 2px solid var(--gold-border-bright);
  padding: 3px;
  background: rgba(0, 77, 64, 0.6);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.4), 0 0 25px rgba(46, 196, 182, 0.25);
  flex-shrink: 0;
  animation: logoNavFloatingGlow 3.5s ease-in-out infinite;
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
}

.portal-nav-logo:hover,
.portal-nav-brand:hover .portal-nav-logo {
  transform: translateY(-3px) scale(1.05);
  filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.95)) drop-shadow(0 0 25px rgba(46, 196, 182, 0.55));
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.85), 0 0 35px rgba(46, 196, 182, 0.5);
  border-color: #ffd700;
  animation-play-state: paused;
}

@keyframes logoNavFloatingGlow {
  0%, 100% {
    transform: translateY(0);
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.4)) drop-shadow(0 0 12px rgba(46, 196, 182, 0.25));
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.4), 0 0 22px rgba(46, 196, 182, 0.25);
  }
  50% {
    transform: translateY(-4px);
    filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.75)) drop-shadow(0 0 22px rgba(46, 196, 182, 0.45));
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.7), 0 0 34px rgba(46, 196, 182, 0.4);
  }
}

/* Bingkai Logo Bulat Sempurna (w-48 sm:w-64 lg:w-80) */
.portal-hero-logo-box {
  position: relative;
  width: 192px; /* w-48 */
  height: 192px; /* h-48 */
  aspect-ratio: 1 / 1;
  border-radius: 9999px;
  background-color: #ffffff;
  padding: 0.75rem; /* p-3 */
  box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
  border: 4px solid #D4AF37;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  animation: logoHeroFloatingGlow 3.6s ease-in-out infinite;
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
}

@media (min-width: 640px) {
  .portal-hero-logo-box {
    width: 256px; /* sm:w-64 */
    height: 256px; /* sm:h-64 */
  }
}

@media (min-width: 1024px) {
  .portal-hero-logo-box {
    width: 320px; /* lg:w-80 */
    height: 320px; /* lg:h-80 */
  }
}

.portal-hero-logo-box:hover {
  transform: translateY(-8px) scale(1.05);
  filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.95)) drop-shadow(0 0 45px rgba(46, 196, 182, 0.65));
  box-shadow: 0 0 45px rgba(212, 175, 55, 0.9), 0 0 65px rgba(46, 196, 182, 0.55), 0 25px 45px rgba(0, 0, 0, 0.85);
  border-color: #ffd700;
  animation-play-state: paused;
}

.portal-hero-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  aspect-ratio: 1 / 1;
  border-radius: 9999px;
  transition: transform 0.35s ease;
}

/* Utility classes requested: responsive sizing, alignments, and footer */
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-12 { width: 48px !important; min-width: 48px; }
.h-12 { height: 48px !important; min-height: 48px; }
.w-44 { width: 176px; }
.h-44 { height: 176px; }
.w-48 { width: 192px; }
.h-48 { height: 192px; }
.w-56 { width: 224px; }
.h-56 { height: 224px; }
.w-64 { width: 256px; }
.h-64 { height: 256px; }
.w-72 { width: 288px; }
.h-72 { height: 288px; }
.w-80 { width: 320px; }
.h-80 { height: 320px; }
.min-h-\[600px\] { min-height: 600px; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.object-cover { object-fit: cover; }
.max-w-7xl { max-width: 80rem; }
.max-w-2xl { max-width: 42rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.flex-col-reverse { flex-direction: column-reverse; }
.justify-between { justify-content: space-between; }
.gap-10 { gap: 2.5rem; }
.gap-4 { gap: 1rem; }
.gap-2\.5 { gap: 0.625rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.p-3 { padding: 0.75rem; }
.shrink-0 { flex-shrink: 0; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.tracking-wide { letter-spacing: 0.025em; }
.rounded-full { border-radius: 9999px !important; }
.bg-white { background-color: #ffffff !important; }
.p-1 { padding: 4px !important; }
.object-contain { object-fit: contain !important; }
.shadow { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45) !important; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.hidden { display: none !important; }

@media (min-width: 640px) {
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:w-56 { width: 224px; }
  .sm\:h-56 { height: 224px; }
  .sm\:w-64 { width: 256px; }
  .sm\:h-64 { height: 256px; }
  .sm\:text-4xl { font-size: 2.25rem; }
  .sm\:text-base { font-size: 1rem; }
}

@media (min-width: 768px) {
  .md\:w-72 { width: 288px; }
  .md\:h-72 { height: 288px; }
  .md\:flex { display: flex !important; }
  .md\:hidden { display: none !important; }
  .md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .md\:text-left { text-align: left; }
  .md\:mx-0 { margin-left: 0; margin-right: 0; }
}

@media (min-width: 1024px) {
  .lg\:min-h-\[680px\] { min-height: 680px; }
  .lg\:flex-row { flex-direction: row; }
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .lg\:w-7\/12 { width: 58.333333%; }
  .lg\:w-5\/12 { width: 41.666667%; }
  .lg\:text-left { text-align: left; }
  .lg\:text-3xl { font-size: 1.875rem; }
  .lg\:text-5xl { font-size: 3rem; }
  .lg\:justify-start { justify-content: flex-start; }
  .lg\:mx-0 { margin-left: 0; margin-right: 0; }
  .lg\:w-80 { width: 320px; }
  .lg\:h-80 { height: 320px; }
}

.portal-hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 38px;
  height: 38px;
  background: rgba(212, 175, 55, 0.15);
  border: 1.5px solid var(--gold-border-bright);
  border-radius: 8px;
  padding: 7px;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.portal-hamburger-btn span {
  width: 100%;
  height: 2.5px;
  background: #D4AF37;
  border-radius: 2px;
  transition: all 0.25s ease;
}
.portal-hamburger-btn:hover {
  background: rgba(212, 175, 55, 0.35);
}

.portal-hero-logo-box:hover .portal-hero-logo-img {
  transform: scale(1.02);
}

@keyframes logoHeroFloatingGlow {
  0%, 100% {
    transform: translateY(0);
    filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.45)) drop-shadow(0 0 20px rgba(46, 196, 182, 0.28));
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.45), 0 0 40px rgba(46, 196, 182, 0.25), 0 10px 25px rgba(0, 0, 0, 0.7);
  }
  50% {
    transform: translateY(-8px);
    filter: drop-shadow(0 0 24px rgba(212, 175, 55, 0.8)) drop-shadow(0 0 35px rgba(46, 196, 182, 0.5));
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.75), 0 0 55px rgba(46, 196, 182, 0.45), 0 18px 30px rgba(0, 0, 0, 0.75);
  }
}

@media (max-width: 900px) {
  .portal-nav-links {
    display: none;
  }
  .portal-hero-container,
  .portal-hero-content {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }
  .portal-hero-col-text {
    align-items: center;
    text-align: center;
    order: 2;
  }
  .portal-hero-col-logo {
    order: 1;
  }
  .portal-hero-logo-box {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    padding: 10px;
  }
}

@media (max-width: 768px) {
  .portal-navbar {
    padding: 10px 16px;
    position: sticky;
    top: 0;
  }
  .portal-nav-brand {
    gap: 8px;
  }
  .portal-nav-sub {
    display: none;
  }
  .btn-ppdb-nav {
    display: none;
  }
  .btn-login-nav {
    padding: 7px 12px;
    font-size: 12px;
  }
  .portal-hamburger-btn {
    display: flex;
  }
  .portal-nav-links.mobile-open {
    display: flex !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(180deg, rgba(0, 24, 20, 0.98) 0%, rgba(11, 90, 46, 0.98) 100%);
    flex-direction: column;
    padding: 18px 24px;
    gap: 12px;
    border-bottom: 2px solid #D4AF37;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.25s ease-out;
    z-index: 999;
  }
  .portal-nav-links.mobile-open .portal-nav-link {
    padding: 10px 14px;
    border-radius: 8px;
    width: 100%;
    background: rgba(0, 77, 64, 0.4);
  }
  .portal-hero-section {
    padding: 40px 16px;
    overflow-x: hidden;
  }
  .portal-hero-container,
  .portal-hero-content {
    display: flex;
    flex-direction: column;
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .portal-hero-col-logo {
    order: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0 auto;
  }
  .portal-hero-col-text {
    order: 2;
    width: 100%;
    max-width: 100%;
    align-items: center;
    text-align: center;
  }
  .portal-hero-badge {
    margin: 0 auto;
    white-space: normal;
    text-align: center;
    font-size: 11px;
  }
  .portal-hero-arabic {
    font-size: 22px;
    text-align: center;
    width: 100%;
  }
  .portal-hero-title {
    font-size: 24px;
    line-height: 1.3;
    text-align: center;
    width: 100%;
  }
  .portal-hero-desc {
    font-size: 13.5px;
    text-align: center;
    width: 100%;
  }
  .portal-hero-cta {
    width: 100%;
    justify-content: center;
  }
  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    max-width: 360px;
    justify-content: center;
    text-align: center;
  }
  .portal-stats-bar {
    width: 100%;
    justify-content: center;
  }
}





