:root {
  --royal-blue: #1e3a8a;
  --royal-blue-600: #1d4ed8;
  --electric-blue: #2563eb;
  --electric-blue-light: #3b82f6;
  --cyan: #06b6d4;
  --sky-cyan: #0ea5e9;
  --purple: #7c3aed;
  --purple-deep: #5b21b6;
  --gold: #f59e0b;
  --gold-soft: #fef3c7;
  --emerald: #10b981;
  --rose: #ef4444;
  --surface: #ffffff;
  --canvas: #f3f6fd;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-soft: rgba(148, 163, 184, 0.22);
  --sidebar-width: 272px;
  --navbar-height: 70px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --shadow-card: 0 10px 30px -8px rgba(30, 58, 138, 0.08), 0 4px 12px -4px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 14px 32px -10px rgba(37, 99, 235, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 45%),
              radial-gradient(circle at bottom left, rgba(124, 58, 237, 0.07), transparent 45%),
              var(--canvas);
  color: var(--text-main);
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

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

.app-sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(175deg, #0f172a 0%, #1e3a8a 52%, #1d4ed8 100%);
  color: #ffffff;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  box-shadow: 8px 0 32px rgba(15, 23, 42, 0.16);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
  padding: 20px 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
}

.sidebar-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar-brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin: 0;
  background: linear-gradient(90deg, #ffffff, #bae6fd, #fde047);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-brand-text span {
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.82);
  display: block;
  line-height: 1.25;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 24px;
}

.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.nav-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(186, 230, 253, 0.68);
  padding: 12px 14px 6px;
  font-weight: 700;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  margin-bottom: 4px;
  border-radius: 12px;
  color: rgba(241, 245, 249, 0.88);
  text-decoration: none;
  font-size: 0.89rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  width: 100%;
  background: transparent;
  text-align: left;
}

.sidebar-link i {
  width: 20px;
  text-align: center;
  font-size: 0.98rem;
  opacity: 0.9;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transform: translateX(3px);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.95), rgba(37, 99, 235, 0.95));
  color: #ffffff;
  font-weight: 600;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 20px -6px rgba(6, 182, 212, 0.6);
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.28);
}

.app-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ==================== TOP NAVBAR ==================== */
.app-navbar {
  height: var(--navbar-height);
  position: sticky;
  top: 0;
  z-index: 1020;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.navbar-school-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(37, 99, 235, 0.16);
  color: var(--royal-blue);
  font-size: 0.82rem;
  font-weight: 600;
}

.navbar-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--electric-blue), var(--purple));
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

/* ==================== CONTENT & CARDS ==================== */
.app-content {
  padding: 24px 26px 40px;
  flex: 1;
}

.page-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.page-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.02em;
}

.breadcrumb-modern {
  margin: 4px 0 0;
  padding: 0;
  background: transparent;
  font-size: 0.82rem;
}

.glass-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card-header-modern {
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title-modern {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.card-body-modern {
  padding: 20px 22px;
}

/* ==================== GLOSSY STAT CARDS (8 DISTINCT GRADIENTS) ==================== */
.stat-card {
  border-radius: var(--radius-lg);
  padding: 20px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 28px -10px rgba(15, 23, 42, 0.24);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -35%;
  right: -18%;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 45%);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 36px -12px rgba(15, 23, 42, 0.32);
}

.stat-royal   { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); }
.stat-emerald { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.stat-amber   { background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%); }
.stat-rose    { background: linear-gradient(135deg, #be123c 0%, #ef4444 100%); }
.stat-cyan    { background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%); }
.stat-purple  { background: linear-gradient(135deg, #5b21b6 0%, #8b5cf6 100%); }
.stat-teal    { background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%); }
.stat-gold    { background: linear-gradient(135deg, #b45309 0%, #eab308 100%); }

.stat-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.stat-value {
  font-size: 1.95rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 10px 0 4px;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.84rem;
  font-weight: 600;
  opacity: 0.94;
}

.stat-sub {
  font-size: 0.74rem;
  opacity: 0.85;
  margin-top: 6px;
}

/* ==================== STATUS BADGES ==================== */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.badge-status-hijau {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-status-merah {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.badge-status-kuning {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.38);
}

.badge-status-biru {
  background: rgba(14, 165, 233, 0.15);
  color: #0369a1;
  border: 1px solid rgba(14, 165, 233, 0.36);
}

.badge-status-indigo {
  background: rgba(124, 58, 237, 0.13);
  color: #5b21b6;
  border: 1px solid rgba(124, 58, 237, 0.32);
}

.badge-status-abu {
  background: rgba(100, 116, 139, 0.13);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.28);
}

.badge-dummy {
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
  border: 1px dashed rgba(217, 119, 6, 0.45);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

/* ==================== BUTTONS & TABLES ==================== */
.btn-gradient-primary {
  background: linear-gradient(135deg, var(--royal-blue-600), var(--sky-cyan));
  border: none;
  color: #ffffff;
  font-weight: 600;
  border-radius: 11px;
  box-shadow: 0 8px 18px -6px rgba(37, 99, 235, 0.55);
  transition: all 0.2s ease;
}

.btn-gradient-primary:hover {
  background: linear-gradient(135deg, var(--royal-blue), var(--electric-blue));
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -6px rgba(37, 99, 235, 0.7);
}

.btn-gradient-purple {
  background: linear-gradient(135deg, var(--purple), var(--electric-blue));
  border: none;
  color: #ffffff;
  font-weight: 600;
  border-radius: 11px;
}

.btn-gradient-purple:hover {
  color: #ffffff;
  filter: brightness(1.06);
}

.table-modern {
  margin-bottom: 0;
  font-size: 0.875rem;
}

.table-modern thead th {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  color: #334155;
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #e2e8f0;
  padding: 13px 14px;
  white-space: nowrap;
}

.table-modern tbody td {
  padding: 12px 14px;
  vertical-align: middle;
  border-color: rgba(226, 232, 240, 0.72);
}

.table-modern tbody tr:hover {
  background-color: rgba(239, 246, 255, 0.55);
}

.form-control, .form-select {
  border-radius: 11px;
  border-color: #cbd5e1;
  padding: 9px 13px;
  font-size: 0.88rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--electric-blue-light);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.14);
}

.modal-content {
  border-radius: 20px;
  border: none;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.modal-header-gradient {
  background: linear-gradient(135deg, var(--royal-blue), var(--electric-blue), var(--sky-cyan));
  color: #ffffff;
  border-bottom: none;
  padding: 18px 22px;
}

.modal-header-gradient .btn-close {
  filter: brightness(0) invert(1);
}

/* ==================== LOGIN PAGE ==================== */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 42%, #2563eb 76%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.login-orb-1, .login-orb-2 {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.login-orb-1 {
  width: 420px;
  height: 420px;
  background: rgba(124, 58, 237, 0.42);
  top: -120px;
  right: -80px;
}

.login-orb-2 {
  width: 360px;
  height: 360px;
  background: rgba(6, 182, 212, 0.35);
  bottom: -100px;
  left: -80px;
}

.login-card-shell {
  max-width: 1060px;
  width: 100%;
  border-radius: 26px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 32px 64px -16px rgba(15, 23, 42, 0.48);
  position: relative;
  z-index: 2;
}

.login-hero-pane {
  background: linear-gradient(155deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%);
  color: #ffffff;
  padding: 40px 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-form-pane {
  padding: 44px 40px;
}

/* ==================== RESPONSIVE SIDEBAR ==================== */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  z-index: 1035;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .sidebar-backdrop.show {
    display: block;
  }
  .app-main {
    margin-left: 0;
  }
  .app-content {
    padding: 18px 16px 32px;
  }
  .app-navbar {
    padding: 0 16px;
  }
  .login-form-pane {
    padding: 32px 24px;
  }
}

/* ==================== PRINT HELPER ==================== */
@media print {
  .no-print {
    display: none !important;
  }
}

