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

:root {
  --primary: #4F46E5;
  --primary-dark: #3730A3;
  --primary-light: #EEF2FF;
  --secondary: #06B6D4;
  --accent: #F59E0B;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --dark: #0F172A;
  --gray-900: #1E293B;
  --gray-700: #334155;
  --gray-500: #64748B;
  --gray-300: #CBD5E1;
  --gray-100: #F1F5F9;
  --white: #FFFFFF;
  --sidebar-w: 260px;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--gray-100);
  color: var(--gray-900);
  line-height: 1.6;
  font-size: 14px;
}

/* ===== LANDING PAGE ===== */
.landing { background: var(--dark); min-height: 100vh; }

.nav-landing {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 60px;
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15,23,42,0.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo {
  font-family: 'Fraunces', serif;
  font-size: 28px; font-weight: 700;
  color: var(--white);
  text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.logo span { color: var(--secondary); }

.nav-btns { display: flex; gap: 12px; }

.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 60px;
  background: radial-gradient(ellipse at 50% 0%, rgba(79,70,229,0.25) 0%, transparent 70%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(79,70,229,0.2); border: 1px solid rgba(79,70,229,0.4);
  color: #A5B4FC; padding: 6px 16px; border-radius: 100px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(40px, 6vw, 72px);
  color: var(--white); line-height: 1.1;
  margin-bottom: 20px;
}
.hero h1 em { font-style: italic; color: var(--secondary); }

.hero p {
  font-size: 18px; color: rgba(255,255,255,0.6);
  max-width: 560px; margin: 0 auto 40px;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  padding: 60px; max-width: 1200px; margin: 0 auto;
}

.feature-card {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius); padding: 28px;
  transition: transform 0.2s, border-color 0.2s;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(79,70,229,0.4); }

.feature-icon {
  width: 48px; height: 48px; background: rgba(79,70,229,0.2);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: #A5B4FC; font-size: 24px; margin-bottom: 16px;
}
.feature-card h3 { color: var(--white); font-size: 16px; margin-bottom: 8px; }
.feature-card p { color: rgba(255,255,255,0.5); font-size: 13px; line-height: 1.6; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; text-decoration: none;
  transition: all 0.2s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(79,70,229,0.4); }
.btn-secondary { background: rgba(255,255,255,0.1); color: var(--white); border: 1px solid rgba(255,255,255,0.2); }
.btn-secondary:hover { background: rgba(255,255,255,0.15); }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #DC2626; }
.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #059669; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: 100vh; display: flex;
  background: var(--dark);
}
.auth-left {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e1b4b 0%, #0F172A 100%);
  padding: 40px; position: relative; overflow: hidden;
}
.auth-left::before {
  content: ''; position: absolute; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(79,70,229,0.3) 0%, transparent 70%);
  top: -100px; right: -100px; border-radius: 50%;
}
.auth-left-content { position: relative; z-index: 1; max-width: 400px; }
.auth-left h2 { font-family: 'Fraunces', serif; font-size: 36px; color: var(--white); margin-bottom: 16px; }
.auth-left p { color: rgba(255,255,255,0.6); font-size: 15px; line-height: 1.7; }

.auth-right {
  width: 480px; display: flex; align-items: center; justify-content: center;
  padding: 40px; background: var(--white);
}
.auth-box { width: 100%; max-width: 380px; }
.auth-box .logo { color: var(--dark); margin-bottom: 32px; display: block; text-decoration: none; font-size: 24px; }
.auth-box h1 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.auth-box .subtitle { color: var(--gray-500); margin-bottom: 32px; }

.role-tabs {
  display: flex; gap: 8px; margin-bottom: 28px;
  background: var(--gray-100); padding: 4px; border-radius: 10px;
}
.role-tab {
  flex: 1; padding: 8px; border: none; background: transparent;
  border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--gray-500); transition: all 0.2s; font-family: 'Plus Jakarta Sans', sans-serif;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.role-tab.active { background: var(--white); color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* ===== FORM ===== */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--gray-300);
  border-radius: 8px; font-size: 14px; font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--gray-900); background: var(--white); transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.form-control::placeholder { color: var(--gray-300); }
.form-control.is-invalid { border-color: var(--danger); }
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-left: 42px; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gray-500); font-size: 18px; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }

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

/* ===== ALERTS ===== */
.alert {
  padding: 12px 16px; border-radius: 8px; margin-bottom: 16px;
  font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px;
}
.alert-danger { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: #15803D; border: 1px solid #BBF7D0; }
.alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.alert-info { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }

/* ===== DASHBOARD LAYOUT ===== */
.dashboard { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); min-height: 100vh;
  background: var(--dark); position: fixed; left: 0; top: 0; bottom: 0;
  display: flex; flex-direction: column; z-index: 50;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar-head {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-head .logo { font-size: 22px; margin-bottom: 0; }

.sidebar-user {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-avatar {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.sidebar-user-info { overflow: hidden; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.5px; }

.sidebar-nav { flex: 1; padding: 12px 12px; overflow-y: auto; }
.nav-section-label {
  font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.3);
  letter-spacing: 1px; text-transform: uppercase;
  padding: 12px 8px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  color: rgba(255,255,255,0.5); text-decoration: none;
  font-size: 13px; font-weight: 500; transition: all 0.2s;
  margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.nav-item.active { background: var(--primary); color: var(--white); }
.nav-item .material-symbols-outlined { font-size: 20px; }

.sidebar-foot {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.main-content {
  margin-left: var(--sidebar-w); flex: 1; min-height: 100vh;
  display: flex; flex-direction: column;
}

.topbar {
  background: var(--white); padding: 0 32px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--gray-100);
  position: sticky; top: 0; z-index: 40;
}
.topbar-title { font-size: 18px; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.page-content { padding: 28px 32px; flex: 1; }

/* ===== STATS CARDS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.stat-card {
  background: var(--white); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px;
  border: 1px solid rgba(0,0,0,0.04);
}
.stat-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}
.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.cyan { background: #ECFEFF; color: #0891B2; }
.stat-icon.amber { background: #FFFBEB; color: #D97706; }
.stat-icon.green { background: #F0FDF4; color: #16A34A; }
.stat-value { font-size: 28px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--gray-500); font-weight: 500; }

/* ===== CARDS ===== */
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.04);
  overflow: hidden;
}
.card-header {
  padding: 18px 22px; border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 15px; font-weight: 700; }
.card-body { padding: 22px; }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  background: var(--gray-100); text-align: left;
  padding: 11px 16px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-500);
}
td { padding: 13px 16px; border-bottom: 1px solid var(--gray-100); font-size: 13px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(79,70,229,0.02); }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 600;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #F0FDF4; color: #15803D; }
.badge-warning { background: #FFFBEB; color: #92400E; }
.badge-danger { background: #FEF2F2; color: #B91C1C; }
.badge-gray { background: var(--gray-100); color: var(--gray-500); }

/* ===== LES CARDS ===== */
.les-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.les-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-100); overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  box-shadow: var(--shadow);
}
.les-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.les-card-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, #6366F1 100%);
  color: var(--white);
}
.les-card-mapel { font-size: 11px; font-weight: 700; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.les-card-title { font-size: 16px; font-weight: 700; }
.les-card-body { padding: 16px 20px; }
.les-info { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--gray-500); font-size: 13px; }
.les-info .material-symbols-outlined { font-size: 16px; }
.les-card-footer { padding: 14px 20px; border-top: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; }
.kuota-bar { flex: 1; margin-right: 12px; }
.kuota-text { font-size: 12px; color: var(--gray-500); margin-bottom: 4px; }
.progress { height: 6px; background: var(--gray-100); border-radius: 100px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 100px; background: var(--primary); transition: width 0.3s; }
.progress-bar.full { background: var(--danger); }

/* ===== MEET CARD ===== */
.meet-card {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border-radius: var(--radius); padding: 24px; color: white; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 8px 32px rgba(79,70,229,0.4);
}
.meet-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.meet-card p { font-size: 13px; opacity: 0.7; }
.meet-btn {
  display: flex; align-items: center; gap: 8px;
  background: #4CAF50; color: white; padding: 12px 20px;
  border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 14px;
  transition: all 0.2s; white-space: nowrap;
}
.meet-btn:hover { background: #388E3C; transform: scale(1.02); }

/* ===== MODALS ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  z-index: 1000; align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--white); border-radius: 16px;
  width: 90%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.2);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--gray-500); font-size: 22px; padding: 4px; border-radius: 6px; }
.modal-close:hover { background: var(--gray-100); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-100); display: flex; justify-content: flex-end; gap: 10px; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-500); }
.empty-state .material-symbols-outlined { font-size: 56px; color: var(--gray-300); margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; color: var(--gray-700); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ===== MAPEL GRID ===== */
.mapel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.mapel-card {
  background: var(--white); border-radius: var(--radius); padding: 20px;
  text-align: center; border: 1px solid var(--gray-100);
  transition: all 0.2s; cursor: pointer; text-decoration: none; color: var(--gray-900);
}
.mapel-card:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(79,70,229,0.12); transform: translateY(-2px); }
.mapel-icon { font-size: 36px; color: var(--primary); margin-bottom: 10px; }
.mapel-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.mapel-count { font-size: 12px; color: var(--gray-500); }

/* ===== GURU CARD ===== */
.guru-card {
  background: var(--white); border-radius: var(--radius); padding: 20px;
  border: 1px solid var(--gray-100); text-align: center;
  transition: all 0.2s;
}
.guru-card:hover { box-shadow: var(--shadow); }
.guru-avatar-lg {
  width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 26px; font-weight: 700;
  margin: 0 auto 12px;
}
.guru-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.guru-mapel-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }

/* ===== JADWAL ===== */
.jadwal-item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--gray-100);
}
.jadwal-item:last-child { border-bottom: none; }
.jadwal-date {
  text-align: center; min-width: 48px;
  background: var(--primary-light); border-radius: 8px; padding: 8px;
}
.jadwal-day { font-size: 11px; font-weight: 700; color: var(--primary); text-transform: uppercase; }
.jadwal-num { font-size: 22px; font-weight: 800; color: var(--primary); line-height: 1; }
.jadwal-info { flex: 1; }
.jadwal-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.jadwal-meta { font-size: 12px; color: var(--gray-500); display: flex; align-items: center; gap: 8px; }

/* ===== CSV IMPORT ===== */
.upload-area {
  border: 2px dashed var(--gray-300); border-radius: var(--radius);
  padding: 40px; text-align: center; cursor: pointer; transition: all 0.2s;
}
.upload-area:hover, .upload-area.dragover { border-color: var(--primary); background: var(--primary-light); }
.upload-area .material-symbols-outlined { font-size: 48px; color: var(--gray-300); margin-bottom: 12px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; padding: 40px 24px; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .auth-left { display: none; }
  .auth-right { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .nav-landing { padding: 16px 24px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ===== UTILITIES ===== */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--gray-500); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-center { text-align: center; }
.w-100 { width: 100%; }

/* Material Icons */
.material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; vertical-align: middle; }
