/* ============================================================
   Reguler Studio — design tokens
   ============================================================ */
:root, :root[data-theme="dark"] {
  --bg: #0b1017;
  --surface: #111823;
  --surface-2: #16202d;
  --surface-3: #1d2836;
  --surface-4: #273445;
  --border: rgba(148, 163, 184, 0.10);
  --border-2: rgba(148, 163, 184, 0.16);
  --border-3: rgba(148, 163, 184, 0.28);
  --text: #f1f5f9;
  --text-2: #a7b4c6;
  --text-3: #6f7f95;
  --brand: #3b82f6;
  --brand-text: #93c5fd;
  --grad: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  --brand-soft: rgba(59, 130, 246, 0.15);
  --brand-line: rgba(96, 165, 250, 0.45);
  --btn-shadow: 0 6px 18px -6px rgba(37, 99, 235, 0.55);
  --accent: #f43f5e;
  --accent-2: #fb7185;
  --accent-soft: rgba(244, 63, 94, 0.14);
  --accent-line: rgba(244, 63, 94, 0.4);
  --ok: #22c55e;
  --ok-soft: rgba(34, 197, 94, 0.14);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.13);
  --warn-text: #fcd34d;
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, 0.13);
  --info-text: #bae6fd;
  --ai: #2dd4bf;
  --ai-soft: rgba(45, 212, 191, 0.14);
  --c-blue: #60a5fa;
  --c-rose: #fb7185;
  --c-cyan: #22d3ee;
  --c-green: #34d399;
  --c-amber: #fbbf24;
  --c-orange: #fb923c;
  --inverse: #f1f5f9;
  --on-inverse: #0b1017;
  --glass: rgba(11, 16, 23, 0.75);
  --scrim: rgba(2, 6, 12, 0.6);
  --ring: rgba(59, 130, 246, 0.3);
  --knob: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 64px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--border);
  --glow-1: rgba(37, 99, 235, 0.16);
  --glow-2: rgba(14, 165, 233, 0.10);
  --glow-3: rgba(244, 63, 94, 0.06);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --side: 248px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --font: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f7;
  --surface-4: #e2e8f0;
  --border: rgba(15, 23, 42, 0.08);
  --border-2: rgba(15, 23, 42, 0.13);
  --border-3: rgba(15, 23, 42, 0.24);
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #8592a6;
  --brand: #2563eb;
  --brand-text: #1d4ed8;
  --grad: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
  --brand-soft: rgba(37, 99, 235, 0.09);
  --brand-line: rgba(37, 99, 235, 0.35);
  --btn-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.45);
  --accent: #e11d48;
  --accent-2: #be123c;
  --accent-soft: rgba(225, 29, 72, 0.09);
  --accent-line: rgba(225, 29, 72, 0.32);
  --ok: #059669;
  --ok-soft: rgba(5, 150, 105, 0.10);
  --warn: #d97706;
  --warn-soft: rgba(245, 158, 11, 0.13);
  --warn-text: #92400e;
  --info: #0284c7;
  --info-soft: rgba(2, 132, 199, 0.10);
  --info-text: #075985;
  --ai: #0d9488;
  --ai-soft: rgba(13, 148, 136, 0.10);
  --c-blue: #2563eb;
  --c-rose: #e11d48;
  --c-cyan: #0891b2;
  --c-green: #059669;
  --c-amber: #d97706;
  --c-orange: #ea580c;
  --inverse: #0f172a;
  --on-inverse: #ffffff;
  --glass: rgba(244, 246, 250, 0.8);
  --scrim: rgba(15, 23, 42, 0.32);
  --ring: rgba(37, 99, 235, 0.2);
  --knob: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 64px -16px rgba(15, 23, 42, 0.22), 0 0 0 1px var(--border);
  --glow-1: rgba(37, 99, 235, 0.10);
  --glow-2: rgba(8, 145, 178, 0.08);
  --glow-3: rgba(225, 29, 72, 0.04);
  color-scheme: light;
}
/* Warna khas per halaman / jenis produksi */
[data-page="dashboard"] { --c: var(--c-blue); }
[data-page="live"] { --c: var(--c-rose); }
[data-page="media"] { --c: var(--c-cyan); }
[data-page="produksi"] { --c: var(--c-orange); }
[data-page="keys"] { --c: var(--c-amber); }
[data-kind="t2i"] { --c: var(--c-cyan); }
[data-kind="t2v"] { --c: var(--c-rose); }
[data-kind="i2v"] { --c: var(--c-orange); }
[data-kind="text"] { --c: var(--c-green); }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
code { background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.015em; font-weight: 600; }
p { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12px; }
.tnum { font-variant-numeric: tabular-nums; }
.link { color: var(--text-2); font-size: 13px; font-weight: 500; transition: color 150ms ease; cursor: pointer; background: none; border: 0; padding: 0; }
.link:hover { color: var(--text); }
.link.accent { color: var(--accent-2); }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.i-lg { width: 20px !important; height: 20px !important; }
::selection { background: var(--brand-soft); }
.theme-btn svg.i { transition: transform 300ms var(--ease-out); }
.theme-btn:active svg.i { transform: rotate(-30deg); }
.theme-switching, .theme-switching * { transition: none !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-4); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   Controls
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border-2);
  background: var(--surface-3); color: var(--text); font-size: 13px; font-weight: 550;
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out), opacity 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), var(--btn-shadow); }
.btn.white { background: var(--inverse); border-color: transparent; color: var(--on-inverse); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.danger { background: transparent; color: var(--accent-2); border-color: var(--border-2); }
.btn.stop { background: var(--accent-soft); color: var(--accent-2); border-color: var(--accent-line); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn.lg { height: 44px; padding: 0 18px; font-size: 14px; border-radius: 11px; }
.btn.block { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--surface-4); border-color: var(--border-3); }
  .btn.primary:hover { background: var(--grad); filter: brightness(1.08) saturate(1.05); border-color: transparent; }
  .btn.white:hover { background: var(--inverse); opacity: 0.88; border-color: transparent; }
  .btn.stop:hover { background: var(--accent-soft); border-color: var(--accent); }
  .btn.ghost:hover { background: var(--surface-3); color: var(--text); }
  .btn.danger:hover { background: var(--accent-soft); border-color: var(--accent-line); }
}
.icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out);
}
.icon-btn:active { transform: scale(0.94); }
.icon-btn.bordered { border-color: var(--border-2); background: var(--surface-2); }
.icon-btn.danger { color: var(--text-3); }
@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover { background: var(--surface-3); color: var(--text); }
  .icon-btn.danger:hover { background: var(--accent-soft); color: var(--accent-2); }
}

.field { display: grid; gap: 7px; min-width: 0; }
.field > .lbl, .lbl { font-size: 12.5px; font-weight: 550; color: var(--text-2); display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 10px; }
.hint { font-size: 12px; color: var(--text-3); line-height: 1.45; }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea, select.input, textarea.input {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text); font: 14px var(--font); outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}
.field textarea, textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.field select, select.input { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.field input::placeholder, .field textarea::placeholder, .input::placeholder { color: var(--text-3); }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--border-3); box-shadow: 0 0 0 3px var(--ring); background: var(--surface); border-color: var(--brand-line); }
.field input:disabled { opacity: 0.6; }
@media (max-width: 720px) { .field input, .field select, .field textarea, .input { font-size: 16px; } }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline > .grow, .inline > input { flex: 1; min-width: 0; }

/* Segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 7px; border: 0; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 550; cursor: pointer; white-space: nowrap; transition: background-color 150ms ease, color 150ms ease; }
.seg button .count { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border-2); }
.seg button.on .count { color: #fff; background: var(--grad); padding: 0 6px; border-radius: 99px; }
@media (hover: hover) and (pointer: fine) { .seg button:not(.on):hover { color: var(--text); } }
.seg.block { display: flex; width: 100%; }
.seg.block button { flex: 1; justify-content: center; }

/* Chips (pilihan) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 30px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; border-radius: 99px; border: 1px solid var(--border-2); background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 550; cursor: pointer; transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 160ms var(--ease-out); }
.chip:active { transform: scale(0.96); }
.chip.on { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand-line); }
@media (hover: hover) and (pointer: fine) { .chip:not(.on):hover { border-color: var(--border-3); color: var(--text); } }
.ratio-ico { display: inline-block; border: 1.5px solid currentColor; border-radius: 3px; }

/* Switch */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; padding: 10px 0; }
.switch .txt b { display: block; font-size: 13.5px; font-weight: 550; }
.switch .txt span { display: block; font-size: 12px; color: var(--text-3); }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 99px; background: var(--surface-4); border: 1px solid var(--border-2); position: relative; cursor: pointer; flex: none; transition: background-color 180ms ease, border-color 180ms ease; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--knob); box-shadow: var(--shadow-sm); transition: transform 200ms var(--ease-out), background-color 180ms ease; }
.switch input:checked { background: var(--grad); border-color: transparent; }
.switch input:checked::after { transform: translateX(16px); background: #fff; }

/* Badges / pills */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; border: 1px solid var(--border); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.live { background: var(--accent); color: #fff; border-color: transparent; letter-spacing: 0.04em; }
.badge.live .dot { background: #fff; animation: pulse 1.6s ease-in-out infinite; }
.badge.ok, .badge.done { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn, .badge.starting, .badge.restarting { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.err, .badge.error, .badge.failed { background: var(--accent-soft); color: var(--accent-2); border-color: transparent; }
.badge.info, .badge.running, .badge.queued { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.ai { background: var(--ai-soft); color: var(--ai); border-color: transparent; }
.badge.glass.ai-tag svg.i { color: var(--ai); }
.badge.glass { background: rgba(9, 9, 11, 0.62); color: #fff; border-color: rgba(255, 255, 255, 0.12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
@keyframes pulse { 50% { opacity: 0.3; } }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.6s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   App shell
   ============================================================ */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; border-right: 1px solid var(--border); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.logo { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; color: #fff;
  background: var(--grad); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), var(--btn-shadow); }
.logo svg { width: 14px; height: 14px; fill: #fff; stroke: none; margin-left: 2px; }
.brand b { display: block; font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.brand small { display: block; font-size: 11.5px; color: var(--text-3); }
.nav { display: grid; gap: 1px; }
.nav-label { font-size: 11px; font-weight: 600; color: var(--text-3); padding: 14px 10px 6px; letter-spacing: 0.02em; }
.nav a { position: relative; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--text-2); font-size: 13.5px; font-weight: 500; transition: background-color 150ms ease, color 150ms ease; }
.nav a svg.i { color: var(--c); opacity: 0.9; }
.nav a.on { background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 32%, transparent); font-weight: 600; }
.nav a.on svg.i { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .nav a:not(.on):hover { background: var(--surface-2); color: var(--text); } }
.nav-badge { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 99px; font-style: normal; font-size: 11px; font-weight: 650; display: inline-grid; place-items: center; background: var(--surface-4); color: var(--text-2); font-variant-numeric: tabular-nums; }
.nav-badge.live { background: var(--accent); color: #fff; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.srv-mini { padding: 12px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface-2); display: grid; gap: 9px; }
.srv-mini .top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-2); }
.srv-mini .top b { display: flex; align-items: center; gap: 6px; color: var(--text); font-weight: 550; }
.srv-mini .online { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.meter { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 8px; font-size: 11px; color: var(--text-3); }
.meter .val { text-align: right; color: var(--text-2); font-family: var(--mono); font-size: 11px; }
.bar { height: 4px; border-radius: 99px; background: var(--surface-4); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--brand)); transition: width 500ms var(--ease-out); }
.bar.hot > i { background: var(--warn); }
.bar.crit > i { background: var(--accent); }
.bar.ok > i { background: var(--ok); }
.user-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px 2px 8px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 650; background: var(--grad); color: #fff; flex: none; }
.user-row .who { flex: 1; min-width: 0; }
.user-row .who b { display: block; font-size: 13px; font-weight: 550; }
.user-row .who span { display: block; font-size: 11.5px; color: var(--text-3); font-family: var(--mono); }

.main { min-width: 0; display: flex; flex-direction: column; position: relative; }
.main::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 420px; pointer-events: none; z-index: 0;
  background: radial-gradient(520px 260px at 18% -60px, var(--glow-1), transparent 70%), radial-gradient(480px 240px at 62% -80px, var(--glow-2), transparent 70%), radial-gradient(420px 220px at 95% -40px, var(--glow-3), transparent 70%); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 14px 32px;
  background: var(--glass); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color 200ms ease; }
.topbar.scrolled { border-bottom-color: var(--border); }
.topbar h1 { font-size: 18px; }
.topbar p { font-size: 13px; color: var(--text-3); margin-top: 1px; }
.topbar-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-title .logo { display: none; }
.page-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 28%, transparent); }
.page-ico svg.i { width: 19px; height: 19px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.clock-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); color: var(--text-2); font-family: var(--mono); font-size: 12px; }
.content { position: relative; z-index: 1; width: 100%; max-width: 1440px; padding: 8px 32px 64px; }
.page { display: none; }
.page.on { display: block; animation: page-in 260ms var(--ease-out); }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }

/* ============================================================
   Cards & generic blocks
   ============================================================ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); min-width: 0; }
.card-pad { padding: 18px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; min-height: 30px; }
.card-h h3 { font-size: 14px; }
.card-h .sub { font-size: 12.5px; color: var(--text-3); font-weight: 400; margin-left: 6px; }
.card-b { padding: 14px 18px 18px; }
.section-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.section-h:first-child { margin-top: 0; }
.section-h h2 { font-size: 15px; }
.section-h p { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search input { width: 240px; height: 36px; padding: 0 12px 0 34px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font: 13.5px var(--font); outline: none; transition: border-color 150ms ease; }
.search input:focus { border-color: var(--border-3); }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 48px 20px; border: 1px dashed var(--border-2); border-radius: var(--r-lg); color: var(--text-2); }
.empty .ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); box-shadow: inset 0 0 0 1px var(--brand-line); }
.empty h4 { font-size: 14px; color: var(--text); }
.empty p { font-size: 13px; max-width: 360px; color: var(--text-3); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.5; background: var(--warn-soft); color: var(--warn-text); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.notice svg { margin-top: 2px; color: var(--warn); }
.notice.info { background: var(--info-soft); color: var(--info-text); border-color: color-mix(in srgb, var(--info) 28%, transparent); }
.notice.info svg { color: var(--info); }
.err-text { color: var(--accent-2); font-size: 12.5px; overflow-wrap: anywhere; }

/* ============================================================
   Dashboard
   ============================================================ */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { position: relative; overflow: hidden; padding: 16px 18px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); min-height: 118px; display: flex; flex-direction: column; }
.kpi .k-label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.kpi::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(260px 130px at 100% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%); }
.kpi > * { position: relative; }
.k-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.k-ico svg.i { width: 15px; height: 15px; }
.kpi .k-val { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; margin-top: 8px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .k-val small { font-size: 15px; color: var(--text-3); font-weight: 500; letter-spacing: 0; }
.kpi .k-foot { font-size: 12px; color: var(--text-3); margin-top: auto; padding-top: 6px; }
.kpi .spark { position: absolute; right: 0; bottom: 0; width: 55%; height: 56px; }
.kpi.live-on { border-color: var(--accent-line); }
.kpi.live-on .k-val { color: var(--accent); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.dash-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.live-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tile { border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; transition: border-color 150ms ease, transform 200ms var(--ease-out); }
.tile:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) { .tile:hover { border-color: var(--border-3); } }
.tile .info { padding: 10px 12px; }
.tile .info b { display: block; font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .info span { font-size: 12px; color: var(--text-3); }
.kv { display: grid; gap: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.res { display: grid; gap: 14px; margin-bottom: 8px; }
.res .r-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 7px; }
.res .r-top span { color: var(--text-2); }
.res .r-top b { font-family: var(--mono); font-weight: 500; font-size: 12px; }
.res .bar { height: 6px; }

/* Tables / list rows */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--text-3); padding: 0 12px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.name { font-weight: 550; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table td.act { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.feed { display: grid; grid-template-columns: minmax(0, 1fr); }
.feed-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .thumb { width: 44px; height: 30px; border-radius: 6px; background: var(--surface-3) center/cover; flex: none; display: grid; place-items: center; color: var(--text-3); }
.feed-item .txt { flex: 1; min-width: 0; }
.feed-item .txt b { display: block; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-item .txt span { font-size: 12px; color: var(--text-3); }

/* ============================================================
   Live
   ============================================================ */
.channel-strip { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 18px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.channel-strip .cs-title { display: flex; align-items: center; gap: 10px; margin-right: 6px; }
.channel-strip .cs-title .yt { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 0, 0, 0.12); color: #ff4d4d; }
.channel-strip .cs-title b { display: block; font-size: 13.5px; font-weight: 600; }
.channel-strip .cs-title span { display: block; font-size: 12px; color: var(--text-3); }
.channels { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; align-items: center; }
.ch { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 4px 0 4px; border-radius: 99px; border: 1px solid var(--border-2); background: var(--surface-2); max-width: 100%; }
.ch img, .ch .ph { width: 26px; height: 26px; border-radius: 50%; flex: none; background: var(--surface-4); display: grid; place-items: center; font-size: 11px; }
.ch .nm { font-size: 13px; font-weight: 550; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch .st { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.ch.bad { border-color: var(--accent-line); }
.ch.bad .st { background: var(--accent); }
.ch .icon-btn { width: 26px; height: 26px; border-radius: 50%; }
.stream-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.scard { display: flex; flex-direction: column; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); overflow: hidden; transition: border-color 200ms ease, box-shadow 200ms ease; }
.scard.is-live { border-color: var(--accent-line); box-shadow: 0 0 0 1px rgba(255, 61, 87, 0.12), 0 18px 40px -20px rgba(255, 61, 87, 0.45); }
.media16 { position: relative; aspect-ratio: 16 / 9; background: var(--surface-3) center/cover no-repeat; overflow: hidden; }
.media16::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 30%, transparent 60%, rgba(0, 0, 0, 0.55)); pointer-events: none; }
.media16 .ov { position: absolute; z-index: 1; display: flex; gap: 6px; align-items: center; }
.media16 .tl { top: 10px; left: 10px; }
.media16 .tr { top: 10px; right: 10px; }
.media16 .bl { bottom: 10px; left: 10px; }
.media16 .br { bottom: 10px; right: 10px; }
.media16 .ph-ico { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); }
.scard .body { padding: 14px 16px 12px; display: grid; gap: 8px; }
.scard .title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.scard .title { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.35; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--text-2); }
.meta span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.meta svg.i { width: 14px; height: 14px; color: var(--text-3); }
.meta .warn-t { color: var(--warn); }
.meta .warn-t svg.i { color: var(--warn); }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); }
.stats3 > div { padding: 10px 16px; display: grid; gap: 2px; }
.stats3 > div + div { border-left: 1px solid var(--border); }
.stats3 span { font-size: 11.5px; color: var(--text-3); }
.stats3 b { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.scard .err-text { padding: 0 16px 10px; }
.scard .foot { display: flex; align-items: center; gap: 6px; padding: 12px 12px 12px 16px; border-top: 1px solid var(--border); margin-top: auto; }
.scard .foot .grow { flex: 1; }

/* ============================================================
   Media
   ============================================================ */
.dropzone { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 16px; border: 1px dashed var(--border-3); border-radius: var(--r-lg); background: var(--surface); transition: border-color 150ms ease, background-color 150ms ease; }
.dropzone .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c-cyan) 15%, transparent); color: var(--c-cyan); flex: none; }
.dropzone b { display: block; font-size: 13.5px; font-weight: 550; }
.dropzone span { font-size: 12.5px; color: var(--text-3); }
.dropzone .grow { flex: 1; min-width: 0; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.progress { height: 4px; border-radius: 99px; background: var(--surface-4); overflow: hidden; margin-top: 8px; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 200ms linear; }
.drag-overlay { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(9, 9, 11, 0.8); backdrop-filter: blur(6px); pointer-events: none; opacity: 0; transition: opacity 150ms ease; }
.drag-overlay.on { opacity: 1; }
.drag-overlay > div { padding: 40px 56px; border-radius: 20px; border: 2px dashed var(--accent); text-align: center; display: grid; gap: 6px; }
.drag-overlay b { font-size: 18px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.mcard { border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); overflow: hidden; display: flex; flex-direction: column; transition: border-color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .mcard:hover { border-color: var(--border-3); } }
.mcard .media16 { cursor: pointer; }
.mcard .play { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; opacity: 0; transition: opacity 150ms ease; }
.mcard .play span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.92); color: #0a0a0a; transform: scale(0.92); transition: transform 200ms var(--ease-out); }
.mcard .play svg.i { fill: #0a0a0a; stroke: none; margin-left: 2px; }
@media (hover: hover) and (pointer: fine) { .mcard .media16:hover .play { opacity: 1; } .mcard .media16:hover .play span { transform: scale(1); } }
.mcard .audio-art { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--ai) 24%, transparent), transparent 60%), var(--surface-3); color: var(--ai); }
.mcard .mb { padding: 10px 12px 4px; display: grid; gap: 2px; }
.mcard .mb b { font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard .mb span { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard .ma { display: flex; align-items: center; gap: 2px; padding: 6px 8px 8px 8px; }
.mcard .ma .grow { flex: 1; }

/* ============================================================
   Studio AI
   ============================================================ */
.studio { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 20px; align-items: start; }
.composer { position: sticky; top: 84px; display: grid; gap: 16px; padding: 16px; max-height: calc(100dvh - 100px); overflow-y: auto; }
.composer .kind { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.kind button { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: 11.5px; font-weight: 550; cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out); }
.kind button:active { transform: scale(0.97); }
.kind button svg.i { color: var(--c); }
.kind button.on { border-color: color-mix(in srgb, var(--c) 50%, transparent); background: color-mix(in srgb, var(--c) 13%, var(--surface)); color: var(--text); box-shadow: 0 8px 20px -12px var(--c); }
@media (hover: hover) and (pointer: fine) { .kind button:not(.on):hover { color: var(--text); border-color: var(--border-2); } }
.prompt-box { position: relative; border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface); transition: border-color 150ms ease, box-shadow 150ms ease; }
.prompt-box:focus-within { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--ring); }
.prompt-box textarea { width: 100%; min-height: 120px; border: 0; background: transparent; color: var(--text); font: 14px/1.55 var(--font); padding: 12px 14px 4px; resize: vertical; outline: none; }
.prompt-box .pb-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 8px 14px; }
.prompt-box .pb-foot span { font-size: 11.5px; color: var(--text-3); font-family: var(--mono); }
.enhance { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid color-mix(in srgb, var(--ai) 35%, transparent); background: var(--ai-soft); color: var(--ai); font-size: 12px; font-weight: 600; cursor: pointer; transition: background-color 150ms ease, transform 160ms var(--ease-out); }
.enhance:active { transform: scale(0.97); }
.enhance:disabled { opacity: 0.6; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .enhance:hover { background: color-mix(in srgb, var(--ai) 20%, transparent); } }
.prov-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; max-height: 176px; overflow-y: auto; }
.pick-grid button { aspect-ratio: 1; border-radius: 9px; border: 2px solid transparent; background: var(--surface-3) center/cover; cursor: pointer; padding: 0; transition: border-color 150ms ease, transform 160ms var(--ease-out); }
.pick-grid button:active { transform: scale(0.95); }
.pick-grid button.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pick-grid .add { display: grid; place-items: center; border: 1px dashed var(--border-3); background: transparent; color: var(--text-3); }
details.adv { border-top: 1px solid var(--border); padding-top: 12px; }
details.adv summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 550; color: var(--text-2); }
details.adv summary::-webkit-details-marker { display: none; }
details.adv summary svg { transition: transform 200ms var(--ease-out); }
details.adv[open] summary svg { transform: rotate(90deg); }
details.adv .adv-body { display: grid; gap: 12px; margin-top: 12px; }
.studio-out { display: grid; gap: 16px; min-width: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.gcard { border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.gcard .media16 { cursor: pointer; }
.gcard .busy { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; padding: 14px; color: var(--text-2); font-size: 12px;
  background: linear-gradient(110deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%); background-size: 250% 100%; animation: shimmer 1.6s linear infinite; }
.gcard .busy .spinner { width: 20px; height: 20px; color: var(--text); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.gcard .failed { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; align-content: center; gap: 8px; padding: 14px; text-align: center; background: var(--surface-2); color: var(--accent-2); font-size: 12px; overflow-wrap: anywhere; }
.gcard .gb { padding: 10px 12px 4px; display: grid; gap: 4px; }
.gcard .gb p { font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.gcard .gb span { font-size: 11.5px; color: var(--text-3); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcard .ga { display: flex; align-items: center; gap: 2px; padding: 6px 8px 8px; margin-top: auto; }
.gcard .ga .grow { flex: 1; }
.text-result { padding: 18px; display: grid; gap: 12px; }
.text-result .doc { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.65; max-height: 460px; overflow-y: auto; }
.text-result .tr-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ============================================================
   Settings / Integrasi
   ============================================================ */
.settings { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
.settings-nav { position: sticky; top: 84px; display: grid; gap: 1px; }
.settings-nav a { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 10px; border-radius: 8px; font-size: 13px; color: var(--text-2); font-weight: 500; transition: background-color 150ms ease, color 150ms ease; }
.settings-nav a.on { background: var(--brand-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--brand-line); }
.settings-nav a svg.i { color: var(--brand-text); }
@media (hover: hover) and (pointer: fine) { .settings-nav a:not(.on):hover { color: var(--text); background: var(--surface-2); } }
.settings-body { display: grid; gap: 32px; min-width: 0; max-width: 860px; }
.set-sec { scroll-margin-top: 90px; }
.set-sec > .sh { margin-bottom: 12px; }
.set-sec > .sh h2 { font-size: 15px; }
.set-sec > .sh p { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.int-list { border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.int { border-bottom: 1px solid var(--border); }
.int:last-child { border-bottom: 0; }
.int-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; transition: background-color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .int-head:hover { background: var(--surface-2); } }
.int-logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 12px -4px rgba(0, 0, 0, 0.3); }
.int-txt { flex: 1; min-width: 0; }
.int-txt b { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 14px; font-weight: 600; }
.int-txt > span { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.int-head .chev { color: var(--text-3); transition: transform 200ms var(--ease-out); }
.int.open .int-head .chev { transform: rotate(90deg); }
.int-body { display: none; padding: 4px 16px 18px 68px; gap: 14px; }
.int.open .int-body { display: grid; animation: page-in 220ms var(--ease-out); }
.int-body .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.int-msg { font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.int-msg.ok { color: var(--ok); }
.int-msg.bad { color: var(--accent-2); }
.key-state { font-size: 12px; color: var(--text-3); font-family: var(--mono); }
.key-state.set { color: var(--ok); }
.steps { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.55; }
.steps b { color: var(--text); font-weight: 600; }
.steps a { color: var(--info); }

/* ============================================================
   Drawer / modal / toast
   ============================================================ */
.drawer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.drawer .scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity 240ms ease; }
.drawer .panel { position: absolute; top: 8px; right: 8px; bottom: 8px; width: min(600px, calc(100vw - 16px)); display: flex; flex-direction: column; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg);
  transform: translateX(calc(100% + 16px)); transition: transform 380ms var(--ease-drawer); }
.drawer.wide .panel { width: min(920px, calc(100vw - 16px)); }
.drawer.on { pointer-events: auto; }
.drawer.on .scrim { opacity: 1; }
.drawer.on .panel { transform: translateX(0); }
.d-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.d-head h2 { font-size: 16px; }
.d-head p { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.d-body { flex: 1; overflow-y: auto; padding: 4px 20px 24px; }
.d-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
.d-foot .note { margin-right: auto; font-size: 12px; color: var(--text-3); }
.fsec { padding: 20px 0; border-bottom: 1px solid var(--border); display: grid; gap: 14px; }
.fsec:last-child { border-bottom: 0; }
.fsec > .fh { display: flex; align-items: center; gap: 10px; }
.fsec > .fh .n { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 11.5px; font-weight: 650; background: var(--grad); color: #fff; font-family: var(--mono); }
.fsec > .fh h3 { font-size: 14px; }
.radio-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rcard { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 11px; border: 1px solid var(--border-2); background: var(--surface); cursor: pointer; text-align: left; transition: border-color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out); }
.rcard:active { transform: scale(0.985); }
.rcard .ri { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.rcard b { display: block; font-size: 13px; font-weight: 600; }
.rcard span { display: block; font-size: 11.5px; color: var(--text-3); line-height: 1.4; margin-top: 1px; }
.rcard.on { border-color: var(--brand-line); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-line); }
.rcard.on .ri { background: var(--grad); color: #fff; }
.rcard .tag { margin-left: auto; font-size: 10.5px; font-weight: 650; color: var(--ok); background: var(--ok-soft); padding: 1px 6px; border-radius: 5px; height: fit-content; white-space: nowrap; }
.playlist { display: grid; gap: 6px; }
.pl { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }
.pl .n { width: 18px; text-align: center; color: var(--text-3); font-family: var(--mono); font-size: 12px; }
.pl .th { width: 48px; height: 27px; border-radius: 5px; background: var(--surface-4) center/cover; flex: none; }
.pl .t { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl .d { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.pl .icon-btn { width: 26px; height: 26px; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days .chip { width: 44px; justify-content: center; padding: 0; }
.logbox { background: #050506; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; font: 12px/1.65 var(--mono); color: #d4d4d8; height: 100%; min-height: 300px; overflow: auto; white-space: pre-wrap; word-break: break-all; margin: 16px 0 0; }
.logbox .l-live { color: var(--ok); }
.logbox .l-err { color: var(--accent-2); }
.logbox .l-sys { color: var(--text-3); }
.logbox .l-yt { color: #fca5a5; }

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity 180ms ease; }
.modal.on { opacity: 1; pointer-events: auto; }
.modal-box { position: relative; width: 100%; max-width: 420px; max-height: calc(100dvh - 32px); overflow: auto; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); transform: scale(0.96); opacity: 0; transition: transform 200ms var(--ease-out), opacity 200ms var(--ease-out); }
.modal.on .modal-box { transform: scale(1); opacity: 1; }
.modal-box.wide { max-width: 960px; }
.dlg { padding: 20px; display: grid; gap: 10px; }
.dlg h3 { font-size: 16px; }
.dlg p { font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.dlg .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.preview { padding: 0; }
.preview .pv-media { display: block; width: 100%; max-height: 72dvh; background: #000; object-fit: contain; }
.preview .pv-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; flex-wrap: wrap; }
.preview .pv-foot b { font-size: 14px; display: block; overflow-wrap: anywhere; }
.preview .pv-foot span { font-size: 12.5px; color: var(--text-3); display: block; overflow-wrap: anywhere; }
.preview .x { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(0, 0, 0, 0.55); color: #fff; }

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-2); box-shadow: var(--shadow-lg); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; pointer-events: auto;
  transition: transform 400ms var(--ease-out), opacity 400ms var(--ease-out); }
@starting-style { .toast { transform: translateY(12px) scale(0.98); opacity: 0; } }
.toast.out { transform: translateY(6px); opacity: 0; transition-duration: 180ms; }
.toast svg.i { margin-top: 1px; color: var(--ok); }
.toast.bad svg.i { color: var(--accent-2); }

/* ============================================================
   Auth
   ============================================================ */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 16px; background: radial-gradient(600px 380px at 30% -10%, var(--glow-1), transparent 70%), radial-gradient(600px 380px at 75% 0%, var(--glow-2), transparent 70%), radial-gradient(600px 380px at 50% 110%, var(--glow-3), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 380px; display: grid; gap: 14px; padding: 28px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-lg); }
.auth-card .logo { width: 40px; height: 40px; border-radius: 12px; }
.auth-card .logo svg { width: 18px; height: 18px; }
.auth-card h2 { font-size: 20px; margin-top: 6px; }
.auth-card p { font-size: 13.5px; color: var(--text-2); }

/* ============================================================
   Mobile
   ============================================================ */
.tabbar { display: none; }
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid, .studio { grid-template-columns: minmax(0, 1fr); }
  .composer { position: static; max-height: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar { padding: 12px 16px; min-height: 60px; padding-top: max(12px, env(safe-area-inset-top)); }
  .topbar-title .logo { display: grid; }
  .topbar h1 { font-size: 16px; }
  .topbar p { display: none; }
  .clock-chip { display: none; }
  .content { padding: 8px 16px calc(84px + env(safe-area-inset-bottom)); }
  .settings { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .settings-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; gap: 4px; }
  .settings-nav a { flex: none; }
  .int-body { padding: 4px 16px 18px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--glass); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-top: 1px solid var(--border); }
  .tabbar a { position: relative; display: grid; justify-items: center; gap: 3px; padding: 6px 0 4px; border-radius: 10px; color: var(--text-3); font-size: 10.5px; font-weight: 550; -webkit-tap-highlight-color: transparent; }
  .tabbar a svg.i { width: 20px; height: 20px; }
  .tabbar a.on { color: var(--text); }
  .tabbar a svg.i { color: var(--c); opacity: 0.75; }
  .tabbar a.on svg.i { opacity: 1; }
  .page-ico { display: none; }
  .tabbar .tb-dot { position: absolute; top: 3px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
  .search input { width: 100%; }
  .toolbar .search { flex: 1; }
  .toasts { left: 16px; right: 16px; width: auto; bottom: calc(80px + env(safe-area-inset-bottom)); }
  .drawer .panel { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 94dvh; height: 94dvh; border-radius: 18px 18px 0 0; transform: translateY(100%); }
  .drawer.wide .panel { width: 100%; }
  .drawer.on .panel { transform: translateY(0); }
}
@media (max-width: 560px) {
  .kpis { gap: 10px; }
  .kpi { padding: 14px; min-height: 104px; }
  .kpi .k-val { font-size: 23px; }
  .stream-grid, .gallery { grid-template-columns: minmax(0, 1fr); }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mcard .ma .btn .t, .mcard .ma .dl { display: none; }
  .mcard .ma .btn { width: 30px; padding: 0; }
  .radio-cards, .row-2, .prov-pick { grid-template-columns: minmax(0, 1fr); }
  .table .hide-sm { display: none; }
  .table td.name { max-width: 150px; }
  .table td, .table th { padding-left: 8px; padding-right: 8px; }
  .composer .kind button { font-size: 10.5px; }
  .dropzone { flex-wrap: wrap; }
  .channel-strip .cs-title span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---- Ikon judul kartu & bagian ---- */
.card-h h3 { display: flex; align-items: center; gap: 8px; }
.card-h h3 svg.i { color: var(--brand); }
.set-sec > .sh h2 { display: flex; align-items: center; gap: 8px; }
.set-sec > .sh h2 svg.i { color: var(--brand); width: 18px; height: 18px; }
.int-logo svg.i { color: #fff; }

/* ---- Picker video bergambar (editor live) ---- */
.vpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; max-height: 248px; overflow-y: auto; padding: 2px; }
.vpick button { position: relative; aspect-ratio: 16 / 9; border-radius: 9px; border: 2px solid transparent; background: var(--surface-3) center/cover; cursor: pointer; padding: 0; overflow: hidden; transition: border-color 150ms ease, transform 160ms var(--ease-out); }
.vpick button:active { transform: scale(0.97); }
.vpick button.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.vpick .num { position: absolute; top: 5px; left: 5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: var(--grad); color: #fff; font: 600 11px var(--mono); display: grid; place-items: center; }
.vpick .add-ic { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.55); color: #fff; }
.vpick .add-ic svg.i { width: 13px; height: 13px; }
.vpick .nm { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 7px 5px; font-size: 10.5px; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, 0.78)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Preview thumbnail YouTube ---- */
.thumb-pv { position: relative; aspect-ratio: 16 / 9; border-radius: 11px; overflow: hidden; background: var(--surface-3); border: 1px solid var(--border); }
.thumb-pv img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity 200ms ease; }
.thumb-pv img.loading { opacity: 0.4; }
.thumb-pv .thumb-note { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; padding: 16px; text-align: center; color: var(--text-3); font-size: 12.5px; }
.thumb-pv .tag { position: absolute; top: 8px; left: 8px; }

/* ---- Media dipakai di live mana ---- */
.used { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 12px 2px; }
.used .u { display: inline-flex; align-items: center; gap: 5px; height: 20px; max-width: 100%; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 550; background: var(--brand-soft); color: var(--brand-text); }
.used .u span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.used .u.on { background: var(--accent-soft); color: var(--accent); }
.used .u .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.used .u.on .dot { animation: pulse 1.6s ease-in-out infinite; }

/* ---- Pilih live tujuan ---- */
.pick-list { display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: 11px; }
.pick-row .th { width: 64px; height: 36px; border-radius: 6px; background: var(--surface-3) center/cover; flex: none; }
.pick-row .tx { flex: 1; min-width: 0; }
.pick-row .tx b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-row .tx span { display: block; font-size: 12px; color: var(--text-3); }

@media (max-width: 560px) { #thumbSeg { display: grid; grid-template-columns: 1fr 1fr; } #thumbSeg button { justify-content: center; } }
