/* YorkMix AdAssist — brand: orange #f16022, charcoal #23272c */
:root {
  --orange: #f16022; --orange-d: #d24c12; --orange-l: #fff1ea;
  --ink: #23272c; --ink-2: #4a5058; --muted: #767c84; --line: #e6e7e9;
  --bg: #f6f6f7; --card: #fff; --ok: #1f8a4c; --ok-l: #e8f6ee; --warn: #b26b00; --warn-l: #fff6e0; --bad: #c0362c; --bad-l: #fdecea;
  --r: 14px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--orange-d); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); } h2 { font-size: 1.35rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
img { max-width: 100%; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .center { text-align: center; }
.mt0 { margin-top: 0; } .mt { margin-top: 1.25rem; } .mb0 { margin-bottom: 0; }

/* header */
.top { background: var(--ink); border-bottom: 4px solid var(--orange); }
.top .in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.top .logo img { height: 42px; display: block; }
.top .brand-tag { color: #fff; font-weight: 700; font-size: .95rem; border-left: 1px solid #555; padding-left: 14px; }
.top nav { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.top nav a, .top nav button { color: #e9e9ea; text-decoration: none; font: inherit; font-size: .92rem; padding: 8px 12px; border-radius: 8px; background: none; border: 0; cursor: pointer; }
.top nav a:hover, .top nav button:hover { background: rgba(255,255,255,.08); color: #fff; }
.top nav .cta { background: var(--orange); color: #fff; font-weight: 700; }
@media (max-width: 640px) { .top .brand-tag { display: none; } .top .in { flex-wrap: wrap; } .top nav { margin-left: 0; width: 100%; } }

main { max-width: 1120px; margin: 0 auto; padding: 28px 16px 60px; }
main.narrow { max-width: 560px; }
main.mid { max-width: 820px; }
.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 16px 40px; }
.foot a { color: var(--muted); }

/* cards & grid */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }

/* forms */
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: .95rem; }
label .hint { font-weight: 400; color: var(--muted); font-size: .85rem; display: block; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=number], input[type=date], select, textarea {
  width: 100%; font: inherit; padding: 11px 13px; border: 1px solid #cfd2d6; border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: var(--orange); }
textarea { min-height: 110px; resize: vertical; }
input[type=number] { max-width: 110px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--orange); flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 12px 20px; cursor: pointer; text-decoration: none; background: var(--orange); color: #fff; }
.btn:hover { background: var(--orange-d); }
.btn.alt { background: #fff; color: var(--ink); border: 1px solid #cfd2d6; }
.btn.alt:hover { border-color: var(--ink); }
.btn.dark { background: var(--ink); } .btn.ok { background: var(--ok); } .btn.bad { background: var(--bad); }
.btn.sm { padding: 7px 12px; font-size: .88rem; border-radius: 8px; }
.btn.big { padding: 15px 26px; font-size: 1.05rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; color: var(--orange-d); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
form.inline { display: inline; }

/* flashes & notes */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; }
.flash.success { background: var(--ok-l); border-color: #bfe3cd; color: #135c32; }
.flash.error { background: var(--bad-l); border-color: #f3c3be; color: #8e2219; }
.flash.warning, .note { background: var(--warn-l); border-color: #f1dca6; color: #6b4300; }
.note { padding: 12px 16px; border-radius: 10px; border: 1px solid #f1dca6; margin: 12px 0; }
.tipbox { background: var(--orange-l); border: 1px solid #f7cdb8; border-radius: var(--r); padding: 16px 18px; }
.tipbox h3 { color: var(--orange-d); }
.tipbox ul { margin: 0; padding-left: 20px; } .tipbox li { margin: 4px 0; }

/* badges */
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #eceef0; color: var(--ink-2); white-space: nowrap; }
.badge-ready, .badge-approved, .badge-final, .badge-completed { background: var(--ok-l); color: var(--ok); }
.badge-live { background: var(--orange); color: #fff; }
.badge-generating, .badge-in_production, .badge-submitted, .badge-in_review { background: var(--warn-l); color: var(--warn); }
.badge-failed, .badge-rejected, .badge-changes_requested { background: var(--bad-l); color: var(--bad); }
.sev-high { color: var(--bad); font-weight: 700; } .sev-warning { color: var(--warn); font-weight: 700; } .sev-info { color: var(--muted); font-weight: 700; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tbl-wrap { overflow-x: auto; }

/* hero */
.hero { background: var(--ink); color: #fff; border-radius: 22px; padding: clamp(28px, 5vw, 56px); position: relative; overflow: hidden; margin-bottom: 28px; }
.hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: var(--orange); opacity: .9; }
.hero > * { position: relative; z-index: 1; max-width: 640px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
.hero p { font-size: 1.15rem; color: #d9dadc; }
.steps { counter-reset: s; }
.steps .card { position: relative; padding-top: 48px; }
.steps .card::before { counter-increment: s; content: counter(s); position: absolute; top: 16px; left: 22px; width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .9rem; }
.stat { font-size: 1.9rem; font-weight: 800; color: var(--orange); line-height: 1; }

/* choice cards */
.choice { display: block; text-decoration: none; color: inherit; border: 2px solid var(--line); transition: border-color .15s, transform .15s; }
.choice:hover { border-color: var(--orange); transform: translateY(-2px); }
.choice .price { font-weight: 800; color: var(--orange-d); }
.choice .ico { font-size: 1.8rem; }

/* audio player */
.player { display: flex; align-items: center; gap: 12px; background: #f3f3f4; border-radius: 12px; padding: 10px 14px; }
.player button.pp { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--orange); color: #fff; cursor: pointer; flex: none; display: grid; place-items: center; }
.player button.pp svg { width: 18px; height: 18px; fill: currentColor; }
.player .bar { flex: 1; height: 8px; background: #dcdde0; border-radius: 99px; cursor: pointer; position: relative; }
.player .bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--orange); border-radius: 99px; }
.player .time { font-variant-numeric: tabular-nums; font-size: .85rem; color: var(--muted); min-width: 78px; text-align: right; }
.version { border: 2px solid var(--line); }
.version.upbeat h3::before { content: "⚡ "; } .version.relaxed h3::before { content: "☕ "; }
.version.chosen { border-color: var(--ok); }
.script { white-space: pre-wrap; background: #fbfbfb; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 1.02rem; }

/* progress */
.progress { text-align: center; padding: 40px 20px; }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 5px solid var(--orange-l); border-top-color: var(--orange); animation: spin 1s linear infinite; margin: 0 auto 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
.stepsline { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.stepsline span { font-size: .85rem; padding: 5px 10px; border-radius: 99px; background: #eceef0; color: var(--muted); }
.stepsline span.done { background: var(--ok-l); color: var(--ok); } .stepsline span.now { background: var(--orange); color: #fff; }

/* word meter */
.meter { font-size: .88rem; margin-top: 6px; font-weight: 600; }
.meter.ok { color: var(--ok); } .meter.warn { color: var(--warn); } .meter.bad { color: var(--bad); }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; font: inherit; font-weight: 600; padding: 10px 14px; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--orange); }
.tabpane { display: none; } .tabpane.on { display: block; }

/* planner */
.pkg { position: relative; cursor: pointer; }
.pkg input { position: absolute; opacity: 0; }
.pkg .card { height: 100%; border: 2px solid var(--line); margin: 0; }
.pkg input:checked + .card { border-color: var(--orange); background: var(--orange-l); }
.pkg .feat { position: absolute; top: -10px; right: 14px; background: var(--orange); color: #fff; font-size: .75rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; z-index: 2; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { margin: 0; font-weight: 600; }
.days input { display: none; }
.days span { display: inline-block; padding: 8px 12px; border: 1px solid #cfd2d6; border-radius: 8px; cursor: pointer; background: #fff; }
.days input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.summary { position: sticky; top: 16px; }
.summary .line { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.summary .total { font-size: 1.3rem; font-weight: 800; border: 0; }
.coming { opacity: .55; }
.artwork-thumb { max-width: 100%; max-height: 120px; border: 1px solid var(--line); border-radius: 6px; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
@media (max-width: 900px) { .layout-2 { grid-template-columns: 1fr; } .summary { position: static; } }

/* messages */
.msg { border-left: 3px solid var(--line); padding: 6px 12px; margin: 10px 0; }
.msg.staff { border-left-color: var(--orange); }
.msg .who { font-size: .82rem; color: var(--muted); }

/* admin */
body.admin .top { border-bottom-color: #555; }
.admin-nav { background: #fff; border-bottom: 1px solid var(--line); }
.admin-nav .in { max-width: 1280px; margin: 0 auto; padding: 0 16px; display: flex; gap: 2px; overflow-x: auto; }
.admin-nav a { padding: 12px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .92rem; white-space: nowrap; border-bottom: 3px solid transparent; }
.admin-nav a.on { color: var(--ink); border-bottom-color: var(--orange); }
body.admin main { max-width: 1280px; }
.kpi .card { margin: 0; }
.kpi .n { font-size: 2rem; font-weight: 800; }
details summary { cursor: pointer; font-weight: 600; }
pre.prompt { white-space: pre-wrap; font-size: .8rem; background: #fafafa; border: 1px solid var(--line); padding: 10px; border-radius: 8px; max-height: 300px; overflow: auto; }

/* inline text editing (superadmin) */
.cms-edit { outline: 1px dashed var(--orange); outline-offset: 2px; cursor: text; border-radius: 3px; }
.cms-edit:hover { background: rgba(241,96,34,.08); }
.cms-edit[contenteditable=true] { background: #fff; outline: 2px solid var(--orange); color: var(--ink); }
.editbar { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 99px; z-index: 50; font-size: .9rem; display: flex; gap: 12px; align-items: center; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.editbar button { background: var(--orange); color: #fff; border: 0; border-radius: 99px; padding: 6px 12px; font: inherit; font-weight: 700; cursor: pointer; }

/* voice picker */
.voice-list { display: grid; gap: 8px; margin-bottom: 10px; }
.voice-opt { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 400; background: #fff; }
.voice-opt:hover { border-color: #cfd2d6; }
.voice-opt input { accent-color: var(--orange); width: 18px; height: 18px; flex: none; }
.voice-opt .vinfo { flex: 1; min-width: 0; line-height: 1.35; }
.voice-opt:has(input:checked) { border-color: var(--orange); background: var(--orange-l); }
.player.mini { background: none; padding: 0; gap: 0; flex: none; }
.player.mini .bar, .player.mini .time { display: none; }
.player.mini button.pp { width: 38px; height: 38px; }
.player.mini button.pp.loading { opacity: .6; }
.badge-test { background: #6b3fa0; color: #fff; }
.pkg-row { border-top: 1px solid var(--line); padding: 14px 0; }
.pkg-row:first-of-type { border-top: 0; }
.pkg-row details { margin-top: 6px; }
