/* imgmotion — tampilan aplikasi */
:root {
  --bg: #0E0F11; --bg2: #121418; --panel: #16181C; --panel2: #1E2126; --line: #23262C; --line2: #2E323A;
  --text: #ECEDEE; --text2: #C9CDD2; --muted: #A3A8B0; --faint: #868C95;
  --accent: #F5A524; --accent-ink: #141414; --accent-soft: #2E2715; --ok: #3DD68C; --bad: #FF6B6B;
  --radius: 12px; --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:hover { color: #FFC35C; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
input::placeholder, textarea::placeholder { color: #7F858E; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.ok { color: var(--ok); }
.warn { color: var(--accent); }
.bad { color: var(--bad); }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.hide { display: none !important; }

/* tombol */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--panel2); color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn.primary:hover { background: #FFB43A; color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); border-color: #4A2626; background: transparent; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--text2); }
.icon-btn:hover { background: var(--panel2); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--panel2); color: var(--text2); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.seg button.on { background: var(--text); color: var(--accent-ink); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--panel2); color: var(--text2); white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11px; font-weight: 800; }

/* form */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--text2); }
.input, select.input, textarea.input { min-height: 44px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); font-size: 14px; width: 100%; }
textarea.input { padding: 10px 13px; min-height: 80px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: #4A505A; outline: none; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 28px; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
input[type=color] { width: 44px; height: 36px; padding: 0; border: 1px solid var(--line2); border-radius: 8px; background: none; }
.check { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-size: 13.5px; color: var(--text2); }
.hint { font-size: 12px; line-height: 1.5; color: var(--faint); }

/* kerangka */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding: 0 24px; min-height: 60px; border-bottom: 1px solid var(--line); background: var(--bg2); position: relative; z-index: 5; }
.brandmark { display: flex; align-items: center; gap: 9px; font-size: 19px; letter-spacing: -0.02em; text-decoration: none; color: var(--text); }
.brandmark i { width: 12px; height: 12px; border-radius: 3px; background: var(--accent); display: block; }
.brandmark b { font-weight: 800; }
.brandmark span { font-weight: 500; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top-right { margin-left: auto; }
.page-head > .grow { min-width: min(100%, 320px); }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; padding: 11px 13px; border-radius: 8px; }
.nav a.on { color: var(--text); background: var(--panel2); font-weight: 600; }
.page { width: 100%; max-width: 1320px; margin: 0 auto; padding: 32px 28px 48px; display: flex; flex-direction: column; gap: 26px; }
.page.narrow { max-width: 1080px; }
h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.025em; }
h2 { margin: 0; font-size: 17px; font-weight: 700; }
h3 { margin: 0; font-size: 15px; font-weight: 700; }
p { margin: 0; line-height: 1.55; }
.card { border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.card.pad { padding: 18px 20px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.steps li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; color: var(--faint); border-radius: 999px; }
.steps li.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.steps li.done { color: var(--muted); }
.steps a { color: inherit; text-decoration: none; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--text2); }
.notice.warn { background: #1A1814; border-color: #3A3120; }
.notice.bad { background: #1C1414; border-color: #4A2626; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line2); border-radius: 14px; }

/* kartu pilihan */
.pick { text-align: left; padding: 0; border-radius: 14px; overflow: hidden; background: var(--panel); border: 2px solid var(--line); color: var(--text); display: flex; flex-direction: column; }
.pick.on { border-color: var(--accent); background: #1A1814; }
.pick:disabled { opacity: .45; }
.pick .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; }

/* proyek */
.proj { text-decoration: none; color: inherit; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.proj:hover { border-color: var(--line2); color: inherit; }
.proj .thumb { height: 200px; background: #1B1D21; display: flex; align-items: center; justify-content: center; }
.proj .thumb img, .proj .thumb canvas { height: 184px; width: auto; border-radius: 6px; }
.proj .info { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 7px; }

/* bahan */
.asset { position: relative; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.asset .thumb { height: 120px; background: #222429 center / cover no-repeat; position: relative; }
.asset .thumb img { width: 100%; height: 100%; object-fit: contain; }
.asset .meta { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 4px; }
.asset .name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset .dur { position: absolute; right: 7px; bottom: 7px; font-family: var(--mono); font-size: 11px; background: #0E0F11; padding: 2px 6px; border-radius: 4px; }
.asset .x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 8px; border: 0; background: rgba(14,15,17,.75); color: var(--text2); display: flex; align-items: center; justify-content: center; }
.progress { height: 5px; border-radius: 3px; background: #2A2E35; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); }
.drop { border: 2px dashed #3A3F47; border-radius: 14px; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--bg2); }
.drop.over { border-color: var(--accent); background: #1A1814; }

/* builder */
.builder { display: flex; flex-direction: column; height: 100vh; min-height: 640px; }
.b-main { flex: 1; display: flex; min-height: 0; }
.b-shots { width: 268px; flex-shrink: 0; border-right: 1px solid var(--line); background: var(--bg2); display: flex; flex-direction: column; min-height: 0; }
.b-shots .list { flex: 1; overflow-y: auto; padding: 6px 10px; }
.shot { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: transparent; border: 1px solid transparent; text-align: left; }
.shot.on { background: #2A2416; border-color: var(--accent); }
.shot .n { font-family: var(--mono); font-size: 11px; color: var(--muted); width: 16px; }
.shot canvas { width: 30px; height: 53px; border-radius: 4px; background: #222; flex-shrink: 0; }
.shot .t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot .s { font-size: 11.5px; color: var(--muted); }
.trans-row { display: flex; align-items: center; gap: 7px; padding: 3px 0 3px 34px; font-size: 11.5px; color: var(--faint); }
.b-stage { flex: 1; min-width: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 14px; background: #0B0C0E; min-height: 0; }
.stage-wrap { position: relative; height: calc(100% - 64px); max-height: 760px; aspect-ratio: 9 / 16; box-shadow: 0 0 0 1px #2A2E35; border-radius: 6px; overflow: hidden; background: #000; }
.stage-wrap canvas { width: 100%; height: 100%; display: block; }
.canvas-host { position: absolute; inset: 0; }
.safe { position: absolute; pointer-events: none; background: rgba(245,165,36,0.12); }
.b-panel { width: 372px; flex-shrink: 0; border-left: 1px solid var(--line); background: var(--bg2); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; border: 0; background: transparent; color: var(--faint); font-weight: 600; font-size: 12.5px; padding: 12px 2px; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.panel-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.preset { text-align: left; padding: 0; border-radius: 10px; overflow: hidden; background: var(--panel); border: 2px solid var(--line); color: var(--text); display: flex; flex-direction: column; }
.preset.on { border-color: var(--accent); }
.preset canvas { width: 100%; height: 92px; display: block; background: #1D1D1D; }
.preset span { padding: 8px 10px; font-size: 12.5px; font-weight: 600; }
.timeline { border-top: 1px solid var(--line); background: var(--bg2); padding: 10px 18px 14px; display: flex; flex-direction: column; gap: 7px; }
.tl-row { display: flex; gap: 10px; align-items: center; }
.tl-label { width: 54px; flex-shrink: 0; font-size: 11px; color: var(--faint); }
.tl-track { flex: 1; min-width: 0; position: relative; }
.tl-blocks { display: flex; gap: 2px; height: 34px; }
.tl-blocks button { min-width: 0; border: 0; border-radius: 5px; background: #2A2E35; color: var(--text2); font-size: 11.5px; font-weight: 600; text-align: left; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-blocks button.on { background: var(--accent); color: var(--accent-ink); }
.playhead { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #fff; pointer-events: none; }
.popover { position: absolute; z-index: 30; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 18px 44px rgba(0,0,0,.55); padding: 14px; }

/* modal & toast */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #ECEDEE; color: #141414; padding: 11px 16px; border-radius: 10px; font-weight: 600; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.bad { background: #FF8A8A; }

/* login */
.login { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login .side { flex: 1 1 560px; min-width: 0; padding: 56px 64px; background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login .form { flex: 1 1 420px; min-width: 0; padding: 56px 48px; display: flex; align-items: center; justify-content: center; }


/* ============================================================ tambahan Tahap 1 */
.splash { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; text-align: center; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; gap: 12px; padding: 24px 0; }
.hero { font-size: 40px; line-height: 1.08; }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.offline-bar { background: #1A1814; border-bottom: 1px solid #3A3120; color: #E8C27A; font-size: 13px; padding: 9px 24px; }
.sync-chip { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--muted); font-size: 12.5px; padding: 8px 6px; border-radius: 8px; }
.sync-chip:hover { background: var(--panel2); }
.sync-chip .dot, .brand-tab .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.user-chip { display: flex; align-items: center; gap: 9px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--panel2); color: var(--text); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; flex-shrink: 0; }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.user-chip .who { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip .who b { font-size: 13px; }
.user-chip .who small { font-size: 11.5px; color: var(--faint); }
.menu { position: absolute; right: 0; top: 46px; z-index: 20; background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; min-width: 170px; box-shadow: 0 14px 36px rgba(0,0,0,.5); }
.menu button { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; padding: 10px 10px; border-radius: 7px; text-align: left; font-size: 13.5px; }
.menu button:hover { background: var(--line2); }
.menu button.bad { color: var(--bad); }
.proj .thumb { text-decoration: none; }
.proj .name { color: var(--text); text-decoration: none; font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb-empty { width: 104px; height: 184px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.resep { border-radius: 14px; background: var(--panel); border: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 9px; }
.resep .btn { align-self: flex-start; margin-top: 4px; }
.pick-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.brand-swatch { height: 96px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }
.brand-swatch span { font-size: 26px; letter-spacing: .01em; }
.brand-swatch i { width: 26px; height: 26px; border-radius: 6px; }
.look-swatch { height: 64px; }
.disabled-card { opacity: .5; }
.radio-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; }
.radio-row input { margin-top: 2px; accent-color: var(--accent); width: 18px; height: 18px; }
.radio-row div { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.radio-row .faint { font-size: 12.5px; }
.drop.compact { padding: 14px 16px; }
.queue { display: flex; flex-direction: column; gap: 8px; }
.q-item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.q-item.failed { border-color: #4A2626; }
.q-item .name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-kind { width: 36px; height: 36px; border-radius: 9px; background: var(--panel2); display: inline-flex; align-items: center; justify-content: center; color: var(--text2); flex-shrink: 0; }
.asset-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.asset .thumb img, .thumb-ph { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb-ph { background: #222429; }
.seg.sm button { min-height: 32px; font-size: 12px; }
.wave { width: 100%; height: 76px; display: block; cursor: pointer; border-radius: 8px; background: var(--bg2); }
.input.bpm { width: 92px; }
.divider { height: 1px; background: var(--line); margin: 2px 0; }

/* builder */
.b-top { display: flex; align-items: center; gap: 14px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--bg2); flex-wrap: wrap; }
.b-title { min-width: 180px; gap: 1px; }
.name-btn { border: 0; background: transparent; padding: 2px 0; text-align: left; font-weight: 700; font-size: 15px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.name-btn:hover { color: var(--accent); }
.name-input { min-height: 34px; max-width: 340px; }
.b-meta { font-size: 12px; }
.b-actions { gap: 6px; flex-wrap: wrap; }
.save-status { font-size: 12px; color: var(--faint); min-width: 130px; }
.b-top .steps li { padding: 6px 10px; }
.b-shots-head { padding: 12px 14px 4px; }
.sthumb { width: 30px; height: 53px; border-radius: 4px; background: #222; flex-shrink: 0; object-fit: cover; display: block; }
.shot { color: var(--text); }
.shot:hover { background: var(--panel); }
.wdot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.wdot.warn { background: var(--accent); }
.wdot.bad { background: var(--bad); }
button.trans-row { border: 0; background: transparent; width: 100%; text-align: left; min-height: 26px; }
button.trans-row:hover { color: var(--accent); }
.b-shots-foot { padding: 10px; border-top: 1px solid var(--line); gap: 6px; }
.stage-info { font-size: 12.5px; gap: 6px; }
.stage-ctrl { gap: 8px; flex-wrap: wrap; justify-content: center; }
.safe span { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); font-size: 10.5px; color: #F5C46B; white-space: nowrap; font-weight: 600; }
.panel-head { padding: 12px 10px 8px 16px; gap: 2px; border-bottom: 1px solid var(--line); }
.shot-issues { padding: 8px 14px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line); background: #17150F; }
.shot-issues div { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.4; }
.shot-issues svg { flex-shrink: 0; width: 15px; height: 15px; margin-top: 1px; }
.tabs button { min-height: 44px; }
.b-isi { display: none; }
.view-isi .b-shots, .view-isi .b-panel { display: none; }
.view-isi .b-isi { display: flex; flex-direction: column; gap: 10px; width: 440px; border-left: 1px solid var(--line); background: var(--bg2); padding: 14px; overflow-y: auto; min-height: 0; }
.isi-card { border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.isi-card.on { border-color: var(--accent); }
.isi-head { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 10px 12px; color: var(--text); }
.isi-n { width: 24px; height: 24px; border-radius: 50%; background: var(--panel2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.isi-card.on .isi-n { background: var(--accent); color: var(--accent-ink); }
.tl-grid { position: relative; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.tl-ruler { position: relative; height: 16px; }
.tl-ruler i { position: absolute; bottom: 0; width: 1px; height: 5px; background: #3A3F47; }
.tl-ruler i.bar { height: 10px; background: #5A606A; }
.tl-ruler b { position: absolute; left: 4px; bottom: 2px; font-size: 10px; font-weight: 600; color: var(--faint); font-family: var(--mono); }
.tl-wave { width: 100%; height: 26px; display: block; }
.tl-nomusic { height: 22px; font-size: 11.5px; color: var(--faint); display: flex; align-items: center; }
.tl-blocks button { position: relative; display: flex; align-items: center; gap: 6px; }
.hist-pop { right: 0; top: 46px; width: 340px; display: flex; flex-direction: column; gap: 10px; }
.hist-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; font-size: 13px; }
.hist-row:hover { background: var(--panel2); }

/* panel */
.slot { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.slot.empty-slot { border-style: dashed; border-color: #4A505A; }
.slot-thumb { width: 52px; height: 52px; border-radius: 8px; background: #222429; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.slot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.slot-name { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn.sm { width: 32px; height: 32px; }
.pick-assets { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.pa { border: 2px solid var(--line); background: var(--panel2); border-radius: 10px; padding: 0; overflow: hidden; display: flex; flex-direction: column; text-align: left; }
.pa.on { border-color: var(--accent); }
.pa img, .pa .thumb-ph { width: 100%; height: 120px; object-fit: contain; background: #1B1D21; }
.pa-name { padding: 6px 8px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text2); }
.focus-pad { position: relative; width: 100%; max-height: 260px; border-radius: 10px; overflow: hidden; cursor: crosshair; background: #1B1D21; }
.focus-pad img { width: 100%; height: 100%; object-fit: fill; display: block; pointer-events: none; }
.focus-dot { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.6); pointer-events: none; }
.look-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; border: 2px solid var(--line); background: var(--panel); color: var(--text); }
.look-row.on { border-color: var(--accent); }
.look-chip { width: 42px; height: 42px; border-radius: 8px; flex-shrink: 0; }
.trans-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-align: left; font-size: 13.5px; }
.trans-opt.on { border-color: var(--accent); background: #1A1814; }
.preset img, .preset-ph { width: 100%; aspect-ratio: 9 / 13; object-fit: cover; object-position: center 40%; display: block; background: #1D1D1D; }
details summary { list-style: revert; }

/* export */
.export-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); align-items: start; }
.check-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; background: var(--panel2); }
.check-pill svg { width: 15px; height: 15px; }
.check-pill.ok { color: var(--ok); }
.check-pill.warn { color: var(--accent); }
.issue { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; background: var(--bg2); border: 1px solid var(--line); }
.issue svg { flex-shrink: 0; }
.issue.bad { border-color: #4A2626; } .issue.bad svg { color: var(--bad); }
.issue.warn svg { color: var(--accent); }
.progress.big { height: 10px; border-radius: 5px; }
.result { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.result-video { height: 520px; max-height: 70vh; aspect-ratio: 9 / 16; background: #000; border-radius: 10px; max-width: 100%; }

/* brand kit */
.brand-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); color: var(--text2); font-weight: 600; }
.brand-tab.on { border-color: var(--accent); color: var(--text); background: #1A1814; }
.bk-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.bk-side { position: sticky; top: 20px; }
.bk-preview canvas { width: 270px; height: 480px; border-radius: 10px; display: block; box-shadow: 0 0 0 1px var(--line2); background: #000; }
.grid2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.logo-box { width: 180px; height: 96px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 12px; border: 1px solid var(--line2); }
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.colors { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.color-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.hex { width: 86px; border: 0; background: transparent; font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 0; }
.font-sample { font-size: 26px; color: var(--text); padding: 8px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* akun */
.table { display: flex; flex-direction: column; }
.tr { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tr:last-child { border-bottom: 0; }
.td-brands { min-width: 140px; }
.dot-sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* uji */
.uji-row { display: flex; gap: 12px; align-items: flex-start; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.uji-row:last-child { border-bottom: 0; }
.uji-st { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--panel2); }
.uji-st svg { width: 15px; height: 15px; }
.uji-st.ok { color: var(--ok); } .uji-st.warn { color: var(--accent); } .uji-st.bad { color: var(--bad); }
.report { margin: 0; white-space: pre-wrap; font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--text2); background: var(--bg2); padding: 14px; border-radius: 10px; border: 1px solid var(--line); }

/* responsif */
@media (max-width: 1100px) {
  .builder { height: auto; min-height: 100vh; }
  .b-main { flex-direction: column; flex-wrap: nowrap; }
  .b-stage { order: 1; min-width: 0; }
  .b-panel, .view-isi .b-isi { order: 2; width: 100%; border-left: 0; border-top: 1px solid var(--line); }
  .b-shots { order: 3; width: 100%; border-right: 0; border-top: 1px solid var(--line); }
  .b-shots .list { display: flex; gap: 6px; overflow-x: auto; padding: 8px 10px; }
  .b-shots .list > div { flex: 0 0 auto; }
  .b-shots .shot { width: 190px; }
  .b-shots .trans-row { display: none; }
  .b-shots-foot { flex-direction: row; }
  .stage-wrap { height: 64vh; max-height: none; }
  .panel-body { overflow: visible; }
  .export-grid, .bk-editor { grid-template-columns: 1fr; }
  .bk-side { position: static; order: -1; }
}
@media (max-width: 760px) {
  .page { padding: 20px 16px 36px; }
  .topbar { padding: 8px 16px 0; gap: 4px 12px; }
  .topbar .brandmark { order: 1; }
  .topbar .top-right { order: 2; }
  .topbar .nav { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; margin: 0 -8px; }
  .topbar .nav a { padding: 10px 10px; font-size: 13.5px; white-space: nowrap; }
  .user-chip .who, .sync-chip span:last-child { display: none; }
  .login .side, .login .form { padding: 32px 20px; }
  .login .side { flex-basis: 100%; }
  .hero { font-size: 30px; }
  .b-top { gap: 8px; padding: 8px 10px; }
  .b-top .steps, .save-status, .b-top .b-actions .btn.ghost:not(.view-toggle) { display: none; }
  .b-title { order: 0; flex: 1; }
  .name-btn { max-width: 52vw; }
  .view-isi .b-stage { position: sticky; top: 0; z-index: 4; padding: 8px; }
  .view-isi .stage-wrap { height: 42vh; }
  .stage-wrap { height: 58vh; }
  .timeline { padding: 8px 12px 12px; }
  .timeline .hint span:last-child { display: none; }
  .view-isi .b-isi { padding: 12px; }
  .result-video { height: auto; width: 100%; }
  .trim-view { width: auto; height: 36vh; margin: 0 auto; }
  .trim { gap: 12px; }
  h1 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
.text-styles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.text-styles .card { background: var(--bg2); }
/* bin klip & trim */
.filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-tabs button { border: 1px solid var(--line2); background: transparent; color: var(--muted); border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 600; }
.filter-tabs button.on { background: var(--text); color: var(--accent-ink); border-color: var(--text); }
.asset.selecting { cursor: pointer; }
.asset.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.asset .pick-n { position: absolute; top: 7px; right: 7px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: rgba(14,15,17,.55); color: var(--accent-ink); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.asset.sel .pick-n { background: var(--accent); border-color: var(--accent); }
.asset .used { position: absolute; left: 7px; bottom: 7px; font-size: 10.5px; font-weight: 700; background: var(--accent); color: var(--accent-ink); padding: 2px 6px; border-radius: 4px; }
.asset .meta .btn { align-self: flex-start; margin-top: 2px; }
.sel-bar { position: sticky; bottom: 12px; z-index: 6; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line2); box-shadow: 0 14px 40px rgba(0,0,0,.5); font-size: 13.5px; }
.trim { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.trim-view { width: 280px; max-width: 100%; max-height: 62vh; background: #000; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.trim-view video { width: 100%; height: 100%; object-fit: contain; display: block; }
.trim .grow { flex: 1 1 300px; }
.trim-track { position: relative; height: 64px; min-height: 48px; max-height: 96px; border-radius: 8px; background: #1B1D21 center / 100% 100% no-repeat; cursor: pointer; touch-action: none; user-select: none; overflow: hidden; }
.trim-dim { position: absolute; top: 0; bottom: 0; background: rgba(0,0,0,.62); pointer-events: none; }
.trim-sel { position: absolute; top: 0; bottom: 0; border: 3px solid var(--accent); border-radius: 6px; pointer-events: none; box-sizing: border-box; }
.trim-sel i { position: absolute; top: 50%; width: 10px; height: 30px; margin-top: -15px; background: var(--accent); border-radius: 3px; }
.trim-sel .h-in { left: -7px; } .trim-sel .h-out { right: -7px; }
.trim-head { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #fff; pointer-events: none; }
.chip-btn { border: 1px solid var(--line2); background: var(--panel2); color: var(--text2); border-radius: 8px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; min-height: 36px; }
.chip-btn.on { border-color: var(--accent); color: var(--accent); }
/* track teks & potongan */
.tl-texts { position: relative; min-height: 22px; }
.tl-text { position: absolute; top: 0; height: 22px; border: 0; border-radius: 5px; padding: 0 8px; font-size: 11px; font-weight: 700; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #141414; }
.tl-text.hook { background: #F5A524; }
.tl-text.ket { background: #8FB8FF; }
.tl-text.empty { opacity: .55; font-style: italic; }
.kind-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; flex-shrink: 0; }
.kind-dot.hook { background: #F5A524; } .kind-dot.ket { background: #8FB8FF; }
.text-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid #F5A524; }
.text-card.ket { border-left-color: #8FB8FF; }
.span-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-top: -4px; }
.span-row .input { min-height: 38px; font-size: 13px; padding: 0 8px; }
.text-quick label { display: flex; align-items: center; }
.trim-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.pa.used-pa { box-shadow: inset 0 -4px 0 var(--accent); }
.tabs button { padding: 12px 0; font-size: 12px; }
