/* REVINNERS portal – "cockpit" look: black ground, one warm gold accent, thin lines, dense panels.
   Dark is the default; [data-theme="light"] switches. All colours are tokens; text contrast >= 4.5:1. */
:root {
  --bg: #0a0a09; --side: #0d0d0b; --panel: #121210; --panel-2: #1a1915; --panel-3: #25221b;
  --ink: #f3efe6; --muted: #a59d8b; --line: #27241c; --line-2: #3b3525;
  --accent: #e3a72f; --fill-hi: #f7cf6b; --fill-lo: #cf9220; --accent-ink: #171002;
  --accent-soft: rgba(227, 167, 47, .12); --accent-line: rgba(227, 167, 47, .38);
  --ok: #4cc38a; --warn: #e3a72f; --bad: #ff7b6b; --info: #7aa7ff;
  --c-instagram: #ff77b7; --c-facebook: #6ea6ff; --c-google_profile: #5fd38a; --c-youtube: #ff6b6b; --c-tiktok: #6fe0e6;
  --c-pinterest: #ff8585; --c-linkedin: #7ab8ff; --c-newsletter: #b79bff; --c-blog: #4fd1c5;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f2ea; --side: #fffdf8; --panel: #fffdf8; --panel-2: #f3eee2; --panel-3: #e6dfce;
  --ink: #1b1812; --muted: #665e4b; --line: #e2dbc9; --line-2: #cfc5ab;
  --accent: #855900; --fill-hi: #f2c155; --fill-lo: #d99a1f; --accent-ink: #1a1203;
  --accent-soft: rgba(168, 116, 8, .10); --accent-line: rgba(133, 89, 0, .35);
  --ok: #0f7a57; --warn: #855900; --bad: #b3261e; --info: #1d4fbf;
  --c-instagram: #b8206f; --c-facebook: #1257c9; --c-google_profile: #137a3e; --c-youtube: #b3241f; --c-tiktok: #0d7c82;
  --c-pinterest: #b3241f; --c-linkedin: #1257c9; --c-newsletter: #6a3fd1; --c-blog: #0d7a70;
  --shadow: 0 6px 18px rgba(60, 45, 10, .08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif; }
a { color: var(--accent); }
h1 { font-size: 1.45rem; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0; }
h2.section { margin: 26px 0 10px; font-size: .8rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
small { font-size: .82rem; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); } .ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); } .info { color: var(--info); }
.ico { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ico.flip { transform: scaleX(-1); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---- frame: sidebar + main ------------------------------------------------------------------ */
.side { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 10px; align-items: center;
  grid-template-areas: "shop shop foot" "switch switch switch" "nav nav nav"; padding: 10px 12px 8px; background: var(--side); border-bottom: 1px solid var(--line); }
.side > .brand { display: none; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font-weight: 900; font-size: 1.15rem; color: var(--accent-ink);
  background: linear-gradient(160deg, var(--fill-hi), var(--fill-lo)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.brand-text strong { display: block; letter-spacing: .12em; font-size: .95rem; line-height: 1.1; }
.brand-text small { display: block; letter-spacing: .22em; text-transform: uppercase; font-size: .62rem; color: var(--accent); }
.shop { grid-area: shop; display: flex; align-items: center; gap: 10px; min-width: 0; }
.shop-logo { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 10px; object-fit: contain; background: #fff; padding: 4px; border: 1px solid var(--line-2); }
.shop-logo.mono { display: grid; place-items: center; padding: 0; font-weight: 800; font-size: .95rem; letter-spacing: .02em; --shop: var(--accent);
  color: var(--shop); background: color-mix(in srgb, var(--shop) 16%, var(--panel-2)); border-color: color-mix(in srgb, var(--shop) 45%, transparent); }
.shop-logo.small { width: 32px; height: 32px; border-radius: 8px; font-size: .78rem; }
img.shop-logo.wide { width: 104px; height: 40px; padding: 5px 8px; }  /* real logos are mostly wide word marks */
img.shop-logo.small.wide { width: 84px; height: 32px; padding: 4px 6px; }
.shop-text { min-width: 0; line-height: 1.2; }
.shop-text small { display: block; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.shop-text small::before { content: "REVINNERS "; }
.shop-text strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.switch { grid-area: switch; margin: 0; }
.switch select { padding: 8px 10px; font-size: .92rem; }
.side nav { grid-area: nav; display: flex; gap: 4px; overflow-x: auto; margin: 0 -12px; padding: 0 12px 2px; scrollbar-width: none; }
.side nav a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; white-space: nowrap; font-weight: 600; font-size: .92rem; }
.side nav a:hover { color: var(--ink); background: var(--panel-2); }
@media (max-width: 479px) { .side nav a { padding: 8px 10px; } .side nav a .ico { display: none; } }
.side nav a[aria-current="page"] { color: var(--accent-ink); background: linear-gradient(160deg, var(--fill-hi), var(--fill-lo)); }
.pill { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; font-size: .7rem; line-height: 20px; text-align: center; font-weight: 800;
  color: var(--accent-ink); background: var(--fill-hi); }
.side nav a[aria-current="page"] .pill { background: var(--accent-ink); color: var(--fill-hi); }
.side-foot { grid-area: foot; display: flex; align-items: center; gap: 6px; }
.side-foot form { margin: 0; }
.side-foot .who { display: none; }
main { padding: 16px 14px 96px; min-width: 0; }
body.guest main { max-width: 440px; margin: 0 auto; padding-top: 9vh; }
.guest-brand { justify-content: center; margin-bottom: 22px; }

/* ---- page head, chips, buttons ---------------------------------------------------------------- */
.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; }
.sub { margin: 4px 0 0; color: var(--muted); font-size: .95rem; max-width: 70ch; } .sub strong { color: var(--ink); }
.pagehead-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--muted); font-size: .86rem; background: var(--panel); }
.chip.month { color: var(--ink); font-weight: 700; min-width: 150px; justify-content: center; }
.chip .ico { color: var(--accent); }
button { font: inherit; cursor: pointer; }
.btn, button.primary, button.secondary, button.danger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 8px;
  border: 1px solid transparent; font-weight: 700; font-size: .92rem; text-decoration: none; }
.btn.primary, button.primary { color: var(--accent-ink); background: linear-gradient(180deg, var(--fill-hi), var(--fill-lo)); border-color: var(--fill-lo); }
.btn.primary:hover, button.primary:hover { filter: brightness(1.06); }
button.primary { width: 100%; margin-top: 18px; padding: 13px 16px; }
button.primary.big { font-size: 1.1rem; padding: 16px; margin-top: 0; }
.btn.ghost, button.secondary { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.btn.ghost { padding: 6px 10px; font-size: .82rem; } .btn.ghost .ico { width: 14px; height: 14px; }
button.danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
button.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; }
button.icon, .cal-nav { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); text-decoration: none; }
button.icon:hover, .cal-nav:hover { color: var(--accent); border-color: var(--accent-line); }
form.below { margin-top: 14px; text-align: center; }
p.hint.below { margin: 16px 0 0; font-size: .84rem; line-height: 1.45; }

/* ---- panels, KPI tiles ------------------------------------------------------------------------ */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 0; }
.panel.pad { padding: 18px; } .panel.narrow { max-width: 440px; margin: 0 auto; padding: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.panel-head a, .panel-head .muted { font-size: .8rem; text-decoration: none; }
.count { min-width: 24px; padding: 0 8px; border-radius: 6px; font-size: .78rem; line-height: 22px; font-weight: 800; text-align: center; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.empty { margin: 0; padding: 22px 16px; text-align: center; color: var(--muted); font-size: .92rem; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.kpi-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 10px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.kpi-icon .ico { width: 22px; height: 22px; }
.kpi-body { display: grid; min-width: 0; }
.kpi-body small { font-size: .74rem; line-height: 1.25; }
.kpi-body strong { font-size: 1.6rem; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi-body em { font-style: normal; font-size: .74rem; color: var(--muted); }
.kpi.tone-warn { border-color: var(--accent-line); } .kpi.tone-warn em { color: var(--warn); } .kpi.tone-ok em { color: var(--ok); }
.board { display: grid; gap: 14px; margin-top: 14px; }
.stack { display: grid; gap: 14px; align-content: start; min-width: 0; }

/* ---- content rows -------------------------------------------------------------------------------- */
.rows, .mini, .ideas, .donut-legend { list-style: none; margin: 0; padding: 0; }
.rows li + li, .mini li + li { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 16px; grid-template-areas: "thumb main go" "thumb badges go" "thumb status go"; gap: 5px 12px; align-items: center;
  padding: 11px 16px; color: inherit; text-decoration: none; }
.row:hover { background: var(--panel-2); } .row:hover .go { color: var(--accent); }
.thumb { grid-area: thumb; width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--panel-2); border: 1px solid var(--line-2); align-self: start; }
.thumb.placeholder { display: grid; place-items: center; color: var(--accent); }
.row-main { grid-area: main; display: grid; min-width: 0; }
.row-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.row .badges { grid-area: badges; } .row .status { grid-area: status; justify-self: start; } .row .go { grid-area: go; color: var(--line-2); width: 16px; height: 16px; }
.shop-tag { color: var(--accent); font-weight: 700; }
.mini li { display: grid; gap: 3px; padding: 11px 16px; } .mini-text { font-size: .92rem; } .mini .status { justify-self: start; }

/* ---- badges + status chips ----------------------------------------------------------------------- */
.badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: .68rem; font-weight: 800; letter-spacing: .03em; line-height: 1.65; --pc: var(--muted);
  color: var(--pc); background: color-mix(in srgb, var(--pc) 13%, transparent); border: 1px solid color-mix(in srgb, var(--pc) 42%, transparent); }
.p-instagram, .c-instagram { --pc: var(--c-instagram); } .p-facebook, .c-facebook { --pc: var(--c-facebook); } .p-google_profile, .c-google_profile { --pc: var(--c-google_profile); }
.p-youtube, .c-youtube { --pc: var(--c-youtube); } .p-tiktok, .c-tiktok { --pc: var(--c-tiktok); } .p-pinterest, .c-pinterest { --pc: var(--c-pinterest); }
.p-linkedin, .c-linkedin { --pc: var(--c-linkedin); } .p-newsletter, .c-newsletter { --pc: var(--c-newsletter); } .p-blog, .c-blog { --pc: var(--c-blog); }
.badge.format { --pc: var(--muted); background: transparent; }
.badge.f-reel, .badge.f-short, .badge.f-story, .badge.f-carousel { --pc: var(--accent); background: var(--accent-soft); }
.badges.compact .badge { padding: 0 5px; font-size: .64rem; }
.badges.compact .badge.f-email, .badges.compact .badge.f-article, .badges.compact .badge.f-image { display: none; }
.status { display: inline-block; padding: 1px 8px; border-radius: 5px; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; line-height: 1.75; white-space: nowrap; --sc: var(--muted);
  color: var(--sc); background: color-mix(in srgb, var(--sc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--sc) 40%, transparent); }
.status-in_review, .idea-new { --sc: var(--warn); }
.status-approved, .status-scheduled, .status-publishing, .status-published, .idea-done { --sc: var(--ok); }
.status-change_requested, .status-revising, .idea-in_progress { --sc: var(--info); }
.status-rejected, .status-publish_failed, .status-stopped, .idea-declined { --sc: var(--bad); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: var(--pc, var(--muted)); }
.dot.s-in_review { background: var(--warn); } .dot.s-plain { background: var(--warn); opacity: .4; } .dot.s-approved { background: var(--ok); }
.dot.s-published { background: var(--ok); opacity: .5; } .dot.s-change_requested { background: var(--info); }
.legend { margin: 10px 16px 14px; color: var(--muted); font-size: .8rem; } .legend span { white-space: nowrap; margin-right: 14px; }

/* ---- charts ------------------------------------------------------------------------------------- */
.bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 5px; padding: 14px 16px 0; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .64rem; color: var(--muted); line-height: 1.2; }
.bar-value { height: 12px; font-weight: 800; color: var(--ink); }
.bar-track { display: flex; align-items: flex-end; width: 100%; max-width: 20px; height: 96px; border-radius: 5px; background: var(--panel-2); overflow: hidden; }
.bar-track i { display: block; width: 100%; min-height: 0; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, var(--fill-hi), var(--fill-lo)); opacity: .4; }
.bar.has-waiting .bar-track i { opacity: 1; }
.bar.today .bar-day, .bar.today .bar-date { color: var(--accent); font-weight: 800; }
.donut-wrap { display: flex; align-items: center; gap: 18px; padding: 14px 16px 16px; flex-wrap: wrap; }
.donut { width: 128px; height: 128px; flex: 0 0 auto; }
.donut circle { fill: none; stroke-width: 5.2; } .donut-ring { stroke: var(--panel-3); } .donut-seg { stroke: var(--pc, var(--muted)); }
.donut-total { font-size: 8px; font-weight: 800; text-anchor: middle; fill: var(--ink); }
.donut-label { font-size: 2.5px; text-anchor: middle; fill: var(--muted); letter-spacing: .3px; text-transform: uppercase; }
.donut-legend { flex: 1 1 140px; display: grid; gap: 6px; font-size: .86rem; }
.donut-legend li { display: flex; align-items: center; } .donut-legend b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* ---- tables (shops) -------------------------------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table thead { display: none; }
.table tr { display: grid; gap: 4px; padding: 12px 16px; border-top: 1px solid var(--line); } .table tbody tr:first-child { border-top: 0; }
.table td { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 0; }
.table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .78rem; }
.table td.act form { margin: 0; width: 100%; } .table td.act .btn { width: 100%; margin-top: 4px; }
.table b { font-variant-numeric: tabular-nums; }
.shop-cell { display: flex; align-items: center; gap: 10px; min-width: 0; } .shop-cell strong, .shop-cell small { display: block; }

/* ---- forms ----------------------------------------------------------------------------------------- */
label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: .92rem; }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=date], input[type=file], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: 8px; font: inherit; background: var(--panel-2); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[type=checkbox] { accent-color: var(--fill-lo); }
.field-error { color: var(--bad); margin: 4px 0 0; font-size: .88rem; }
fieldset { border: 1px solid var(--line-2); border-radius: 10px; margin: 16px 0 0; padding: 8px 14px 14px; } legend { font-weight: 600; font-size: .92rem; padding: 0 6px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; margin: 10px 0 0; } .check input { width: 19px; height: 19px; margin-top: 2px; flex: 0 0 auto; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 12px; } .grid-2 { display: grid; gap: 0 14px; }
.flash { margin: 0 0 14px; padding: 11px 14px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: .95rem; }
.flash.success { border-color: color-mix(in srgb, var(--ok) 60%, transparent); } .flash.error { border-color: color-mix(in srgb, var(--bad) 60%, transparent); }
.hint, .when, .back { color: var(--muted); font-size: .9rem; } .back a { text-decoration: none; }

/* ---- single item ------------------------------------------------------------------------------------- */
.item-head { margin-bottom: 4px; } .item-head h1 { margin-top: 8px; }
.changed { margin: 10px 0 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; font-size: .95rem; }
.preview { margin-top: 16px; }
.gallery { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.gallery video { flex: 0 0 auto; width: min(100%, 360px); border-radius: 10px; border: 1px solid var(--line-2); background: #000; }
.gallery img { flex: 0 0 auto; width: min(100%, 420px); border-radius: 10px; scroll-snap-align: start; border: 1px solid var(--line-2); }
.channels { display: grid; gap: 12px; margin-top: 14px; }
.channel h2 { margin: 0 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.caption { margin: 0; overflow-wrap: anywhere; } .hashtags { margin: 8px 0 0; color: var(--info); overflow-wrap: anywhere; } .alt { margin-top: 12px; font-size: .9rem; color: var(--muted); }
.mailhead { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 12px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.mailhead dt { color: var(--muted); } .mailhead dd { margin: 0; font-weight: 600; }
.newsletter iframe { width: 100%; height: 70vh; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; }
.article { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.article h1 { font-size: 1.5rem; } .article h2 { font-size: 1.2rem; margin: 18px 0 6px; } .article .teaser { font-size: 1.05rem; color: var(--muted); }
.article details { border-top: 1px solid var(--line); padding: 10px 0; } .article summary { font-weight: 700; cursor: pointer; }
.decide { position: sticky; bottom: 0; margin: 20px -14px 0; padding: 12px 14px; background: color-mix(in srgb, var(--bg) 92%, transparent); border-top: 1px solid var(--line-2); backdrop-filter: blur(6px); }
.decide form { margin: 0; } .change { margin-top: 8px; } .change summary { cursor: pointer; font-weight: 700; padding: 8px 0; color: var(--muted); }
.decide .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 0; } .decide .row:hover { background: none; }
.log { margin-top: 22px; } .log h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); } .log ul { padding-left: 18px; font-size: .92rem; } .log .comment { color: var(--muted); }

/* ---- calendar: agenda on phones, month grid from tablet width -------------------------------------------- */
.cal-head { flex-wrap: nowrap; }
.calendar { display: none; }
.agenda h2 { margin: 18px 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.agenda .rows { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.shops-legend { margin-bottom: 0; }

/* ---- ideas ------------------------------------------------------------------------------------------------ */
.ideas { display: grid; gap: 12px; }
.idea-meta { margin: 0 0 6px; color: var(--muted); font-size: .88rem; } .idea-text { margin: 0 0 8px; }
.idea-photos { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; } .idea-photos img { height: 92px; border-radius: 8px; border: 1px solid var(--line-2); }

/* ---- walk-through ---------------------------------------------------------------------------------------------- */
.progress { height: 4px; margin: 0 0 12px; border-radius: 999px; background: var(--panel-3); overflow: hidden; } .progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--fill-lo), var(--fill-hi)); }
.head-tools { display: flex; align-items: center; gap: 10px; } .btn.small { padding: 6px 12px; font-size: .8rem; }
form.later { margin: 10px 0 0; text-align: center; } form.later button { font-size: .92rem; padding: 6px; }

/* ---- agency tools, stop orders, numbers -------------------------------------------------------------------- */
.stopbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; color: var(--ink);
  background: color-mix(in srgb, var(--bad) 14%, var(--panel)); border: 1px solid color-mix(in srgb, var(--bad) 55%, transparent); }
.stopbar > .ico { color: var(--bad); width: 22px; height: 22px; } .stopbar span { flex: 1 1 260px; font-size: .95rem; }
.stopbar form { display: flex; align-items: center; gap: 10px; margin: 0; flex-wrap: wrap; } .stopbar .check { margin: 0; font-size: .9rem; }
.icon-link { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); }
.icon-link:hover, .icon-link.has-news { color: var(--accent); border-color: var(--accent-line); }
.icon-link b { position: absolute; top: -6px; right: -6px; min-width: 18px; padding: 0 4px; border-radius: 999px; font-size: .64rem; line-height: 18px; text-align: center; color: var(--accent-ink); background: var(--fill-hi); }
.stopbox { position: relative; } .stopbox > summary { list-style: none; cursor: pointer; } .stopbox > summary::-webkit-details-marker { display: none; }
.stopbox[open] > form { position: absolute; right: 0; z-index: 30; width: min(360px, 86vw); margin-top: 8px; }
.stopbox form button { width: 100%; margin-top: 12px; }
.btn.danger-ghost { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.staffbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; } .staffbar form { margin: 0; }
.staffbar .stopbox[open] > form { left: 0; right: auto; }
.deliveries { margin-top: 16px; } .findings { margin: 0; padding-left: 18px; font-size: .92rem; } h2.section.flush { margin-top: 0; }
.package { padding: 14px 16px; border-top: 1px solid var(--line); } .package:first-of-type { border-top: 0; }
.package header { display: grid; gap: 3px; margin-bottom: 8px; } .package header a { color: inherit; text-decoration: none; }
.copy { margin: 8px 0; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 8px; background: var(--panel-2); font-size: .92rem; overflow-wrap: anywhere; user-select: all; }
.copy small { display: block; margin-bottom: 4px; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); user-select: none; }
form.inline { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; } form.inline input { flex: 1 1 220px; width: auto; }
button.btn { width: auto; margin-top: 0; padding: 10px 16px; font-size: .92rem; } button.btn.ghost { padding: 9px 12px; }
.mini li.unread { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.segmented { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--panel); }
.segmented a { padding: 8px 12px; font-size: .84rem; text-decoration: none; color: var(--muted); border-left: 1px solid var(--line-2); } .segmented a:first-child { border-left: 0; }
.segmented a[aria-current="true"] { color: var(--accent-ink); background: linear-gradient(180deg, var(--fill-hi), var(--fill-lo)); font-weight: 700; }
.panel + .panel, .panel + .board, .board + .panel { margin-top: 14px; }
.toprow { grid-template-areas: "thumb main go" "thumb badges go" "thumb figures go"; } .toprow a { color: inherit; } .toprow small a { color: var(--accent); }
.figures { grid-area: figures; display: flex; gap: 18px; } .figures span { display: grid; } .figures b { font-variant-numeric: tabular-nums; } .figures small { font-size: .68rem; }
.status-waiting, .status-manual_pending, .status-draft_created { --sc: var(--warn); } .status-cancelled, .status-failed, .status-unknown { --sc: var(--bad); }

@media (min-width: 620px) {
  .kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .channels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 760px) {
  main { padding: 20px 22px 96px; }
  .table thead { display: table-header-group; } .table tr { display: table-row; padding: 0; }
  .table th { text-align: left; padding: 10px 16px; font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line); }
  .table td { display: table-cell; padding: 10px 16px; border-top: 1px solid var(--line); } .table tbody tr:first-child td { border-top: 0; }
  .table td[data-label]::before { content: none; } .table .num { text-align: right; white-space: nowrap; }
  .table td.act { text-align: right; width: 1%; white-space: nowrap; } .table td.act form { display: inline-block; width: auto; margin: 0 0 0 6px; } .table td.act .btn { width: auto; margin: 0; }
  .table tbody tr:hover td { background: var(--panel-2); }
  .decide { margin: 24px 0 0; border: 1px solid var(--line-2); border-radius: 12px; }

  .calendar { display: block; overflow: hidden; } .agenda { display: none; }
  .cal-weekdays, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cal-weekdays span { padding: 9px 8px; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); }
  .cal-day { min-height: 116px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
  .cal-day:nth-child(7) { border-right: 0; } .cal-week:last-child .cal-day { border-bottom: 0; }
  .cal-day.other { background: var(--bg); } .cal-day.other .cal-date { opacity: .4; }
  .cal-date { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 6px; font-size: .8rem; font-weight: 700; color: var(--muted); }
  .cal-day.today { background: var(--accent-soft); } .cal-day.today .cal-date { color: var(--accent-ink); background: linear-gradient(160deg, var(--fill-hi), var(--fill-lo)); }
  .cal-item { display: block; margin-top: 4px; padding: 4px 6px; border-radius: 6px; border-left: 3px solid var(--muted); background: var(--panel-2); color: var(--ink); text-decoration: none; font-size: .74rem; line-height: 1.35; }
  .cal-item:hover { outline: 1px solid var(--accent); }
  .cal-item.s-in_review { border-left-color: var(--warn); } .cal-item.s-approved, .cal-item.s-scheduled, .cal-item.s-publishing { border-left-color: var(--ok); }
  .cal-item.s-published { border-left-color: var(--ok); opacity: .7; } .cal-item.s-change_requested, .cal-item.s-revising { border-left-color: var(--info); }
  .cal-time { font-weight: 800; margin-right: 4px; font-variant-numeric: tabular-nums; }
  .cal-label, .cal-shop { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cal-shop { color: var(--muted); font-size: .68rem; } .cal-shop .dot { width: 7px; height: 7px; margin-right: 4px; }
  .cal-item .badges { display: inline-flex; vertical-align: middle; }
}

@media (min-width: 1000px) {
  body.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
  .side { display: flex; flex-direction: column; align-items: stretch; gap: 14px; height: 100vh; padding: 18px 14px; border-bottom: 0; border-right: 1px solid var(--line); overflow-y: auto; }
  .side > .brand { display: flex; padding: 0 4px 14px; border-bottom: 1px solid var(--line); }
  .shop { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
  .shop:has(img.wide) { flex-direction: column; align-items: stretch; gap: 8px; } .shop img.shop-logo.wide { width: 100%; height: 54px; padding: 8px 12px; }
  .shop-text small::before { content: none; }
  .side nav { flex-direction: column; overflow: visible; margin: 0; padding: 0; gap: 2px; }
  .side nav a { padding: 10px 12px; }
  .side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
  .side-foot .who { display: grid; min-width: 0; margin-right: auto; line-height: 1.25; } .side-foot .who strong { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  main { padding: 24px 28px 96px; max-width: 1500px; }
  h1 { font-size: 1.6rem; }
  .board { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .board.thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .board.halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  /* wide rows: everything on one line, like a table */
  .rows:not(.compact) .row { grid-template-columns: 48px minmax(260px, 1fr) minmax(0, auto) auto 16px; grid-template-areas: "thumb main badges status go"; }
  .rows:not(.compact) .row .badges { justify-content: flex-end; max-width: 270px; }
  .rows:not(.compact) .row .status { justify-self: end; } .rows:not(.compact) .thumb { align-self: center; }
  .rows:not(.compact) .row.toprow { grid-template-columns: 48px minmax(260px, 1fr) minmax(0, auto) auto; grid-template-areas: "thumb main badges figures"; }
  .toprow .figures { justify-self: end; min-width: 250px; justify-content: flex-end; }
}

@media (min-width: 1000px) {
  /* single item: picture left, texts per platform right */
  .preview.social { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
  .preview.social:not(:has(.gallery)) { grid-template-columns: minmax(0, 1fr); }
  .preview.social .gallery img { width: 100%; }
  .preview.social .channels { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
  .preview.social .alt { grid-column: 1 / -1; margin-top: 0; }
  .decide { max-width: 760px; }
}

@media (min-width: 760px) {
  /* shops table: names and dates stay on one line, the long column titles may wrap instead */
  .table.shops th { white-space: normal; vertical-align: bottom; } .table.shops td:first-child { min-width: 250px; }
  .shop-cell strong, .shop-cell small, .table.shops td[data-label="Nächster Termin"] { white-space: nowrap; }
}

/* ---- style memory + shop check ---------------------------------------------------------------------------------------- */
.quotes { margin: 0 0 8px; padding-left: 18px; color: var(--muted); font-size: .92rem; } .quotes li { margin: 2px 0; }
form.inline.pad { padding: 12px 16px 0; border-top: 1px solid var(--line); margin-top: 0; } form.inline select { flex: 0 1 220px; width: auto; }
.rule-line form { margin: 0; } .kpis.inset { padding: 14px 16px 2px; margin-bottom: 8px; } .head-tools form { margin: 0; }

/* ---- costs ------------------------------------------------------------------------------------------------------------- */
.sum { font-size: 1.05rem; color: var(--accent); font-variant-numeric: tabular-nums; } .table tr.total td { border-top: 1px solid var(--line-2); background: var(--panel-2); }
details.entries { border-top: 1px solid var(--line); } details.entries summary { padding: 10px 16px; cursor: pointer; color: var(--muted); font-size: .88rem; }
.segmented { flex-wrap: wrap; }

/* ---- topics + sources -------------------------------------------------------------------------------------------------- */
form.inline.tight { margin-top: 6px; } form.inline.tight .btn { padding: 6px 12px; font-size: .85rem; }
.panel > form.pad { padding: 16px; } .panel > form.pad .btn { margin-top: 10px; }
.topline { border-top: 1px solid var(--line); margin-top: 6px; }
details.edit { margin-top: 10px; } details.edit > summary { cursor: pointer; color: var(--muted); font-size: .85rem; width: fit-content; } details.edit > summary:hover { color: var(--accent); }
details.edit[open] { padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); } details.edit form.idea-form { margin-top: 8px; }
details.edit .btn { margin-top: 10px; } .danger-line { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); align-items: center; } .danger-line .btn { margin-top: 0; } form.inline.danger-line .check { margin: 0; flex: 1 1 260px; font-size: .9rem; } form.inline.danger-line .check input { flex: 0 0 auto; width: 19px; }
.package .when + form.inline { margin-top: 8px; }

/* ---- design examples + style sheet ------------------------------------------------------------------------------------ */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 14px 16px 16px; }
.shot { display: grid; gap: 6px; color: inherit; text-decoration: none; } .shot img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.shot small { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.refs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; padding: 14px 16px 18px; }
.ref { margin: 0; display: grid; gap: 8px; align-content: start; }
.ref img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 0; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); }
.ref figcaption { display: grid; gap: 4px; } .ref figcaption p { margin: 0; font-size: .88rem; } .ref figcaption small { color: var(--muted); font-size: .78rem; }
.ref form.inline.tight { margin-top: 2px; align-items: center; } .ref .check { margin: 0; font-size: .8rem; }
.brief { padding: 14px 16px 6px; } .brief .lead { margin: 0 0 12px; font-size: 1rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 14px; }
.swatch { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; color: var(--muted); }
.swatch i { display: block; width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line-2); } .swatch b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.facts-list { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 8px 16px; margin: 0 0 14px; font-size: .92rem; }
.facts-list dt { color: var(--muted); } .facts-list dd { margin: 0; } .facts-list .quotes { margin: 4px 0 0; }
.rules-from-design li { padding: 8px 0; } .rules-from-design form.inline.tight input[type=text] { flex: 1 1 260px; }
@media (max-width: 640px) { .facts-list { grid-template-columns: 1fr; gap: 2px; } .facts-list dd { margin-bottom: 8px; } }

/* ---- chances + campaigns --------------------------------------------------------------------------------------------- */
.chance .quotes { margin: 0 0 8px; } .chance .when a { color: inherit; }
.answer-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; } .answer-buttons .btn { margin-top: 0; }
form.answer { margin-top: 10px; } .pieces li { padding: 8px 0; }
.chance .checks { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); align-items: end; gap: 6px 14px; margin-bottom: 8px; }
.chance .checks select { width: auto; margin-left: 8px; } .chance .checks label { display: flex; align-items: center; gap: 6px; }
.proposal-box { border-color: var(--accent); } .proposal-box .pad-line { padding: 4px 16px 16px; margin: 0; }
.manual-chance { margin: 6px 16px 16px; } .manual-chance textarea { width: 100%; }
.chance .checks label.wide { grid-column: 1 / -1; flex-wrap: wrap; }

