/* ============================================================
   ALAT BANTU DAPODIK - STYLESHEET
   Dark Mode Glassmorphism Design
   ============================================================ */

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

/* ============================================================
   CSS VARIABLES / DESIGN TOKENS
   ============================================================ */
:root {
  --bg-base:       #060d1f;
  --bg-surface:    #0d1a2e;
  --bg-elevated:   #112240;
  --glass-bg:      rgba(17, 34, 64, 0.7);
  --glass-border:  rgba(59, 130, 246, 0.2);
  --glass-hover:   rgba(59, 130, 246, 0.08);

  --primary:       #3b82f6;
  --primary-glow:  rgba(59, 130, 246, 0.4);
  --secondary:     #8b5cf6;
  --accent:        #14b8a6;

  --success:       #10b981;
  --success-bg:    rgba(16, 185, 129, 0.15);
  --warning:       #f59e0b;
  --warning-bg:    rgba(245, 158, 11, 0.15);
  --danger:        #ef4444;
  --danger-bg:     rgba(239, 68, 68, 0.15);
  --info:          #06b6d4;

  --text-primary:  #f0f6ff;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;
  --muted:         #64748b;

  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     18px;
  --radius-xl:     24px;

  --shadow-sm:     0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:     0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:     0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow:   0 0 40px rgba(59,130,246,0.15);

  --transition:    all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  --gradient-main: linear-gradient(135deg, #3b82f6, #8b5cf6, #14b8a6);
  --gradient-glow: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2), rgba(20,184,166,0.2));
}

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

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

/* Animated gradient background */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 20% 20%, rgba(59,130,246,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 80%, rgba(139,92,246,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 50%, rgba(20,184,166,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.1rem; }
p  { color: var(--text-secondary); }

.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
#app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 13, 31, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.header-logo { width: 40px; height: 40px; flex-shrink: 0; filter: drop-shadow(0 0 8px var(--primary-glow)); }
.header-logo svg { width: 40px; height: 40px; }
.header-text { display: flex; flex-direction: column; }
.header-title { font-size: 0.85rem; font-weight: 800; letter-spacing: 0.05em; background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.header-subtitle { font-size: 0.65rem; color: var(--text-muted); font-weight: 500; margin-top: -2px; }

.header-nav {
  display: flex;
  gap: 0.3rem;
  margin-left: auto;
  align-items: center;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-btn:hover {
  background: var(--glass-hover);
  border-color: var(--glass-border);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.nav-btn.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
#main-content {
  min-height: calc(100vh - 64px);
  transition: var(--transition-slow);
}

.page-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-container.center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 100px);
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h2 {
  margin-bottom: 0.3rem;
}

.dashboard-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* ============================================================
   GLASS CARD
   ============================================================ */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(59,130,246,0.05);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* ============================================================
   LANDING PAGE
   ============================================================ */
.landing-hero {
  max-width: 1300px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.5rem;
  align-items: start;
  min-height: calc(100vh - 80px);
}

.hero-bg-glow {
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  height: 400px;
  background: var(--gradient-glow);
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
}

.hero-content { display: flex; flex-direction: column; gap: 1.5rem; justify-content: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.3);
  color: var(--primary);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  width: fit-content;
  animation: pulse-border 3s infinite;
}

@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.2); }
  50% { box-shadow: 0 0 0 6px rgba(59,130,246,0); }
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
}

.hero-desc {
  font-size: 1rem;
  max-width: 600px;
  line-height: 1.8;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-4px); border-color: rgba(59,130,246,0.4); }
.stat-card.highlight { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.4); }
.stat-icon { font-size: 1.5rem; margin-bottom: 0.25rem; }
.stat-val { font-size: 1.8rem; font-weight: 800; background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-lbl { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

.global-progress {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 100px;
  overflow: hidden;
}
.global-progress-bar {
  height: 100%;
  background: var(--gradient-main);
  border-radius: 100px;
  transition: width 1s ease;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hero info card */
.hero-info-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: sticky;
  top: 80px;
}

.info-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.info-card-header h3 { font-size: 1rem; }

.info-rows { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.5rem; }
.info-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.85rem; padding: 0.4rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.info-lbl { color: var(--text-muted); flex-shrink: 0; }
.info-val { color: var(--text-primary); font-weight: 500; text-align: right; }

.info-steps { display: flex; flex-direction: column; gap: 0.75rem; }
.step { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; }
.step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--gradient-main); color: white; font-weight: 700; font-size: 0.75rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  background: var(--gradient-main);
  color: white;
  border: none;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 25px var(--primary-glow); filter: brightness(1.1); }
.btn-primary:active { transform: translateY(0); }
.btn-primary.large { padding: 0.85rem 1.75rem; font-size: 0.95rem; border-radius: var(--radius-md); }
.btn-primary.small { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.btn-primary.w-full { width: 100%; justify-content: center; }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.btn-secondary:hover { background: var(--glass-hover); border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn-secondary.large { padding: 0.85rem 1.75rem; font-size: 0.95rem; border-radius: var(--radius-md); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}
.btn-ghost:hover { color: var(--text-primary); background: var(--glass-hover); }
.btn-ghost.small { padding: 0.3rem 0.7rem; font-size: 0.78rem; }

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.3);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-danger.small { padding: 0.35rem 0.75rem; font-size: 0.78rem; }

.btn-geo {
  background: linear-gradient(135deg, rgba(20,184,166,0.15), rgba(59,130,246,0.15));
  border: 1px solid rgba(20,184,166,0.4);
  color: var(--accent);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
}
.btn-geo:hover { background: linear-gradient(135deg, rgba(20,184,166,0.25), rgba(59,130,246,0.25)); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(20,184,166,0.2); }
.btn-geo:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: var(--transition);
}
.icon-btn:hover { background: var(--glass-hover); transform: scale(1.1); }
.icon-btn.danger:hover { background: var(--danger-bg); }

.btn-group { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.input-field {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
}
.input-field:focus { border-color: var(--primary); background: rgba(59,130,246,0.06); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.input-field::placeholder { color: var(--text-muted); }
.input-field.small { padding: 0.45rem 0.7rem; font-size: 0.82rem; width: auto; }

select.input-field { cursor: pointer; }
select.input-field option { background: var(--bg-surface); color: var(--text-primary); }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.form-group .required { color: var(--danger); }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row .flex-1 { flex: 1; min-width: 150px; }
.form-row .flex-2 { flex: 2; min-width: 200px; }
.form-row .flex-3 { flex: 3; min-width: 200px; }

.hint-text { font-size: 0.78rem; color: var(--text-muted); }

.input-btn-row { display: flex; gap: 0.5rem; }
.input-btn-row .input-field { flex: 1; }

/* Radio Cards */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
  user-select: none;
}
.radio-card input { display: none; }
.radio-card:hover { border-color: var(--primary); background: rgba(59,130,246,0.08); }
.radio-card.selected {
  border-color: var(--primary);
  background: rgba(59,130,246,0.15);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--primary);
}

/* Toggle Options (Ya/Tidak) */
.toggle-group { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.toggle-option {
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition);
  user-select: none;
  text-align: center;
}
.toggle-option input { display: none; }
.toggle-option:hover { border-color: var(--primary); background: rgba(59,130,246,0.08); transform: translateY(-2px); }
.toggle-option.selected {
  border-color: var(--success);
  background: var(--success-bg);
  color: var(--success);
  box-shadow: 0 0 0 1px var(--success), 0 4px 12px rgba(16,185,129,0.2);
}

/* ============================================================
   FORM SECTIONS
   ============================================================ */
.data-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.form-section {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  animation: slide-up 0.3s ease;
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.section-icon { font-size: 1.2rem; }
.section-header h3 { font-size: 1rem; }
.section-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* Form Header (student info bar) */
.form-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  flex-wrap: wrap;
  position: sticky;
  top: 63px;
  z-index: 10;
  backdrop-filter: blur(20px);
  margin-bottom: 0;
  max-width: 100%;
}
.form-student-info { display: flex; align-items: center; gap: 0.75rem; flex: 1; }
.form-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--gradient-main); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 700; color: white; flex-shrink: 0; }
.form-nama { font-weight: 700; font-size: 0.95rem; }
.form-kelas { font-size: 0.78rem; color: var(--text-muted); }

.form-progress-info { text-align: right; }
.form-progress-label { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0.3rem; }
.progress-bar-sm { width: 120px; height: 5px; background: var(--bg-elevated); border-radius: 100px; overflow: hidden; }
.progress-fill-sm { height: 100%; background: var(--gradient-main); border-radius: 100px; transition: width 0.5s ease; }

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding-bottom: 2rem;
}

/* ============================================================
   GEO PANEL
   ============================================================ */
.geo-panel { display: flex; flex-direction: column; gap: 0.75rem; }

.geo-status {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 1rem;
  min-height: 60px;
  display: flex;
  align-items: center;
  transition: var(--transition);
}
.geo-status.success { border-color: rgba(16,185,129,0.3); background: rgba(16,185,129,0.06); }
.geo-status.error { border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.06); }

.geo-result { width: 100%; }
.geo-coords { display: flex; gap: 1.5rem; font-size: 0.85rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.geo-jarak { font-size: 0.9rem; margin-bottom: 0.5rem; }
.jarak-highlight { color: var(--accent); font-size: 1.05rem; }
.geo-placeholder { color: var(--text-muted); font-size: 0.85rem; }
.geo-error { color: var(--danger); font-size: 0.85rem; }

@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin 1s linear infinite; }

/* ============================================================
   ADMIN & SISWA LIST
   ============================================================ */
.admin-grid { display: grid; grid-template-columns: 380px 1fr; gap: 1.5rem; align-items: start; }

.siswa-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: 520px; overflow-y: auto; padding-right: 4px; }

.siswa-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  animation: slide-up 0.2s ease;
}
.siswa-item:hover { border-color: var(--glass-border); background: var(--glass-hover); }

.siswa-item-info { display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0; }
.siswa-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gradient-main); display: flex; align-items: center; justify-content: center; font-weight: 700; color: white; font-size: 0.9rem; flex-shrink: 0; }
.siswa-nama { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.siswa-meta { font-size: 0.75rem; color: var(--text-muted); }
.siswa-item-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

/* Siswa Cards */
.search-section { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.search-section .input-field { flex: 1; min-width: 200px; }
.search-big-box { position: relative; flex: 1; min-width: 250px; }
.search-icon { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); font-size: 0.9rem; pointer-events: none; }
.search-big-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}
.search-big-input:focus { border-color: var(--primary); background: rgba(59,130,246,0.06); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }

.siswa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }

.siswa-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transition: var(--transition);
  animation: slide-up 0.25s ease;
  flex-wrap: wrap;
}
.siswa-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(59,130,246,0.4); }
.siswa-card.done { border-color: rgba(16,185,129,0.25); background: rgba(16,185,129,0.04); }

.siswa-card-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.siswa-card-avatar.done { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 4px 15px rgba(16,185,129,0.4); }

.siswa-card-info { flex: 1; min-width: 0; }
.siswa-card-nama { font-weight: 700; font-size: 1rem; }
.siswa-card-kelas { font-size: 0.8rem; color: var(--text-muted); }
.siswa-card-nisn { font-size: 0.75rem; color: var(--text-muted); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(16,185,129,0.3); }
.badge-pending { background: rgba(245,158,11,0.12); color: var(--warning); border: 1px solid rgba(245,158,11,0.3); }
.badge-draft   { background: rgba(99,102,241,0.12); color: #818cf8; border: 1px solid rgba(99,102,241,0.3); }

/* ============================================================
   DASHBOARD
   ============================================================ */
.summary-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }

.summary-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}
.summary-card:hover { transform: translateY(-4px); }
.summary-card.total   { border-top: 3px solid var(--primary); }
.summary-card.success { border-top: 3px solid var(--success); }
.summary-card.draft   { border-top: 3px solid #818cf8; }
.summary-card.pending { border-top: 3px solid var(--warning); }
.summary-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.summary-val { font-size: 2.2rem; font-weight: 800; }
.summary-card.total .summary-val   { color: var(--primary); }
.summary-card.success .summary-val { color: var(--success); }
.summary-card.draft .summary-val   { color: #818cf8; }
.summary-card.pending .summary-val { color: var(--warning); }
.summary-lbl { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

.overall-progress-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.progress-pct { font-size: 2rem; font-weight: 800; background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.progress-bar-lg { height: 12px; background: var(--bg-elevated); border-radius: 100px; overflow: hidden; margin-bottom: 0.75rem; }
.progress-fill-lg { height: 100%; background: var(--gradient-main); border-radius: 100px; transition: width 1s ease; }
.progress-labels { display: flex; gap: 1.5rem; font-size: 0.82rem; flex-wrap: wrap; }

.kelas-progress-list { display: flex; flex-direction: column; gap: 0.75rem; }
.kelas-progress-item { display: flex; align-items: center; gap: 0.75rem; }
.kelas-label { width: 100px; font-size: 0.82rem; font-weight: 600; flex-shrink: 0; }
.kelas-bar-wrap { flex: 1; }
.kelas-bar { height: 8px; background: var(--bg-elevated); border-radius: 100px; overflow: hidden; }
.kelas-bar-fill { height: 100%; background: var(--gradient-main); border-radius: 100px; transition: width 0.8s ease; }
.kelas-stat { font-size: 0.82rem; font-weight: 600; white-space: nowrap; color: var(--text-secondary); width: 80px; text-align: right; }
.kelas-pct { color: var(--text-muted); }

/* Table */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.data-table th { padding: 0.75rem 0.9rem; text-align: left; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid rgba(255,255,255,0.06); white-space: nowrap; }
.data-table td { padding: 0.75rem 0.9rem; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: var(--glass-hover); }
.muted { color: var(--text-muted); }

.mini-progress { height: 4px; background: var(--bg-elevated); border-radius: 100px; overflow: hidden; width: 60px; margin-bottom: 2px; }
.mini-bar { height: 100%; background: var(--gradient-main); border-radius: 100px; }

/* ============================================================
   PENGATURAN - KELAS CHIPS
   ============================================================ */
.kelas-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.kelas-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 100px;
  padding: 0.3rem 0.4rem 0.3rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary);
}
.chip-remove {
  background: rgba(59,130,246,0.2);
  border: none;
  color: var(--primary);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  line-height: 1;
}
.chip-remove:hover { background: var(--danger); color: white; }

/* ============================================================
   FILE UPLOAD
   ============================================================ */
.file-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.03);
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
  text-align: center;
}
.file-upload-label:hover { border-color: var(--primary); color: var(--primary); background: rgba(59,130,246,0.05); }

.toast-inline {
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  margin-top: 0.75rem;
}
.toast-inline.success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(16,185,129,0.3); }
.toast-inline.error   { background: var(--danger-bg);  color: var(--danger);  border: 1px solid rgba(239,68,68,0.3); }

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast-popup {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  max-width: 360px;
  backdrop-filter: blur(20px);
}
.toast-popup.show { opacity: 1; transform: translateY(0); }
.toast-popup.success { border-color: rgba(16,185,129,0.4); box-shadow: 0 8px 32px rgba(16,185,129,0.2); }
.toast-popup.error   { border-color: rgba(239,68,68,0.4);  box-shadow: 0 8px 32px rgba(239,68,68,0.2); }
.toast-popup.info    { border-color: rgba(6,182,212,0.4);  box-shadow: 0 8px 32px rgba(6,182,212,0.15); }

/* ============================================================
   MISC
   ============================================================ */
.divider { border: none; border-top: 1px solid rgba(255,255,255,0.06); margin: 1.25rem 0; }

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  font-size: 0.85rem;
}

.empty-state-large {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
}
.empty-icon { font-size: 4rem; margin-bottom: 0.5rem; }
.empty-state-large h3 { font-size: 1.3rem; }

.search-box { display: flex; gap: 0.5rem; }
.filter-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.danger-zone { display: flex; justify-content: flex-end; padding-top: 0.75rem; border-top: 1px solid rgba(239,68,68,0.15); margin-top: 0.75rem; }

code { background: rgba(255,255,255,0.08); padding: 0.2rem 0.4rem; border-radius: 4px; font-family: monospace; font-size: 0.82rem; color: var(--accent); }

/* ============================================================
   LOADING OVERLAY
   ============================================================ */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 13, 31, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#loading-overlay.show { opacity: 1; pointer-events: all; }

.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(59,130,246,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================================
   MODAL LOGIN
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 13, 31, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9997;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(59,130,246,0.1);
  animation: slide-up 0.25s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.modal-header h3 { font-size: 1.1rem; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: var(--transition);
}
.modal-close:hover { background: var(--glass-hover); color: var(--text-primary); }

/* ============================================================
   ADMIN UI
   ============================================================ */
.admin-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 100px;
  padding: 0.3rem 0.3rem 0.3rem 0.85rem;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
}

.admin-badge-card {
  background: var(--success-bg);
  border: 1px solid rgba(16,185,129,0.3);
  color: var(--success);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  margin-top: 0.75rem;
}

.panduan-steps {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .landing-hero { grid-template-columns: 1fr; }
  .hero-info-card { position: static; }
  .admin-grid { grid-template-columns: 1fr; }
  .summary-cards { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .header-nav { 
    display: none;
    position: fixed;
    top: 63px;
    left: 0;
    right: 0;
    background: rgba(6, 13, 31, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.3rem;
    z-index: 99;
  }
  .header-nav.open { display: flex; }
  .hamburger { display: flex; }
  .nav-btn { width: 100%; justify-content: flex-start; padding: 0.65rem 1rem; }

  .form-header { top: 63px; gap: 0.75rem; }
  .form-progress-info { display: none; }

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

  .page-container { padding: 1.25rem 1rem; }
  .form-row { flex-direction: column; }
  .form-row .flex-1, .form-row .flex-2 { min-width: unset; }

  .dashboard-actions { flex-direction: column; }
  .dashboard-actions .btn-primary, .dashboard-actions .btn-secondary, .dashboard-actions .btn-ghost { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .summary-cards { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn-primary, .hero-actions .btn-secondary { width: 100%; justify-content: center; }
  .toggle-group { flex-direction: column; }
  .toggle-option { min-width: unset; }
  .kelas-progress-item { flex-wrap: wrap; }
  .kelas-label { width: 100%; }
}
