/* gaya.css — Dandanan dashboard Epple WIC Studio */
* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
}

[hidden] { display: none !important; }

/* ---------- Halaman login & setup ---------- */
.tengah { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.kartu {
  background: #1e293b;
  padding: 28px 32px;
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.kartu h1 { margin: 0 0 6px; font-size: 24px; }
.sub { color: #94a3b8; margin: 0 0 20px; font-size: 14px; }
label { display: block; font-size: 14px; margin: 14px 0 6px; color: #cbd5e1; }
input[type="text"], input[type="password"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 15px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #6366f1; border-color: transparent; }
.centang { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #94a3b8; margin-top: 10px; }
button {
  margin-top: 20px;
  width: 100%;
  padding: 11px;
  border: 0;
  border-radius: 8px;
  background: #6366f1;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: #4f46e5; }
button:disabled { opacity: 0.6; cursor: wait; }
.galat { color: #f87171; font-size: 14px; margin: 12px 0 0; min-height: 20px; }

/* ---------- Kerangka aplikasi ---------- */
#ruang-aplikasi { min-height: 100vh; display: flex; flex-direction: column; }
.atas {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}
.atas h1 { font-size: 18px; margin: 0; }
.tombol-kecil { width: auto; margin: 0; padding: 8px 14px; font-size: 14px; background: #334155; }
.tombol-kecil:hover { background: #475569; }

.tubuh { flex: 1; display: flex; }

.menu {
  width: 210px;
  flex-shrink: 0;
  background: #111827;
  border-right: 1px solid #334155;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 15px;
}
.menu a:hover { background: #1e293b; }
.menu a.aktif { background: #312e81; color: #fff; font-weight: 600; }

main { flex: 1; padding: 24px; max-width: 1100px; width: 100%; }
main h2 { margin-top: 0; }

/* ---------- Isi halaman ---------- */
.segera { background: #1e293b; border-radius: 12px; padding: 20px 24px; color: #94a3b8; }
.segera ul { margin: 12px 0 0; padding-left: 20px; }
.daftar { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.daftar li { background: #1e293b; padding: 14px 16px; border-radius: 12px; }
.daftar .nama { font-weight: 600; }
.daftar .ket { color: #94a3b8; font-size: 13px; margin-top: 4px; }

/* ---------- Layar HP (lebar ≤ 720px): menu pindah ke atas ---------- */
@media (max-width: 720px) {
  .tubuh { flex-direction: column; }
  .menu {
    width: auto;
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #334155;
  }
  .menu a { white-space: nowrap; }
  main { padding: 16px; }
}
/* ---------- Halaman Agent (Fase 4) ---------- */
.baris-judul { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.baris-judul h2 { margin: 0; }
.tombol-utama { width: auto; margin: 0; padding: 9px 16px; font-size: 14px; }
.tombol-batal { background: #334155; }
.tombol-batal:hover { background: #475569; }
.tombol-baris { display: flex; gap: 8px; margin-top: 18px; }
.panel { background: #1e293b; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.panel h3 { margin: 0 0 4px; }
.kisi-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.petunjuk { color: #94a3b8; font-size: 12px; margin: 4px 0 0; }
.daftar-agent { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.kartu-agent {
  display: block;
  background: #1e293b;
  padding: 14px 16px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  border: 1px solid transparent;
}
.kartu-agent:hover { border-color: #6366f1; }
.kartu-agent .nama { font-weight: 600; }
.kartu-agent .ket { color: #94a3b8; font-size: 13px; margin-top: 4px; }
.lencana { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #334155; color: #cbd5e1; margin-left: 8px; vertical-align: middle; font-weight: 500; }
.lencana.cuti { background: #7c2d12; color: #fed7aa; }
.kembali { color: #a5b4fc; text-decoration: none; font-size: 14px; display: inline-block; margin-bottom: 12px; }
.kembali:hover { text-decoration: underline; }
@media (max-width: 720px) { .kisi-2 { grid-template-columns: 1fr; } }

/* ---------- Detail agent: tab (Fase 4) ---------- */
.tab-baris { display: flex; gap: 4px; border-bottom: 1px solid #334155; margin: 16px 0; overflow-x: auto; }
.tab-baris button {
  width: auto; margin: 0; padding: 10px 14px;
  background: transparent; color: #94a3b8;
  border-radius: 8px 8px 0 0; white-space: nowrap; font-weight: 500;
}
.tab-baris button:hover { background: #1e293b; }
.tab-baris button.aktif { background: #1e293b; color: #fff; box-shadow: inset 0 -2px 0 #6366f1; }
textarea { min-height: 320px; resize: vertical; line-height: 1.5; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.saklar { display: flex; gap: 10px; align-items: center; margin: 16px 0 0; cursor: pointer; }
.pilihan-alat { display: grid; gap: 8px; margin-top: 12px; }
.pilihan-alat label {
  display: flex; gap: 10px; align-items: flex-start; margin: 0;
  padding: 10px 12px; background: #0f172a; border: 1px solid #334155; border-radius: 8px; cursor: pointer;
}
.pilihan-alat label.berisiko { border-color: #b45309; }
.pilihan-alat input { margin-top: 3px; }
.pesan-ok { color: #4ade80; font-size: 14px; margin: 12px 0 0; min-height: 20px; }
.peringatan {
  background: #422006; border: 1px solid #b45309; color: #fde68a;
  padding: 12px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 12px;
  display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.tabel { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabel th, .tabel td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #334155; }
.tabel th { color: #94a3b8; font-weight: 500; }

/* ---------- Papan kanban (Fase 5) ---------- */
.alat-papan { display: flex; gap: 8px; flex-wrap: wrap; }
.alat-papan input[type="search"], .alat-papan select {
  width: auto; min-width: 200px; padding: 8px 12px; font-size: 14px;
  border-radius: 8px; border: 1px solid #334155; background: #0f172a; color: #e2e8f0; font-family: inherit;
}
.papan { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kolom {
  flex: 0 0 272px;
  background: #111827; border: 1px solid #1f2937; border-radius: 12px;
  padding: 10px; display: flex; flex-direction: column;
  max-height: calc(100vh - 190px);
}
.kolom-kepala { padding: 4px 4px 10px; }
.kolom-nama { font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kolom-nama .jumlah { font-size: 12px; font-weight: 500; color: #94a3b8; background: #1e293b; padding: 2px 8px; border-radius: 999px; }
.kolom-ket { font-size: 12px; color: #94a3b8; margin-top: 4px; }
.kolom-isi { display: flex; flex-direction: column; gap: 8px; min-height: 48px; overflow-y: auto; padding: 2px; }
.kartu-papan {
  background: #1e293b; border: 1px solid #334155; border-left: 4px solid #475569;
  border-radius: 10px; padding: 10px 12px; cursor: pointer;
}
.kartu-papan:hover { border-color: #6366f1; }
.kartu-papan.prio-tinggi { border-left-color: #ef4444; }
.kartu-papan.prio-rendah { border-left-color: #22c55e; }
.kartu-judul { font-size: 14px; line-height: 1.4; word-break: break-word; }
.kartu-bawah { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.kartu-bawah .lencana { margin-left: 0; }
.kartu-bawah .waktu { font-size: 11px; color: #64748b; margin-left: auto; }
.st-menunggu    { background: #334155; }
.st-dikerjakan  { background: #1e3a8a; color: #bfdbfe; }
.st-keputusan   { background: #713f12; color: #fde68a; }
.st-gagal       { background: #7f1d1d; color: #fecaca; }
.st-selesai     { background: #14532d; color: #bbf7d0; }
.prio-lencana-tinggi { background: #7f1d1d; color: #fecaca; }
.prio-lencana-rendah { background: #14532d; color: #bbf7d0; }
.tambah-kartu { margin-top: 8px; background: transparent; color: #94a3b8; text-align: left; padding: 8px 10px; font-weight: 500; }
.tambah-kartu:hover { background: #1e293b; color: #e2e8f0; }
.form-kartu { margin-top: 8px; }
.form-kartu input { font-size: 14px; padding: 8px 10px; }
.galat.kecil { font-size: 12px; margin: 6px 0 0; min-height: 0; }
.kosong-kolom { font-size: 12px; color: #475569; text-align: center; padding: 10px 0; }

/* ---------- Seret-lepas kartu (Fase 5) ---------- */
.kartu-bayangan { opacity: 0.35; border-style: dashed; }
.kartu-papan.sortable-chosen { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.kartu-papan.terkunci { cursor: not-allowed; }
.mencari .kartu-papan { cursor: default; }

/* ---------- Panel samping kartu (Fase 5) ---------- */
.latar-panel { position: fixed; inset: 0; background: rgba(2, 6, 23, 0.55); z-index: 40; }
.panel-samping {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(440px, 100vw);
  background: #0f172a; border-left: 1px solid #334155;
  z-index: 41; padding: 16px 20px 32px; overflow-y: auto;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
}
.panel-kepala { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tutup-panel { width: auto; margin: 0; padding: 4px 10px; background: transparent; color: #94a3b8; font-size: 18px; }
.tutup-panel:hover { background: #1e293b; color: #fff; }
textarea.judul-panel {
  min-height: 0; resize: none;
  font-family: inherit; font-size: 18px; font-weight: 600; line-height: 1.4;
  background: transparent; border-color: transparent; padding: 6px 8px;
}
textarea.judul-panel:hover { border-color: #334155; }
.judul-bagian { font-size: 15px; margin: 22px 0 8px; color: #cbd5e1; }
.hasil-kolom { background: #1e293b; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.hasil-judul { font-size: 13px; color: #a5b4fc; margin-bottom: 6px; }
.hasil-teks { white-space: pre-wrap; word-break: break-word; margin: 0; font-size: 13px; line-height: 1.5; font-family: inherit; }
.riwayat { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.riwayat li { font-size: 14px; border-left: 2px solid #334155; padding-left: 10px; }
.tombol-bahaya { background: #991b1b; }
.tombol-bahaya:hover { background: #b91c1c; }

/* ---------- Pengaturan kolom (Fase 5) ---------- */
input[type="number"] {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid #334155; background: #0f172a; color: #e2e8f0;
  font-size: 15px; font-family: inherit;
}
.kolom-aksi { display: flex; gap: 4px; align-items: center; }
.atur-kolom { width: auto; margin: 0; padding: 2px 6px; background: transparent; font-size: 14px; opacity: 0.6; }
.atur-kolom:hover { background: #1e293b; opacity: 1; }
.kolom-tambah { background: transparent; border: 2px dashed #1f2937; }
textarea.instruksi-kolom { min-height: 160px; }
.panel-samping .pilihan-alat label { padding: 8px 10px; }
.panel-samping input[type="radio"] { margin-top: 4px; }

/* ---------- Katalog kemampuan (Fase 6) ---------- */
.kartu-katalog { background: #1e293b; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.kartu-katalog .nama { font-weight: 600; }
.kartu-katalog .ket { color: #94a3b8; font-size: 13px; margin-top: 4px; }
.tugas-katalog { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: #cbd5e1; }
.form-rekrut label:first-child { margin-top: 12px; }

/* ---------- Bash terbatas (Fase 6) ---------- */
.daftar-izin { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.daftar-izin li { display: flex; justify-content: space-between; align-items: center; background: #0f172a; border: 1px solid #334155; border-radius: 8px; padding: 8px 12px; }
.daftar-izin code { font-family: ui-monospace, Consolas, monospace; color: #a5b4fc; }
.tombol-hapus-kecil { width: auto; margin: 0; padding: 2px 8px; background: transparent; color: #94a3b8; font-size: 13px; }
.tombol-hapus-kecil:hover { background: #7f1d1d; color: #fff; }
.baris-tambah { display: flex; gap: 8px; }
.baris-tambah button { width: auto; margin: 0; white-space: nowrap; }
.preset-bash { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tombol-preset {
  width: auto; margin: 0; padding: 4px 10px; font-size: 13px;
  font-family: ui-monospace, Consolas, monospace; background: #1e293b; border: 1px solid #334155; color: #cbd5e1;
}
.tombol-preset:hover { background: #312e81; }

/* ---------- Pengaturan: PC & mesin AI (Fase 7) ---------- */
.kotak-kode { background: #0f172a; border: 1px dashed #6366f1; border-radius: 12px; padding: 16px; margin-top: 12px; text-align: center; }
.kode-pasang { font-family: ui-monospace, Consolas, monospace; font-size: 32px; letter-spacing: 4px; font-weight: 700; color: #a5b4fc; margin-bottom: 6px; }
.tombol-kecil-baris { width: auto; margin-top: 10px; padding: 6px 12px; font-size: 13px; }

/* ---------- Kerja agent di panel kartu (Fase 7) ---------- */
.kotak-kerja { background: #1e293b; border-radius: 10px; padding: 12px 14px; }
.kotak-kerja p { margin: 0 0 8px; font-size: 14px; }
.kotak-kerja button { width: auto; margin: 4px 0 0; }
.berkas-hasil { margin: 6px 0; }
.berkas-hasil summary { cursor: pointer; font-size: 13px; color: #cbd5e1; margin-bottom: 6px; }
.berkas-hasil pre { background: #0f172a; border-radius: 8px; padding: 10px; max-height: 360px; overflow: auto; }

/* ---------- Status login Claude per PC (Fase 7) ---------- */
.baris-tombol-pc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.baris-tombol-pc .tombol-kecil-baris { margin-top: 6px; }
.galat-teks { color: #f87171; }

/* ---------- Jadwal (Fase 9) ---------- */
input[type="time"] {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid #334155; background: #0f172a; color: #e2e8f0;
  font-size: 15px; font-family: inherit; color-scheme: dark;
}
.baris-hari { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.saklar-kecil { margin: 0; font-size: 14px; gap: 6px; }
.jadwal-jeda { opacity: 0.55; }

/* ---------- Kuota harian (Fase 9) ---------- */
.meteran { margin: 14px 0; }
.meteran-judul { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.meteran-batang { height: 10px; background: #0f172a; border: 1px solid #334155; border-radius: 999px; overflow: hidden; }
.meteran-isi { height: 100%; background: #22c55e; border-radius: 999px; transition: width 0.3s; }
.meteran-isi.hampir { background: #eab308; }
.meteran-isi.penuh { background: #ef4444; }

/* ---------- Keputusan pemilik (Fase 10) ---------- */
.kotak-keputusan { background: #2a1d07; border: 1px solid #b45309; border-radius: 10px; padding: 12px 14px; }
.kotak-keputusan ul { margin: 0 0 10px; padding-left: 18px; }
textarea.catatan-keputusan { min-height: 70px; font-family: inherit; font-size: 14px; }
.kotak-keputusan .tombol-baris { flex-wrap: wrap; margin-top: 10px; }
.kotak-keputusan .tombol-baris button { width: auto; margin: 0; }
.tombol-setujui { background: #16a34a; }
.tombol-setujui:hover { background: #15803d; }

/* ---------- Halaman Persetujuan (Fase 10) ---------- */
.lencana-menu {
  margin-left: auto; min-width: 22px; text-align: center;
  background: #f59e0b; color: #111827; border-radius: 999px;
  font-size: 12px; font-weight: 700; padding: 1px 7px;
}
.daftar-keputusan { display: grid; gap: 14px; }
.kartu-keputusan {
  background: #1e293b; border: 1px solid #334155; border-left: 4px solid #475569;
  border-radius: 12px; padding: 14px 16px;
}
.kartu-keputusan.prio-tinggi { border-left-color: #ef4444; }
.kartu-keputusan.prio-rendah { border-left-color: #22c55e; }
.kartu-keputusan .nama { font-weight: 600; font-size: 16px; }
.kartu-keputusan .ket { color: #94a3b8; font-size: 13px; margin: 4px 0 10px; }
.kartu-keputusan .tombol-baris { flex-wrap: wrap; margin-top: 10px; }
.kartu-keputusan .tombol-baris button { width: auto; margin: 0; }
.isi-keputusan { margin-bottom: 10px; }

/* ---------- Pemutar media & popup (Fase 11) ---------- */
.kotak-media { display: grid; gap: 10px; margin: 8px 0; }
.media-video { display: block; width: 100%; max-height: 420px; background: #000; border-radius: 10px; }
.media-audio { width: 100%; }
.popup-latar {
  position: fixed; inset: 0; z-index: 60; padding: 16px;
  background: rgba(2, 6, 23, 0.88); display: grid; place-items: center;
}
.popup-kotak {
  width: 100%; max-width: min(480px, 100%);
  background: #0f172a; border: 1px solid #334155; border-radius: 14px; padding: 12px;
}
.popup-kepala { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 600; }
.popup-video { display: block; width: 100%; max-height: calc(100vh - 120px); background: #000; border-radius: 10px; }

/* ---------- Gambar cek mutu (Fase 11) ---------- */
.media-gambar { display: block; width: 100%; border-radius: 10px; cursor: zoom-in; background: #000; }
.popup-kotak.lebar { max-width: min(1200px, 100%); }
.popup-gambar { display: block; width: 100%; height: auto; max-height: calc(100vh - 120px); object-fit: contain; border-radius: 10px; }

/* ---------- 🎨 Template video (Fase 11) ---------- */
.galeri-template { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kartu-template {
  display: block; background: #1e293b; border: 1px solid #334155; border-radius: 12px; padding: 12px;
  color: inherit; text-decoration: none;
}
.kartu-template:hover { border-color: #6366f1; }
.kartu-template .nama { font-weight: 600; margin-top: 10px; }
.kartu-template .ket { color: #94a3b8; font-size: 13px; margin-top: 4px; }
.contoh-template {
  height: 120px; border-radius: 8px; display: grid; place-content: center; font-size: 30px;
  grid-auto-flow: column; gap: 8px;
}
.baris-baru-template { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0 12px; align-items: end; }
.tata-editor-template { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.kolom-pratinjau { position: sticky; top: 16px; display: grid; gap: 8px; }
.bingkai-pratinjau {
  width: 270px; height: 480px; overflow: hidden; border-radius: 14px; border: 1px solid #334155; background: #000;
}
.pratinjau-iframe { width: 1080px; height: 1920px; border: 0; transform: scale(0.25); transform-origin: 0 0; pointer-events: none; }
.form-template textarea { min-height: 70px; font-family: inherit; font-size: 14px; }
.form-template .baris-isian label { margin-top: 12px; }
.kisi-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.pilih-warna { width: 100%; height: 40px; padding: 2px; border: 1px solid #334155; border-radius: 8px; background: #0f172a; cursor: pointer; }
.daftar-aksen { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.baris-aksen { display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: center; }
.geser-baris { display: flex; align-items: center; gap: 10px; }
.geser-baris input[type="range"] { flex: 1; accent-color: #6366f1; }
.nilai-geser { min-width: 70px; text-align: right; font-variant-numeric: tabular-nums; color: #cbd5e1; font-size: 14px; }
.daftar-kontras { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.lencana-kontras { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #0f172a; border: 1px solid #334155; }
.lencana-kontras.kontras-buruk { border-color: #f87171; color: #fecaca; }
.lencana-kontras.kontras-cukup { border-color: #fbbf24; color: #fde68a; }
.lencana-kontras.kontras-baik { border-color: #4ade80; color: #bbf7d0; }
.titik-warna { width: 12px; height: 12px; border-radius: 50%; border: 1px solid #64748b; }
@media (max-width: 860px) {
  .tata-editor-template { grid-template-columns: 1fr; }
  .kolom-pratinjau { position: static; justify-items: center; }
  .baris-baru-template, .kisi-3, .daftar-aksen, .form-template .kisi-2 { grid-template-columns: 1fr; }
}

/* ---------- 🎥 Klip Google Flow (Fase 11) ---------- */
.meteran-flow { height: 10px; background: #334155; border-radius: 999px; overflow: hidden; margin: 6px 0 8px; }
.isi-meteran-flow { height: 100%; background: #f97316; border-radius: 999px; }
.kisi-klip-flow { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 8px; }
.video-klip-flow { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #000; border-radius: 8px; cursor: pointer; }
.label-klip-flow { font-size: 12px; color: #94a3b8; text-align: center; margin-top: 3px; }
