:root {
  --bg: #0c0f09; --panel: #151a10; --line: #2c3421; --text: #eef0e2; --muted: #9aa284;
  --accent: #f2cf0e; --on-accent: #12150d; --cyan: #f2cf0e; --olive: #6b7c39; --hot: #ff5a4a; --good: #3ecf8e; --warn: #f5b942; --x: #e8eaef; --tiktok: #25f4ee; --instagram: #e1306c; --facebook: #4a8cff;
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
.hidden { display: none !important; }
button { font: inherit; font-weight: 700; background: var(--accent); color: var(--on-accent); border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
button.small { padding: 4px 10px; font-size: 13px; }
button:disabled { opacity: .5; cursor: default; }
input, select { font: inherit; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
a { color: inherit; }
.err { color: var(--hot); }
.muted { color: var(--muted); }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { display: grid; gap: 12px; width: min(320px, 100%); }
.login h1 { margin: 0 0 8px; }

header { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand img { height: 38px; display: block; }
.login-logo { width: 100%; max-width: 260px; display: block; margin: 0 auto 8px; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav button { background: transparent; color: var(--muted); padding: 6px 10px; }
nav button.on { color: var(--text); background: var(--line); }
.pill { font-size: 12px; font-weight: 700; background: var(--accent); color: var(--on-accent); border-radius: 10px; padding: 0 7px; margin-left: 4px; }
.pill:empty { display: none; }
.scan { margin-left: auto; display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }

main { padding: 16px; max-width: 1500px; margin: 0 auto; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.chk { font-size: 14px; color: var(--muted); display: flex; gap: 6px; align-items: center; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.card { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.thumb { position: relative; aspect-ratio: 9 / 12; background: #000 center / cover no-repeat; cursor: pointer; }
.score { position: absolute; top: 8px; left: 8px; font-weight: 800; font-size: 18px; padding: 2px 9px; border-radius: 8px; background: rgba(0,0,0,.75); }
.score.hot { background: var(--accent); color: var(--on-accent) !important; }
.score.warm { background: var(--olive); }
.age { position: absolute; top: 8px; right: 8px; font-size: 12px; padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,.75); }
.age.fresh { background: var(--good); color: #000; font-weight: 700; }
.dur { position: absolute; bottom: 8px; right: 8px; font-size: 12px; padding: 1px 6px; border-radius: 5px; background: rgba(0,0,0,.75); }
.body { padding: 10px 12px 12px; display: grid; gap: 6px; flex: 1; }
.who { display: flex; gap: 6px; align-items: center; font-weight: 600; font-size: 14px; }
.pf { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; color: #000; }
.pf.x { background: var(--x); } .pf.tiktok { background: var(--tiktok); } .pf.instagram { background: var(--instagram); color: #fff; } .pf.facebook { background: var(--facebook); color: #fff; }
.cap { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.stats { display: flex; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.stats b { font-weight: 700; }
.up { color: var(--good); } .down { color: var(--hot); }
.acts { display: flex; gap: 6px; margin-top: 4px; }
.acts button { flex: 1; min-width: 0; padding-left: 6px; padding-right: 6px; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; grid-column: 1 / -1; }

table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
.list th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px; border-bottom: 1px solid var(--line); }
.list td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list img { width: 44px; height: 58px; object-fit: cover; border-radius: 6px; display: block; }
.code { font: 700 18px/1 ui-monospace, Menlo, monospace; letter-spacing: 1px; cursor: copy; }
.state-done { color: var(--good); } .state-error { color: var(--hot); } .state-requested, .state-working { color: var(--warn); }

.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 20px; display: grid; gap: 6px; justify-items: center; text-align: center; margin-bottom: 16px; }
.drop.over { border-color: var(--cyan); }
.drop span { color: var(--muted); font-size: 13px; }
#uploads div { font-size: 13px; margin-bottom: 4px; }

.add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.add input { flex: 1; min-width: 180px; }
h2 { font-size: 16px; margin: 24px 0 8px; }
.recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.rec { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.rec .name { font-weight: 700; }
.rec .why { font-size: 13px; color: var(--muted); }
.rec .hs { display: flex; flex-wrap: wrap; gap: 6px; }
.rec .hs button { background: var(--line); color: var(--text); font-size: 12px; padding: 4px 8px; }
.rec .hs button.added { background: transparent; border: 1px solid var(--good); color: var(--good); }

.settings { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.settings input { width: 90px; }
.explain { max-width: 680px; color: var(--muted); }
.explain b { color: var(--text); }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; width: min(720px, 94vw); padding: 16px; }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog video { width: 100%; max-height: 60vh; background: #000; border-radius: 8px; }
.spark { width: 100%; height: 120px; }

@media (max-width: 640px) {
  .scan { margin-left: 0; width: 100%; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .list .hide-sm { display: none; }
  .body { padding: 8px; }
  .acts { gap: 4px; }
  .acts button { font-size: 12px; padding-left: 2px; padding-right: 2px; }
  .acts button:first-child { flex: 1.6; }
  .stats { gap: 6px; font-size: 12px; }
}

.src { font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 26px; }
.src a { color: var(--cyan); text-decoration: none; }
.conf { font-weight: 700; padding: 0 6px; border-radius: 5px; font-size: 12px; }
.conf.hi { background: var(--good); color: #000; } .conf.mid { background: var(--warn); color: #000; } .conf.lo { background: var(--line); }
.alts { padding-left: 18px; } .alts li { margin-bottom: 8px; }
dialog .acts { display: flex; flex-wrap: wrap; gap: 8px; }
dialog a { color: var(--cyan); }

.queue td { vertical-align: top; }
.c-score { width: 52px; }
.c-score .score, .list .score { position: static; display: inline-block; font-size: 15px; min-width: 38px; text-align: center; color: #fff; }
.c-title a { color: var(--text); text-decoration: none; font-weight: 600; }
.c-title a:hover { color: var(--cyan); }
.meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.fresh-txt { color: var(--good); font-weight: 700; }
.c-num { white-space: nowrap; }
.c-acts { white-space: nowrap; text-align: right; }
.c-acts button + button { margin-left: 6px; }
.small-txt { font-size: 12px; }
.empty { color: var(--muted); padding: 30px 0; text-align: center; }
@media (max-width: 640px) {
  .queue .c-acts { white-space: normal; text-align: left; }
  .queue tr { display: grid; grid-template-columns: 52px 1fr; }
  .queue .c-acts { grid-column: 2; padding-top: 0; }
  .queue thead { display: none; }
}
.topic { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: rgba(107, 124, 57, .35); color: #d6e08c; }
.topic.not { background: var(--line); color: var(--muted); }
.lift { font-size: 12px; font-weight: 800; padding: 1px 6px; border-radius: 5px; white-space: nowrap; }
.lift.above { background: var(--good); color: #000; }
.lift.below { background: rgba(255, 77, 77, .18); color: var(--hot); }
.lift.par { background: var(--line); color: var(--muted); }
.c-vs { white-space: nowrap; }
.show-sm { display: none; }
@media (max-width: 640px) { .show-sm { display: inline; } }
.edit { display: grid; gap: 12px; }
.edit label { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.edit input:not([type]), .edit input[type=number] { width: 90px; }
.paste { display: grid; gap: 6px; margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.paste div { display: flex; gap: 8px; flex-wrap: wrap; }
.paste input { flex: 1; min-width: 220px; }

/* ---------- clip workspace ---------- */
dialog.work { width: min(1200px, 98vw); max-height: 96vh; overflow: auto; padding: 16px; }
.w-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.w-head a { color: var(--cyan); }
.w-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.w-card { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; min-width: 0; }
.w-card h3 { margin: 4px 0 10px; font-size: 15px; }
.w-card video { width: 100%; max-height: 46vh; background: #000; border-radius: 8px; }
.w-trim { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; font-size: 14px; }
.w-trim input { width: 78px; }
.w-radio { display: grid; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.w-radio input[type=number] { width: 64px; padding: 4px 6px; }
.w-layouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.w-lay { border: 2px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 4px; justify-items: center; text-align: center; cursor: pointer; font-size: 14px; }
.w-lay.on { border-color: var(--cyan); }
.w-mock { position: relative; width: 54px; height: 96px; border-radius: 6px; background: var(--olive); overflow: hidden; }
.w-mock i, .w-mock b { position: absolute; display: block; }
.w-mock.inset b { left: 10%; right: 10%; top: 44%; bottom: 6%; background: var(--cyan); }
.w-mock.split b { left: 0; right: 0; top: 50%; bottom: 0; background: var(--cyan); }
.w-mock.flip { background: var(--cyan); } .w-mock.flip b { left: 0; bottom: 0; width: 36%; height: 26%; background: var(--olive); }
.w-vol { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 14px; }
.w-title { display: grid; grid-template-columns: 1fr 220px; gap: 16px; }
.w-title input#wTitle, .w-title textarea { width: 100%; }
.w-title textarea { font: inherit; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; resize: vertical; }
.w-title label { display: block; margin: 8px 0; }
.w-title input[type=number] { width: 60px; padding: 3px 6px; }
.w-cover { display: grid; gap: 6px; justify-items: center; }
.w-cover-frame { width: 200px; height: 356px; border-radius: 10px; background: linear-gradient(#2e3326 0 42%, #6d7361 42% 95%, #2e3326 95%); display: flex; justify-content: center; padding: 16px 8px 0; overflow: hidden; }
#wTitlePrev { font-family: "Bangers", Impact, sans-serif; text-transform: uppercase; color: #b8332a; font-size: 28px; line-height: .98; text-align: center; transform: rotate(-4deg);
  -webkit-text-stroke: 5px #fff6e4; paint-order: stroke fill; letter-spacing: .5px; height: fit-content; }
.w-actions { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.w-actions button { font-size: 16px; padding: 10px 18px; }
.w-out { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.w-out video { width: 300px; max-height: 60vh; }
.w-out img { width: 200px; border-radius: 8px; }
.btn { display: inline-block; font-weight: 700; background: var(--accent); color: var(--on-accent); border-radius: 8px; padding: 8px 14px; text-decoration: none; margin-right: 6px; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.w-drop { cursor: pointer; }
.linkish { color: var(--cyan); cursor: pointer; }
@media (max-width: 760px) {
  .w-grid, .w-title { grid-template-columns: 1fr; }
  .w-layouts { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .w-lay { padding: 6px; font-size: 12px; }
}

/* Clip Commando: stencil type for headings and codes */
h1, h2, h3, nav button, .w-card h3, dialog h3 { font-family: "Black Ops One", Impact, sans-serif; font-weight: 400; letter-spacing: .5px; }
.code { font-family: "Black Ops One", ui-monospace, monospace; font-weight: 400; color: var(--accent); }
header { border-bottom: 2px solid var(--olive); }
.login form { text-align: center; }
a { color: var(--accent); }
.c-title a, .w-head a:not(.btn) { color: var(--text); }
#tab-approved { overflow-x: auto; }
.w-brand { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.w-logos, .w-corners, .w-seg { display: flex; gap: 8px; margin-top: 4px; }
.w-logo { border: 2px solid var(--line); border-radius: 10px; padding: 6px; width: 92px; display: grid; justify-items: center; gap: 4px; cursor: pointer; }
.w-logo img { height: 48px; } .w-nologo { height: 48px; font-size: 32px; line-height: 48px; color: var(--muted); }
.w-corners { display: grid; grid-template-columns: 38px 38px; gap: 6px; }
.w-corner { border: 2px solid var(--line); border-radius: 8px; height: 38px; display: grid; place-items: center; cursor: pointer; font-size: 18px; }
.w-seg label { border: 2px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: 14px; }
.w-logo.on, .w-corner.on, .w-seg label.on { border-color: var(--accent); }
.w-follow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; }
.w-follow img { height: 28px; } .w-follow input[type=number] { width: 70px; padding: 4px 6px; }

.w-corners { grid-template-columns: 38px 38px; }
.w-corner.wide { grid-column: 1 / span 2; font-size: 13px; }
.p-wrap { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.p-stage { position: relative; width: 270px; height: 480px; background: #2a2f22; border-radius: 10px; overflow: hidden; flex: none; touch-action: none; user-select: none; }
.p-stage > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.p-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.p-box { position: absolute; background: #555a48; outline: 1px dashed rgba(255,255,255,.5); cursor: move; }
.p-box video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.p-tag { position: absolute; left: 4px; top: 4px; font-size: 10px; background: rgba(0,0,0,.6); padding: 0 4px; border-radius: 3px; }
.p-logo { position: absolute; cursor: move; }
.p-box.sel, .p-logo.sel { outline: 2px solid var(--accent); }
.p-fields { flex: 1; min-width: 240px; display: grid; gap: 12px; }
.p-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.p-group b { width: 100%; }
.p-group input { width: 76px; padding: 4px 6px; }

.cards { display: grid; gap: 14px; }
.rp { display: flex; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; flex-wrap: wrap; }
.rp video { width: 180px; aspect-ratio: 9/16; background: #000; border-radius: 8px; }
.rp-body { flex: 1; min-width: 240px; display: grid; gap: 8px; align-content: start; }
.rp-cap { white-space: pre-wrap; font: inherit; font-size: 14px; color: var(--text); margin: 0; max-height: 140px; overflow: auto; background: var(--bg); border-radius: 8px; padding: 8px; }
.rp-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rp-at { display: inline-flex; gap: 6px; }
.posting { max-width: 720px; display: grid; gap: 10px; margin-bottom: 20px; }
.posting h3 { margin: 10px 0 0; }
.pg-accounts, .pg-days { display: flex; flex-wrap: wrap; gap: 12px; }
.pg-times { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pg-time { background: var(--line); padding: 3px 8px; border-radius: 6px; }
.pg-time a { color: var(--hot); text-decoration: none; margin-left: 4px; }
.posting .blk { display: grid; gap: 4px; }
.posting textarea { font: inherit; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
