/*
 * custom.css — Sistem Deteksi Stunting Balita KNN
 * ================================================
 * File ini HANYA berisi CSS (satu file satu bahasa).
 * Tidak ada JavaScript, Python, atau bahasa lain di sini.
 *
 * Daftar isi:
 * 1.  Reset & Base
 * 2.  CSS Variables
 * 3.  Sidebar
 * 4.  Topbar
 * 5.  Main Wrapper & Page Content
 * 6.  Hero Section (Dashboard & Tentang)
 * 7.  Stat Cards
 * 8.  Dataset Stat Cards
 * 9.  General Cards
 * 10. Chart Box & Insight
 * 11. Distribusi Progress Bar
 * 12. Label Pills
 * 13. Confusion Matrix
 * 14. Table Styles
 * 15. Form Styles (Prediksi)
 * 16. Hasil Prediksi
 * 17. KNN Step Cards
 * 18. Formula Box
 * 19. About / Tentang Page
 * 20. Dataset Table
 * 21. Footer
 * 22. Utility Classes
 * 23. Responsive — Mobile Friendly
 */

/* ============================================================
   1. RESET & BASE
   ============================================================ */
* { box-sizing: border-box; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: #f0f2f8;
  color: #1e2749;
  margin: 0;
  overflow-x: hidden;
}

/* ============================================================
   2. CSS VARIABLES
   ============================================================ */
:root {
  --sidebar-w:      260px;
  --topbar-h:       64px;
  --primary:        #4f46e5;
  --primary-light:  #eef2ff;
  --card-radius:    16px;
  --shadow:         0 4px 24px rgba(79,70,229,.08);
  --shadow-hover:   0 8px 32px rgba(79,70,229,.16);
  --transition:     .25s cubic-bezier(.4,0,.2,1);
}

/* ============================================================
   3. SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(180deg, #1e1b4b 0%, #312e81 60%, #1e2749 100%);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99,102,241,.4);
}
.brand-title { display: block; font-size: 1rem; font-weight: 700; color: #fff; line-height: 1.2; }
.brand-sub   { display: block; font-size: .7rem; color: rgba(255,255,255,.5); }

/* Navigation items */
.sidebar-nav { padding: 16px 12px; flex: 1; }
.nav-section-title {
  font-size: .65rem; font-weight: 700; letter-spacing: 1.2px;
  color: rgba(255,255,255,.35); text-transform: uppercase;
  padding: 8px 8px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: .88rem; font-weight: 500;
  position: relative;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(99,102,241,.35), rgba(99,102,241,.15));
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,.3);
}
.nav-item.active .nav-icon { color: #818cf8; }
.nav-icon { font-size: 1.05rem; flex-shrink: 0; width: 20px; text-align: center; }
.nav-dot  { width: 6px; height: 6px; border-radius: 50%; background: #818cf8; margin-left: auto; }

/* Sidebar footer */
.sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.footer-badge {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; color: rgba(255,255,255,.7);
}
.sidebar-footer small { font-size: .7rem; color: rgba(255,255,255,.35); display: block; margin-top: 4px; }

/* Overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 999;
}
.sidebar-overlay.show { display: block; }

/* ============================================================
   4. TOPBAR
   ============================================================ */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid #e8eaf0;
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
  position: sticky; top: 0; z-index: 900;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.sidebar-toggle-btn {
  background: none; border: none; cursor: pointer;
  color: #64748b; padding: 6px; border-radius: 8px; line-height: 1;
  transition: background var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.sidebar-toggle-btn:hover { background: #f1f5f9; color: var(--primary); }
.topbar-title  { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.breadcrumb { margin: 0; font-size: .8rem; }
.breadcrumb-item + .breadcrumb-item::before { content: "›"; }

/* ============================================================
   5. MAIN WRAPPER & PAGE CONTENT
   ============================================================ */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
  transition: margin-left var(--transition);
}
.page-content { padding: 28px 28px 12px; flex: 1; }
.page-header  { margin-bottom: 28px; }
.page-header h2 { font-size: 1.5rem; font-weight: 800; color: #1e2749; margin-bottom: 4px; }
.page-header p  { color: #64748b; margin: 0; font-size: .9rem; }

/* ============================================================
   6. HERO SECTION
   ============================================================ */
.hero-section {
  background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 50%, #6d28d9 100%);
  border-radius: var(--card-radius);
  padding: 36px 36px 36px 36px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(79,70,229,.3);
}

/* Konten teks di kiri hero */
.hero-content-wrap {
  position: relative;
  z-index: 2;
  padding-right: 210px; /* sisakan ruang untuk ikon kanan */
}

/* Ikon besar di kanan, vertikal tengah */
.hero-right-big {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 1;
  pointer-events: none;
}

@keyframes floatBig {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%       { transform: translateY(-12px) rotate(2deg); }
}

/* Kotak glassmorphism dengan ikon besar di dalamnya */
.hero-big-icon {
  width: 130px;
  height: 130px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,255,255,.28);
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: #fff;
  animation: floatBig 4s ease-in-out infinite;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  flex-shrink: 0;
}
.hero-big-icon-label {
  font-size: .75rem; font-weight: 700;
  color: rgba(255,255,255,.75);
  text-transform: uppercase; letter-spacing: 1px;
  text-align: center;
}

/* Dekorasi bubble latar belakang */
.hero-section::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}
.hero-section::after {
  content: '';
  position: absolute; bottom: -40px; left: 60px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}

/* Badge kecil di atas judul hero */
.hero-float-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50px; padding: 5px 14px;
  font-size: .78rem; font-weight: 600; color: #fff;
  margin-bottom: 14px;
}
.hero-title { font-size: 1.8rem; font-weight: 800; line-height: 1.2; margin-bottom: 10px; }
.hero-desc  { font-size: .9rem; opacity: .85; line-height: 1.7; margin-bottom: 20px; }

/* Tombol CTA di hero */
.hero-btn {
  background: #fff; color: var(--primary);
  border: none; border-radius: 50px;
  padding: 11px 28px; font-weight: 700; font-size: .9rem;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); color: var(--primary); }

/* Statistik kecil di bawah tombol hero */
.hero-stats    { display: flex; gap: 28px; margin-top: 20px; flex-wrap: wrap; }
.hero-stat     { text-align: center; }
.hero-stat-val { font-size: 1.4rem; font-weight: 800; display: block; }
.hero-stat-lbl { font-size: .72rem; opacity: .7; text-transform: uppercase; letter-spacing: .5px; }

/* ============================================================
   7. STAT CARDS
   ============================================================ */
.stat-card {
  background: #fff;
  border-radius: var(--card-radius);
  padding: 22px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative; overflow: hidden;
  border: 1px solid #f1f5f9;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.stat-card::after {
  content: ''; position: absolute; top: 0; right: 0;
  width: 80px; height: 80px; border-radius: 50%;
  opacity: .06; transform: translate(20px,-20px);
}
.stat-card.sc-primary::after { background: #4f46e5; }
.stat-card.sc-danger::after  { background: #ef4444; }
.stat-card.sc-success::after { background: #22c55e; }
.stat-card.sc-warning::after { background: #f59e0b; }
.stat-card.sc-info::after    { background: #0ea5e9; }

.stat-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.si-primary { background: #eef2ff; color: #4f46e5; }
.si-danger  { background: #fff1f2; color: #ef4444; }
.si-success { background: #f0fdf4; color: #22c55e; }
.si-warning { background: #fffbeb; color: #f59e0b; }
.si-info    { background: #f0f9ff; color: #0ea5e9; }
.si-purple  { background: #fdf4ff; color: #a855f7; }

.stat-body  {}
.stat-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: #94a3b8; margin-bottom: 4px; }
.stat-value { font-size: 1.7rem; font-weight: 800; color: #1e2749; line-height: 1; }
.stat-sub   { font-size: .75rem; color: #94a3b8; margin-top: 3px; }

/* Rasio L:P — tidak terpotong */
.rasio-val {
  font-size: .88rem; font-weight: 800;
  color: #1e2749; line-height: 1.2; white-space: nowrap;
}

/* ============================================================
   8. DATASET STAT CARDS
   ============================================================ */
.dataset-stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px 10px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow);
  border: 1px solid #f1f5f9;
  height: 68px;
  overflow: hidden; min-width: 0;
}
.dataset-stat-icon {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
}
.dataset-stat-val {
  font-weight: 800; color: #1e2749; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dataset-stat-lbl {
  color: #94a3b8; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dv-normal { font-size: .95rem; }
.dv-small  { font-size: .78rem; }
.dl-normal { font-size: .68rem; }
.dl-small  { font-size: .62rem; }

.dsi-blue { background: #eef2ff; border-radius: 8px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dsi-pink { background: #fdf2f8; border-radius: 8px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ============================================================
   9. GENERAL CARDS
   ============================================================ */
.card-modern {
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  border: 1px solid #f1f5f9;
  overflow: hidden;
}
.card-header-modern {
  padding: 18px 22px 14px;
  border-bottom: 1px solid #f1f5f9;
  display: flex; align-items: center; justify-content: space-between;
}
.card-header-modern h5 { font-size: .95rem; font-weight: 700; color: #1e2749; margin: 0; }
.card-body-modern { padding: 20px 22px; }

/* ============================================================
   10. CHART BOX & INSIGHT
   ============================================================ */
.chart-box {
  background: #fff;
  border-radius: var(--card-radius); padding: 20px;
  box-shadow: var(--shadow); border: 1px solid #f1f5f9;
}
.chart-box canvas { max-height: 320px; }
.chart-title {
  font-size: .9rem; font-weight: 700; color: #1e2749;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.chart-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
}
.chart-insight {
  margin-top: 12px; padding: 10px 14px;
  background: #f8fafc; border-radius: 8px;
  border-left: 3px solid var(--primary);
  font-size: .8rem; color: #475569; line-height: 1.6;
}
.chart-insight-tight {
  margin-top: 10px; padding: 10px 14px;
  background: #f8fafc; border-radius: 8px;
  border-left: 3px solid var(--primary);
  font-size: .8rem; color: #475569; line-height: 1.6;
}
.chart-insight strong, .chart-insight-tight strong { color: #1e2749; }

/* ============================================================
   11. DISTRIBUSI PROGRESS BAR
   ============================================================ */
.distrib-item  { margin-bottom: 14px; }
.distrib-label { display: flex; justify-content: space-between; font-size: .82rem; font-weight: 600; margin-bottom: 5px; }
.distrib-bar   { height: 8px; border-radius: 50px; background: #f1f5f9; overflow: hidden; }
.distrib-fill  { height: 100%; border-radius: 50px; transition: width .8s ease; }

/* ============================================================
   12. LABEL PILLS
   ============================================================ */
.label-pill {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 50px; padding: 4px 12px;
  font-size: .78rem; font-weight: 600;
}
.lp-danger  { background: #fff1f2; color: #ef4444; border: 1px solid #fecaca; }
.lp-warning { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.lp-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.lp-info    { background: #f0f9ff; color: #0284c7; border: 1px solid #bae6fd; }

/* ============================================================
   13. CONFUSION MATRIX
   ============================================================ */
.cm-table { width: 100%; border-collapse: separate; border-spacing: 3px; }
.cm-table th, .cm-table td { text-align: center; padding: 10px 8px; border-radius: 6px; font-size: .78rem; }
.cm-header-row th { background: #f1f5f9; font-weight: 700; color: #475569; }
.cm-label-col     { background: #f1f5f9; font-weight: 700; color: #475569; white-space: nowrap; }
.cm-cell-tp { background: #dcfce7; color: #16a34a; font-weight: 800; font-size: .9rem; }
.cm-cell-fp { background: #fff7ed; color: #c2410c; font-weight: 600; }

/* ============================================================
   14. TABLE STYLES
   ============================================================ */
.table-modern { font-size: .83rem; }
.table-modern thead th {
  background: #f8fafc; font-weight: 700; color: #475569;
  text-transform: uppercase; font-size: .72rem; letter-spacing: .5px;
  border-bottom: 2px solid #e2e8f0; padding: 12px 14px; white-space: nowrap;
}
.table-modern tbody td { padding: 10px 14px; vertical-align: middle; border-color: #f1f5f9; }
.table-modern tbody tr:hover { background: #f8fafc; }
.table-scroll { overflow-x: auto; border-radius: 12px; }

/* ============================================================
   15. FORM STYLES
   ============================================================ */
.form-section {
  background: #fff; border-radius: var(--card-radius);
  box-shadow: var(--shadow); border: 1px solid #f1f5f9; overflow: hidden;
}
.form-section-header {
  background: linear-gradient(135deg, #1e1b4b, #6d28d9);
  padding: 24px 28px; color: #fff;
}
.form-section-header h4 { font-size: 1.1rem; font-weight: 700; margin: 0 0 4px; }
.form-section-header p  { font-size: .85rem; opacity: .8; margin: 0; }
.form-section-body { padding: 28px; }

.field-label {
  font-size: .82rem; font-weight: 700; color: #475569;
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.field-label i { color: var(--primary); }
.form-control, .form-select {
  border: 1.5px solid #e2e8f0; border-radius: 10px;
  font-size: .9rem; padding: 12px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.12); outline: none;
}
.form-control.is-invalid { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.invalid-msg { font-size: .78rem; color: #ef4444; margin-top: 4px; display: none; }
.invalid-msg.show { display: block; }
.input-group .input-group-text {
  border: 1.5px solid #e2e8f0; border-left: none;
  border-radius: 0 10px 10px 0; background: #f8fafc;
  font-weight: 600; color: #64748b; font-size: .85rem;
}
.input-group .form-control { border-radius: 10px 0 0 10px; border-right: none; }

.btn-prediksi {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff; border: none; border-radius: 10px;
  padding: 13px 28px; font-weight: 700; font-size: .95rem;
  display: flex; align-items: center; gap: 8px;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  cursor: pointer; width: 100%; justify-content: center;
}
.btn-prediksi:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(79,70,229,.3); color: #fff; }
.btn-prediksi:disabled { opacity: .7; transform: none; }
.btn-reset {
  background: #f1f5f9; color: #64748b; border: 1.5px solid #e2e8f0;
  border-radius: 10px; padding: 13px 20px; font-weight: 600; font-size: .9rem;
  display: flex; align-items: center; gap: 8px; justify-content: center;
  width: 100%; transition: background var(--transition); cursor: pointer;
}
.btn-reset:hover { background: #e2e8f0; color: #1e2749; }

/* ============================================================
   16. HASIL PREDIKSI
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up   { animation: fadeInUp .5s ease forwards; }
.fade-up-2 { animation: fadeInUp .5s ease .15s forwards; opacity: 0; }
.fade-up-3 { animation: fadeInUp .5s ease .3s  forwards; opacity: 0; }

.hasil-main {
  border-radius: var(--card-radius);
  padding: 48px 60px;
  text-align: center; position: relative; overflow: hidden;
  box-shadow: var(--shadow-hover);
}
.hasil-main.hm-danger  { background: linear-gradient(135deg,#fff1f2,#ffe4e6); border: 1.5px solid #fecaca; }
.hasil-main.hm-warning { background: linear-gradient(135deg,#fffbeb,#fef3c7); border: 1.5px solid #fde68a; }
.hasil-main.hm-success { background: linear-gradient(135deg,#f0fdf4,#dcfce7); border: 1.5px solid #bbf7d0; }
.hasil-main.hm-info    { background: linear-gradient(135deg,#f0f9ff,#e0f2fe); border: 1.5px solid #bae6fd; }
.hasil-icon  { font-size: 4.5rem; display: block; line-height: 1; }
.hasil-label { font-size: 2.4rem; font-weight: 800; margin: 8px 0; }
.hasil-label.hl-danger  { color: #dc2626; }
.hasil-label.hl-warning { color: #d97706; }
.hasil-label.hl-success { color: #16a34a; }
.hasil-label.hl-info    { color: #0284c7; }
.hasil-desc { color: #64748b; font-size: .95rem; line-height: 1.7; max-width: 540px; margin: 0 auto; }

/* ============================================================
   17. KNN STEP CARDS
   ============================================================ */
.knn-step {
  background: #fff; border-radius: 12px; padding: 18px; text-align: center;
  border: 1px solid #f1f5f9;
  transition: transform var(--transition), box-shadow var(--transition); height: 100%;
}
.knn-step:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.knn-step-num {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem; margin: 0 auto 10px; color: #fff;
}
.knn-step-icon { font-size: 1.8rem; margin-bottom: 8px; display: block; }
.knn-step h6 { font-size: .85rem; font-weight: 700; margin-bottom: 4px; }
.knn-step p  { font-size: .75rem; color: #64748b; margin: 0; }

/* ============================================================
   18. FORMULA BOX
   ============================================================ */
.formula-box {
  background: #1e1b4b; border-radius: 10px; padding: 16px 20px;
  font-family: 'JetBrains Mono', monospace; color: #a5b4fc;
  font-size: .9rem; margin: 12px 0;
}

/* ============================================================
   19. ABOUT / TENTANG PAGE
   ============================================================ */
.about-card {
  background: #fff; border-radius: var(--card-radius); padding: 28px;
  box-shadow: var(--shadow); border: 1px solid #f1f5f9; height: 100%;
}
.feature-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid #f8fafc; }
.feature-item:last-child { border-bottom: none; }
.feature-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}

/* ============================================================
   20. DATASET TABLE
   ============================================================ */
.table-scroll { overflow-x: auto; }

/* ============================================================
   21. FOOTER — putih, sederhana, tidak berwarna
   ============================================================ */
.page-footer {
  background: #fff;
  border-top: 1px solid #e8eaf0;
  padding: 0 28px;
  margin-top: auto;
}
.footer-inner {
  min-height: 52px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: .8rem;
  color: #64748b;
  padding: 10px 0;
}
.footer-brand {
  display: flex; align-items: center; gap: 6px;
  font-weight: 700; color: #1e2749;
}
.footer-brand img { border-radius: 4px; }
.footer-sep { color: #cbd5e1; }
.footer-desc { color: #64748b; }
.footer-right { color: #94a3b8; font-size: .78rem; }
.footer-nav-link { color: #94a3b8; font-size: .78rem; text-decoration: none; transition: color .2s; }
.footer-nav-link:hover { color: #e2e8f0; }

/* ============================================================
   22. UTILITY CLASSES
   ============================================================ */
.text-gradient {
  background: linear-gradient(135deg, #4f46e5, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mono { font-family: 'JetBrains Mono', monospace; }

/* Info boxes */
.info-box       { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 14px; }
.info-box-blue  { background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 8px; padding: 12px 14px; }
.info-box-green { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 12px 14px; }
.info-box-warn  { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 12px 14px; }

/* Label background per warna */
.bg-lbl-danger  { background: #fff1f2; border: 1px solid #fecaca; }
.bg-lbl-warning { background: #fffbeb; border: 1px solid #fde68a; }
.bg-lbl-success { background: #f0fdf4; border: 1px solid #bbf7d0; }
.bg-lbl-info    { background: #f0f9ff; border: 1px solid #bae6fd; }

/* Detail boxes hasil prediksi */
.detail-box-blue  { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 12px; padding: 16px; height: 100%; text-align: center; }
.detail-box-warn  { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 16px; height: 100%; text-align: center; }
.detail-box-green { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 16px; height: 100%; text-align: center; }

/* List separator */
.list-sep { border-top: 1px solid #f8fafc !important; }

/* Ref card */
.ref-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 14px; height: 100%; }

/* ============================================================
   23. RESPONSIVE — MOBILE FRIENDLY
   ============================================================ */

/* Tablet: sembunyikan sidebar, main wrapper full width */
@media (max-width: 991.98px) {
  .sidebar         { transform: translateX(calc(-1 * var(--sidebar-w))); }
  .sidebar.open    { transform: translateX(0); }
  .main-wrapper    { margin-left: 0; }
  .hero-right-big  { display: none; }
  .hero-content-wrap { padding-right: 0; }
  .page-content    { padding: 20px 16px 10px; }
}

/* Mobile: layout lebih compact */
@media (max-width: 767.98px) {
  .hero-section     { padding: 22px 20px; }
  .hero-title       { font-size: 1.4rem; }
  .hero-desc        { font-size: .85rem; }
  .hero-stats       { gap: 14px; }
  .hero-stat-val    { font-size: 1.1rem; }
  .hero-btn         { padding: 10px 20px; font-size: .85rem; }

  .stat-card        { padding: 14px 12px; gap: 10px; }
  .stat-value       { font-size: 1.3rem; }
  .stat-icon        { width: 44px; height: 44px; font-size: 1.1rem; border-radius: 12px; }
  .stat-label       { font-size: .7rem; }

  .card-body-modern { padding: 14px 16px; }
  .card-header-modern { padding: 14px 16px 12px; }

  .chart-box        { padding: 14px; }
  .chart-title      { font-size: .85rem; }

  .form-section-body { padding: 16px; }
  .form-section-header { padding: 18px 20px; }

  .page-header h2   { font-size: 1.25rem; }

  .knn-step         { padding: 14px 8px; }
  .knn-step-icon    { font-size: 1.5rem; }
  .knn-step h6      { font-size: .8rem; }

  .formula-box      { font-size: .82rem; padding: 12px 14px; }

  .topbar           { padding: 0 14px; gap: 10px; }
  .page-footer      { padding: 0 16px; }
  .footer-inner     { font-size: .75rem; }
  .footer-divider   { display: none; }
}

/* Small mobile: < 576px */
@media (max-width: 575.98px) {
  .hasil-main       { padding: 24px 16px; }
  .hasil-label      { font-size: 1.6rem; }
  .hasil-icon       { font-size: 3rem; }
  .hasil-desc       { font-size: .85rem; }

  .dataset-stat-card { height: auto; min-height: 60px; padding: 10px 8px; }
  .dataset-stat-val  { font-size: .85rem; }

  .cm-table th,
  .cm-table td       { font-size: .62rem; padding: 6px 4px; }

  .stat-value        { font-size: 1.2rem; }
  .distrib-label     { font-size: .78rem; }

  .knn-step          { padding: 12px 6px; }
  .knn-step-icon     { font-size: 1.3rem; }
}

/* ============================================================
   SIDEBAR COLLAPSE (desktop) — dipanggil oleh main.js
   ============================================================ */
.sidebar.collapsed { width: 68px; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-dot,
.sidebar.collapsed .sidebar-footer-info { display: none; }
.sidebar.collapsed .brand-icon          { margin: 0 auto; }
.sidebar.collapsed .sidebar-brand       { justify-content: center; }
.sidebar.collapsed .nav-item            { justify-content: center; padding: 10px; }
.main-wrapper.sidebar-collapsed         { margin-left: 68px; }

/* Footer mobile: stack vertikal */
@media (max-width: 575.98px) {
  .page-footer      { padding: 0 14px; }
  .footer-inner     { flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 0; min-height: auto; }
  .footer-sep       { display: none; }
  .footer-right     { font-size: .75rem; }
  .ms-auto          { margin-left: 0 !important; }
}
