/* ============================================================
   style.css — Shift Scheduler
   Styling kustom di atas Bootstrap 5 (tema gelap profesional)
   ============================================================ */

/* ── Variabel Tema ── */
:root {
  --bg:          #0f172a;
  --bg-card:     #1e293b;
  --bg-card2:    #273548;
  --bg-input:    #1a2744;
  --border:      #334155;
  --border-soft: rgba(51, 65, 85, 0.6);
  --muted:       #94a3b8;
  --muted2:      #64748b;
  --primer:      #1a56db;
  --primer-dark: #1e429f;
  --aksen:       #16bdca;
  --hijau:       #0e9f6e;
  --merah:       #e02424;
  --kuning:      #e3a008;
  --ungu:        #7e3af2;
  --mono:        'JetBrains Mono', monospace;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  background: var(--bg);
  color: #e2e8f0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: scroll;
  /* flex column: header → layout-wrapper → footer berurutan ke bawah */
  display: flex;
  flex-direction: column;
}

/* layout wrapper mengisi sisa ruang di antara header dan footer */
.layout-wrapper {
  flex: 1;
  align-items: flex-start;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── Header ── */
.app-header {
  background: linear-gradient(135deg, #0c1a35 0%, #0f172a 100%);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header .header-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primer), var(--aksen));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}

.app-header h1 { font-size: 15px; font-weight: 700; margin: 0; line-height: 1.3; }
.app-header p  { font-size: 11px; color: var(--muted); margin: 0; }

/* ── Badge subtopik ── */
.badge-subtopik {
  font-size: 10px; font-weight: 600;
  padding: 3px 8px; border-radius: 20px;
  background: rgba(126,58,242,0.2);
  border: 1px solid rgba(126,58,242,0.4);
  color: #a78bfa;
}

/* ── Sidebar ── */
.sidebar {
  width: 220px; min-width: 220px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 57px;
  height: calc(100vh - 57px);
  overflow-y: auto;
  flex-shrink: 0;
  padding: 16px;
}

.sidebar-section-label {
  font-size: 10px; font-weight: 600;
  color: var(--muted2); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 8px;
}

/* ── Nav Pills (tab algoritma) Bootstrap override ── */
.nav-pills .nav-link {
  color: var(--muted); font-size: 13px; font-weight: 500;
  padding: 7px 12px; border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.nav-pills .nav-link:hover { background: var(--bg-card2); color: #e2e8f0; }
.nav-pills .nav-link.active {
  background: rgba(26,86,219,0.2) !important;
  border-color: var(--primer) !important;
  color: #60a5fa !important;
}
.nav-pills .nav-link .algo-icon { margin-right: 6px; }

/* ── Panel konten kanan ── */
.konten-utama {
  flex: 1;
  padding: 20px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Tab hasil mengisi ruang yang tersisa agar footer turun ke bawah */
#tab-hasil-content {
  flex: 1;
}

/* ── Kartu Bootstrap override ── */
.card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
}

.card-header {
  background: var(--bg-card2) !important;
  border-bottom: 1px solid var(--border) !important;
  font-size: 13px; font-weight: 600;
  color: #e2e8f0; padding: 10px 16px;
  border-radius: 12px 12px 0 0 !important;
}

.card-body { padding: 16px; }

/* ── Form override ── */
.form-range { accent-color: var(--primer); width: 100%; }

.form-label {
  font-size: 12px; font-weight: 500;
  color: #e2e8f0; margin-bottom: 2px;
}

.nilai-param {
  font-family: var(--mono);
  font-size: 12px; font-weight: 600;
  color: var(--aksen);
}

.keterangan-param {
  font-size: 10px; color: var(--muted2);
  margin-bottom: 5px; display: block;
}

/* ── Tombol ── */
.btn-jalankan {
  width: 100%; padding: 10px;
  background: linear-gradient(135deg, var(--primer), var(--primer-dark));
  border: none; border-radius: 8px;
  color: white; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: opacity 0.2s;
  font-family: inherit;
}
.btn-jalankan:hover:not(:disabled) { opacity: 0.85; }
.btn-jalankan:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-varian {
  font-size: 11px; padding: 4px 10px;
  border-radius: 20px; border: 1px solid var(--border);
  background: transparent; color: var(--muted);
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.btn-varian:hover  { border-color: var(--primer); color: #e2e8f0; }
.btn-varian.aktif  {
  background: rgba(26,86,219,0.2);
  border-color: var(--primer); color: #60a5fa;
}

/* ── Kartu Statistik ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 16px; }

.stat-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 20px 16px;
  text-align: center;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100px;
}

/* Kartu algoritma (teks panjang) lebih lebar */
.stat-card--wide {
  grid-column: span 2;
}

.stat-card .s-label { font-size: 11px; color: var(--muted); margin-bottom: 10px; font-weight: 500; letter-spacing: 0.04em; }
.stat-card .s-nilai { font-family: var(--mono); font-size: 30px; font-weight: 700; line-height: 1.1; }
.stat-card .s-satuan { font-size: 12px; color: var(--muted); margin-left: 3px; font-family: inherit; }

/* ── Alert / Notifikasi ── */
.notif-sukses {
  background: rgba(14,159,110,0.12);
  border: 1px solid rgba(14,159,110,0.4);
  color: #34d399; border-radius: 8px;
  padding: 9px 14px; font-size: 12px; margin-bottom: 14px;
}
.notif-error {
  background: rgba(224,36,36,0.1);
  border: 1px solid rgba(224,36,36,0.35);
  color: #fca5a5; border-radius: 8px;
  padding: 9px 14px; font-size: 12px;
}

/* ── State Kosong & Loading ── */
.state-kosong {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 320px; gap: 10px; color: var(--muted2);
}
.state-kosong .ikon { font-size: 50px; opacity: 0.35; }
.state-kosong .teks { font-size: 14px; }
.state-kosong .teks2 { font-size: 12px; color: var(--muted2); }

.state-loading {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 320px; gap: 14px;
}
.state-loading .loading-teks { color: var(--aksen); font-size: 15px; font-weight: 600; }
.state-loading .loading-sub  { color: var(--muted); font-size: 12px; }

/* ── Grafik Container ── */
.chart-box { position: relative; height: 240px; width: 100%; }
.chart-box-tall { position: relative; height: 280px; width: 100%; }

/* ── Tabel Jadwal Shift ── */
.tabel-jadwal { width: 100%; border-collapse: collapse; font-size: 12px; }
.tabel-jadwal th {
  background: var(--bg-card2); color: var(--muted);
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 7px 8px; text-align: center;
  border-bottom: 1px solid var(--border);
}
.tabel-jadwal th:first-child { text-align: left; }
.tabel-jadwal td {
  padding: 5px 8px; text-align: center;
  border-bottom: 1px solid var(--border-soft); color: #e2e8f0;
}
.tabel-jadwal td:first-child { text-align: left; font-weight: 500; white-space: nowrap; }
.tabel-jadwal tr:last-child td { border-bottom: none; }
.tabel-jadwal tr.row-animasi { animation: kilat 0.4s ease; }

@keyframes kilat {
  0%   { background: rgba(22,189,202,0.2); }
  100% { background: transparent; }
}

/* ── Chip warna shift ── */
.chip {
  display: inline-block; padding: 2px 8px;
  border-radius: 10px; font-size: 10px;
  font-weight: 700; font-family: var(--mono);
}
.chip-P { background: rgba(227,160,8,0.2);   color: #fbbf24; border: 1px solid rgba(227,160,8,0.4); }
.chip-S { background: rgba(26,86,219,0.2);   color: #60a5fa; border: 1px solid rgba(26,86,219,0.4); }
.chip-M { background: rgba(126,58,242,0.2);  color: #c4b5fd; border: 1px solid rgba(126,58,242,0.4); }
.chip-L { background: rgba(100,116,139,0.12); color: #94a3b8; border: 1px solid var(--border); }

/* ── Legenda shift ── */
.legenda { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: 11px; color: var(--muted); }
.legenda-item { display: flex; align-items: center; gap: 5px; }

/* ── Tabel Komparatif ── */
.tabel-komp { width: 100%; border-collapse: collapse; font-size: 12px; }
.tabel-komp th {
  background: var(--bg-card2); color: var(--muted);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 9px 12px; border-bottom: 1px solid var(--border); font-weight: 600;
}
.tabel-komp td {
  padding: 10px 12px; border-bottom: 1px solid var(--border-soft);
  color: #e2e8f0; vertical-align: middle;
}
.tabel-komp tr:last-child td { border-bottom: none; }
.tabel-komp tr:hover td { background: var(--bg-card2); }
.sel-terbaik { color: var(--hijau) !important; font-weight: 700; }

/* ── Panel Animasi Otomatis ── */
.animasi-panel {
  max-width: 500px;
  margin: 40px auto;
  text-align: center;
}

/* ── Animasi progress bar ── */
.animasi-kontrol {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px;
  margin-top: 14px;
}
.animasi-info { font-size: 12px; color: var(--muted); }
.animasi-progress {
  height: 4px; background: var(--border);
  border-radius: 2px; margin: 10px 0;
  overflow: hidden;
}
.animasi-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primer), var(--aksen));
  border-radius: 2px;
  transition: width 0.1s linear;
}

/* ── Highlight iterasi saat ini ── */
.highlight-row td { background: rgba(22,189,202,0.08) !important; }

/* ══════════════════════════════════════════════
   FOOTER — di dalam area konten kanan (main)
   sejajar dengan konten, bukan menutupi sidebar
   ══════════════════════════════════════════════ */

.app-footer {
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  margin-top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted2);
  width: 100%;
}

.footer-nama {
  color: var(--aksen);
  font-weight: 600;
}

.footer-kanan-isi {
  font-size: 11px;
  color: var(--muted2);
  letter-spacing: 0.03em;
}

/* ── Panel Parameter (di konten kanan) ── */
.panel-param .card-header {
  font-size: 13px;
  font-weight: 600;
}

.panel-param .form-label {
  font-size: 11px;
}

.panel-param .keterangan-param {
  font-size: 10px;
  color: var(--muted2);
  display: block;
  margin-bottom: 4px;
  line-height: 1.4;
}

.panel-param .nilai-param {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--aksen);
}

/* ── Responsif ── */
@media (max-width: 992px) {
  .sidebar {
    width: 100%; min-width: unset;
    max-height: unset;      /* tidak dibatasi tinggi di mobile */
    position: static;       /* tidak sticky di mobile */
    overflow-y: visible;    /* tidak scroll sendiri di mobile */
    border-right: none;
    border-bottom: 1px solid var(--border);
    scrollbar-width: auto;  /* kembalikan scrollbar normal di mobile */
  }
  .sidebar::-webkit-scrollbar { display: block; }
  .konten-utama { padding: 16px; }
  .layout-wrapper { flex-direction: column; }
}

/* ══════════════════════════════════════════════
   SECTION TENTANG ALGORITMA
   ══════════════════════════════════════════════ */

.tentang-wrapper {
  width: 100%;
}

.tentang-judul-utama h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.tentang-judul-utama p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.tentang-card {
  margin-bottom: 20px;
}

/* Header warna per algoritma */
.tentang-header-hc {
  background: rgba(227, 160, 8, 0.12) !important;
  border-bottom-color: rgba(227, 160, 8, 0.3) !important;
  color: #fbbf24 !important;
}

.tentang-header-sa {
  background: rgba(224, 36, 36, 0.1) !important;
  border-bottom-color: rgba(224, 36, 36, 0.3) !important;
  color: #fca5a5 !important;
}

.tentang-header-ga {
  background: rgba(14, 159, 110, 0.1) !important;
  border-bottom-color: rgba(14, 159, 110, 0.3) !important;
  color: #34d399 !important;
}

/* Teks penjelasan umum */
.tentang-teks {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.75;
  margin-bottom: 0;
}

.tentang-teks strong {
  color: #e2e8f0;
}

/* Sub-judul dalam card */
.tentang-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
}

/* Daftar constraint */
.tentang-list {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.9;
  padding-left: 18px;
  margin-bottom: 0;
}

.tentang-list strong {
  color: #e2e8f0;
}

/* Formula fitness */
.tentang-formula {
  background: rgba(22, 189, 202, 0.07);
  border: 1px solid rgba(22, 189, 202, 0.25);
  border-radius: 10px;
  padding: 14px 18px;
}

.tentang-formula-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--aksen);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.tentang-formula-isi {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--aksen);
  margin-bottom: 4px;
}

.tentang-formula-ket {
  font-size: 11px;
  color: var(--muted2);
}

/* Kartu varian HC */
.tentang-varian-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  height: 100%;
}

.tentang-varian-judul {
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
  margin-bottom: 8px;
}

.tentang-varian-isi {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}

.tentang-varian-isi strong {
  color: #e2e8f0;
}

/* Kartu parameter SA */
.tentang-param-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  height: 100%;
}

.tentang-param-nama {
  font-size: 12px;
  font-weight: 600;
  color: #fca5a5;
  margin-bottom: 8px;
}

.tentang-param-isi {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}

/* Kartu komponen GA */
.tentang-komponen-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  height: 100%;
}

.tentang-komponen-ikon {
  font-size: 24px;
  margin-bottom: 8px;
}

.tentang-komponen-judul {
  font-size: 12px;
  font-weight: 600;
  color: #34d399;
  margin-bottom: 6px;
}

.tentang-komponen-isi {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

/* Pseudocode block */
.tentang-pseudocode {
  background: #0a1628;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 4px;
}

.tentang-pseudocode-judul {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.tentang-pseudocode pre {
  font-family: var(--mono);
  font-size: 12px;
  color: #a5f3fc;
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.8;
}

/* Box kelemahan / keunggulan */
.tentang-kelemahan {
  background: rgba(126, 58, 242, 0.08);
  border: 1px solid rgba(126, 58, 242, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: #c4b5fd;
  line-height: 1.6;
}

.tentang-kelemahan strong {
  color: #e2e8f0;
}

/* Daftar referensi */
.tentang-referensi {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 2;
  padding-left: 18px;
  margin-bottom: 0;
}

.tentang-referensi em {
  color: var(--aksen);
}

/* ══════════════════════════════════════════════
   CLASS PENGGANTI STYLE INLINE
   ══════════════════════════════════════════════ */

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0 12px;
}

.sidebar-constraint-list {
  font-size: 11px;
  color: var(--muted2);
  line-height: 1.9;
}

.teks-bahaya    { color: var(--merah) !important; }
.teks-peringatan { color: var(--kuning) !important; }
.teks-sukses    { color: var(--hijau) !important; }

/* ══════════════════════════════════════════════
   SECTION PANDUAN PARAMETER
   ══════════════════════════════════════════════ */

.panduan-item {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  height: 100%;
}

.panduan-nama {
  font-size: 12px;
  font-weight: 600;
  color: var(--aksen);
  margin-bottom: 8px;
}

.panduan-isi {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.panduan-isi strong {
  color: #e2e8f0;
}

.panduan-isi ul {
  margin: 6px 0 0;
  padding-left: 16px;
}

.panduan-tabel {
  margin-top: 8px;
  overflow-x: auto;
}

.tabel-panduan {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.tabel-panduan th {
  background: var(--bg);
  color: var(--muted2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.tabel-panduan td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--muted);
}

.tabel-panduan tr:last-child td {
  border-bottom: none;
}

.panduan-rekomen td {
  color: var(--hijau) !important;
  font-weight: 600;
}

/* ══════════════════════════════════════════════
   MOBILE FRIENDLY
   ══════════════════════════════════════════════ */

@media (max-width: 992px) {
  /* Layout: sidebar di atas, konten di bawah */
  .layout-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-width: unset;
    height: auto;
    position: static;
    overflow-y: visible;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  /* Sidebar navigasi: tampil horizontal scroll di mobile — diatur di blok media query bawah */

  .konten-utama {
    padding: 12px;
    min-height: unset;
  }

  /* Header lebih compact di mobile */
  .app-header h1 {
    font-size: 13px;
  }

  .app-header p {
    display: none;
  }

  .badge-subtopik {
    display: none;
  }

  /* Panel parameter: stack vertikal di mobile */
  .panel-param .row > [class*="col-md"] {
    margin-bottom: 8px;
  }

  /* Grafik lebih kecil di mobile */
  .chart-box       { height: 200px; }
  .chart-box-tall  { height: 220px; }

  /* Tabel bisa di-scroll horizontal */
  .tabel-jadwal,
  .tabel-komp,
  .tabel-panduan {
    font-size: 11px;
  }

  /* Stat grid: 2 kolom di mobile */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card--wide {
    grid-column: span 2;
  }

  /* Footer stack vertikal di mobile */
  .app-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  /* Tentang: komponen GA jadi 2 kolom */
  .tentang-komponen-card {
    margin-bottom: 8px;
  }

  /* Animasi panel max width */
  .animasi-panel {
    margin: 20px auto;
  }
}

@media (max-width: 576px) {
  /* Stat grid: 2 kolom tetap di hp kecil */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card .s-nilai {
    font-size: 22px;
  }

  .app-header {
    padding: 10px 14px;
  }

  .app-header .header-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }
}

/* ══════════════════════════════════════════════
   KELOLA KARYAWAN
   ══════════════════════════════════════════════ */

.karyawan-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}

.karyawan-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
}

.karyawan-nomor {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted2);
  min-width: 20px;
  text-align: center;
}

.karyawan-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  padding: 2px 4px;
}

.karyawan-input:focus {
  background: rgba(26, 86, 219, 0.1);
  border-radius: 4px;
}

.karyawan-hapus {
  background: transparent;
  border: none;
  color: var(--muted2);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
  font-family: inherit;
}

.karyawan-hapus:hover {
  background: rgba(224, 36, 36, 0.15);
  color: var(--merah);
}

/* ══════════════════════════════════════════════
   TOMBOL EKSPOR
   ══════════════════════════════════════════════ */

.btn-ekspor {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.btn-ekspor:hover {
  border-color: var(--aksen);
  color: var(--aksen);
}

/* ══════════════════════════════════════════════
   MOBILE: PERBAIKAN NAV PILL SIDEBAR
   ══════════════════════════════════════════════ */

@media (max-width: 992px) {
  /* Nav pill horizontal scroll di mobile */
  #nav-algoritma {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    gap: 4px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  #nav-algoritma::-webkit-scrollbar {
    display: none;
  }

  #nav-algoritma .nav-item {
    flex-shrink: 0;
  }

  #nav-algoritma .nav-link {
    width: auto !important;
    white-space: nowrap;
    font-size: 11px;
    padding: 5px 10px;
  }

  /* Sidebar: lebih compact */
  .sidebar {
    padding: 10px 12px;
  }

  .sidebar-divider {
    margin: 8px 0;
  }

  .sidebar-constraint-list {
    display: none; /* sembunyikan constraint di mobile agar tidak terlalu panjang */
  }
}

/* ── Kelas pengganti style inline karyawan ── */
.karyawan-stat-grid {
  max-width: 400px;
}

.karyawan-status-nilai {
  font-size: 14px;
}

.btn-karyawan-aksi {
  width: auto;
  padding: 8px 16px;
  font-size: 13px;
}

.btn-karyawan-sekunder {
  background: var(--bg-card2);
  border: 1px solid var(--border);
}
