@font-face { font-family: "Jameel"; src: url("/fonts/JameelNooriNastaleeq.ttf") format("truetype"); font-display: swap; }
:root {
  /* Editorial system (Newsroom Studio redesign v2): modern slate canvas, deep navy ink, crisp corners */
  --primary: #0b2b45; --primary-dark: #071c2e; --primary-light: #eef3f8;
  --green: #108548; --green-light: #edf8f2; --orange: #c06a00; --orange-light: #fef7ed; --yellow: #b45309; --yellow-light: #fefce8; --rose: #dc2626; --rose-light: #fef2f2; --blue: #2563eb; --blue-light: #eff6ff;
  --ink: #0f172a; --text: #1e293b; --muted: #64748b; --text2: #334155; --canvas: #f6f8fa; --card: #ffffff; --line: #e2e8f0; --line-2: #cbd5e1; --soft: #f1f5f9;
  --navy: #0b2b45; --poster-yellow: #ffec08;
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --ur: "Jameel", "Noto Nastaliq Urdu", serif;
  --shadow: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --r: 6px; --r-sm: 4px; --sidebar: 236px; --header: 56px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--canvas); color: var(--text); font-family: var(--ui); font-size: 13.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 6px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; } h1 { font-size: 20px; } h2 { font-size: 16px; } h3 { font-size: 14px; }
.ur { font-family: var(--ur); font-size: 17px; line-height: 1.95; direction: rtl; }
.muted { color: var(--muted); } .small { font-size: 12px; } .caption { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.center { display: flex; align-items: center; justify-content: center; min-height: 60vh; }

/* ---------- shell: sidebar + header + scrolling content ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; height: 100vh; overflow: hidden; }
.rail { background: var(--sidebar-bg, var(--card)); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; gap: 2px; overflow-y: auto; }
.rail .brand { display: flex; align-items: center; gap: 8px; padding: 4px 8px 18px; font-weight: 700; font-size: 20px; color: var(--ink); letter-spacing: -.02em; }
.rail .brand img { height: 34px; }
.rail a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 13.5px; }
.rail a img { width: 20px; height: 20px; opacity: .8; }
.rail a:hover { background: var(--canvas); color: var(--ink); }
.rail a.on { background: var(--soft); color: var(--primary); font-weight: 600; } .rail a.on img { opacity: 1; }
.rail .grow { flex: 1; } .rail .divider { height: 1px; background: var(--line); margin: 10px 4px; }
.mainwrap { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.header { height: var(--header); background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 22px; gap: 14px; flex: 0 0 auto; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); } .crumbs b { color: var(--ink); font-weight: 600; } .crumbs img { width: 12px; opacity: .5; }
.who { display: flex; align-items: center; gap: 10px; } .who .av { width: 34px; height: 34px; border-radius: 3px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; } .who .n { font-weight: 600; font-size: 13px; color: var(--ink); line-height: 1.2 } .who .c { font-size: 11.5px; color: var(--muted); }
.meter { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); } .meter .bar { width: 80px; } .meter.warn .bar div { background: var(--orange); } .meter.bad .bar div { background: var(--rose); }
.main { flex: 1; min-height: 0; overflow: auto; padding: 18px 22px; }
.main > .topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }

/* ---------- modules ---------- */
.card { background: var(--card); border-radius: var(--r); border: 1px solid var(--line); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
details.card > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--ink); list-style: none; display: flex; justify-content: space-between; } details.card > summary::after { content: "›"; color: var(--muted); transform: rotate(90deg); } details.card[open] > summary::after { transform: rotate(-90deg); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; } .grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; } .grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; } .row > .grow { flex: 1; min-width: 120px; }
.stat { background: var(--card); border-radius: var(--r); border: 1px solid var(--line); padding: 14px 16px; display: flex; align-items: center; gap: 14px; }
.stat .sq { width: 40px; height: 40px; border-radius: 3px; display: flex; align-items: center; justify-content: center; background: var(--soft); flex: 0 0 auto; } .stat .sq img { width: 22px; }
.stat .sq.green { background: var(--green-light); } .stat .sq.orange { background: var(--orange-light); } .stat .sq.yellow { background: var(--yellow-light); } .stat .sq.blue { background: var(--blue-light); } .stat .sq.rose { background: var(--rose-light); }
.stat .v { font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.1; } .stat .l { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.delta { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--green-light); color: #0e8f57; margin-left: 6px; } .delta.neg { background: var(--rose-light); color: var(--rose); }

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 3px; font-size: 11.5px; font-weight: 600; background: var(--soft); color: var(--text2); text-transform: capitalize; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.draft { color: var(--muted); } .pill.generated, .pill.blue { color: var(--blue); background: var(--blue-light); } .pill.approved { color: #7a6222; background: #fdf8ec; } .pill.published, .pill.ok { color: #2f6b41; background: #eef3ee; } .pill.archived { color: var(--muted); } .pill.warn { color: #c06a00; background: var(--yellow-light); } .pill.bad { color: var(--rose); background: var(--rose-light); }

/* ---------- controls ---------- */
input, textarea, select, button { font: inherit; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; } .field > span { font-size: 12px; font-weight: 500; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; } .field.grow { flex: 1; }
input[type=text], input[type=password], input[type=number], input[type=url], input[type=date], input[type=datetime-local], textarea, select { width: 100%; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #fff; color: var(--text); transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11,43,69,0.12); }
textarea { resize: vertical; } textarea.ur, input.ur { font-size: 16px; line-height: 1.9; }
input[type=range] { width: 100%; accent-color: var(--primary); } input[type=color] { width: 34px; height: 30px; border: 1px solid var(--line-2); border-radius: 6px; padding: 0; background: none; cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: #fff; color: var(--text2); cursor: pointer; font-weight: 500; font-size: 13px; white-space: nowrap; transition: all .15s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.btn:hover { background: var(--soft); border-color: #94a3b8; color: var(--ink); transform: translateY(-0.5px); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.btn.p { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 6px rgba(11,43,69,0.18); }
.btn.p:hover { background: #123c60; border-color: #123c60; color: #fff; box-shadow: 0 4px 10px rgba(11,43,69,0.25); transform: translateY(-0.5px); }
.btn.s { height: 28px; padding: 0 10px; font-size: 12px; } .btn.d { color: var(--rose); } .btn.w { width: 100%; } .btn.large { height: 42px; padding: 0 22px; font-size: 14px; } .btn[disabled] { opacity: .5; cursor: progress; }
.btn.ai::after { content: "≈ 1 credit"; font-size: 10px; opacity: .75; margin-left: 2px; font-weight: 400; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); overflow-x: auto; flex: 0 0 auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 12px; color: var(--muted); cursor: pointer; font-weight: 500; font-size: 12.5px; white-space: nowrap; margin-bottom: -1px; } .tabs button.on { color: var(--ink); border-bottom-color: var(--primary); font-weight: 600; }
.pane { display: none; gap: 10px; flex-direction: column; padding-top: 10px; min-height: 0; } .pane.on { display: flex; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; } th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: var(--soft); padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); } td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; } tr:last-child td { border-bottom: 0; } td input, td select { padding: 5px 8px; }
.status { font-size: 12px; color: var(--muted); min-height: 1.4em; margin: 0; } .status.err { color: var(--rose); } .status.ok { color: #0e8f57; }
.drop { border: 1.5px dashed var(--line-2); border-radius: 10px; padding: 14px; text-align: center; color: var(--muted); cursor: pointer; background: var(--canvas); } .drop.over { border-color: var(--primary); background: var(--primary-light); } .drop input { display: none; }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; } .thumbs .t { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: var(--canvas); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); } .thumbs .t img { width: 100%; height: 100%; object-fit: cover; } .thumbs .t.on { border-color: var(--primary); } .thumbs .t .x { position: absolute; top: 0; right: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 0 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; } .chip { font-size: 12px; padding: 2px 9px; border-radius: 12px; background: var(--canvas); } .chip.warn { background: var(--yellow-light); color: #c06a00; }
.alts button { font-family: var(--ur); font-size: 15px; line-height: 1.9; text-align: right; direction: rtl; padding: 5px 10px; background: var(--canvas); border: 1px dashed var(--line-2); border-radius: 8px; cursor: pointer; width: 100%; }
.metric { background: var(--canvas); border-radius: 10px; padding: 10px 12px; } .metric .l { font-size: 11px; color: var(--muted); } .metric .v { font-size: 20px; font-weight: 700; color: var(--ink); }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; } .bar div { height: 100%; background: var(--primary); border-radius: 3px; }
pre.out { white-space: pre-wrap; background: var(--canvas); border-radius: 8px; padding: 10px; font-family: var(--ur); font-size: 15px; line-height: 1.9; direction: rtl; margin: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; } .kv b { font-weight: 500; color: var(--muted); }
.statusgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; } .stcard { border-radius: 10px; padding: 8px 10px; font-size: 12px; display: flex; flex-direction: column; gap: 2px; background: var(--canvas); border-left: 3px solid var(--line-2); } .stcard b { font-weight: 600; text-transform: capitalize; color: var(--ink); } .stcard span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .stcard i { font-style: normal; color: var(--muted); font-size: 11px; } .stcard.ok { border-left-color: var(--green); } .stcard.bad { border-left-color: var(--rose); } .stcard.skip { opacity: .65; }

/* ---------- stories ---------- */
.story-list .item { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; } .story-list .item:last-child { border-bottom: 0; } .story-list .item:hover { background: var(--canvas); } .story-list .item .t { font-family: var(--ur); font-size: 15px; direction: rtl; text-align: right; line-height: 1.8; color: var(--ink); }
.kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; } .kanban .col { background: transparent; } .kanban .col h3 { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 4px 6px 8px; } .kanban .kcard { background: #fff; border-radius: 3px; border: 1px solid var(--line); padding: 10px 12px; margin-bottom: 8px; cursor: pointer; } .kanban .kcard .t { font-family: var(--ur); font-size: 14px; direction: rtl; text-align: right; line-height: 1.8; }
.vault { max-height: 200px; overflow: auto; }

/* ---------- editor: two independently scrolling columns, one screen ---------- */
.editor { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 12px; align-items: start; height: calc(100vh - var(--header) - 36px - 44px); min-height: 0; }
.editor > * { height: 100%; overflow: auto; min-height: 0; }
#left { display: flex; flex-direction: column; gap: 10px; padding-right: 2px; }
#right.card { display: flex; flex-direction: column; }
#right .pane.on { flex: 1; overflow: auto; }
.preview-wrap { background: var(--canvas); border-radius: 10px; padding: 10px; display: flex; justify-content: center; } #poster { width: 100%; max-width: 420px; max-height: 58vh; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 30px rgba(5,40,72,.22); touch-action: none; cursor: grab; }
.editor .card { box-shadow: none; border: 1px solid var(--line); }
.login { max-width: 400px; margin: 10vh auto; }
#toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 6px; } #toast div { background: var(--ink); color: #fff; padding: 9px 14px; border-radius: 10px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.2); } #toast div.err { background: var(--rose); }

/* ---------- landing ---------- */
.landing { min-height: 100vh; background: #fff; }
.lwrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.ltop { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; } .lbrand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; color: var(--ink); } .lbrand img { height: 34px; }
.lhero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 36px 0 30px; }
.eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); font-weight: 600; margin: 0 0 10px; }
.lhero h1 { font-size: clamp(32px, 4.4vw, 50px); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 14px; }
.lead { font-size: 16px; color: var(--muted); max-width: 54ch; margin: 0 0 20px; }
.lmock { background: var(--canvas); border-radius: 16px; padding: 14px; box-shadow: 0 30px 60px rgba(20,20,20,.08); }
.lmock .mrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; } .lmock .mstat { background: #fff; border-radius: 10px; padding: 10px; display: flex; gap: 8px; align-items: center; } .lmock .mstat .sq { width: 32px; height: 32px; border-radius: 8px; background: var(--primary-light); } .lmock .mstat .v { font-weight: 700; font-size: 15px; color: var(--ink); } .lmock .mstat .l { font-size: 10px; color: var(--muted); }
.lmock .mposter { display: grid; grid-template-columns: 150px 1fr; gap: 10px; background: #fff; border-radius: 10px; padding: 10px; } .lposter { width: 150px; aspect-ratio: 4/5; background: linear-gradient(#052848 60%, #0f314d); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 6px; } .lframe { flex: 0 0 45%; border: 2px solid #fff; border-radius: 6px; background: #12395e; } .lhead { color: #fff; font-family: var(--ur); font-size: 9px; text-align: center; direction: rtl; margin: auto 0 0; line-height: 1.8 } .lhead span { color: var(--poster-yellow); }
.lmock .mlines { display: flex; flex-direction: column; gap: 6px; } .lmock .mlines div { height: 10px; border-radius: 5px; background: var(--canvas); } .lmock .mlines div:nth-child(1) { width: 70%; background: var(--primary-light); } .lmock .mlines div:nth-child(3) { width: 85%; } .lmock .mlines div:nth-child(5) { width: 55%; }
.lgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; padding: 10px 0 30px; }
.lfeat { background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 16px; } .lfeat .sq { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; } .lfeat .sq img { width: 20px; } .lfeat h3 { margin: 0 0 4px; } .lfeat p { margin: 0; font-size: 12.5px; color: var(--muted); }
.lfoot { text-align: center; color: var(--muted); font-size: 12px; padding: 20px 0 30px; border-top: 1px solid var(--line); }

/* ---------- dark ---------- */
html.dark { --canvas: #0f1216; --card: #171b21; --ink: #f1f3f6; --text: #d7dce3; --muted: #8f9bab; --line: #232a33; --line-2: #2e3742; --primary-light: #2a2150; --green-light: #103526; --orange-light: #3d1d12; --yellow-light: #3a2e0a; --blue-light: #0f2b44; --rose-light: #3d0f24; --shadow: 0 2px 10px rgba(0,0,0,.35); }
html.dark input[type=text], html.dark input[type=password], html.dark input[type=number], html.dark input[type=url], html.dark input[type=date], html.dark input[type=datetime-local], html.dark textarea, html.dark select, html.dark .btn { background: #11151a; color: var(--text); } html.dark .btn.p { background: var(--primary); color: #fff; } html.dark .tabs button.on { background: #232a33; } html.dark .landing { background: var(--card); } html.dark .lmock .mstat, html.dark .lmock .mposter { background: var(--card); } html.dark .kanban .kcard { background: var(--card); }

/* ---------- mobile ---------- */
.mobilebar { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .rail { display: none; }
  .mainwrap { height: auto; }
  .header { position: sticky; top: 0; z-index: 20; padding: 0 14px; } .who .n, .who .c { display: none; } .meter .bar { display: none; }
  .main { padding: 12px 12px 76px; overflow: visible; }
  .editor { grid-template-columns: 1fr; height: auto; } .editor > * { height: auto; overflow: visible; } #right .pane.on { overflow: visible; } #poster { max-height: 52vh; }
  .mobilebar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); justify-content: space-around; } .mobilebar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--muted); } .mobilebar a img { width: 20px; opacity: .8; } .mobilebar a.on { color: var(--primary); } .mobilebar a.on img { opacity: 1; }
  .lhero { grid-template-columns: 1fr; padding: 20px 0; } .lmock { transform: none; }
}

#adminTabs { display: flex; flex-direction: column; } #adminTabs .pane.on { flex: 1; overflow: auto; }

.topbar select, .topbar input[type=text] { width: auto; min-width: 160px; }
html.dark .rail .brand img, html.dark .lbrand img { filter: invert(1) hue-rotate(180deg); }
.rail .brand img { width: auto; height: 34px; opacity: 1; }
@media (max-width: 900px) { .meter { display: none; } .header { height: 56px; } }

/* ---------- guided pipeline ---------- */
.flow { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 12px; height: calc(100vh - var(--header) - 36px); min-height: 0; }
.flowrail { background: var(--card); border-radius: var(--r); border: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.flowmeta { display: flex; flex-direction: column; gap: 6px; } .ftitle { font-size: 16px !important; line-height: 1.7 !important; padding: 6px 10px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.steps li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--muted); }
.steps li b { display: block; color: var(--ink); font-weight: 600; font-size: 13px; } .steps li small { font-size: 11.5px; }
.steps li .n { width: 24px; height: 24px; border-radius: 50%; background: var(--canvas); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: 0 0 auto; }
.steps li.on { background: var(--soft); } .steps li.on .n { background: var(--primary); color: #fff; } .steps li.done .n { background: var(--green-light); color: var(--green); }
.nexthint { font-size: 12px; color: var(--muted); background: var(--canvas); border-radius: 8px; padding: 8px 10px; margin-top: auto; }
.flowpanel { background: var(--card); border-radius: var(--r); border: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.flowhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex: 0 0 auto; } .flowhead h2 { margin: 0; } .flowhead p { margin: 0; }
.flowbody { flex: 1; overflow: auto; padding: 14px 16px; min-height: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; } .two > .card { box-shadow: none; border: 1px solid var(--line); }
.outpick { display: flex; flex-direction: column; gap: 6px; } .opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; } .opt.on { border-color: var(--primary); background: var(--primary-light); } .opt b { display: block; font-size: 13px; } .opt small { color: var(--muted); font-size: 11.5px; } .opt .cost { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; } .opt input { accent-color: var(--primary); }
.chips label.chip { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
h4 { margin: 6px 0 4px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.flowbody .preview-wrap { padding: 8px; } .flowbody #poster { max-width: 360px; max-height: 52vh; }
@media (max-width: 1000px) { .two { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; height: auto; } .flowrail { flex-direction: row; flex-wrap: wrap; align-items: center; overflow: visible; } .flowmeta { flex: 1 1 100%; } .steps { flex-direction: row; flex: 1 1 100%; overflow-x: auto; } .steps li { flex: 0 0 auto; padding: 6px 8px; } .steps li small { display: none; } .nexthint { flex: 1 1 100%; margin: 0; } .flowrail > a { display: none; }
  .flowpanel { min-height: 60vh; } .flowhead { flex-wrap: wrap; } .flowbody { overflow: visible; }
}

/* brands + image search */
.brandpick { margin-bottom: 12px; padding: 10px 12px; }
.brands { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 2px; }
.brands .brand { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 118px; padding: 8px 6px; border: 1.5px solid var(--line-2); border-radius: 3px; background: #fff; cursor: pointer; font: inherit; }
.brands .brand .swatch { width: 100%; height: 44px; border-radius: 8px; background: var(--bbg); display: flex; align-items: center; justify-content: center; color: #fff; } .brand .swatch img { max-height: 30px; max-width: 90%; } .brand .swatch b { font-size: 13px; letter-spacing: .06em; }
.brands .brand .bn { font-size: 11.5px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; } .brands .brand .bu { font-size: 12px; line-height: 1.4; color: var(--muted); }
.brands .brand.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.imgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; max-height: 260px; overflow: auto; } .imgrid figure { margin: 0; position: relative; cursor: pointer; border-radius: 8px; overflow: hidden; background: var(--canvas); aspect-ratio: 1; border: 2px solid transparent; } .imgrid img { width: 100%; height: 100%; object-fit: cover; } .imgrid figcaption { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px; color: #fff; background: rgba(0,0,0,.55); padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .imgrid figure.busy { opacity: .5; } .imgrid figure.added { border-color: var(--green); }
html.dark .brand { background: var(--card); }

/* reel preview */
.reelprev { width: 260px; margin: 0 auto; aspect-ratio: 1080/1920; background: #000; border-radius: 10px; overflow: hidden; display: grid; grid-template-rows: 475fr 970fr 475fr; box-shadow: var(--shadow); }
.reelprev canvas { width: 100%; height: 100%; display: block; }
#rband { position: relative; overflow: hidden; background: #111; } #rbandbg { position: absolute; inset: 0; filter: blur(12px) brightness(.7); } #rbandbg img, #rbandbg video { width: 100%; height: 100%; object-fit: cover; }
#rbandfg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; } #rbandfg img, #rbandfg video { width: 100%; height: 100%; object-fit: contain; } #rbandfg.fill img, #rbandfg.fill video { object-fit: cover; }
#rwmprev { position: absolute; max-width: 50%; } .wm.br { right: 4%; bottom: 3%; } .wm.bl { left: 4%; bottom: 3%; } .wm.tr { right: 4%; top: 3%; } .wm.tl { left: 4%; top: 3%; } .wm.bc { left: 50%; bottom: 3%; transform: translateX(-50%); } .wm.c { left: 50%; top: 50%; transform: translate(-50%, -50%); }

/* intake tabs + natures */
.tabs.intake { margin-bottom: 8px; } .ipane { display: none; flex-direction: column; gap: 8px; } .ipane.on { display: flex; }
.natures { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 0; } .nat { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 5px 12px; border: 1.5px solid var(--line-2); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; min-width: 84px; } .nat b { font-size: 12px; color: var(--ink); } .nat .ur { font-size: 12px; line-height: 1.5; color: var(--muted); } .nat.on { border-color: var(--nacc); box-shadow: inset 0 3px 0 var(--nacc); } html.dark .nat { background: var(--card); }

/* landing v2 */
.lnav { display: flex; align-items: center; gap: 18px; font-size: 13.5px; } .lnav a { color: var(--muted); font-weight: 500; } .lnav a.btn { color: #fff; }
.lstats { display: flex; gap: 22px; margin-top: 26px; flex-wrap: wrap; } .lstats div { display: flex; flex-direction: column; } .lstats b { font-size: 24px; color: var(--primary); letter-spacing: -.02em; } .lstats span { font-size: 12px; color: var(--muted); }
.lsteps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 26px 0 6px; } .lstep { background: var(--card); border: 1px solid var(--line); border-radius: 3px; padding: 14px; } .lstep .num { font-size: 11px; font-weight: 700; color: var(--primary); letter-spacing: .1em; } .lstep h3 { margin: 6px 0 4px; } .lstep p { margin: 0; font-size: 12.5px; color: var(--muted); }
.clock { margin-left: 14px; font-size: 12px; color: var(--muted); padding-left: 14px; border-left: 1px solid var(--line); }
@media (max-width: 900px) { .lsteps { grid-template-columns: 1fr 1fr; } .lnav a:not(.btn) { display: none; } .clock { display: none; } }
@media (max-width: 560px) { .lsteps { grid-template-columns: 1fr; } }

/* desk table */
table.desk td.hl { font-size: 15px; line-height: 1.7; direction: rtl; text-align: right; max-width: 380px; } table.desk tr[data-id] { cursor: pointer; } table.desk tr[data-id]:hover td { background: var(--canvas); }
/* landing hero cards */
.lcards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-items: end; }
.lc { aspect-ratio: 4/5; border-radius: 10px; padding: 10px; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 20px 40px rgba(20,20,20,.15); } .lc img { height: 22px; width: auto; object-fit: contain; align-self: center; }
.lc .fr { flex: 0 0 42%; border: 2px solid #fff; border-radius: 8px; background: rgba(255,255,255,.12); } .lc p { margin: auto 0 0; text-align: center; color: #fff; font-size: 10px; line-height: 1.8; } .lc i { font-style: normal; }
.lc-abn { background: radial-gradient(circle at 30% 20%, #b0121b, #5a0509); transform: translateY(14px) rotate(-3deg); } .lc-abn .strap { color: #fff; font-family: var(--ur); font-size: 12px; text-align: center; text-shadow: 0 2px 3px rgba(0,0,0,.6); } .lc-abn i { color: #ffe737; }
.lc-ausaf { background: linear-gradient(#052848 60%, #0f314d); z-index: 1; transform: scale(1.06); } .lc-ausaf i { color: #ffec08; }
.lc-life { background: linear-gradient(#333, #000); transform: translateY(14px) rotate(3deg); } .lc-life img { align-self: flex-end; } .lc-life .en { font-family: var(--ui); font-weight: 800; font-size: 11px; line-height: 1.3; } .lc-life i { color: #8dc06b; } .lc-life .url { font-size: 8px; color: #8dc06b; text-align: center; font-weight: 700; letter-spacing: .08em; }
@media (max-width: 900px) { .lcards { max-width: 420px; margin: 0 auto; } }

/* editorial landing (v2) */
.landing { background: var(--canvas); }
.lgroup { display: flex; align-items: baseline; gap: 12px; } .lgroup b { font-size: 15px; font-weight: 700; letter-spacing: .01em; color: var(--ink); } .lgroup span { font-size: 12px; color: var(--muted); border-left: 1px solid var(--line-2); padding-left: 12px; }
.lhero { padding: 44px 0 26px; } .lhero h1 { font-weight: 700; color: var(--ink); letter-spacing: -.02em; } .lead { color: var(--text2); }
.lstats b { color: var(--ink); font-size: 22px; } .lstats { border-top: 1px solid var(--line); padding-top: 18px; gap: 34px; }
.lcards { align-items: end; } .lc { border-radius: 3px; box-shadow: none; border: 1px solid rgba(0,0,0,.15); } .lc-abn { transform: translateY(12px); } .lc-life { transform: translateY(12px); } .lc-ausaf { transform: scale(1.04); }
.lsec { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 26px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.lnet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .lbrandcard { background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 14px; } .lbrandcard .lg { height: 64px; border-radius: 3px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; } .lbrandcard .lg img { max-height: 30px; max-width: 70%; } .lbrandcard .badge { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; } .lbrandcard h3 { margin: 4px 0; } .lbrandcard p { margin: 0; font-size: 12.5px; color: var(--text2); }
.leditions { display: flex; flex-wrap: wrap; gap: 6px; } .leditions span { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text2); background: #fff; border: 1px solid var(--line); padding: 5px 10px; border-radius: 3px; } .leditions i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.lfoot { border-top: 1px solid var(--line); margin-top: 26px; padding: 18px 0 30px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); text-align: left; }
.login.card { border: 1px solid var(--line); } .login h1 { font-size: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 12px 14px; } .kpi .l { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; } .kpi .v { font-size: 24px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; margin: 2px 0; } .kpi .d { font-size: 12px; color: var(--text2); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 3px; overflow: hidden; } .seg button { height: 34px; padding: 0 13px; border: 0; background: #fff; color: var(--text2); font: inherit; font-size: 13px; cursor: pointer; } .seg button.on { background: var(--primary); color: #fff; }
@media (max-width: 900px) { .lnet { grid-template-columns: 1fr; } .lgroup span { display: none; } }
.rail a img, .mobilebar a img, .stat .sq img, .lfeat .sq img { filter: grayscale(1) brightness(.35); opacity: .75; }
.rail a.on img, .mobilebar a.on img { filter: grayscale(1) brightness(.15); opacity: 1; }

/* ---- v2: sidebar text, header, story editor 3-col, sticky preview & floating overlay, admin sub-nav ---- */
.rail { padding: 14px 12px; } .rail .brand { flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px 16px; } .rail .brand .org { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.2; } .rail .brand .prod { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.rail a { padding: 9px 12px; border-radius: var(--r-sm); color: var(--text2); font-size: 13.5px; transition: all .15s ease; } .rail a.on { background: var(--soft); color: var(--primary); font-weight: 600; }
.header { padding: 0 20px; background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); } .crumbs b { font-size: 14px; } .clock { border: 0; padding-left: 10px; margin-left: 4px; }
.spend { font-size: 12.5px; color: var(--text2); } .spend b { color: var(--ink); } .spend.warn b { color: var(--orange); } .spend.bad b { color: var(--rose); }
.who .av { width: 32px; height: 32px; font-size: 12px; border-radius: var(--r-sm); } .who .c { text-transform: capitalize; }
.kpistrip { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 14px; box-shadow: 0 1px 3px rgba(15,23,42,0.04); overflow: hidden; } .kpistrip > div { padding: 12px 15px; border-right: 1px solid var(--soft); transition: background .15s ease; } .kpistrip > div:hover { background: var(--soft); } .kpistrip > div:last-child { border-right: 0; } .kpistrip .l { font-size: 12px; color: var(--muted); font-weight: 500; } .kpistrip .v { font-size: 20px; font-weight: 700; color: var(--ink); margin-top: 2px; } .kpistrip .v small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }
table.desk { border-radius: var(--r); overflow: hidden; } table.desk th { background: var(--soft); color: var(--text2); font-weight: 600; padding: 10px 12px; } table.desk td { padding: 11px 12px; vertical-align: middle; }
table.desk .hl { font-size: 15px; line-height: 1.65; direction: rtl; text-align: right; font-family: var(--ur); color: var(--ink); }
table.desk tr[data-id]:hover td { background: var(--canvas); }

/* story editor */
.story { display: flex; flex-direction: column; gap: 14px; } .shead { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; } .smeta { font-size: 12px; color: var(--muted); } .stitle { font-size: 18px !important; font-weight: 700; border: 0 !important; background: transparent !important; padding: 2px 0 !important; width: 100%; min-width: 320px; line-height: 1.8 !important; } .stitle:focus { box-shadow: none !important; border-bottom: 1px solid var(--line-2) !important; } #sactions { margin-left: auto; }
.scols { display: grid; grid-template-columns: minmax(280px, 0.9fr) minmax(330px, 1.25fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.scol { background: #fff; border: 1px solid var(--line); border-radius: var(--r); min-width: 0; box-shadow: 0 1px 3px rgba(15,23,42,0.04); }
.scol-h { padding: 11px 15px; border-bottom: 1px solid var(--soft); font-size: 12.5px; font-weight: 700; color: var(--text2); }
.scol-b { padding: 14px; display: flex; flex-direction: column; gap: 10px; }

/* Step headers */
.step-head { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-bottom: 1px solid var(--soft); background: #fff; }
.step-badge { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 2px 6px rgba(11,43,69,0.2); }
.step-meta { display: flex; flex-direction: column; line-height: 1.15; }
.step-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.step-sub { font-size: 10px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }

/* Category Filter Bar */
.cat-filter { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; background: var(--canvas); border-bottom: 1px solid var(--line); }
.cat-btn { padding: 5px 12px; font-size: 11.5px; font-weight: 600; border-radius: 20px; border: 1px solid var(--line-2); background: #fff; color: var(--text2); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; transition: all .15s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.02); }
.cat-btn:hover { border-color: var(--primary); color: var(--primary); }
.cat-btn.on { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 6px rgba(11,43,69,0.18); }
html.dark .cat-btn { background: #1e293b; border-color: rgba(255,255,255,0.1); color: #cbd5e1; }
html.dark .cat-btn.on { background: #0284c7; color: #fff; border-color: #0284c7; }

/* Modtabs Tool Bar */
.modtabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; background: #fff; border-bottom: 1px solid var(--soft); }
.modtabs button { padding: 6px 11px; background: var(--canvas); border: 1px solid var(--line-2); border-radius: 6px; color: var(--text2); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: all .15s ease; flex-shrink: 0; box-shadow: 0 1px 2px rgba(0,0,0,0.02); }
.modtabs button .m-ic { font-size: 13px; flex-shrink: 0; }
.modtabs button:hover { border-color: var(--primary); color: var(--ink); }
.modtabs button.on { background: #0b2b45; color: #fff; border-color: #0b2b45; font-weight: 700; box-shadow: 0 2px 6px rgba(11,43,69,0.2); }
html.dark .modtabs { background: var(--card); border-bottom-color: rgba(255,255,255,0.08); }
html.dark .modtabs button { background: #1e293b; border-color: rgba(255,255,255,0.1); color: #cbd5e1; }
html.dark .modtabs button.on { background: #0284c7; color: #fff; border-color: #0284c7; }

/* Sub toggle bar (inside modules) */
.sub-toggle-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)); gap: 6px; border: 1px solid var(--line-2); border-radius: 8px; padding: 5px; background: var(--canvas); margin-bottom: 12px; }
.sub-toggle-btn { padding: 7px 8px; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--text2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,0.03); transition: all .15s ease; min-width: 0; }
.sub-toggle-btn .st-ic { font-size: 12px; flex-shrink: 0; }
.sub-toggle-btn:hover { border-color: var(--primary); color: var(--ink); transform: translateY(-1px); }
.sub-toggle-btn.on { background: #0b2b45; color: #fff; border-color: #0b2b45; font-weight: 700; box-shadow: 0 2px 6px rgba(11,43,69,0.2); }
html.dark .sub-toggle-bar { background: #0f172a; border-color: rgba(255,255,255,0.08); }
html.dark .sub-toggle-btn { background: #1e293b; border-color: rgba(255,255,255,0.1); color: #cbd5e1; }
html.dark .sub-toggle-btn.on { background: #0284c7; color: #fff; border-color: #0284c7; }
.sub-pane { display: none; flex-direction: column; gap: 10px; }
.sub-pane.on { display: flex; }

.s-chip { padding: 3px 9px; font-size: 11px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; color: var(--text2); cursor: pointer; transition: all .15s ease; }
.s-chip:hover { border-color: var(--primary); color: var(--primary); }
.s-chip.on { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }

.mhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 2px; }
.mhead h3 { margin: 0; font-size: 13.5px; font-weight: 700; }
.fbox .fl { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.fbx { width: 100%; padding: 8px 10px; background: #fafafa; border: 1px solid #ebebe8; border-radius: var(--r-sm); font-size: 13px; line-height: 1.5; color: var(--ink); transition: border-color .15s ease; }
.fbx:focus-within { border-color: var(--primary); }
textarea.fbx, input.fbx { font-family: inherit; }
.fbx.ur, textarea.fbx.ur, input.fbx.ur { font-family: var(--ur); font-size: 15px; line-height: 1.85; }
.fbx.warn { background: #fdf8ec; border-color: #eadfc4; color: #6b5620; }
.fbox + .fbox { margin-top: 2px; }
.gate { padding: 8px 10px; background: #fdf8ec; border: 1px solid #eadfc4; border-radius: var(--r-sm); font-size: 12px; line-height: 1.45; color: #6b5620; }
.empty { padding: 18px; background: #fafafa; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--text2); font-size: 12.5px; }
.empty p { margin: 6px 0 0; }
.ichip { padding: 6px 12px; background: #fff; color: var(--text2); border: 1px solid var(--line-2); border-radius: var(--r-sm); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: all .15s ease; }
.ichip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.sizetabs { display: inline-flex; gap: 2px; }
.sizetabs button { padding: 4px 9px; background: var(--soft); border: 0; border-radius: var(--r-sm); font: inherit; font-size: 11px; color: var(--text2); cursor: pointer; transition: all .15s ease; }
.sizetabs button.on { background: var(--primary); color: #fff; }

/* Sticky Preview Column: stays on eye as you scroll */
#preview.scol { position: sticky; top: 10px; max-height: calc(100vh - var(--header) - 26px); display: flex; flex-direction: column; overflow: hidden; z-index: 20; box-shadow: 0 4px 20px rgba(15,23,42,0.08); border-color: var(--slate-300, #cbd5e1); }
#preview .scol-h { flex: 0 0 auto; background: #fff; z-index: 5; border-bottom: 1px solid var(--line); }
#previewBody { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 12px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
#preview #posterCanvas .preview-wrap { position: sticky; top: 0; z-index: 10; background: #ffffff; padding: 4px 0 6px; border-bottom: 1px solid var(--soft); margin-bottom: 4px; box-shadow: 0 2px 6px rgba(0,0,0,0.02); }
#preview #poster { width: 100%; max-width: 100%; max-height: 38vh; height: auto; object-fit: contain; border-radius: var(--r-sm); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,0.08); background: #0f172a; transition: max-height 0.2s ease; }
#preview .preview-wrap + p { display: none; }
.rightsum .kv b { color: var(--muted); }

/* One-box toggle menu in Step 3 */
.onebox-menu { border: 1px solid var(--line); box-shadow: none; padding: 10px 12px; border-radius: var(--r-sm); background: #fff; }
html.dark .onebox-menu { background: var(--card); }
.onebox-menu .tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 6px; background: var(--canvas); border: 1px solid var(--line-2); border-radius: 8px; padding: 5px; margin-bottom: 12px; }
.onebox-menu .tabs button { padding: 7px 8px; font-size: 11.5px; font-weight: 600; border-radius: 6px; background: #fff; color: var(--text2); border: 1px solid var(--line-2); cursor: pointer; white-space: nowrap; text-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 5px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); transition: all .15s ease; min-width: 0; }
.onebox-menu .tabs button:hover { border-color: var(--primary); color: var(--ink); transform: translateY(-1px); }
.onebox-menu .tabs button.on { background: #0b2b45; color: #fff; border-color: #0b2b45; font-weight: 700; box-shadow: 0 2px 6px rgba(11,43,69,0.2); }
html.dark .onebox-menu .tabs { background: #0f172a; border-color: rgba(255,255,255,0.08); }
html.dark .onebox-menu .tabs button { background: #1e293b; border-color: rgba(255,255,255,0.1); color: #cbd5e1; }
html.dark .onebox-menu .tabs button.on { background: #0284c7; color: #fff; border-color: #0284c7; }
.onebox-menu .pane { display: none; flex-direction: column; gap: 8px; }
.onebox-menu .pane.on { display: flex; }


/* Quick Palette Chips */
.palette-bar { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 7px 9px; }
.palette-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.pchip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; font: inherit; font-size: 11px; font-weight: 600; color: var(--ink); cursor: pointer; transition: all .15s ease; }
.pchip:hover { border-color: var(--primary); transform: translateY(-1px); }
.pc-dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.25); flex-shrink: 0; }

/* Color pick items */
.color-pick-item { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 500; cursor: pointer; }
.color-pick-item input[type="color"] { width: 26px; height: 24px; border-radius: 4px; border: 1px solid var(--line-2); padding: 1px; cursor: pointer; background: transparent; }

/* Alt headlines chips */
.alts { display: flex; flex-wrap: wrap; gap: 4px; }
.alts button { background: var(--soft); border: 1px solid var(--line-2); border-radius: 4px; padding: 3px 7px; font-family: var(--ur); font-size: 12.5px; color: var(--ink); cursor: pointer; text-align: right; direction: rtl; transition: all .15s ease; }
.alts button:hover { border-color: var(--primary); background: #fff; }

/* Floating Live Preview Overlay Window (Always on eye when scrolling) */
.floating-preview-overlay { position: fixed; bottom: 24px; right: 24px; width: 320px; background: #ffffff; border: 1px solid #cbd5e1; border-radius: 12px; box-shadow: 0 20px 40px -4px rgba(11,43,69,0.24), 0 8px 16px -2px rgba(0,0,0,0.08); z-index: 9999; display: flex; flex-direction: column; overflow: hidden; transition: width 0.2s cubic-bezier(0.16,1,0.3,1), transform 0.2s cubic-bezier(0.16,1,0.3,1), opacity 0.2s ease; backdrop-filter: blur(10px); }
.floating-preview-overlay.size-s { width: 220px; }
.floating-preview-overlay.size-m { width: 320px; }
.floating-preview-overlay.size-l { width: 400px; }
.floating-preview-overlay.minimized { transform: scale(0.85) translateY(20px); opacity: 0; pointer-events: none; }
.fpo-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #0b2b45; color: #ffffff; cursor: grab; user-select: none; }
.fpo-bar:active { cursor: grabbing; }
.fpo-title { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; }
.fpo-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 2px rgba(16,185,129,0.3); animation: fpo-pulse 2s infinite; }
@keyframes fpo-pulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16,185,129,0.6); } 70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(16,185,129,0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
.fpo-actions { display: flex; align-items: center; gap: 4px; }
.fpo-btn { background: rgba(255,255,255,0.14); border: 0; color: #ffffff; font-size: 11px; font-weight: 600; width: 22px; height: 22px; border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background .15s ease; }
.fpo-btn:hover { background: rgba(255,255,255,0.28); }
.fpo-btn.fpo-close:hover { background: #ef4444; }
.fpo-content { padding: 10px; background: #f8fafc; display: flex; flex-direction: column; gap: 8px; }
.fpo-canvas-wrap { display: flex; align-items: center; justify-content: center; background: #0b1926; border-radius: 6px; overflow: hidden; padding: 4px; border: 1px solid #cbd5e1; max-height: 48vh; }
#fpoMirrorCanvas { max-width: 100%; max-height: 44vh; height: auto; object-fit: contain; display: block; border-radius: 4px; }
.fpo-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 2px; }
.fpo-badge { font-size: 11px; color: #64748b; font-weight: 500; }
.floating-preview-badge { position: fixed; bottom: 24px; right: 24px; z-index: 9998; background: #0b2b45; color: #ffffff; border: 1px solid rgba(255,255,255,0.2); border-radius: 20px; padding: 8px 14px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; box-shadow: 0 8px 24px rgba(11,43,69,0.25); transition: transform 0.15s ease, background 0.15s ease; }
.floating-preview-badge:hover { background: #123c60; transform: translateY(-2px); }
#floatToggleBtn.on { background: var(--primary); color: #fff; border-color: var(--primary); }

/* admin */
.adminwrap { background: transparent; } #adminTabs { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; align-items: start; height: calc(100vh - var(--header) - 96px); }
#adminTabs .tabs.subnav { flex-direction: column; border: 1px solid var(--line); background: #fff; border-radius: var(--r); padding: 6px; gap: 2px; overflow: visible; box-shadow: 0 1px 3px rgba(15,23,42,0.04); } #adminTabs .tabs.subnav button { text-align: left; border: 0; border-radius: var(--r-sm); padding: 8px 10px; color: var(--text2); transition: all .15s ease; } #adminTabs .tabs.subnav button.on { background: var(--soft); color: var(--primary); font-weight: 600; }
#adminTabs .pane { grid-column: 2; grid-row: 1; padding-top: 0; overflow: auto; max-height: 100%; }
.statuslist { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); border: 1px solid var(--soft); border-radius: var(--r); margin-top: 8px; overflow: hidden; } .strow { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-right: 1px solid var(--soft); border-bottom: 1px solid var(--soft); font-size: 12.5px; } .strow b { font-weight: 500; color: var(--ink); text-transform: capitalize; } .strow span { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; } .strow i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); } .strow.ok i { background: var(--green); } .strow.bad i { background: var(--rose); }

/* landing bands */
.lband { padding: 30px 0; border-top: 1px solid var(--line); background: #fff; } .lband.alt { background: var(--canvas); } .lband h2 { margin: 0 0 18px; font-size: 17px; }
.lstep { background: transparent; border: 0; border-top: 2px solid var(--primary); border-radius: 0; padding: 10px 0 0; } .lstep .num { color: var(--muted); }
.lfeat { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0 0 12px; }
.hpanel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); } .hpanel-h { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--soft); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; } .hpanel-h .ur { font-size: 13px; text-transform: none; letter-spacing: 0; }
.hcard { margin: 14px; background: linear-gradient(#0b2b45, #123c60); border-radius: var(--r); padding: 14px 16px; color: #fff; } .hcard-top { display: flex; justify-content: space-between; align-items: center; } .hcard-top img { height: 22px; } .hcard-top .ur { font-size: 12px; opacity: .85; } .hcard > p { margin: 12px 0; font-size: 17px; line-height: 2; text-align: right; } .hcard-foot { display: flex; justify-content: space-between; font-size: 11px; opacity: .8; }
.hstats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--soft); } .hstats div { padding: 10px 14px; border-right: 1px solid var(--soft); } .hstats div:last-child { border-right: 0; } .hstats b { display: block; font-size: 15px; color: var(--ink); } .hstats span { font-size: 11px; color: var(--muted); }

@media (max-width: 1100px) { .scols { grid-template-columns: 1fr 1fr; } #preview { position: static; max-height: none; } }
@media (max-width: 900px) { .scols { grid-template-columns: 1fr; } .kpistrip { grid-template-columns: 1fr 1fr; } #adminTabs { grid-template-columns: 1fr; height: auto; } #adminTabs .tabs.subnav { flex-direction: row; overflow-x: auto; } #adminTabs .pane { grid-column: 1; grid-row: auto; } .stitle { min-width: 0; } .hcard > p { font-size: 15px; } }

/* theme: dark sidebar variant */
html.sidebar-dark .rail { border-right-color: rgba(255,255,255,.08); } html.sidebar-dark .rail a { color: rgba(255,255,255,.72); } html.sidebar-dark .rail a.on { background: rgba(255,255,255,.12); color: #fff; } html.sidebar-dark .rail .brand .org { color: #fff; } html.sidebar-dark .rail .brand .prod { color: rgba(255,255,255,.6); } html.sidebar-dark .rail .divider { background: rgba(255,255,255,.1); }
/* grouped design panels + reel groups */
details.pg { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 10px 10px; } details.pg > summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--text2); padding: 9px 0; list-style: none; } details.pg > summary::after { content: "+"; float: right; color: var(--muted); } details.pg[open] > summary::after { content: "–"; } details.pg > * + * { margin-top: 8px; }
.rgroup { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; } .rgh { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--text2); }
#reelPreview .reelprev { width: 100%; max-width: 300px; }
