/* ============================================
   PENGUMUMAN KELULUSAN - PREMIUM DESIGN SYSTEM
   Dark Theme + Gold/Emerald Accent
   ============================================ */

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

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Colors */
  --bg-primary: #ebf0ec;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f9f9f9;
  --bg-glass: rgba(255, 255, 255, 0.95);
  --border-glass: rgba(0, 0, 0, 0.04);
  --border-glass-hover: rgba(0, 0, 0, 0.08);

  --text-primary: #2e3b32;
  --text-secondary: #78867b;
  --text-muted: #a4b4a8;

  --gold: #365440;
  --gold-light: #507a5f;
  --gold-dark: #1f3326;
  --gold-glow: rgba(54, 84, 64, 0.2);

  --emerald: #365440;
  --emerald-light: #507a5f;
  --emerald-dark: #1f3326;
  --emerald-glow: rgba(54, 84, 64, 0.2);

  --red: #ef4444;
  --red-dark: #dc2626;
  --red-glow: rgba(239, 68, 68, 0.2);

  --blue: #3b82f6;
  --blue-dark: #2563eb;

  --purple: #8b5cf6;
  --orange: #f97316;

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.06);
  --shadow-gold: 0 0 30px rgba(54, 84, 64, 0.15);
  --shadow-emerald: 0 0 30px rgba(54, 84, 64, 0.15);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Animated background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(14, 165, 233, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-emerald { color: var(--emerald); }
.text-red { color: var(--red); }
.text-muted { color: var(--text-secondary); }

/* ============================================
   PARTICLES BACKGROUND
   ============================================ */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 380px;
}

.toast.success { background: rgba(5, 150, 105, 0.9); }
.toast.error { background: rgba(220, 38, 38, 0.9); }
.toast.info { background: rgba(37, 99, 235, 0.9); }

.toast.fade-out {
  animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120%); opacity: 0; }
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   LOGIN PAGE
   ============================================ */
#page-login {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-container {
  width: 100%;
  max-width: 440px;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-brand {
  text-align: center;
  margin-bottom: 40px;
}

.login-brand .brand-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  box-shadow: var(--shadow-gold);
  animation: pulse-glow 3s ease-in-out infinite;
}

.login-brand h2 {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.login-brand h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.login-brand p {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

.login-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}

.login-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

/* Role Tabs */
.role-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: var(--radius-md);
  padding: 4px;
}

.role-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.role-tab.active {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.3);
}

.role-tab:not(.active):hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.05);
}

/* Form */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s ease;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
  background: #ffffff;
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238888a0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-group select option {
  background: #ffffff;
  color: var(--text-primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #ffffff;
  box-shadow: 0 2px 16px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(16, 185, 129, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-full {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
}

.btn-success {
  background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
  color: #fff;
}

.btn-danger {
  background: rgba(220, 38, 38, 0.15);
  color: var(--red);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.btn-danger:hover {
  background: rgba(220, 38, 38, 0.3);
}

.btn-ghost {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
}

.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================
   ADMIN DASHBOARD
   ============================================ */
#page-admin {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* Admin Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar */
.admin-sidebar {
  width: 250px;
  background: var(--bg-secondary);
  border-right: none;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 16px;
  left: 16px;
  height: calc(100vh - 32px);
  z-index: 200;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 24px 20px 24px;
  border-bottom: none;
}

.sidebar-brand .brand-dot {
  width: 24px;
  height: 24px;
  background: var(--gold);
  border-radius: var(--radius-sm);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
}
.sidebar-brand .brand-dot::after {
  content: 'S';
  font-size: 14px;
  font-family: 'Inter', sans-serif;
}

.sidebar-brand h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.sidebar-close-mobile {
  display: none;
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.nav-item .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item .nav-icon i {
  width: 20px;
  height: 20px;
}

.nav-item:hover {
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-primary);
}

.nav-item.active {
  background: transparent;
  color: var(--text-primary);
  font-weight: 700;
}

.nav-item.active .nav-icon {
  color: var(--gold);
}

.sidebar-footer {
  padding: 20px;
  border-top: none;
}

/* Main Content Area */
.admin-main {
  flex: 1;
  margin-left: 282px; /* Offset for sidebar + margins */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Bar */
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px 0 32px;
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
  position: relative;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sidebar-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: 4px;
}

.admin-topbar h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.badge-admin {
  font-size: 0.8rem;
  color: var(--gold-dark);
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 20px;
  font-weight: 600;
}

/* Admin Content */
.admin-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 32px 24px;
}

/* Tab Panels */
.admin-tab {
  animation: fadeIn 0.4s ease-in-out;
}


/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: all 0.3s ease;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

.stat-card.total { background: #e0eadf; }
.stat-card.lulus { background: #e6edd9; }
.stat-card.tidak-lulus { background: #f3e5e4; }
.stat-card.pending { background: #eae5ed; }

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-sm);
}

.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
  background: transparent;
  color: var(--text-primary);
}

.stat-card.total .stat-icon { color: #52755e; }
.stat-card.lulus .stat-icon { color: #5b743e; }
.stat-card.tidak-lulus .stat-icon { color: #b45f5f; }
.stat-card.pending .stat-icon { color: #756184; }

.stat-card .stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 4px;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
}

.stat-card .stat-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Quick Access */
.quick-access-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 32px 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.quick-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border-glass);
}

.quick-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-glow);
}

.quick-card .qc-icon {
  width: 40px;
  height: 40px;
  background: rgba(54, 84, 64, 0.08);
  color: var(--gold);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-card .qc-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.quick-card .qc-info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 2px 0 0 0;
}

/* Section */
.admin-section {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

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

.section-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header .section-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-glass);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

.data-table .student-name {
  font-weight: 600;
  color: var(--text-primary);
}

.data-table .student-nisn {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Status Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.lulus {
  background: rgba(52, 211, 153, 0.12);
  color: var(--emerald);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.badge.tidak-lulus {
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.badge.pending {
  background: rgba(16, 185, 129, 0.12);
  color: var(--gold);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.action-btns {
  display: flex;
  gap: 6px;
}

.action-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-secondary);
}

.action-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

.action-btn.edit:hover { color: var(--blue); }
.action-btn.delete:hover { color: var(--red); }

/* Settings Form */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.settings-grid .full-width {
  grid-column: 1 / -1;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 24px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.03);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(248, 113, 113, 0.15);
  color: var(--red);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-glass);
}

/* Announcement Modal Specific */
.modal-announcement {
  max-width: 420px;
  text-align: center;
  padding: 40px 32px;
}

.announcement-icon-wrapper {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.announcement-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: var(--shadow-gold);
  animation: bounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.announcement-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.announcement-message {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
  background: rgba(0, 0, 0, 0.02);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
}

.announcement-action .btn {
  padding: 14px;
  font-size: 1rem;
}

.announcement-quote {
  margin-top: 28px;
  color: var(--emerald-dark);
  font-style: italic;
  font-size: 0.85rem;
  font-weight: 600;
  position: relative;
  display: inline-block;
  padding: 12px 24px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
  animation: pulse-light 2s infinite;
}

.announcement-quote::before {
  content: '“';
  position: absolute;
  left: 8px;
  top: 0;
  font-size: 1.8rem;
  font-family: 'Playfair Display', serif;
  color: var(--emerald);
  opacity: 0.3;
}

.announcement-quote::after {
  content: '”';
  position: absolute;
  right: 8px;
  bottom: -5px;
  font-size: 1.8rem;
  font-family: 'Playfair Display', serif;
  color: var(--emerald);
  opacity: 0.3;
}

@keyframes pulse-light {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1); }
  50% { transform: scale(1.02); box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2); }
}

/* ============================================
   STUDENT PAGE - COUNTDOWN
   ============================================ */
#page-student {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.student-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}

.student-header {
  margin-bottom: 12px;
}

.student-header .school-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.student-header .school-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.student-header .student-name-display {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-top: 16px;
  padding: 8px 20px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  display: inline-block;
}

/* Countdown Title */
.countdown-section {
  margin: 40px 0;
}

.countdown-section .countdown-title {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 600;
}

/* ============================================
   FLIP CLOCK
   ============================================ */
.flip-clock {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.flip-clock-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.flip-clock-group .flip-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-weight: 600;
}

.flip-clock-digits {
  display: flex;
  gap: 6px;
}

.flip-card {
  position: relative;
  width: 64px;
  height: 88px;
  font-size: 2.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--gold-light);
  border-radius: var(--radius-sm);
  perspective: 600px;
}

/* Top & bottom static halves */
.flip-card-inner {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  overflow: hidden;
  backface-visibility: hidden;
}

.flip-card-inner span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 200%; /* Double height to show full digit */
  display: flex;
  align-items: center;
  justify-content: center;
}

.flip-card-top {
  top: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.95));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 1px solid rgba(212, 168, 83, 0.15);
  border-bottom: none;
}

.flip-card-top span {
  top: 0;
}

.flip-card-bottom {
  bottom: 0;
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.95), rgba(203, 213, 225, 0.95));
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  border: 1px solid rgba(212, 168, 83, 0.15);
  border-top: none;
}

.flip-card-bottom span {
  bottom: 0;
}

/* Divider line in middle */
.flip-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  z-index: 5;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Glow effect */
.flip-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.1), transparent, rgba(212, 168, 83, 0.05));
  z-index: -1;
  pointer-events: none;
}

/* === Flip animation layers === */
.flip-card-anim-top,
.flip-card-anim-bottom {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  overflow: hidden;
  backface-visibility: hidden;
  z-index: 10;
}

.flip-card-anim-top span,
.flip-card-anim-bottom span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 200%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flip-card-anim-top {
  top: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.95));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 1px solid rgba(212, 168, 83, 0.15);
  border-bottom: none;
  transform-origin: bottom center;
}

.flip-card-anim-top span {
  top: 0;
}

.flip-card-anim-top.flip {
  animation: flipTopDown 0.3s ease-in forwards;
}

.flip-card-anim-bottom {
  bottom: 0;
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.95), rgba(203, 213, 225, 0.95));
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  border: 1px solid rgba(212, 168, 83, 0.15);
  border-top: none;
  transform-origin: top center;
  transform: rotateX(90deg);
}

.flip-card-anim-bottom span {
  bottom: 0;
}

.flip-card-anim-bottom.flip {
  animation: flipBottomUp 0.3s 0.15s ease-out forwards;
}

@keyframes flipTopDown {
  from { transform: rotateX(0deg); }
  to   { transform: rotateX(-90deg); }
}

@keyframes flipBottomUp {
  from { transform: rotateX(90deg); }
  to   { transform: rotateX(0deg); }
}

.flip-clock-separator {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--gold);
  height: 88px;
  display: flex;
  align-items: center;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0.3; }
}

/* ============================================
   REVEAL ANIMATION
   ============================================ */
#page-reveal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
}

/* Phase 1 - Cinematic Loading */
.reveal-loading {
  text-align: center;
}

.reveal-loading .loading-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  letter-spacing: 4px;
  text-transform: uppercase;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.reveal-loading .loading-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.reveal-loading .loading-dots span {
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
  animation: dotPulse 1.4s ease-in-out infinite;
}

.reveal-loading .loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.reveal-loading .loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* Phase 2 - Envelope */
.reveal-envelope {
  position: relative;
  width: 300px;
  height: 200px;
  margin: 0 auto;
  cursor: pointer;
}

.envelope-body {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 140px;
  background: linear-gradient(180deg, #10b981, #059669);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

.envelope-flap {
  position: absolute;
  top: 20px;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(180deg, #34d399, #10b981);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  z-index: 3;
  transform-origin: top;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.envelope-flap.open {
  transform: rotateX(180deg);
}

.envelope-letter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 120px;
  background: #fff;
  border-radius: var(--radius-sm);
  z-index: 1;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.envelope-letter.rise {
  bottom: 160px;
  height: 140px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.envelope-letter .seal {
  width: 50px;
  height: 50px;
  background: var(--red-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Phase 3 - Result */
.reveal-result {
  text-align: center;
  animation: fadeInScale 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 24px;
  max-width: 600px;
  width: 100%;
}

.reveal-result .result-icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  margin: 0 auto 28px;
  animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-result .result-icon.lulus {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(5, 150, 105, 0.1));
  box-shadow: 0 0 60px rgba(52, 211, 153, 0.3);
  border: 2px solid rgba(52, 211, 153, 0.3);
}

.reveal-result .result-icon.tidak-lulus {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.2), rgba(220, 38, 38, 0.1));
  box-shadow: 0 0 60px rgba(248, 113, 113, 0.3);
  border: 2px solid rgba(248, 113, 113, 0.3);
}

.reveal-result .result-status {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.reveal-result .result-status.lulus {
  background: linear-gradient(135deg, var(--emerald-light), var(--emerald));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.reveal-result .result-status.tidak-lulus {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.reveal-result .result-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.reveal-result .result-detail {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.reveal-result .result-message {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

.reveal-result .result-school {
  font-size: 0.82rem;
  color: var(--text-muted);
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes bounceIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* ============================================
   CONFETTI
   ============================================ */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5001;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 20px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotateZ(0deg) rotateX(0deg);
    opacity: 1;
  }
  75% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotateZ(720deg) rotateX(360deg);
    opacity: 0;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(212, 168, 83, 0.3); }
  50% { box-shadow: 0 0 40px rgba(212, 168, 83, 0.5); }
}

/* ============================================
   LOGOUT BUTTON (student)
   ============================================ */
.student-logout {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  /* Sidebar Mobile Overlay */
  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .admin-main {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: block;
  }

  .sidebar-close-mobile {
    display: block;
  }

  .admin-topbar {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .admin-content {
    padding: 20px 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-section {
    padding: 20px 16px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .flip-clock {
    gap: 10px;
  }

  .flip-card {
    width: 52px;
    height: 70px;
    font-size: 2.2rem;
  }

  .flip-card-anim-top,
  .flip-card-anim-bottom,
  .flip-card-inner {
    font-size: 2.2rem;
  }

  .flip-clock-separator {
    font-size: 1.8rem;
    height: 70px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .reveal-result .result-status {
    font-size: 2rem;
  }

  .login-brand h1 {
    font-size: 1.5rem;
  }

  .student-header .school-name {
    font-size: 1.3rem;
  }

  .reveal-envelope {
    width: 240px;
    height: 160px;
  }

  .envelope-body {
    height: 110px;
  }

  .envelope-flap {
    height: 80px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-card .stat-value {
    font-size: 1.5rem;
  }

  .flip-card {
    width: 40px;
    height: 54px;
  }

  .flip-card .top,
  .flip-card .bottom,
  .flip-card .top-flip,
  .flip-card .bottom-flip {
    font-size: 1.4rem;
  }

  .flip-clock-separator {
    font-size: 1.2rem;
    line-height: 54px;
  }

  .login-card {
    padding: 24px;
  }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.9rem;
}

/* ============================================
   SEARCH BAR
   ============================================ */
.search-bar {
  position: relative;
}

.search-bar input {
  padding: 10px 16px 10px 40px;
  background: #ffffff;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  width: 240px;
  transition: all 0.3s ease;
}

.search-bar input:focus {
  border-color: var(--gold);
  background: #ffffff;
  width: 280px;
}

.search-bar .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================
   SCHEDULE DISPLAY
   ============================================ */
.schedule-display {
  background: rgba(212, 168, 83, 0.08);
  border: 1px solid rgba(212, 168, 83, 0.15);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.schedule-display .schedule-icon {
  width: 48px;
  height: 48px;
  background: rgba(212, 168, 83, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.schedule-display .schedule-info h4 {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  font-weight: 600;
}

.schedule-display .schedule-info .schedule-datetime {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-light);
}
