:root {
  --bg: #0B1118;
  --panel: #111A23;
  --panel-2: #0E161E;
  --line: #1E2A36;
  --text: #F2F5F7;
  --muted: #9AA7B4;
  --accent: #22E07A;
  --accent-dim: #0A1A12;
  --warn: #FFB020;
  --error: #FF6B6B;
  --info: #5CC8FF;
  --radius: 10px;
  --mono: "Cascadia Mono", Consolas, "JetBrains Mono", "Courier New", monospace;
  --sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.label { font: 600 11px var(--mono); letter-spacing: .1em; color: var(--muted); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-rows: 64px minmax(0, 1fr) 230px;
  grid-template-areas: "top top" "side main" "side term";
  height: 100vh;
}

/* --- topbar --- */
.topbar { grid-area: top; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.brand { display: flex; align-items: center; gap: 12px; }
.logo svg { width: 40px; height: 40px; display: block; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand-tag { font-size: 12px; color: #C8D2DB; }
.cursor { color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.badge { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 14px; cursor: pointer; font: 12px var(--mono); }
.badge.ok { border-color: var(--accent); color: var(--accent); }
.badge.bad { border-color: var(--warn); color: var(--warn); }

/* --- sidebar --- */
.sidebar { grid-area: side; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-right: 1px solid var(--line); background: var(--panel-2); overflow: auto; }
.sidebar-head { display: flex; justify-content: space-between; align-items: center; }
.channel-list { display: flex; flex-direction: column; gap: 6px; }
.channel-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px; border-radius: var(--radius); border: 1px solid transparent; background: transparent; cursor: pointer; min-height: 52px; }
.channel-item:hover { background: var(--panel); }
.channel-item.active { background: var(--panel); border-color: var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--line); flex: none; object-fit: cover; display: grid; place-items: center; font: 600 13px var(--mono); color: var(--accent); }
.channel-meta { min-width: 0; flex: 1; }
.channel-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel-sub { font: 11px var(--mono); color: var(--muted); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; }
.status-dot.running { background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 1.2s infinite; }
.status-dot.queued { background: var(--info); }
.status-dot.attention { background: var(--warn); }
@keyframes pulse { 50% { opacity: .4; } }
.add-channel { justify-content: center; }
.setting-row { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--muted); margin-top: auto; cursor: pointer; }
.setting-row input { margin-top: 2px; accent-color: var(--accent); }

/* --- main --- */
.main { grid-area: main; overflow: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h2 { margin: 0 0 4px; font-size: 16px; }
.card h3 { margin: 0 0 12px; font-size: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field > span { font-size: 12px; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); }
.steps-mini { margin: 4px 0 8px; padding-left: 18px; display: grid; gap: 4px; }
input[type=text], input[type=date], input[type=time], select, textarea {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; min-height: 40px; width: 100%;
}
textarea { min-height: 84px; resize: vertical; font-family: var(--mono); font-size: 13px; }
input[type=date], input[type=time] { color-scheme: dark; }
.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio { display: flex; gap: 6px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; min-height: 40px; }
.radio input { accent-color: var(--accent); }
.times { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.times input { width: 120px; }

.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 8px; padding: 9px 16px; min-height: 40px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-weight: 600; }
.btn:hover:not(:disabled) { border-color: var(--muted); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #04140B; border-color: var(--accent); }
.btn-primary:hover:not(:disabled) { background: #3BEA8C; border-color: #3BEA8C; }
.btn-danger { color: var(--error); border-color: #4A2326; }
.btn-ghost { background: transparent; }
a.btn { color: inherit; text-decoration: none; }
.btn-big { padding: 12px 26px; font-size: 15px; min-height: 48px; }

/* --- preview table --- */
.summary { font-family: var(--mono); font-size: 13px; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); }
.issues { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.issue { font-size: 13px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); }
.issue.error { border-color: #5A2A2D; color: #FFB3B3; background: #1E1214; }
.issue.warning { border-color: #4D3A12; color: #FFD58A; background: #1B160B; }
.table-wrap { overflow-x: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 11px var(--mono); letter-spacing: .08em; color: var(--muted); background: var(--panel-2); }
tr:last-child td { border-bottom: 0; }
.ok-mark { color: var(--accent); }
.warn-mark { color: var(--warn); }
.err-mark { color: var(--error); }
.cell-title { max-width: 360px; }
.small { font-size: 12px; }

/* --- progress --- */
.progress { height: 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.progress-label { font: 12px var(--mono); color: var(--muted); }

/* --- terminal --- */
.terminal { grid-area: term; display: flex; flex-direction: column; border-top: 1px solid var(--line); background: #05090D; min-height: 0; }
.terminal-head { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid #101820; }
.terminal-title { font-size: 12px; flex: 1; }
.terminal-head select { width: auto; min-height: 30px; padding: 4px 8px; font-size: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #FF5F57; } .dot.amber { background: #FEBC2E; } .dot.green { background: #28C840; }
.log { flex: 1; overflow: auto; padding: 10px 14px; font-size: 12.5px; line-height: 1.6; color: #B8F5CF; white-space: pre-wrap; word-break: break-word; }
.log-line .t { color: #4F6B5A; }
.log-line .lv { font-weight: 700; }
.log-line .ch { color: #7FA38C; }
.lv-ok, .lv-done { color: var(--accent); }
.lv-up { color: var(--info); }
.lv-wait { color: #C9A8FF; }
.lv-warn { color: var(--warn); }
.lv-error { color: var(--error); }
.lv-info { color: #8FB3A0; }

/* --- modal & toast --- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(2, 6, 10, .72); display: grid; place-items: center; padding: 20px; z-index: 10; }
.modal { width: min(560px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.modal h2 { margin: 0; font-size: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.toast-root { position: fixed; right: 20px; bottom: 250px; display: flex; flex-direction: column; gap: 8px; z-index: 20; }
.toast { max-width: 420px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.toast.error { border-color: #5A2A2D; color: #FFB3B3; }
.toast.ok { border-color: #1D5A38; color: #B8F5CF; }

.empty { text-align: center; padding: 48px 24px; }
.steps { text-align: left; max-width: 560px; margin: 18px auto 0; display: flex; flex-direction: column; gap: 10px; counter-reset: s; padding: 0; list-style: none; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.steps li::before { content: counter(s, decimal-leading-zero); font: 700 13px var(--mono); color: var(--accent); min-width: 24px; }

@media (max-width: 1100px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* --- log bisa dilipat --- */
.log-toggle { min-height: 30px; padding: 4px 10px; font-size: 12px; }
.app.log-collapsed { grid-template-rows: 64px minmax(0, 1fr) 46px; }
.app.log-collapsed .log { display: none; }

/* --- HP (Android) --- */
@media (max-width: 760px) {
  html, body { font-size: 15px; }
  .app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr) 38vh;
    grid-template-areas: "top" "side" "main" "term";
    height: 100dvh;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .app.log-collapsed { grid-template-rows: auto auto minmax(0, 1fr) 46px; }
  .topbar { padding: 10px 14px; gap: 8px; }
  .logo svg { width: 34px; height: 34px; }
  .brand-name { font-size: 16px; }
  .brand-tag { display: none; }
  .badge { padding: 6px 10px; font-size: 11px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar { flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; }
  .sidebar-head, .setting-row, .terminal-title { display: none; }
  .sidebar { scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .terminal-head { justify-content: flex-start; }
  .terminal-head .dot { flex: none; }
  .log-toggle { white-space: nowrap; margin-left: auto; }
  .channel-list { flex-direction: row; gap: 8px; }
  .channel-item { width: auto; max-width: 70vw; border-color: var(--line); padding: 8px 12px; min-height: 48px; flex: none; }
  .channel-sub { display: none; }
  .add-channel { flex: none; min-height: 48px; white-space: nowrap; }
  .main { padding: 12px; gap: 12px; }
  .card { padding: 14px; }
  .card-head > .row { width: 100%; }
  .card-head > .row .btn { flex: 1; justify-content: center; }
  .btn-big { width: 100%; justify-content: center; }
  .table-wrap { border: 0; }
  table, thead, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tr { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; padding: 6px 0; background: var(--panel-2); }
  td { border: 0; padding: 4px 12px; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; }
  td::before { content: attr(data-label); font: 600 11px var(--mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
  .cell-title { max-width: none; }
  .times input { width: 110px; }
  .modal { padding: 18px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; border-radius: 16px 16px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .toast-root { left: 12px; right: 12px; bottom: calc(40vh + 8px); }
  .toast { max-width: none; }
  .terminal-head { padding: 6px 10px; }
  .terminal-head select { max-width: 38vw; }
  .log { font-size: 11.5px; padding: 8px 10px; }
}
.cell-title .hint { word-break: break-all; }

/* --- banner perbarui izin Google (versi web) --- */
.renew-banner { position: fixed; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top)); z-index: 30; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px; border-radius: 12px; border: 1px solid var(--warn); background: #1B160B; color: #FFD58A; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.renew-banner > div { flex: 1 1 240px; }
/* --- pita mode demo (di atas konten, tidak menutupi tombol) --- */
.demo-ribbon { font: 600 11px/1.5 var(--mono); letter-spacing: .04em; color: #FFD58A; background: #1B160B; border: 1px solid #4D3A12; border-radius: 8px; padding: 8px 12px; }
.topbar-right { display: flex; gap: 8px; align-items: center; min-width: 0; }
@media (max-width: 760px) { .topbar-right { gap: 6px; } .topbar-right .badge { max-width: 38vw; } }

/* --- wizard Mulai --- */
.wizard { display: flex; flex-direction: column; gap: 14px; max-width: 760px; width: 100%; margin: 0 auto; }
.wizard p { margin: 0; }
.wiz-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.stepper li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); position: relative; }
.stepper li::before { content: ""; position: absolute; top: 16px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.now::before { background: var(--accent); }
.step-dot { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--panel-2); font: 700 13px var(--mono); cursor: pointer; }
.stepper li.done .step-dot { border-color: var(--accent); color: var(--accent); }
.stepper li.now .step-dot { border-color: var(--accent); background: var(--accent); color: #04140B; }
.stepper li.now { color: var(--text); font-weight: 600; }
.tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.task.done { border-color: #1D5E3A; }
.task.done .task-title { color: var(--accent); }
.task-check input { width: 22px; height: 22px; accent-color: var(--accent); margin: 2px 0 0; }
.task-title { font-weight: 600; margin-bottom: 2px; }
.task-open { white-space: nowrap; }
.origin-row { margin-top: 8px; flex-wrap: nowrap; }
.two-logins { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.two-logins > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel-2); }
.wiz-actions { justify-content: flex-end; }
.wiz-back { display: flex; justify-content: flex-start; }

/* --- halaman channel --- */
.alert { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-color: #4D3A12; background: #1B160B; color: #FFD58A; }
.alert-inline { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border-radius: 8px; border: 1px solid #4D3A12; background: #1B160B; color: #FFD58A; }
.ch-title { display: flex; align-items: center; gap: 12px; }
.ch-title .avatar { width: 40px; height: 40px; }
.ch-meta { flex: 1; min-width: 0; }
.ch-meta h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu { position: relative; }
.menu > summary { list-style: none; min-width: 44px; justify-content: center; font-size: 18px; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; display: flex; flex-direction: column; gap: 4px; min-width: 230px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.menu-list .btn { justify-content: flex-start; width: 100%; text-decoration: none; }
.schedule { display: flex; flex-direction: column; gap: 14px; }
.big-status { font-size: 16px; font-weight: 600; }
.note { font-size: 13px; color: #FFD58A; background: #1B160B; border: 1px solid #4D3A12; border-radius: 8px; padding: 10px 12px; }
.segmented { display: flex; gap: 8px; }
.seg { flex: 1; min-height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 600; cursor: pointer; }
.seg.on { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.segmented.need .seg { border-color: var(--warn); }
.schedule > .btn-big { width: 100%; justify-content: center; min-height: 52px; font-size: 16px; }
.center { text-align: center; }
.counts { margin: 4px 0; }
.vlist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow: auto; }
.vrow { display: flex; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.vrow.err { border-color: #5E2626; }
.vrow.warn { border-color: #4D3A12; }
.vno { color: var(--accent); font-weight: 700; }
.vmain { min-width: 0; flex: 1; }
.vtitle { font-weight: 600; overflow-wrap: anywhere; }
.advanced > summary { cursor: pointer; font-weight: 600; list-style: none; }
.advanced > summary::before { content: "▸ "; color: var(--accent); }
.advanced[open] > summary::before { content: "▾ "; }
.adv-form { margin-top: 14px; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 760px) {
  .two-logins { grid-template-columns: 1fr; }
  .task { grid-template-columns: auto minmax(0, 1fr); }
  .task-open { grid-column: 2; justify-self: start; }
  .stepper li span { font-size: 11px; }
  .wiz-actions .btn-big { width: 100%; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
.badge .short { display: none; }
@media (max-width: 760px) {
  .badge .full { display: none; }
  .badge .short { display: inline; }
  .topbar-right .badge { max-width: none; }
  .toast-root { top: calc(10px + env(safe-area-inset-top)); bottom: auto; }
  .app.no-channels .sidebar { display: none; }
  .app.no-channels { grid-template-rows: auto 0 minmax(0, 1fr) 38vh; }
  .app.no-channels.log-collapsed { grid-template-rows: auto 0 minmax(0, 1fr) 46px; }
}
@media (max-width: 760px) {
  .app.no-channels .topbar-right { display: none; }
  .topbar-right .badge { flex: none; }
}

/* --- tab Jadwal / Analitik --- */
.tabs { display: flex; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.tab { flex: 1; min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: 600 15px var(--sans); cursor: pointer; }
.tab.on { background: var(--accent-dim); color: var(--accent); box-shadow: inset 0 0 0 1px #1D5E3A; }

/* --- analitik --- */
.analytics { display: flex; flex-direction: column; gap: 16px; }
.an-head { display: flex; gap: 8px; align-items: center; }
.an-head .period { flex: 1; }
.an-head .seg { min-height: 40px; }
.an-loading { padding: 40px 0; text-align: center; }
.an-setup { display: flex; flex-direction: column; gap: 10px; }
.an-setup p { margin: 0; }
.an-body { display: flex; flex-direction: column; gap: 18px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel-2); min-width: 0; }
.kpi-label { font-size: 12px; color: var(--muted); }
.kpi-value { font-size: 22px; font-weight: 700; color: var(--text); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.kpis.small .kpi-value { font-size: 17px; }
.an-section { display: flex; flex-direction: column; gap: 8px; }
.an-section h3 { margin: 0; font-size: 14px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.chart-wrap { position: relative; }
.chart { display: block; max-width: 100%; touch-action: pan-y; }
.chart-wrap { min-height: 170px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 12px var(--mono); }
.chart .area { fill: var(--accent); fill-opacity: .10; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.chart-tip { position: absolute; top: 2px; transform: translateX(-50%); padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 12px var(--sans); white-space: nowrap; pointer-events: none; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.top-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.top-item { display: grid; grid-template-columns: 20px 64px minmax(0, 1fr); gap: 10px; align-items: center; }
.top-rank { color: var(--muted); text-align: right; }
.top-thumb { width: 64px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--panel-2); border: 1px solid var(--line); }
.top-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.top-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.top-bar-fill { height: 100%; border-radius: 2px; background: var(--accent); }

/* --- persetujuan pedoman --- */
.policy-list { display: flex; flex-direction: column; gap: 8px; }
.policy-item { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); cursor: pointer; }
.policy-item input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }

@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis.small .kpi-value { font-size: 15px; }
  .kpi-value { font-size: 20px; }
}

/* --- mini YT Studio --- */
.stack { display: flex; flex-direction: column; gap: 12px; }
.tabs.scroll { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs.scroll::-webkit-scrollbar { display: none; }
.tabs.scroll .tab { flex: 0 0 auto; padding: 0 14px; white-space: nowrap; }
.subnav .seg { min-height: 40px; }
.thumb-box { position: relative; overflow: hidden; flex: none; }
.thumb-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-badge { position: absolute; right: 3px; bottom: 3px; padding: 1px 4px; border-radius: 4px; background: rgba(0,0,0,.8); color: #fff; font-size: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); font: 600 13px var(--sans); cursor: pointer; }
.chip.on { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.an-head input[type=search] { flex: 1; min-width: 0; }
.vlist2 { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.vrow2 { width: 100%; display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; align-items: start; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.vrow2:hover { border-color: #2B3B4B; }
.vthumb { width: 128px; height: 72px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.vthumb.big { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.vinfo { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.vtitle2 { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vis { font-size: 12px; color: var(--muted); }
.vis.pub { color: #8BE3B4; } .vis.sched { color: #FFD58A; } .vis.prv { color: #C9D1D9; } .vis.unl { color: #9FD3FF; }
.vstats { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.link-list { display: flex; flex-direction: column; gap: 6px; }
.link-list .btn { justify-content: flex-start; text-decoration: none; }
.btn.small { min-height: 32px; padding: 4px 10px; font-size: 13px; text-decoration: none; }
.live-dot-label { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #FF4E45; box-shadow: 0 0 0 0 rgba(255,78,69,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,78,69,.55); } 70% { box-shadow: 0 0 0 8px rgba(255,78,69,0); } 100% { box-shadow: 0 0 0 0 rgba(255,78,69,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.bars { height: 84px; display: flex; align-items: flex-end; gap: 2px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.bar { flex: 1; min-width: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.bar.nil { background: var(--line); }
.bars-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dash { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dash-head h3 { margin: 0; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.top-item.no-rank { grid-template-columns: 64px minmax(0, 1fr); }
.clist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.citem { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
.cavatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--panel-2); display: grid; place-items: center; font-weight: 700; color: var(--accent); border: 1px solid var(--line); }
.cmain { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chead { font-size: 13px; }
.ctext { white-space: pre-wrap; overflow-wrap: anywhere; }
.cvideo { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cactions { display: flex; align-items: center; gap: 10px; }
@media (max-width: 760px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .vrow2 { grid-template-columns: 112px minmax(0, 1fr); }
  .vthumb { width: 112px; height: 63px; }
}
.tabs { flex: none; }
#main > * { flex-shrink: 0; }
input[type=search] { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; }
input[type=search]::placeholder { color: var(--muted); }
.vrev { color: #8BE3B4; }

/* --- kelola channel (Tahap 2) --- */
input[type=datetime-local] { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); color-scheme: dark; }
.modal { max-height: calc(100dvh - 40px); overflow-y: auto; }
@media (max-width: 720px) { .modal { max-height: 92dvh; } }
.act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.act-grid .btn { justify-content: center; }
.segmented.wrap { flex-wrap: wrap; }
.segmented.wrap .seg { flex: 1 1 calc(50% - 8px); padding: 0 8px; }
.seg:disabled { opacity: .4; cursor: not-allowed; }
.lbl-row { display: flex; justify-content: space-between; gap: 8px; }
.count { font-size: 11px; color: var(--muted); }
.count.over { color: var(--error); font-weight: 700; }
.alert-inline.danger { border-color: #4A2326; background: #1E0F11; color: #FFB4B4; margin-top: 0; }
.danger-text { color: var(--error); }
.grow { flex: 1; min-width: 0; }
.row.end { justify-content: flex-end; }
.cactions { flex-wrap: wrap; gap: 6px 8px; }
.reply-box { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.reply-ta { min-height: 64px; font-family: var(--sans); font-size: 14px; }
.clist.replies { margin: 10px 0 0; padding-left: 12px; border-left: 2px solid var(--line); gap: 12px; }
.clist.replies .cavatar { width: 28px; height: 28px; }
.clist.replies .citem { grid-template-columns: 28px minmax(0, 1fr); }
.badge-mine { margin-left: 6px; font-size: 11px; padding: 1px 6px; border-radius: 999px; background: var(--accent-dim); color: var(--accent); }
.plist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pitem { display: grid; grid-template-columns: 18px 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.pitem .top-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 14px; }
.self-start { align-self: flex-start; }
.pick-list { list-style: none; margin: 0; padding: 0; max-height: 50dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.pick { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; }
.pick input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --- penyesuaian channel & bahasa (Tahap 3) --- */
.act-grid .btn-danger { grid-column: 1 / -1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.dash > .field, .dash > .hint, .dash > .row, .dash > .grid2, .dash > .segmented, .dash > .stack, .dash > .link-list, .dash > .btn, .dash > .banner-prev { margin-top: 10px; }
.dash > .btn { align-self: flex-start; }
.card.dash { display: flex; flex-direction: column; }
.banner-prev { width: 100%; aspect-ratio: 16 / 4; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); }
.banner-prev.empty { display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.num-in { width: 84px; min-height: 40px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }
.loc-list { display: flex; flex-direction: column; gap: 10px; }
.loc-item { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.loc-item input[type=text], .loc-item textarea { background: var(--panel); }
.sub-h { margin: 6px 0 0; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cap-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cap-item { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.cap-up { display: flex; flex-direction: column; gap: 8px; }
.cap-up .btn { align-self: flex-start; }
