/* =============================================================
   CodeKids — Design Tokens
   Signature element: "Jalur Level" — garis penghubung bertitik
   yang merepresentasikan perjalanan belajar anak (Pemula -> Mahir),
   dipakai di hero, kartu kelas, dan progres anak.
   ============================================================= */

:root {
  --navy-900: #0B1B42;
  --navy-800: #142B6B;
  --navy-700: #1E3A8A;
  --amber-500: #F59E0B;
  --amber-600: #DB8409;
  --cyan-400: #22D3EE;
  --green-600: #16A34A;
  --red-500: #DC2626;
  --bg: #F6F7FB;
  --card: #FFFFFF;
  --ink-900: #111827;
  --ink-600: #4B5563;
  --ink-400: #9CA3AF;
  --border: #E5E7EB;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 10px 30px rgba(11, 27, 66, 0.08);
  --shadow-lift: 0 16px 40px rgba(11, 27, 66, 0.14);

  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.25; margin: 0 0 .5em; color: var(--navy-900); }
p { margin: 0 0 1em; color: var(--ink-600); }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  min-height: 50px;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--amber-500); color: #1A1300; box-shadow: 0 10px 24px rgba(245,158,11,.35); }
.btn-primary:hover { background: var(--amber-600); }
.btn-outline { background: transparent; border: 2px solid var(--navy-700); color: var(--navy-700); }
.btn-outline:hover { background: var(--navy-700); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn-block { width: 100%; }
.btn-lg { padding: 18px 30px; font-size: 17px; }
.btn-sm { padding: 10px 16px; font-size: 14px; min-height: 40px; }
.btn-danger { background: #FEE2E2; color: var(--red-500); }
.btn-success { background: #DCFCE7; color: var(--green-600); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-heading); font-weight: 700; font-size: 19px; color: var(--navy-900); }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--navy-700), var(--cyan-400));
  color: #fff; font-size: 14px; font-weight: 700;
}
.logo-text strong { color: var(--amber-500); }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a { font-weight: 500; color: var(--ink-600); font-size: 15px; }
.main-nav a:hover { color: var(--navy-700); }
.btn-nav-cta { padding: 10px 18px; min-height: 40px; font-size: 14px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--navy-900); border-radius: 2px; }

@media (max-width: 860px) {
  .main-nav {
    position: fixed; top: 68px; left: 0; right: 0; bottom: 0;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 24px 20px; gap: 4px; transform: translateX(100%);
    transition: transform .25s ease; overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { padding: 14px 10px; border-bottom: 1px solid var(--border); font-size: 16px; }
  .btn-nav-cta { margin-top: 12px; text-align: center; }
  .nav-toggle { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(120% 140% at 20% -10%, #21407F 0%, var(--navy-900) 55%, #081230 100%);
  color: #fff;
  padding: 56px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(34,211,238,.18) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  opacity: .35;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 760px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--cyan-400); margin-bottom: 20px;
}
.hero h1 { font-size: 34px; color: #fff; font-weight: 800; letter-spacing: -.5px; }
.hero h1 .hl { color: var(--amber-500); }
.hero-sub { color: rgba(255,255,255,.78); font-size: 17px; max-width: 560px; margin: 0 auto 28px; }
.hero-cta { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; width: 100%; }
.hero-trust { margin-top: 28px; display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,.65); }
.hero-trust strong { color: #fff; font-family: var(--font-heading); display: block; font-size: 20px; }

/* Signature: Jalur Level (learning path) */
.jalur-level { display: flex; align-items: center; justify-content: center; gap: 0; margin: 44px auto 0; max-width: 520px; }
.jalur-level .node { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; position: relative; }
.jalur-level .dot {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.25);
  font-family: var(--font-heading); font-weight: 700; font-size: 13px; color: #fff;
}
.jalur-level .node.active .dot { background: var(--amber-500); border-color: var(--amber-500); color: #1A1300; box-shadow: 0 0 0 6px rgba(245,158,11,.2); }
.jalur-level .node span.label { font-size: 12px; color: rgba(255,255,255,.7); }
.jalur-level .line { flex: 1; height: 2px; background: rgba(255,255,255,.2); margin-top: -22px; }
.jalur-level .line.filled { background: linear-gradient(90deg, var(--amber-500), var(--cyan-400)); }

@media (min-width: 640px) { .hero h1 { font-size: 44px; } .hero-sub { font-size: 18px; } }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.eyebrow { color: var(--amber-600); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; display: block; }
.section-head h2 { font-size: 26px; }
@media (min-width: 640px) { .section-head h2 { font-size: 32px; } }

/* ---------- Benefit / Feature Cards ---------- */
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 760px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 760px) { .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; } }

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(11,27,66,.04);
}
.benefit-card .icon-badge {
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  color: var(--cyan-400); font-size: 22px; margin-bottom: 18px;
}
.benefit-card h3 { font-size: 18px; margin-bottom: 8px; }
.benefit-card p { font-size: 14.5px; margin-bottom: 0; }

/* ---------- Class Cards ---------- */
.filter-bar { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 28px; -ms-overflow-style: none; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--border);
  background: #fff; font-size: 14px; font-weight: 600; color: var(--ink-600); white-space: nowrap;
}
.chip.active, .chip:hover { border-color: var(--navy-700); color: var(--navy-700); background: #EEF2FF; }

.kelas-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.kelas-card .thumb {
  height: 150px; background: linear-gradient(135deg, var(--navy-800), var(--cyan-400));
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.85);
  font-family: var(--font-heading); font-weight: 700; font-size: 15px; text-align: center; padding: 16px;
}
.kelas-card .body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.kelas-card .level-tag { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: #FEF3C7; color: var(--amber-600); }
.kelas-card h3 { font-size: 18px; margin-bottom: 2px; }
.kelas-card .meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--ink-400); }
.kelas-card .price { font-family: var(--font-heading); font-weight: 700; font-size: 20px; color: var(--navy-800); margin-top: auto; }
.kelas-card .price span { font-size: 12px; color: var(--ink-400); font-weight: 500; font-family: var(--font-body); }

.grid-cards { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 640px) { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-cards { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Testimonials ---------- */
.testi-card { background: #fff; }
.testi-card .stars { color: var(--amber-500); font-size: 14px; margin-bottom: 12px; }
.testi-card p.quote { font-style: italic; color: var(--ink-900); font-size: 15px; }
.testi-person { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.testi-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--navy-700); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 700; }
.testi-person strong { display: block; font-size: 14px; }
.testi-person span { font-size: 12.5px; color: var(--ink-400); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy-800), var(--navy-900));
  border-radius: var(--radius-lg);
  padding: 44px 28px;
  text-align: center;
  color: #fff;
}
.cta-band h2 { color: #fff; font-size: 24px; }
.cta-band p { color: rgba(255,255,255,.75); }

/* ---------- Forms ---------- */
.form-card { max-width: 560px; margin: 0 auto; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; color: var(--ink-900); }
.field .hint { font-size: 12.5px; color: var(--ink-400); margin-top: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 15.5px; background: #fff; color: var(--ink-900);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 4px rgba(30,58,138,.12);
}
.field.error input, .field.error select { border-color: var(--red-500); }
.field .error-msg { color: var(--red-500); font-size: 13px; margin-top: 6px; display: block; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 560px) { .field-row.two { grid-template-columns: 1fr 1fr; } }

.alert { padding: 16px 18px; border-radius: var(--radius-sm); margin-bottom: 22px; font-size: 14.5px; }
.alert-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.alert-info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-success { background: #DCFCE7; color: #166534; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-info { background: #DBEAFE; color: #1E40AF; }
.badge-muted { background: #F3F4F6; color: #6B7280; }

/* ---------- Empty / Success state ---------- */
.state-box { text-align: center; padding: 48px 24px; border: 1.5px dashed var(--border); border-radius: var(--radius-lg); background: #fff; }
.state-box .emoji { font-size: 40px; margin-bottom: 12px; }
.state-box h3 { font-size: 17px; margin-bottom: 6px; }
.state-box p { font-size: 14.5px; max-width: 380px; margin: 0 auto 18px; }

/* ---------- Dashboard ---------- */
.dash-header { background: linear-gradient(120deg, var(--navy-800), var(--navy-900)); color: #fff; padding: 36px 0 60px; }
.dash-header h1 { color: #fff; font-size: 24px; }
.dash-header p { color: rgba(255,255,255,.72); margin: 0; }
.dash-wrap { margin-top: -40px; }
.dash-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 24px; }
.dash-tab { flex: 0 0 auto; padding: 10px 16px; border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-soft); font-size: 13.5px; font-weight: 600; color: var(--ink-600); }
.dash-tab.active, .dash-tab:hover { background: var(--navy-800); color: #fff; }

.progress-track { width: 100%; height: 10px; background: #E5E7EB; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--amber-500), var(--cyan-400)); border-radius: 999px; transition: width .4s ease; }

.child-card { display: flex; flex-direction: column; gap: 14px; }
.child-card .top { display: flex; align-items: center; gap: 14px; }
.child-avatar { width: 54px; height: 54px; border-radius: 16px; background: var(--navy-700); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 700; font-size: 18px; }
.child-card h3 { font-size: 17px; margin: 0 0 2px; }
.child-card .sub { font-size: 13px; color: var(--ink-400); }

.module-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.module-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: #F9FAFB; font-size: 14px; }
.module-item .check { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; flex: 0 0 auto; }
.module-item.done .check { background: var(--green-600); color: #fff; }
.module-item.progress .check { background: var(--amber-500); color: #fff; }
.module-item.locked .check { background: #E5E7EB; color: var(--ink-400); }
.module-item.locked { color: var(--ink-400); }

.cert-box {
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  border: 1.5px dashed var(--amber-500);
  border-radius: var(--radius-lg);
  padding: 26px;
  text-align: center;
}
.cert-box .medal { font-size: 40px; margin-bottom: 10px; }

table.report-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.report-table th, table.report-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); }
table.report-table th { color: var(--ink-400); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }

.zoom-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.zoom-card .info strong { display: block; font-size: 15px; }
.zoom-card .info span { font-size: 13px; color: var(--ink-400); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.7); padding: 44px 0 26px; margin-top: 40px; }
.footer-inner { display: flex; flex-direction: column; gap: 24px; align-items: center; text-align: center; }
.footer-brand .logo-text { color: #fff; }
.footer-brand p { color: rgba(255,255,255,.55); font-size: 13.5px; max-width: 320px; margin: 8px auto 0; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 12.5px; color: rgba(255,255,255,.4); }
@media (min-width: 760px) { .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; } .footer-brand p { margin-left: 0; } }

/* ---------- WhatsApp floating button ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(37,211,102,.45);
  transition: transform .15s ease;
}
.wa-float:hover { transform: scale(1.08); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; }
.gap-10 { gap: 10px; }
.small-note { font-size: 13px; color: var(--ink-400); }

/* ---------- Admin (ringkas) ---------- */
.admin-shell { display: flex; min-height: 100vh; background: var(--bg); }
.admin-sidebar { width: 220px; background: var(--navy-900); color: #fff; padding: 26px 18px; flex-shrink: 0; }
.admin-sidebar a { display: block; padding: 12px 12px; border-radius: 10px; font-size: 14.5px; color: rgba(255,255,255,.75); margin-bottom: 4px; }
.admin-sidebar a.active, .admin-sidebar a:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-main { flex: 1; padding: 30px 24px; min-width: 0; }
@media (max-width: 760px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; display: flex; overflow-x: auto; gap: 6px; padding: 14px; }
  .admin-sidebar a { flex: 0 0 auto; margin-bottom: 0; white-space: nowrap; }
}
table.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-soft); }
table.admin-table th, table.admin-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
table.admin-table th { background: #F9FAFB; font-size: 12px; text-transform: uppercase; color: var(--ink-400); letter-spacing: .04em; }
.table-scroll { overflow-x: auto; border-radius: var(--radius-md); }
