/* ═══════════════════════════════════════════════════════
   LasLes Live — Global Stylesheet
   Dark theme, mirip StreamHib
═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary:    #0d0f14;
  --bg-secondary:  #131620;
  --bg-card:       #181c27;
  --bg-sidebar:    #10131c;
  --border:        #1e2336;
  --border-hover:  #2a3050;

  --text-primary:  #e8eaf0;
  --text-muted:    #6b7280;
  --text-dim:      #9ca3af;

  --accent-green:  #00c97a;

  /* PRIMARY = indigo. Satu warna untuk semua aksi utama & state terpilih di
     seluruh halaman. --accent-blue disisakan sbg alias biar kode lama ikut
     indigo otomatis tanpa diedit satu-satu. Hijau khusus status live/sukses. */
  --accent:        #6366f1;
  --accent-hover:  #4f46e5;
  --accent-light:  #818cf8;
  --accent-blue:   var(--accent);
  --accent-purple: #8b5cf6;
  --accent-orange: #f97316;
  --accent-red:    #ef4444;
  --accent-cyan:   #06b6d4;
  --accent-pink:   #ec4899;

  /* Versi "R,G,B" polos (bukan #hex) dari 3 warna di atas yang paling sering
     dipakai sbg rgba(...) transparan di berbagai halaman (badge, hover tint,
     dll). Dipakai spt rgba(var(--accent-blue-rgb), .15) -- kalau cuma --accent-blue
     yang jadi var(), rgba(99,102,241,.15) yang ditulis literal TETAP gak ikut
     berubah pas tema diganti, karena angkanya bukan referensi ke variable. */
  --accent-rgb:       99,102,241;
  --accent-blue-rgb:  var(--accent-rgb);
  --accent-green-rgb: 34,197,94;
  --accent-red-rgb:   239,68,68;

  --font-body:     'Inter', sans-serif;
  --font-display:  'Inter', sans-serif;
  --font-mono:     'Inter', ui-monospace, monospace;

  --sidebar-width: 220px;
  --sidebar-rail:  60px;
  --topbar-height: 52px;
  --radius:        10px;
  --radius-sm:     7px;
  --transition:    0.18s ease;
}

html, body {
  height: 100%;
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ── Polish pro: aksesibilitas & rendering (skill ui-ux checklist) ── */
/* Focus ring keyboard: kelihatan jelas pas navigasi pakai Tab (bukan pas klik mouse) */
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; border-radius: 4px; }
button, a, [role="button"], .btn, .tab-item, .toggle-tab-btn, .sub-pill-btn, .main-tab-btn { cursor: pointer; }

/* Angka rata lebar (tabular) -> timer/jam/stat gak goyang tiap detik */
.modal-clock, .time-badge, .stat-value, .disk-stat-value { font-variant-numeric: tabular-nums; }

/* Hormati "kurangi animasi" (setelan aksesibilitas OS) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

a { text-decoration: none; color: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 10px; }

/* ═══════════════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════════════ */

.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 0;      /* garis tepi menu dimulai DI BAWAH header (lihat .sidebar::after) supaya header satu pita tanpa sekat */
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  padding-bottom: 20px;
  transition: transform 0.2s ease, width 0.2s ease;
  overflow: hidden;
}

/* Garis tepi kanan menu: hanya di bawah header, jadi baris logo + judul halaman menyatu tanpa garis vertikal. */
.sidebar::after {
  content: '';
  position: absolute;
  top: var(--topbar-height);
  right: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
  pointer-events: none;
}

/* Baris logo = tinggi topbar persis, supaya garis bawah kiri & kanan satu garis lurus di semua halaman. */
.sidebar-logo {
  display: flex;
  align-items: center;
  height: var(--topbar-height);
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  width: 100%;
}

.sidebar-logo-img {
  height: 28px;
  max-width: 165px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: opacity 0.15s ease;
}

.sidebar-logo-link:hover .sidebar-logo-img {
  opacity: 0.9;
}

.sidebar-logo-ico { height: 28px; width: 28px; display: none; flex-shrink: 0; }

.logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.logo-text {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.3px;
}
.logo-text span { color: #ef4444; }

.sidebar-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 12px 4px 18px;
  white-space: nowrap;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13.5px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(99,102,241,0.12);
  color: var(--accent-blue);
  font-weight: 600;
}

.nav-item.active .nav-icon { color: var(--accent-blue); }

.nav-icon {
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.nav-icon svg { width: 17px; height: 17px; }

/* ── Sidebar bottom ── */
.sidebar-bottom {
  margin-top: auto;
  padding: 12px 10px 0;
  border-top: 1px solid var(--border);
}

/* ── Main area ── */
.main-area {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  transition: margin-left 0.2s ease;
}

/* Tombol ciutkan/lebarkan menu samping (di samping tulisan MENU; pilihan diingat per browser). */
.sb-toggle {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.sb-toggle:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.sb-toggle:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 1px; }
.sb-toggle svg { width: 16px; height: 16px; }
.sb-toggle-m { display: none; width: 30px; height: 30px; margin-left: -6px; }
.sb-toggle-m svg { width: 18px; height: 18px; }

/* Menu diciutkan: tinggal logo + deretan ikon (tulisan disembunyikan; nama menu muncul sebagai tooltip). */
@media (min-width: 601px) {
  html.sb-off .sidebar { width: var(--sidebar-rail); }
  html.sb-off .main-area { margin-left: var(--sidebar-rail); }
  html.sb-off .nav-text { display: none; }
  html.sb-off .sidebar-logo { padding: 0; justify-content: center; }
  html.sb-off .sidebar-logo-link { width: auto; }
  html.sb-off .sidebar-logo-img { display: none; }
  html.sb-off .sidebar-logo-ico { display: block; }
  html.sb-off .sidebar-section-label { padding: 12px 0 4px; justify-content: center; }
  html.sb-off .sidebar-nav { padding: 0 9px; }
  html.sb-off .nav-item { justify-content: center; padding: 9px 0; gap: 0; }
  html.sb-off .sidebar-bottom { padding: 12px 9px 0; }
}

/* ── Topbar ── */
.topbar {
  height: var(--topbar-height);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--bg-sidebar);      /* sama dengan baris logo: header satu warna di semua halaman */
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.server-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
}

.dot-live {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.time-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

/* ── Page content ── */
.page-content {
  padding: 24px;
  flex: 1;
}

/* ═══════════════════════════════════════════════════════
   COMPONENTS
═══════════════════════════════════════════════════════ */

/* ── Section card ── */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13.5px;
}

.section-title svg { width: 16px; height: 16px; }

.section-body { padding: 18px; }

/* ── Stat grid — kartu lepas (masing2 punya border+radius sendiri), BUKAN
   grid nyambung dengan garis 1px kayak versi lama -- itu kelihatan kayak
   tabel spreadsheet, bukan kartu, beda jauh sama proposal yg disepakati. ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  transition: var(--transition);
}

.stat-item:hover { border-color: var(--border-hover); transform: translateY(-1px); }

.stat-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}

.stat-icon svg { width: 16px; height: 16px; }

.stat-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Quick access ── */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.quick-btn:hover {
  border-color: var(--border-hover);
  background: #1a1f2e;
  transform: translateY(-1px);
}

.quick-btn.active-btn {
  border-color: var(--accent-blue);
  background: rgba(99,102,241,0.08);
  color: var(--accent-blue);
}

.quick-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.quick-icon svg { width: 18px; height: 18px; }

/* ── Disk bar ── */
.disk-bar-wrap {
  background: var(--bg-secondary);
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
  margin: 10px 0 16px;
}

.disk-bar-fill {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  transition: width 0.8s ease;
}

.disk-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: center;
}

.disk-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.disk-stat-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

/* ── VU meter (Penggunaan Disk versi "Ruang Kontrol") ── */
.vu-meter {
  display: flex;
  gap: 3px;
  height: 20px;
  margin: 10px 0 16px;
}
.vu-meter i {
  flex: 1;
  border-radius: 2px;
  background: var(--border);
  transition: var(--transition);
}
.vu-meter i.on { background: var(--accent-green); }
.vu-meter i.on.warn { background: var(--accent-blue); }

.status-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}

.badge-normal {
  background: rgba(0,201,122,0.12);
  color: var(--accent-green);
  border: 1px solid rgba(0,201,122,0.3);
}

.badge-warning {
  background: rgba(249,115,22,0.12);
  color: var(--accent-orange);
  border: 1px solid rgba(249,115,22,0.3);
}

/* ── Bottom grid ── */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn svg { width: 15px; height: 15px; }

.btn-primary {
  background: var(--accent-blue);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-success {
  background: var(--accent-green);
  color: #0a0f1a;
}
.btn-success:hover { background: #00b56d; transform: translateY(-1px); }

.btn-danger {
  background: var(--accent-red);
  color: #fff;
}
.btn-danger:hover { background: #dc2626; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-hover);
  color: var(--text-primary);
}
.btn-outline:hover { background: rgba(255,255,255,0.05); }

.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ── Modal chrome: header seragam untuk SEMUA modal (judul+ikon, jam, tutup) ── */
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-title { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.modal-title-ico { background: rgba(var(--accent-rgb),0.15); color: var(--accent-light); padding: 6px; border-radius: 8px; }
.modal-head-right { display: flex; align-items: center; gap: 12px; }
.modal-clock { background: var(--bg-secondary); border: 1px solid var(--border); padding: 4px 10px; border-radius: 6px; font-size: 11px; color: var(--accent-light); font-family: var(--font-mono); }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 15px; line-height: 1; transition: var(--transition); }
.modal-close:hover { color: var(--text-primary); }

/* ── Segmented pill group (Loop/Acak/Tanpa Loop dll) ── */
.pill-group { display: flex; gap: 8px; background: var(--bg-secondary); padding: 4px; border-radius: 8px; border: 1px solid var(--border); }
.pill-group > .sub-pill-btn { flex: 1; }

/* ── Note / hint box kecil ── */
.note-box { font-size: 11px; color: var(--text-muted); background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.5; }

/* ── Baris tombol aksi di bawah modal (rata kanan) ── */
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* ── Tombol tutup (X) ikon polos ── */
.btn-x { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; transition: var(--transition); }
.btn-x:hover { color: var(--text-primary); }

/* ── Baris judul <-> aksi (space-between) ── */
.row-between { display: flex; justify-content: space-between; align-items: center; }

/* ── Baris checkbox + label (toggle fitur) ── */
.toggle-check { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; }
.toggle-check input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }

/* ── Radio inline (mis. "Apakah konten AI? Ya/Tidak") ── */
.radio-inline { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; color: var(--text-primary); }
.radio-inline input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ── Penghitung karakter (0/100 dll) ── */
.char-count { font-size: 10.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.link-clear { background: none; border: none; padding: 0; cursor: pointer; font-size: 10.5px; font-weight: 600; color: var(--text-muted); transition: color 0.15s ease; }
.link-clear:hover { color: var(--accent); }

/* ── Dialog konfirmasi global (pengganti confirm()/alert() bawaan browser) ── */
.cdialog-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 10000; align-items: center; justify-content: center; padding: 20px; }
.cdialog-bg.open { display: flex; }
.cdialog { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 22px; max-width: 400px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.5); animation: slide-in 0.15s ease; }
.cdialog-head { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; margin-bottom: 10px; color: var(--text-primary); }
.cdialog-ico { font-size: 18px; line-height: 1; }
.cdialog-msg { font-size: 13.5px; color: var(--text-dim); line-height: 1.55; }

/* ── Breadcrumb icon ── */
.page-icon {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-blue);
}
.page-icon svg { width: 18px; height: 18px; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 12px; opacity: 0.4; display: block; }
.empty-state p { font-size: 13px; }

/* ── Table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Alert / info box ── */
.info-box {
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: #93c5fd;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.info-box svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

/* ── Form elements ── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-body);
  transition: var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.form-select { cursor: pointer; }
.form-textarea { resize: vertical; min-height: 90px; }

/* ── Upload dropzone ── */
.dropzone {
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent-blue);
  background: rgba(99,102,241,0.05);
  color: var(--text-primary);
}
.dropzone svg { width: 36px; height: 36px; margin: 0 auto 10px; display: block; opacity: 0.5; }
.dropzone p { font-size: 13px; margin-bottom: 4px; }
.dropzone small { font-size: 11px; color: var(--text-muted); }

/* ── Tab system ── */
.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab-item {
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.tab-item:hover { color: var(--text-primary); }
.tab-item.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  min-width: 260px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: slide-in 0.2s ease;
}

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.toast.success { border-left: 3px solid var(--accent-green); }
.toast.error   { border-left: 3px solid var(--accent-red); }
.toast.info    { border-left: 3px solid var(--accent-blue); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .bottom-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .sidebar { transform: translateX(-100%); }
  .main-area { margin-left: 0; }
  html.sb-mobile-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,0.5); }
  .sidebar .sb-toggle { display: none; }
  .sb-toggle-m { display: inline-flex; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════ Phase 7 — Working Account, badge kepemilikan, kartu kesiapan, modal alasan ═══════════════
   Palet (mockup D7): pemilik = indigo, Shared = cyan, Unassigned = amber, BROADCAST = ungu;
   hijau HANYA untuk LIVE / AKTIF / Siap. Seleksi = indigo (bukan hijau). */
.toast.warning { border-left: 3px solid var(--accent-orange); }

.wa-box { display:flex; align-items:center; gap:8px; padding:4px 10px; border:1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-card); margin-right: 10px; }
.wa-box .wa-label { font-size:11px; color: var(--text-muted); text-transform:uppercase; letter-spacing:.4px; white-space:nowrap; }
.wa-select { background: transparent; color: var(--text-primary); border:none; font-size:13px; font-weight:600;
  max-width:190px; outline:none; cursor:pointer; }
.wa-select option { background: var(--bg-card); color: var(--text-primary); }
.wa-box[data-wa="off"] { opacity:.45; pointer-events:none; }
.wa-box.wa-set { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(var(--accent-rgb),.25); }

.ll-badge { display:inline-flex; align-items:center; gap:4px; font-size:10.5px; font-weight:700; line-height:1;
  padding:3px 7px; border-radius:20px; border:1px solid transparent; white-space:nowrap; }
.ll-b-own   { color:#a5b4fc; background:rgba(var(--accent-rgb),.16); border-color:rgba(var(--accent-rgb),.4); }
.ll-b-other { color:var(--text-dim); background:rgba(148,163,184,.10); border-color:rgba(148,163,184,.3); }
.ll-b-shared{ color:#67e8f9; background:rgba(6,182,212,.13); border-color:rgba(6,182,212,.4); }
.ll-b-unas  { color:#fbbf24; background:rgba(245,158,11,.13); border-color:rgba(245,158,11,.4); }
.ll-b-bc    { color:#c4b5fd; background:rgba(139,92,246,.15); border-color:rgba(139,92,246,.4); }
.ll-badge-row { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }

.ll-notice { display:flex; gap:10px; align-items:flex-start; padding:10px 14px; margin:0 0 12px; border-radius:var(--radius-sm);
  font-size:12.5px; color:var(--text-dim); background:rgba(var(--accent-rgb),.08); border:1px solid rgba(var(--accent-rgb),.28); }
.ll-notice strong { color:var(--text-primary); }
.ll-notice.warn { background:rgba(245,158,11,.08); border-color:rgba(245,158,11,.35); }

.ll-sec-head { display:flex; align-items:center; gap:8px; margin:16px 0 8px; font-size:11px; font-weight:800;
  letter-spacing:.6px; text-transform:uppercase; color:var(--text-muted); cursor:default; }
.ll-sec-head::after { content:''; flex:1; height:1px; background:var(--border); }
.ll-sec-head .ll-sec-count { color:var(--text-dim); }
.ll-sec-head.ll-collapsible { cursor:pointer; }
.ll-sec-head.ll-collapsible:hover { color:var(--text-primary); }

.ll-modal-bg { display:none; position:fixed; inset:0; background:rgba(0,0,0,.62); z-index:400; align-items:center; justify-content:center; padding:20px; }
.ll-modal-bg.open { display:flex; }
.ll-modal { width:100%; max-width:520px; max-height:88vh; overflow:auto; background:var(--bg-card); border:1px solid var(--border);
  border-radius:14px; padding:20px 22px; box-shadow:0 20px 60px rgba(0,0,0,.55); }
.ll-modal.wide { max-width:760px; }
.ll-modal-head { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.ll-modal-ico { width:34px; height:34px; border-radius:9px; display:flex; align-items:center; justify-content:center;
  background:rgba(var(--accent-rgb),.16); color:#a5b4fc; font-size:16px; flex-shrink:0; }
.ll-modal-ico.danger { background:rgba(239,68,68,.15); color:#f87171; }
.ll-modal-title { font-size:15px; font-weight:800; flex:1; }
.ll-modal-x { background:none; border:none; color:var(--text-muted); font-size:18px; cursor:pointer; }
.ll-modal-body { font-size:13px; color:var(--text-dim); line-height:1.55; }
.ll-modal-body strong { color:var(--text-primary); }
.ll-modal-foot { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }
.ll-list { margin:8px 0 0; padding:0; list-style:none; }
.ll-list li { padding:6px 10px; margin-bottom:5px; border-radius:7px; background:rgba(148,163,184,.07); border:1px solid var(--border); font-size:12.5px; color:var(--text-primary); }
.ll-radio { display:flex; gap:10px; align-items:flex-start; padding:10px 12px; margin-bottom:8px; border:1px solid var(--border);
  border-radius:9px; cursor:pointer; }
.ll-radio.sel { border-color:var(--accent); background:rgba(var(--accent-rgb),.10); }
.ll-radio input { margin-top:3px; accent-color: var(--accent); }
.ll-select, .ll-input { background:var(--bg-primary); color:var(--text-primary); border:1px solid var(--border); border-radius:7px;
  padding:7px 10px; font-size:13px; width:100%; outline:none; }
.ll-select:focus, .ll-input:focus { border-color:var(--accent); }

/* Kartu Kesiapan (Green / Yellow / Red) */
.ll-ready { border:1px solid var(--border); border-radius:11px; background:var(--bg-secondary); overflow:hidden; }
.ll-ready-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 13px;
  font-size:12px; font-weight:700; border-bottom:1px solid var(--border); }
.ll-ready-head .ll-ready-mode { font-weight:500; color:var(--text-muted); font-size:11.5px; }
.ll-ready.st-green  { border-color:rgba(34,197,94,.45); }
.ll-ready.st-yellow { border-color:rgba(245,158,11,.5); }
.ll-ready.st-red    { border-color:rgba(239,68,68,.55); }
.ll-ready-badge { font-size:11px; font-weight:800; padding:3px 9px; border-radius:20px; white-space:nowrap; }
.st-green  .ll-ready-badge { color:#4ade80; background:rgba(34,197,94,.13); }
.st-yellow .ll-ready-badge { color:#fbbf24; background:rgba(245,158,11,.14); }
.st-red    .ll-ready-badge { color:#f87171; background:rgba(239,68,68,.14); }
.ll-ready-line { display:flex; align-items:flex-start; gap:8px; padding:7px 13px; font-size:12.5px; color:var(--text-primary);
  border-bottom:1px solid rgba(148,163,184,.08); }
.ll-ready-line:last-child { border-bottom:none; }
.ll-ready-line .ll-dot { flex-shrink:0; width:9px; height:9px; border-radius:50%; margin-top:5px; }
.ll-dot.g { background:#22c55e; } .ll-dot.y { background:#f59e0b; } .ll-dot.r { background:#ef4444; } .ll-dot.n { background:#64748b; }
.ll-ready-line .ll-ready-txt { flex:1; }
.ll-ready-line.muted { color:var(--text-muted); }
.ll-ready-act { background:none; border:1px solid var(--border); color:#a5b4fc; border-radius:6px; font-size:11px; font-weight:700;
  padding:3px 8px; cursor:pointer; white-space:nowrap; }
.ll-ready-act:hover { border-color:var(--accent); }
.ll-ready-more { color:var(--text-muted); font-size:11.5px; padding:5px 13px 8px 30px; cursor:pointer; }
.ll-ready-loading { padding:12px 14px; font-size:12px; color:var(--text-muted); }

/* ── Menu profil (avatar) ── */
.avatar-wrap { position: relative; }
button.avatar { border: 0; padding: 0; color: #fff; font-family: inherit; }
button.avatar:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.av-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 80;
  width: 270px; max-width: calc(100vw - 24px);
  background: var(--bg-card); border: 1px solid var(--border-hover); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.45); padding: 6px;
  font-size: 13px; color: var(--text-primary);
}
.av-menu[hidden] { display: none; }
.av-head { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; }
.av-big { width: 40px; height: 40px; font-size: 14px; cursor: default; flex-shrink: 0; }
.av-id { min-width: 0; }
.av-nama { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-mail { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-peran { display: inline-block; margin-top: 5px; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; color: var(--accent-light);
  background: rgba(var(--accent-rgb), .14); border-radius: 20px; padding: 2px 8px; }
.av-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.av-item {
  display: block; width: 100%; box-sizing: border-box; text-align: left; text-decoration: none;
  background: transparent; border: 0; border-radius: 8px; padding: 8px 10px;
  font: inherit; font-size: 13px; color: var(--text-primary); cursor: pointer;
}
.av-item:hover, .av-item:focus-visible { background: rgba(255,255,255,.06); outline: none; }
.av-item[disabled] { opacity: .5; cursor: not-allowed; }
.av-keluar { color: #f87171; }
.av-ver { padding: 4px 10px; font-size: 11.5px; color: var(--text-muted); }
