/* ============================================================
   TumbuhCerdas.id — Global Design System
   Font: Nunito (Google Fonts) — warm, friendly, educational
   Version: 1.0
   ============================================================ */

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

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Color — Green (Primary brand) */
  --tc-green-600:   #3A7020;
  --tc-green-500:   #4A8C28;
  --tc-green-400:   #5A9E2F;
  --tc-green-300:   #7FC04A;
  --tc-green-100:   #D4EBBE;
  --tc-green-50:    #F0F7EC;

  /* Color — Brown (Content & earth) */
  --tc-brown-600:   #6B4E24;
  --tc-brown-400:   #A07840;
  --tc-brown-200:   #D4B896;
  --tc-brown-50:    #F7F2EC;

  /* Color — Amber (Kids & generate) */
  --tc-amber-600:   #B87010;
  --tc-amber-500:   #D48A14;
  --tc-amber-400:   #E8A020;
  --tc-amber-100:   #FDECC8;
  --tc-amber-50:    #FEF9EE;

  /* Color — Neutral */
  --tc-neutral-900: #1C1A16;
  --tc-neutral-800: #2C2820;
  --tc-neutral-700: #3E3A32;
  --tc-neutral-600: #5A5448;
  --tc-neutral-500: #7A7468;
  --tc-neutral-400: #8C8678;
  --tc-neutral-300: #B0A898;
  --tc-neutral-200: #D4CECC;
  --tc-neutral-100: #EDE8DF;
  --tc-neutral-50:  #F8F6F2;
  --tc-white:       #FFFFFF;

  /* Semantic */
  --color-success:  #2D7D32;
  --color-warning:  #E8A020;
  --color-error:    #C62828;
  --color-info:     #1565C0;

  /* Typography */
  --font-base: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-display: 2.25rem;   /* 36px */
  --font-size-h1:      1.75rem;   /* 28px */
  --font-size-h2:      1.375rem;  /* 22px */
  --font-size-h3:      1.125rem;  /* 18px */
  --font-size-body:    0.9375rem; /* 15px */
  --font-size-sm:      0.8125rem; /* 13px */
  --font-size-xs:      0.75rem;   /* 12px */
  --font-size-kids:    1.25rem;   /* 20px */

  /* Border Radius */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-2xl:  32px;
  --r-full: 999px;

  /* Spacing */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   400ms ease;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-base);
  font-size: var(--font-size-body);
  color: var(--tc-neutral-800);
  background-color: var(--tc-neutral-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--tc-green-600);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--tc-green-400); }

ul, ol { list-style: none; }

button { cursor: pointer; font-family: inherit; }

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
.display  { font-size: var(--font-size-display); font-weight: 800; line-height: 1.2; }
h1, .h1   { font-size: var(--font-size-h1); font-weight: 700; line-height: 1.3; }
h2, .h2   { font-size: var(--font-size-h2); font-weight: 600; line-height: 1.4; }
h3, .h3   { font-size: var(--font-size-h3); font-weight: 600; line-height: 1.4; }
.body-sm  { font-size: var(--font-size-sm); }
.caption  { font-size: var(--font-size-xs); color: var(--tc-neutral-400); }

.text-primary   { color: var(--tc-green-600); }
.text-muted     { color: var(--tc-neutral-500); }
.text-dark      { color: var(--tc-neutral-800); }
.text-center    { text-align: center; }
.font-bold      { font-weight: 700; }
.font-semibold  { font-weight: 600; }

/* ============================================================
   4. LAYOUT
   ============================================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.container-sm {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* Dashboard grid: sidebar + content */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--sp-6);
  min-height: calc(100vh - 64px);
  padding: var(--sp-6) 0;
}

/* Tools grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-4);
}

/* Metric cards — 3 kolom */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}

.flex          { display: flex; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-col      { display: flex; flex-direction: column; }
.items-center  { align-items: center; }
.gap-2         { gap: var(--sp-2); }
.gap-3         { gap: var(--sp-3); }
.gap-4         { gap: var(--sp-4); }
.gap-6         { gap: var(--sp-6); }

/* ============================================================
   5. BUTTONS
   ============================================================ */

/* Base button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 10px 20px;
  font-size: var(--font-size-body);
  font-weight: 600;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast),
    opacity var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

/* Primary — hijau */
.btn-primary {
  background: var(--tc-green-600);
  color: var(--tc-white);
}
.btn-primary:hover {
  background: var(--tc-green-400);
  box-shadow: 0 4px 12px rgba(58, 112, 32, 0.3);
  color: var(--tc-white);
}

/* Secondary — outline hijau */
.btn-secondary {
  background: transparent;
  color: var(--tc-green-600);
  border: 1.5px solid var(--tc-green-600);
}
.btn-secondary:hover {
  background: var(--tc-green-50);
  color: var(--tc-green-600);
}

/* Ghost — transparan */
.btn-ghost {
  background: transparent;
  color: var(--tc-neutral-600);
  border: 1.5px solid var(--tc-neutral-200);
}
.btn-ghost:hover {
  background: var(--tc-neutral-100);
  color: var(--tc-neutral-800);
}

/* Kids — amber, lebih besar */
.btn-kids {
  background: var(--tc-amber-400);
  color: var(--tc-white);
  border-radius: var(--r-xl);
  padding: 14px 28px;
  font-size: var(--font-size-kids);
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(232, 160, 32, 0.3);
}
.btn-kids:hover {
  background: var(--tc-amber-500);
  box-shadow: 0 6px 18px rgba(232, 160, 32, 0.4);
  transform: translateY(-2px);
  color: var(--tc-white);
}

/* Danger */
.btn-danger {
  background: var(--color-error);
  color: var(--tc-white);
}
.btn-danger:hover {
  background: #b71c1c;
  box-shadow: 0 4px 12px rgba(198, 40, 40, 0.3);
  color: var(--tc-white);
}

/* Sizes */
.btn-sm { padding: 7px 14px; font-size: var(--font-size-sm); }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ============================================================
   6. FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: var(--sp-4); }
.form-group label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--tc-neutral-700);
  margin-bottom: var(--sp-2);
}
.form-group .form-hint {
  font-size: var(--font-size-xs);
  color: var(--tc-neutral-400);
  margin-top: var(--sp-1);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: var(--font-size-body);
  color: var(--tc-neutral-800);
  background: var(--tc-white);
  border: 1.5px solid var(--tc-neutral-200);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-control:focus {
  border-color: var(--tc-green-400);
  box-shadow: 0 0 0 3px rgba(90, 158, 47, 0.15);
}
.form-control::placeholder {
  color: var(--tc-neutral-300);
}
.form-control.is-error {
  border-color: var(--color-error);
}
.form-control.is-error:focus {
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.form-error {
  font-size: var(--font-size-xs);
  color: var(--color-error);
  margin-top: var(--sp-1);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

/* Radio group kids */
.radio-group-kids {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-3);
}
.radio-kids {
  display: none;
}
.radio-kids-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4);
  background: var(--tc-white);
  border: 2px solid var(--tc-neutral-200);
  border-radius: var(--r-xl);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 700;
  font-size: var(--font-size-kids);
}
.radio-kids:checked + .radio-kids-label {
  border-color: var(--tc-amber-400);
  background: var(--tc-amber-50);
  box-shadow: 0 0 0 3px rgba(232, 160, 32, 0.2);
}

/* ============================================================
   7. CARDS
   ============================================================ */
.card {
  background: var(--tc-white);
  border: 1px solid var(--tc-neutral-100);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-5);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--tc-neutral-100);
}

.card-title { font-size: var(--font-size-h3); font-weight: 700; }

/* Card kids — lebih playful */
.card-kids {
  background: var(--tc-white);
  border: 2.5px solid var(--tc-green-100);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-md);
  padding: var(--sp-6);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.card-kids:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* Card metric */
.metric-card {
  background: var(--tc-white);
  border: 1px solid var(--tc-neutral-100);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  text-align: center;
}
.metric-card .metric-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--tc-green-600);
  line-height: 1;
  margin-bottom: var(--sp-1);
}
.metric-card .metric-label {
  font-size: var(--font-size-xs);
  color: var(--tc-neutral-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ============================================================
   8. NAVBAR
   ============================================================ */
.navbar {
  height: 64px;
  background: var(--tc-white);
  border-bottom: 1px solid var(--tc-neutral-100);
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--tc-green-600);
  text-decoration: none;
}
.navbar-logo:hover { color: var(--tc-green-400); }

.navbar-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--tc-green-600);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--tc-neutral-600);
  transition: all var(--transition-fast);
}
.nav-link:hover,
.nav-link.active {
  background: var(--tc-green-50);
  color: var(--tc-green-600);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  object-fit: cover;
  border: 2px solid var(--tc-green-100);
}

/* Status badge langganan di navbar */
.plan-badge {
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.plan-badge.free   { background: var(--tc-green-50); color: var(--tc-green-600); border: 1px solid var(--tc-green-100); }
.plan-badge.basic  { background: var(--tc-amber-100); color: var(--tc-amber-600); }
.plan-badge.family { background: var(--tc-green-600); color: var(--tc-white); }

/* Token counter */
.token-counter {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 4px 12px;
  background: var(--tc-amber-50);
  border: 1px solid var(--tc-amber-100);
  border-radius: var(--r-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--tc-amber-600);
}

/* ============================================================
   9. SIDEBAR (Dashboard)
   ============================================================ */
.sidebar {
  background: var(--tc-white);
  border: 1px solid var(--tc-neutral-100);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  height: fit-content;
  position: sticky;
  top: 80px;
}

.sidebar-section {
  margin-bottom: var(--sp-4);
}

.sidebar-section-title {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--tc-neutral-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-1);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-3);
  border-radius: var(--r-md);
  color: var(--tc-neutral-600);
  font-weight: 600;
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
  margin-bottom: 2px;
}
.sidebar-link:hover {
  background: var(--tc-green-50);
  color: var(--tc-green-600);
}
.sidebar-link.active {
  background: var(--tc-green-50);
  color: var(--tc-green-600);
}
.sidebar-link .sidebar-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ============================================================
   10. BADGE / LABEL
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
}

.badge-paud    { background: var(--tc-green-50);  color: var(--tc-green-600); }
.badge-sd-low  { background: var(--tc-brown-50);  color: var(--tc-brown-600); }
.badge-sd-high { background: var(--tc-amber-100); color: var(--tc-amber-600); }
.badge-premium { background: var(--tc-green-600); color: var(--tc-white); }
.badge-free    { background: var(--tc-green-50);  color: var(--tc-green-600); border: 1px solid var(--tc-green-100); }
.badge-cerita  { background: #E8F5E9; color: #2E7D32; }
.badge-tutor   { background: #E3F2FD; color: #1565C0; }
.badge-kuis    { background: #FFF3E0; color: #E65100; }

/* Status badges */
.badge-success { background: #E8F5E9; color: #2E7D32; }
.badge-warning { background: var(--tc-amber-100); color: var(--tc-amber-600); }
.badge-error   { background: #FFEBEE; color: var(--color-error); }
.badge-info    { background: #E3F2FD; color: var(--color-info); }

/* ============================================================
   11. ALERTS / NOTIFICATIONS
   ============================================================ */
.alert {
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--font-size-sm);
}
.alert-icon { flex-shrink: 0; font-size: 1.1rem; margin-top: 1px; }
.alert-success { background: #E8F5E9; border-left: 4px solid var(--color-success); color: #1B5E20; }
.alert-warning { background: var(--tc-amber-50); border-left: 4px solid var(--color-warning); color: var(--tc-amber-600); }
.alert-error   { background: #FFEBEE; border-left: 4px solid var(--color-error); color: #B71C1C; }
.alert-info    { background: #E3F2FD; border-left: 4px solid var(--color-info); color: #0D47A1; }

/* ============================================================
   12. PROGRESS BAR
   ============================================================ */
.progress-bar {
  height: 8px;
  background: var(--tc-neutral-100);
  border-radius: var(--r-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--tc-green-400), var(--tc-green-600));
  border-radius: var(--r-full);
  transition: width var(--transition-slow);
}

/* Kids progress — amber */
.progress-fill.kids {
  background: linear-gradient(90deg, var(--tc-amber-400), var(--tc-amber-600));
}

/* ============================================================
   13. TABLES
   ============================================================ */
.table-wrapper { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}
.table th {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tc-neutral-400);
  border-bottom: 2px solid var(--tc-neutral-100);
}
.table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--tc-neutral-100);
  color: var(--tc-neutral-700);
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--tc-neutral-50); }

/* ============================================================
   14. LOADER / SPINNER
   ============================================================ */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner.dark {
  border-color: rgba(58, 112, 32, 0.2);
  border-top-color: var(--tc-green-600);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  z-index: 999;
  backdrop-filter: blur(4px);
}

/* ============================================================
   15. HERO SECTION (Landing)
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--tc-green-50) 0%, var(--tc-white) 60%);
  padding: var(--sp-16) 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--tc-green-100) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 580px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--tc-green-100);
  color: var(--tc-green-600);
  padding: 6px 16px;
  border-radius: var(--r-full);
  font-size: var(--font-size-sm);
  font-weight: 700;
  margin-bottom: var(--sp-5);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--tc-neutral-900);
  margin-bottom: var(--sp-5);
}

.hero-title .highlight {
  color: var(--tc-green-600);
  position: relative;
}

.hero-desc {
  font-size: 1.0625rem;
  color: var(--tc-neutral-600);
  line-height: 1.7;
  margin-bottom: var(--sp-8);
}

.hero-cta {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================================
   16. PRICING CARDS
   ============================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-5);
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--tc-white);
  border: 2px solid var(--tc-neutral-100);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  text-align: center;
  position: relative;
  transition: all var(--transition-normal);
}

.pricing-card.featured {
  border-color: var(--tc-green-400);
  box-shadow: 0 8px 32px rgba(58, 112, 32, 0.15);
  transform: scale(1.02);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--tc-green-600);
  color: white;
  padding: 4px 16px;
  border-radius: var(--r-full);
  font-size: var(--font-size-xs);
  font-weight: 800;
  white-space: nowrap;
}

.pricing-plan { font-size: var(--font-size-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--tc-neutral-400); margin-bottom: var(--sp-3); }
.pricing-price { font-size: 2.5rem; font-weight: 800; color: var(--tc-neutral-900); line-height: 1; }
.pricing-price span { font-size: 1rem; font-weight: 600; color: var(--tc-neutral-400); }
.pricing-features { margin: var(--sp-6) 0; text-align: left; }
.pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  font-size: var(--font-size-sm);
  color: var(--tc-neutral-600);
  border-bottom: 1px solid var(--tc-neutral-100);
}
.pricing-feature:last-child { border-bottom: none; }
.pricing-feature .check { color: var(--tc-green-500); flex-shrink: 0; }

/* ============================================================
   17. EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: var(--sp-16) var(--sp-6);
}
.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--sp-4);
  opacity: 0.4;
}
.empty-state-title {
  font-size: var(--font-size-h2);
  font-weight: 700;
  color: var(--tc-neutral-700);
  margin-bottom: var(--sp-3);
}
.empty-state-desc {
  color: var(--tc-neutral-400);
  margin-bottom: var(--sp-6);
}

/* ============================================================
   18. KIDS INTERFACE SPECIFICS
   ============================================================ */
.kids-page {
  background: linear-gradient(135deg, #FEFDF8 0%, var(--tc-green-50) 100%);
  min-height: 100vh;
}

.kids-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--tc-neutral-900);
}

.kids-card {
  background: var(--tc-white);
  border: 3px solid var(--tc-amber-100);
  border-radius: var(--r-2xl);
  padding: var(--sp-8);
  text-align: center;
  transition: all var(--transition-normal);
  cursor: pointer;
}
.kids-card:hover {
  border-color: var(--tc-amber-400);
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(232, 160, 32, 0.2);
}
.kids-card .kids-card-icon {
  font-size: 3.5rem;
  margin-bottom: var(--sp-4);
}
.kids-card .kids-card-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--tc-neutral-800);
  margin-bottom: var(--sp-2);
}
.kids-card .kids-card-desc {
  font-size: var(--font-size-body);
  color: var(--tc-neutral-500);
}

/* Typing animation untuk AI Tutor */
.typing-indicator {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 12px 16px;
}
.typing-dot {
  width: 8px;
  height: 8px;
  background: var(--tc-neutral-300);
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
}

/* ============================================================
   19. CHAT INTERFACE (AI Tutor)
   ============================================================ */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  max-height: 700px;
  background: var(--tc-white);
  border: 1.5px solid var(--tc-neutral-100);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  scroll-behavior: smooth;
}

.chat-bubble {
  max-width: 75%;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-lg);
  font-size: var(--font-size-body);
  line-height: 1.6;
  word-break: break-word;
}

.chat-bubble.user {
  background: var(--tc-green-600);
  color: var(--tc-white);
  align-self: flex-end;
  border-bottom-right-radius: var(--r-sm);
}

.chat-bubble.ai {
  background: var(--tc-neutral-50);
  color: var(--tc-neutral-800);
  align-self: flex-start;
  border: 1px solid var(--tc-neutral-100);
  border-bottom-left-radius: var(--r-sm);
}

.chat-input-bar {
  padding: var(--sp-4);
  border-top: 1px solid var(--tc-neutral-100);
  display: flex;
  gap: var(--sp-3);
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  resize: none;
  padding: 10px 14px;
  font-family: inherit;
  font-size: var(--font-size-body);
  border: 1.5px solid var(--tc-neutral-200);
  border-radius: var(--r-lg);
  outline: none;
  max-height: 120px;
  transition: border-color var(--transition-fast);
}
.chat-input:focus { border-color: var(--tc-green-400); }

/* ============================================================
   20. SECTION DIVIDERS
   ============================================================ */
.section { padding: var(--sp-16) 0; }
.section-sm { padding: var(--sp-10) 0; }

.section-title {
  text-align: center;
  margin-bottom: var(--sp-12);
}
.section-tag {
  display: inline-block;
  background: var(--tc-green-50);
  color: var(--tc-green-600);
  padding: 4px 14px;
  border-radius: var(--r-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-3);
}
.section-heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--tc-neutral-900);
  margin-bottom: var(--sp-3);
}
.section-desc {
  color: var(--tc-neutral-500);
  font-size: 1rem;
  max-width: 580px;
  margin: 0 auto;
}

/* ============================================================
   21. ANIMATIONS
   ============================================================ */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pop {
  0%   { transform: scale(0.9); opacity: 0; }
  80%  { transform: scale(1.03); }
  100% { transform: scale(1); opacity: 1; }
}

.animate-fade-up { animation: fade-in-up var(--transition-slow) ease both; }
.animate-fade    { animation: fade-in var(--transition-normal) ease both; }
.animate-pop     { animation: pop var(--transition-slow) cubic-bezier(0.175, 0.885, 0.32, 1.275) both; }

/* Delay utilities */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }

/* ============================================================
   22. MODALS
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 26, 22, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  animation: fade-in 200ms ease;
}

.modal {
  background: var(--tc-white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: pop 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-6);
  border-bottom: 1px solid var(--tc-neutral-100);
}
.modal-body  { padding: var(--sp-6); }
.modal-footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--tc-neutral-100);
  display: flex;
  gap: var(--sp-3);
  justify-content: flex-end;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--tc-neutral-100);
  border-radius: var(--r-full);
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--tc-neutral-500);
  transition: all var(--transition-fast);
}
.modal-close:hover {
  background: var(--tc-neutral-200);
  color: var(--tc-neutral-800);
}

/* ============================================================
   23. FOOTER
   ============================================================ */
.footer {
  background: var(--tc-neutral-900);
  color: var(--tc-neutral-300);
  padding: var(--sp-12) 0 var(--sp-8);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-8);
  margin-bottom: var(--sp-10);
}

.footer-brand .logo { font-size: 1.25rem; font-weight: 800; color: var(--tc-white); margin-bottom: var(--sp-3); }
.footer-brand p { font-size: var(--font-size-sm); line-height: 1.8; color: var(--tc-neutral-400); }

.footer-links h4 {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--tc-white);
  margin-bottom: var(--sp-4);
}
.footer-links ul li { margin-bottom: var(--sp-2); }
.footer-links ul li a {
  font-size: var(--font-size-sm);
  color: var(--tc-neutral-400);
  transition: color var(--transition-fast);
}
.footer-links ul li a:hover { color: var(--tc-white); }

.footer-bottom {
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  color: var(--tc-neutral-400);
}

/* ============================================================
   24. UTILITIES
   ============================================================ */
.mt-auto   { margin-top: auto; }
.mb-0      { margin-bottom: 0; }
.mb-2      { margin-bottom: var(--sp-2); }
.mb-3      { margin-bottom: var(--sp-3); }
.mb-4      { margin-bottom: var(--sp-4); }
.mb-6      { margin-bottom: var(--sp-6); }
.mb-8      { margin-bottom: var(--sp-8); }
.mt-2      { margin-top: var(--sp-2); }
.mt-4      { margin-top: var(--sp-4); }
.mt-6      { margin-top: var(--sp-6); }
.mt-8      { margin-top: var(--sp-8); }

.p-4       { padding: var(--sp-4); }
.p-6       { padding: var(--sp-6); }
.py-4      { padding-top: var(--sp-4); padding-bottom: var(--sp-4); }

.w-full    { width: 100%; }
.hidden    { display: none !important; }
.sr-only   { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.rounded-full { border-radius: var(--r-full); }
.rounded-lg   { border-radius: var(--r-lg); }

.bg-white       { background: var(--tc-white); }
.bg-green-50    { background: var(--tc-green-50); }
.bg-amber-50    { background: var(--tc-amber-50); }

.border         { border: 1px solid var(--tc-neutral-100); }
.border-green   { border-color: var(--tc-green-200); }

.overflow-hidden { overflow: hidden; }

/* ============================================================
   25. RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .container { padding: 0 var(--sp-4); }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: none;  /* Mobile: hamburger menu */
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero { padding: var(--sp-10) 0; }
  .hero-cta { flex-direction: column; align-items: stretch; }

  .footer-grid { grid-template-columns: 1fr; }

  .navbar-nav { display: none; }  /* Mobile: simplified nav */

  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card.featured { transform: scale(1); }

  .chat-container { height: calc(100vh - 140px); }
  .chat-bubble { max-width: 88%; }

  .tools-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .modal { margin: var(--sp-4); max-width: 100%; }
  .btn-kids { font-size: 1.125rem; padding: 12px 20px; }
}

/* ============================================================
   26. PRINT STYLES
   ============================================================ */
@media print {
  .navbar, .sidebar, .footer, .btn { display: none !important; }
  body { background: white; font-size: 12pt; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}
