/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange: #F97316;
  --gold: #F59E0B;
  --dark: #1C1917;
  --dark2: #292524;
  --light: #FFF7ED;
  --text: #44403C;
  --text-light: #78716C;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(249,115,22,0.15);
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--dark);
  color: #fff;
  line-height: 1.6;
}

.highlight {
  background: linear-gradient(135deg, var(--orange), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 80px 8%;
  background: radial-gradient(ellipse at top left, #3a1a0a 0%, var(--dark) 60%);
  position: relative;
  overflow: hidden;
  gap: 40px;
}

.hero-content {
  max-width: 560px;
  z-index: 2;
}

.badge {
  display: inline-block;
  background: rgba(249,115,22,0.15);
  border: 1px solid rgba(249,115,22,0.4);
  color: var(--gold);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.1rem;
  color: #D6D3D1;
  margin-bottom: 36px;
  max-width: 440px;
}

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: #fff;
  padding: 14px 36px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(249,115,22,0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(249,115,22,0.5);
}

/* Hero decoration */
.hero-illustration {
  position: relative;
  width: 300px;
  height: 300px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.circle-deco {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.c1 {
  width: 280px; height: 280px;
  background: var(--orange);
}
.c2 {
  width: 180px; height: 180px;
  background: var(--gold);
}

.hero-logo-float {
  position: relative;
  width: 200px;
  height: 200px;
  object-fit: contain;
  animation: float 3s ease-in-out infinite;
  z-index: 2;
}

@keyframes float {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-16px); }
}

/* ===== SECTION KELAS ===== */
.section-kelas {
  padding: 80px 8%;
  background: var(--dark2);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  color: #A8A29E;
  margin-bottom: 56px;
  font-size: 1rem;
}

.kelas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

/* ===== KELAS CARD ===== */
.kelas-card {
  background: #1C1917;
  border: 1px solid rgba(249,115,22,0.2);
  border-radius: var(--radius);
  padding: 36px 28px 28px;
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.kelas-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  opacity: 0;
  transition: opacity 0.25s;
}

.kelas-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249,115,22,0.5);
  box-shadow: var(--shadow);
}

.kelas-card:hover::before {
  opacity: 1;
}

.kelas-card.featured {
  border-color: rgba(245,158,11,0.5);
  background: linear-gradient(160deg, #2a1a08, #1C1917);
}

.kelas-card.featured::before {
  opacity: 1;
}

.kelas-badge-top {
  position: absolute;
  top: 16px; right: 16px;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.kelas-icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.kelas-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.kelas-card p {
  color: #A8A29E;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.toggle-hint {
  display: inline-block;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0;
  transition: color 0.2s;
}

.kelas-card:hover .toggle-hint {
  color: var(--orange);
}

/* ===== MATERI LIST ===== */
.materi-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, margin-top 0.3s;
}

.materi-list.open {
  max-height: 400px;
  margin-top: 20px;
}

.materi-list ul {
  list-style: none;
  border-top: 1px solid rgba(249,115,22,0.15);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.materi-list li {
  background: rgba(249,115,22,0.07);
  border: 1px solid rgba(249,115,22,0.12);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: #D6D3D1;
  transition: background 0.2s;
}

.materi-list li:hover {
  background: rgba(249,115,22,0.15);
  color: #fff;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 28px;
  background: var(--dark);
  color: #57534E;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 60px 6%;
  }
  .hero p { margin: 0 auto 36px; }
  .hero-illustration { width: 200px; height: 200px; }
  .c1 { width: 200px; height: 200px; }
  .c2 { width: 130px; height: 130px; }
  .icon-float { font-size: 4rem; }
}

/* ===== LOGIN ===== */
.login-overlay {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at top left, #3a1a0a 0%, var(--dark) 70%);
  padding: 24px;
}

.login-box {
  background: var(--dark2);
  border: 1px solid rgba(249,115,22,0.25);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  text-align: center;
}

.login-logo {
  margin-bottom: 16px;
}

.logo-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 16px;
}

.login-box h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.login-sub {
  color: #A8A29E;
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.input-group {
  text-align: left;
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #D6D3D1;
  margin-bottom: 8px;
}

.input-group input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(249,115,22,0.25);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.input-group input:focus {
  border-color: var(--orange);
}

.input-group input::placeholder {
  color: #57534E;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  padding-right: 44px;
}

.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.toggle-pw:hover { opacity: 1; }

.input-hint {
  display: block;
  font-size: 0.75rem;
  color: #57534E;
  margin-top: 6px;
}

.login-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #FCA5A5;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  text-align: left;
}

.btn-full { width: 100%; text-align: center; }

/* ===== NAVBAR ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 8%;
  background: rgba(28,25,23,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(249,115,22,0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-user {
  font-size: 0.85rem;
  color: var(--gold);
}

.btn-logout {
  background: rgba(249,115,22,0.15);
  border: 1px solid rgba(249,115,22,0.3);
  color: var(--orange);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-logout:hover {
  background: rgba(249,115,22,0.3);
}

/* ===== UTILITY ===== */
.hidden { display: none !important; }

/* ===== ABSENSI OVERLAY ===== */
#absensi-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}

.absensi-box {
  background: var(--dark2);
  border: 1px solid rgba(249,115,22,0.3);
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.absensi-logo { margin-bottom: 20px; }

.absensi-box h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.absensi-sub {
  color: var(--gold);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.absensi-time {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 2px;
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}

.absensi-info {
  color: #A8A29E;
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.btn-hadir {
  display: inline-block;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: #fff;
  padding: 14px 40px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(249,115,22,0.4);
}

.btn-hadir:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(249,115,22,0.5);
}

.btn-hadir:disabled { cursor: not-allowed; opacity: 0.8; }

.absensi-ok {
  margin-top: 16px;
  color: #86EFAC;
  font-size: 0.88rem;
}

.absensi-err {
  margin-top: 16px;
  color: #FCA5A5;
  font-size: 0.88rem;
}

/* ===== GURU TAB ===== */
.guru-tab {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(249,115,22,0.25);
  color: #A8A29E;
  padding: 8px 24px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.guru-tab:hover {
  background: rgba(249,115,22,0.1);
  color: #fff;
  border-color: rgba(249,115,22,0.5);
}

.guru-tab.active {
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: #fff;
  border-color: transparent;
}
