/* ==========================================================================
   Fuchsfund Control Center — Admin-Layer über dem Public-Designsystem.
   Nutzt ausschließlich die bestehenden Tokens aus /assets/style.css.
   ========================================================================== */

:root {
  --side-w: 232px;
  --adm-head-h: 58px;

  /* Eigene Admin-Tokens. Die Sidebar ist in BEIDEN Modi dunkel — das ist eine
     bewusste Entscheidung: sie ist Navigation, nicht Inhalt, und rahmt die
     Arbeitsflaeche. Deshalb sind die Sidebar-Farben nicht theme-abhaengig. */
  --sidebg: #221C17;
  --sideink: #F5EFE6;
  --sidemut: #A29686;
  --sideact: rgba(224, 138, 80, .16);

  /* Diagrammfarben: dieselbe Palette wie das Public-Frontend, aber als eigene
     Rollen, damit ein Akzentwechsel die Charts nicht unleserlich macht. */
  --chart1: #B4551D;
  --chart2: #33608F;
  --violet: #6B4E9E;
  --violetsoft: #EDE7F6;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --chart1: #E08A50;
    --chart2: #8FB3D9;
    --violet: #B49AE0;
    --violetsoft: #2C2338;
  }
}
:root[data-theme="dark"] {
  --chart1: #E08A50;
  --chart2: #8FB3D9;
  --violet: #B49AE0;
  --violetsoft: #2C2338;
}

/* Das hidden-Attribut muss gewinnen. Die UA-Regel [hidden]{display:none} hat
   nur Elementspezifitaet und wird von jeder Klasse mit display (.card ist
   display:flex) ueberstimmt — Batch-Leiste, Autocomplete und der eingeklappte
   Filter waeren sonst dauerhaft sichtbar. */
[hidden] { display: none !important; }

body.adm {
  background: var(--bg);
  font-size: 15px;
}

/* Operator workspace: quiet FuchsSpur family, dense working surfaces. */
.nav-group { margin:14px 12px 4px; color:var(--sidemut); font-size:10px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.nav-group:first-child { margin-top:0; }
.control-intro { display:flex; align-items:center; justify-content:space-between; gap:28px; padding:16px 0 24px; border-bottom:1px solid var(--line); }
.control-intro h2 { font-family:var(--font-display); font-size:clamp(23px,2.6vw,36px); letter-spacing:-.035em; line-height:1.16; margin:7px 0 10px; }
.control-intro p { max-width:72ch; color:var(--ink2); margin:0 0 15px; line-height:1.55; }
.eyebrow { font-size:10px; letter-spacing:.13em; text-transform:uppercase; font-weight:750; color:var(--acc); }
.control-summary { display:flex; flex-direction:column; gap:5px; min-width:160px; font-size:12px; }
.control-summary strong,.source-number { font-size:42px; font-weight:750; letter-spacing:-.04em; font-variant-numeric:tabular-nums; }
.control-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.source-card h2,.candidate h2 { font-size:20px; margin:0; line-height:1.3; }
.source-card p,.candidate p { margin:0; line-height:1.5; }
.source-card .btn2 { align-self:flex-start; }
.candidate .kv { font-size:13px; }
.candidate .kv dt { font-size:12px; }
.control-note { padding:14px 18px; border-left:3px solid var(--acc); font-size:13px; background:var(--surface); line-height:1.6; }
.adm .control-filters { display:flex; flex-direction:row; align-items:end; flex-wrap:wrap; gap:14px; }
.control-filters .fld { flex:1; min-width:180px; }
.control-products { min-width:740px; }
.control-products th { white-space:normal; }
.control-products td { vertical-align:top; max-width:340px; white-space:normal; }
.control-products td:first-child { min-width:220px; width:32%; }
.product-name { display:block; font-weight:650; line-height:1.4; margin-bottom:5px; }
.control-products .xs { margin-top:5px; line-height:1.45; }
.adm .row { flex-wrap:wrap; }
.adm .panel { min-width:0; }
.adm pre { max-width:100%; overflow:auto; }
.adm a:focus-visible,.adm button:focus-visible,.adm summary:focus-visible { outline:3px solid var(--acc); outline-offset:3px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media(max-width:760px) {
  .control-grid { grid-template-columns:1fr; }
  .control-intro { align-items:flex-start; flex-direction:column; gap:12px; }
  .control-summary { flex-direction:row; align-items:center; flex-wrap:wrap; gap:10px; }
  .control-summary strong { font-size:26px; }
  .control-products { min-width:680px; }
  .adm .tbl { display:block; max-width:100%; overflow-x:auto; }
  .adm .tabs { flex-wrap:wrap; }
}

.adm-wrap { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.adm-side {
  width: var(--side-w); flex: none; background: var(--sidebg); color: var(--sideink);
  display: flex; flex-direction: column; padding: 16px 12px; gap: 20px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.adm-brand { display: flex; align-items: center; gap: 9px; padding: 2px 8px; }
.adm-brand .name { font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--sideink); }
.adm-brand .tag { font-size: 11px; font-weight: 600; color: var(--sidemut); margin-top: 3px; }
.adm-side nav { display: flex; flex-direction: column; gap: 2px; }
.adm-side nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px;
  font-size: 14px; font-weight: 600; color: var(--sidemut); text-decoration: none;
}
.adm-side nav a:hover { background: rgba(255, 255, 255, .05); color: var(--sideink); }
.adm-side nav a.on { background: var(--sideact); color: var(--sideink); }
.adm-side nav a .cnt {
  margin-left: auto; background: var(--acc); color: #fff; border-radius: var(--r-pill);
  font-size: 10.5px; font-weight: 700; padding: 1px 7px;
}
.adm-side-foot {
  margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.adm-side-foot .av {
  width: 30px; height: 30px; border-radius: var(--r-pill); background: var(--acc); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none;
}
.adm-side-foot .u { font-size: 13.5px; color: var(--sideink); font-weight: 600; }
.adm-side-foot .r { font-size: 11px; color: var(--sidemut); }
.adm-side-foot .lo { margin-left: auto; color: var(--sidemut); padding: 8px; border-radius: 8px; }
.adm-side-foot .lo:hover { background: rgba(255, 255, 255, .07); color: var(--sideink); }

/* ---------- Main / Header ---------- */
.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-head {
  display: flex; align-items: center; gap: 14px; padding: 12px 24px;
  border-bottom: 1px solid var(--line); background: var(--surface);
  position: sticky; top: 0; z-index: 20; min-height: var(--adm-head-h);
}
.adm-burger { display: none; }
.adm-search {
  position: relative; display: flex; align-items: center; gap: 9px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 9px; padding: 7px 12px; width: 280px;
  color: var(--mut);
}
.adm-search input { border: none; outline: none; background: none; flex: 1; min-width: 0; font: inherit; color: var(--ink); }
.adm-ac { position: absolute; left: 0; right: 0; top: calc(100% + 6px); padding: 6px; z-index: 30; max-height: 320px; overflow-y: auto; }
.adm-ac a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-size: 13.5px; }
.adm-ac a:hover { background: var(--well); color: var(--ink); }
.adm-body { padding: 22px 24px 48px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- Bausteine ---------- */
.adm-offline { padding: 16px 18px; background: var(--ambersoft); border-color: transparent; }
.adm-offline code { font-family: ui-monospace, monospace; font-size: 12px; background: var(--surface); padding: 1px 5px; border-radius: 4px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 5px; }
.kpi .lbl { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--mut); }
.kpi .val { font-family: var(--font-display); font-weight: 800; font-size: 27px; line-height: 1.1; }
.kpi .sub { font-size: 12px; color: var(--mut); }
.kpi .dlt { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.kpi .dlt.up { color: var(--green); } .kpi .dlt.down { color: var(--red); } .kpi .dlt.flat { color: var(--mut); }
.factory-kpi { color: var(--ink); min-width: 0; transition: transform .12s, border-color .12s; }
.factory-kpi:hover { color: var(--ink); transform: translateY(-1px); border-color: var(--acc); }
.factory-kpi .sub { display: flex; align-items: center; gap: 5px; }
.factory-tech > summary { cursor: pointer; }
.factory-tech[open] > summary { margin-bottom: 4px; }

.todo { display: flex; flex-direction: column; gap: 0; }
.todo-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.todo-row:last-child { border-bottom: none; }
.todo-row .n { font-family: var(--font-display); font-weight: 800; font-size: 19px; min-width: 44px; text-align: right; }
.todo-row .txt { font-size: 13.5px; color: var(--ink2); flex: 1; line-height: 1.45; }
.todo-ico { width: 34px; height: 34px; justify-content: center; padding: 0; border-radius: 9px; }

.adm-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.adm-tbl th {
  text-align: left; font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--mut); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap; background: var(--surface); position: sticky; top: 0; z-index: 5;
  /* top: 0, nicht die Hoehe der Kopfzeile: .tbl-scroll hat overflow-x:auto und ist
     damit auch in der Block-Achse ein Scroll-Container. Ein Versatz haette den
     Kopf um 58px nach unten geschoben — mitten in die erste Datenzeile. */
}
.adm-tbl th a { color: var(--mut); }
.adm-tbl th a:hover { color: var(--ink); }
.adm-tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-tbl tr:last-child td { border-bottom: none; }
.adm-tbl tbody tr:hover { background: var(--well); }
.adm-tbl .thumb { width: 38px; height: 38px; padding: 3px; flex: none; }
/* Ohne Produktbild: neutrale Flaeche statt weisser Kasten. Der weisse
   Grund von .imgwell ist fuer echte Amazon-Fotos gedacht (mix-blend-mode). */
.imgwell.noimg { background: var(--well2); border-style: dashed; }
.tbl-scroll { overflow-x: auto; }
/* Eskalationen und Einheitenhinweise sind ganze Sätze. `.badge` ist bewusst
   nowrap (kurze Zustände); diese Variante darf umbrechen — sonst schiebt eine
   Warnung die Seite auf dem Telefon seitlich aus dem Bild. */
.adm .badge-note { white-space: normal; text-align: left; max-width: 100%; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill); white-space: nowrap; }
.qo { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; font-family: ui-monospace, monospace; color: var(--ink2); background: var(--well); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: var(--r-pill); flex: none; display: inline-block; }

.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { font-size: 12.5px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--stonesoft); color: var(--stone); font-weight: 600; border: none; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { color: var(--stone); }
.chip.on { background: var(--accsoft); color: var(--accink); }
.chip .c { opacity: .65; font-variant-numeric: tabular-nums; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; flex-wrap: wrap; }
.pager .pages { display: flex; gap: 6px; align-items: center; }
.pager a, .pager span.cur {
  padding: 6px 11px; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--line); color: var(--ink2); background: var(--surface);
}
.pager span.cur { background: var(--accsoft); color: var(--accink); border-color: transparent; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.panel { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.panel > .ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
/* .t ist eine Ueberschrift (h2) — die UA-Marge und -Groesse werden hier
   zurueckgesetzt, damit die Semantik nichts an der Optik aendert. */
.ph .t, h2.t { font-weight: 700; font-size: 14.5px; margin: 0; line-height: 1.35; }

.bar { height: 7px; background: var(--well); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--chart1); border-radius: 4px; }
.barrow { display: flex; flex-direction: column; gap: 5px; }
.barrow .l { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }

/* ---------- Weltkarte ---------- */
.worldmap { width: 100%; display: block; }
.worldmap path { fill: var(--well2); stroke: var(--surface); stroke-width: .5; transition: fill .12s; }
.worldmap path.has { fill: var(--chart2); }
.worldmap path.has:hover, .worldmap path:hover { fill: var(--acc); cursor: pointer; }
.map-tip {
  position: fixed; z-index: 60; pointer-events: none; background: var(--ink); color: var(--bg);
  border-radius: 8px; padding: 8px 11px; font-size: 12px; line-height: 1.5; box-shadow: var(--shadow);
  opacity: 0; transition: opacity .1s; max-width: 220px;
}
.map-tip.show { opacity: .96; }
.map-tip b { color: #fff; }
.map-legend { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--mut); }
.map-legend i { width: 42px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--well2), var(--chart2)); display: block; }

/* ---------- Charts ---------- */
.chart { width: 100%; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .lbl { font-size: 10.5px; fill: var(--mut); }
.chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink2); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: block; }

/* ---------- Empty / Demo ---------- */
.empty { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; padding: 34px 24px; color: var(--mut); }
.empty .t { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.empty .d { font-size: 12.5px; max-width: 380px; line-height: 1.6; }
.demo-banner { padding: 11px 16px; background: var(--violetsoft); border-color: transparent; display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--violet); font-weight: 600; }

/* ---------- Detail ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 10px 14px; font-size: 13.5px; font-weight: 600; color: var(--ink2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--acc); }
.kv { display: grid; grid-template-columns: 190px 1fr; gap: 10px 18px; font-size: 13.5px; }
.kv dt { color: var(--mut); font-weight: 600; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.kv dd { margin: 0; color: var(--ink2); line-height: 1.6; min-width: 0; overflow-wrap: anywhere; }
.readonly-note { display: flex; gap: 9px; align-items: flex-start; padding: 12px 14px; background: var(--well); border-radius: 10px; font-size: 12.5px; color: var(--ink2); line-height: 1.55; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld label { font-size: 13px; font-weight: 600; }
/* Alle Texteingaben, nicht nur type=text — sonst bekommt das Passwortfeld
   im Login die Browser-Standardoptik (weisser Kasten im Dark Mode). */
.fld input:not([type="checkbox"]):not([type="radio"]), .fld textarea, .fld select {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; width: 100%;
}
.fld textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.fld .hint { font-size: 11.5px; color: var(--mut); }
.fld input:focus, .fld textarea:focus, .fld select:focus { outline: 2px solid var(--acc); outline-offset: -1px; border-color: var(--acc); }
.warnlist { display: flex; flex-direction: column; gap: 8px; }
.warnrow { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }

details.expl > summary { cursor: pointer; font-size: 12.5px; color: var(--accink); font-weight: 600; padding: 4px 0; }
details.expl[open] > summary { margin-bottom: 8px; }
.expl-list { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-family: ui-monospace, monospace; color: var(--ink2); }
.expl-list .pos { color: var(--green); } .expl-list .neg { color: var(--red); } .expl-list .zero { color: var(--mut); }

/* ---------- Review Queue ---------- */
.rq { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.rq-list { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 190px); overflow-y: auto; }
.rq-item { display: flex; gap: 10px; padding: 10px; border-radius: 11px; align-items: center; }
.rq-item.on { outline: 2px solid var(--acc); outline-offset: -2px; }
.rq-item .imgwell { width: 42px; height: 42px; padding: 4px; flex: none; }
/* Beim Pruefen muss das Produkt sichtbar sein, nicht nur der Text darueber. */
.imgwell.rq-hero { width: 96px; height: 96px; padding: 8px; flex: none; }
.rq-card { padding: 20px; display: flex; flex-direction: column; gap: 15px; }
.rq-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.kbd { display: inline-block; font-size: 11px; font-weight: 600; color: var(--ink2); background: var(--well); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }
.btn .kbd { background: rgba(255, 255, 255, .22); border-color: transparent; color: #fff; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.login-card { max-width: 380px; width: 100%; padding: 30px; display: flex; flex-direction: column; gap: 16px; }
.login-card .brandrow { display: flex; align-items: center; gap: 10px; }
.login-card .brandrow .name { font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.err { padding: 11px 14px; background: var(--redsoft); color: var(--red); border-radius: 9px; font-size: 13px; font-weight: 600; }

/* ==========================================================================
   Responsive — Desktop primär, Tablet/Mobile funktional
   ========================================================================== */
@media (max-width: 1180px) {
  .split, .grid-3 { grid-template-columns: 1fr; }
  .rq { grid-template-columns: 250px 1fr; }
}

@media (max-width: 900px) {
  .adm-side {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%);
    visibility:hidden;
    transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .4);
  }
  .adm-side.open { transform: translateX(0); visibility:visible; }
  .adm-burger { display: inline-flex; }
  .adm-search { width: 150px; }
  .adm-body { padding: 16px 14px 40px; }
  .adm-head { padding: 10px 14px; }
  .grid-2, .rq { grid-template-columns: 1fr; }
  .rq-list { max-height: 260px; }
  .kv { grid-template-columns: 1fr; gap: 4px 0; }
  .kv dt { margin-top: 10px; }
  .adm-tbl th { position: static; }
}

@media (max-width: 640px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .val { font-size: 22px; }
  .adm-search { display: none; }
}

/* Chrome-Autofill nicht mit Systemfarben ueberschreiben */
.fld input:-webkit-autofill, .fld input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--surface) inset;
  caret-color: var(--ink);
}

/* Fokus in der dunklen Sidebar braucht einen helleren Ring als der
   Copper-Akzent auf dunkelbraunem Grund. */
.adm-side a:focus-visible, .adm-side button:focus-visible {
  outline: 2px solid var(--sideink);
  outline-offset: 2px;
}

/* ---------- Vine Operations Cockpit ---------- */
.ops-cockpit { display: flex; flex-direction: column; gap: 16px; }
.ops-live-error {
  margin: 0; padding: 11px 14px; background: var(--redsoft); color: var(--red);
  border-radius: 9px; font-size: 13px; font-weight: 600;
}
.ops-hero { gap: 10px; }
.ops-hero .ops-kicker {
  margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase;
}
.ops-hero .ops-job {
  margin: 0; font-family: var(--font-display); font-size: 28px; line-height: 1.15; font-weight: 800;
}
.ops-hero .ops-detail { margin: 0; font-size: 15.5px; line-height: 1.5; max-width: 46rem; }
.ops-hero .ops-hint { margin: 0; font-size: 13.5px; color: var(--mut); }
.ops-hero.st-running { border-color: var(--green); }
.ops-hero.st-wait { border-color: var(--amber); background: var(--ambersoft); }
.ops-hero.st-paused { border-color: var(--stone); }
.ops-hero.st-blocked { border-color: var(--red); }
.ops-hero.st-offline { border-color: var(--stone); }
.ops-hero.st-done { border-color: var(--green); }
.ops-progress {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 18px; margin-top: 6px;
}
.ops-progress .xs { display: block; margin-bottom: 2px; }
.ops-primary-row { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ops-asin {
  font-family: ui-monospace, monospace; font-size: 22px; font-weight: 700; margin: 0;
  letter-spacing: .04em;
}
.ops-steps { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.ops-steps li { font-size: 14px; }
.ops-feed { display: flex; flex-direction: column; }
.ops-ev {
  display: grid; grid-template-columns: 88px 1fr; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px;
}
.ops-ev:last-child { border-bottom: none; }
.ops-ev time { color: var(--mut); font-variant-numeric: tabular-nums; }
.ops-deltas { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.ops-delta { display: flex; flex-direction: column; gap: 4px; }
.ops-delta .l { font-size: 12px; color: var(--mut); }
.ops-delta .n { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ops-stock {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px;
}
.ops-stock-cell { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ops-stock-cell .n {
  font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.ops-stock-cell .l { font-size: 12.5px; color: var(--mut); line-height: 1.35; }
.ops-runner-name { font-weight: 700; margin: 0; }
.ops-more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 10px; }
.ops-destroy { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.ops-cockpit.ops-stale [data-ops-hero] { opacity: .55; }

@media (max-width: 640px) {
  .ops-hero .ops-job { font-size: 22px; }
  .ops-stock { grid-template-columns: 1fr 1fr; }
  .ops-stock-cell .n { font-size: 22px; }
  .ops-ev { grid-template-columns: 1fr; gap: 2px; }
  .ops-deltas { grid-template-columns: 1fr; }
}

/* ---------- Awin V2c Join Intelligence (German operator UX) ---------- */
.awin-hero-title { margin: 0 0 8px; font-size: 1.25rem; }
.awin-hero-lead { margin: 0 0 10px; font-size: 1.05rem; line-height: 1.45; max-width: 46rem; }
.awin-partner-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.awin-partner-list li { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.awin-partner-list li:last-child { border-bottom: none; padding-bottom: 0; }
.awin-partner-name { font-weight: 700; font-size: 1.05rem; }
.awin-rec {
  display: inline-flex; flex-direction: column; gap: 2px;
  margin: 6px 0; padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface);
  max-width: 100%;
}
.awin-rec-label { font-weight: 800; font-size: 12.5px; letter-spacing: .02em; }
.awin-rec-cov { font-size: 12px; color: var(--mut); }
.awin-rec-SEHRINTERESSANT { border-color: var(--green); background: var(--greensoft, var(--ambersoft)); }
.awin-rec-INTERESSANT { border-color: var(--amber); background: var(--ambersoft); }
.awin-rec-NOCHPRFEN, .awin-rec-NOCHPRUEFEN { border-color: var(--stone); }
.awin-rec-WENIGDATEN { border-color: var(--stone); }
.awin-rec-EHERNICHT { border-color: var(--red); background: var(--redsoft); }
.awin-flag {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 1px 6px; border-radius: 4px; border: 1px solid var(--amber); color: var(--ink);
  background: var(--ambersoft);
}
.awin-help { text-decoration: underline dotted; cursor: help; }
.awin-filters .awin-filter-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 14px; margin-bottom: 12px;
}
.awin-filters label { font-size: 14px; display: flex; gap: 8px; align-items: flex-start; }
.awin-filter-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end;
}
.awin-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 0 0 10px; }
.awin-dl dt { font-size: 12px; color: var(--mut); margin: 0; }
.awin-dl dd { margin: 2px 0 0; font-weight: 600; }
.awin-stats { margin: 0; padding-left: 1.2rem; }
.awin-steps { margin: 0 0 14px; padding-left: 1.2rem; line-height: 1.5; }
.awin-prepare-form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.awin-confirm { display: flex; gap: 10px; align-items: flex-start; max-width: 36rem; font-size: 14px; }
.awin-tech summary {
  cursor: pointer; font-weight: 700; padding: 4px 0;
}
.awin-tech summary:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.awin-flash { border-color: var(--green); }
.awin-error { border-color: var(--red); background: var(--redsoft); }
.awin-pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.awin-nav a:focus-visible, .awin-prepare-form button:focus-visible, .awin-filters button:focus-visible {
  outline: 2px solid var(--acc); outline-offset: 2px;
}
.btn-sm { font-size: 13px; padding: 6px 10px; }
.awin-detail > .card { margin-bottom: 14px; }
@media (max-width: 720px) {
  .awin-partners-tbl { font-size: 13px; }
  .awin-hero-lead { font-size: 1rem; }
}

/* ---------- CMS Workspace (Phase 1) ---------- */
.cms-head { gap: 10px; }
.cms-worklist td { vertical-align: top; }
.cms-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cms-media { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.cms-media img { width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--line); }
.cms-media.inactive { opacity: .55; }
tr.cms-conflict td { background: var(--ambersoft); }

/* ---------- CMS 1.1: Hero, Warn-Aktionen, Thumbnails ---------- */
.cms-hero { gap: 12px; }
.cms-hero-id { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cms-hero-thumb { width: 52px; height: 52px; object-fit: contain; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; flex: none; }
.cms-hero-title { font: 750 16px var(--font-display); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cms-thumb { width: 40px; height: 40px; object-fit: contain; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; flex: none; }
.cms-thumb-empty { display: inline-grid; place-items: center; background: var(--well);
  color: var(--mut); }
.cms-thumb-empty img { opacity: .4; }
.cms-thumb-empty.big { width: 96px; height: 96px; border: 1px solid var(--line); border-radius: 8px; }
.cms-warn { display: inline-flex; gap: 7px; align-items: center; padding: 5px 10px 5px 6px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; color: var(--ink2); }
.cms-warn:hover { border-color: var(--mut); color: var(--ink); }
.cms-warn b { color: var(--accink); font-size: 12px; }
.cms-editor-shell { display: block; }

/* Phase 2A.1: Produktionszustand-Leiste + Media-Blocker */
.cms-dims { display: flex; gap: 6px; flex-wrap: wrap; }
.cms-dim { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink2); text-decoration: none; }
.cms-dim.ok { background: var(--greensoft); border-color: transparent; }
.cms-dim.warn { background: var(--ambersoft); border-color: transparent; }
.cms-dim.todo { color: var(--mut); }
.cms-dim:hover { border-color: var(--mut); }
.cms-media-blocker { border-left: 3px solid var(--red); }
/* Phase 2A.1: visueller Quellkatalog (Liste + Galerie) */
.src-thumb { width: 56px; height: 56px; flex: none; }
.src-thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; background: #fff; }
.src-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.src-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.src-card-media { display: block; }
.src-card-media .src-thumb { width: 100%; height: 160px; }
.src-card-media .src-thumb.noimg { display: flex; align-items: center; justify-content: center; }
.src-card .product-name { font-weight: 700; line-height: 1.35; }
.src-card .btn2 { margin-top: auto; align-self: flex-start; }

/* ---------- 2A.5: Kommandozentrum, Reifegrad, mobile Bedienbarkeit ---------- */
/* Arbeitsvorräte der Startseite: Zahl, Name, Grund, genau eine Aktion. */
.wf-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.wf-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 15px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.wf-card .wf-count { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.wf-card .wf-label { font-weight: 700; font-size: 14px; }
.wf-card .wf-reason { margin: 0; font-size: 12.5px; color: var(--mut); line-height: 1.5; }
.wf-card .btn, .wf-card .btn2 { margin-top: 8px; align-self: flex-start; min-height: 40px; }
.wf-card.wf-clear .wf-count { color: var(--green); font-size: 20px; }
.wf-card.wf-unknown { border-color: var(--amber); }
.wf-card .wf-unknown { font-size: 17px; font-weight: 700; color: var(--amber); }
.wf-sev-high { border-left: 3px solid var(--red); }

/* Produktionsreife: diskrete Zustände statt erfundener Prozentwerte. */
.wf-readiness { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.wf-dim { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; text-decoration: none; background: var(--well); color: var(--ink2); }
.wf-dim .wf-mark { font-weight: 800; }
.wf-dim-ok { background: var(--greensoft, var(--well)); color: var(--green); }
.wf-dim-warn { background: var(--ambersoft); color: var(--amber); }
.wf-dim-todo { background: var(--stonesoft); color: var(--stone); }
.wf-back { margin: 0 0 10px; }
.wf-primary { min-height: 34px; }

/* Mobil: die Tab-Leiste bleibt — sie wird nur fingerfreundlich. */
@media (max-width: 560px) {
  .tabs { gap: 0; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .tabs a { padding: 12px 14px; font-size: 14px; scroll-snap-align: start; min-height: 44px;
    display: inline-flex; align-items: center; }
  .wf-cards { grid-template-columns: 1fr; }
  .wf-card .btn, .wf-card .btn2 { align-self: stretch; text-align: center; justify-content: center; }
}

/* ---------- 2A.6: Objekt-Werkbank ---------- */
.wb-head { gap: 12px; }
.wb-back { margin: 0; }
.wb-id { display: flex; gap: 12px; align-items: flex-start; }
.wb-id-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wb-type { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); }
.wb-title { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere; }
.wb-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wb-signals { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.wb-signal { display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--well); }
.wb-signal-key { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); }
.wb-why summary { font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink2); }
.wb-why-list { margin: 6px 0 0; padding-left: 16px; font-size: 12.5px; line-height: 1.6; }
.wb-why-list .pos { color: var(--green); } .wb-why-list .neg { color: var(--ink2); }
.wb-blockers { margin: 4px 0 0; padding-left: 16px; font-size: 12.5px; line-height: 1.6; }
/* MMC 4: Freigabe als Checkliste aus dem echten Gate — Status nie nur über Farbe (✓/○ + Text). */
.wb-ready { grid-column: 1 / -1; order: -1; }   /* Freigabe zuerst, dann Wirtschaft */
.wb-ready .wb-next { width: 100%; margin-top: 6px; }
.wb-checks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px 18px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); width: 100%; font-size: 13px; line-height: 1.45; }
.wb-check { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; align-content: flex-start; }
.wb-check-mark { font-weight: 800; width: 1.1em; flex: none; text-align: center; }
.wb-check.is-ok .wb-check-mark { color: var(--green); }
.wb-check.is-open .wb-check-mark { color: var(--ink2); }
.wb-check.is-soft .wb-check-mark { color: var(--mut); }
.wb-check-why { flex-basis: 100%; padding-left: 1.5em; }
.wb-who { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink2); white-space: nowrap; }
.wb-who-agent { border-color: var(--violet); color: var(--violet); }
.wb-who-decision { border-color: var(--fox); color: var(--ink); }
.wb-who-external { border-style: dashed; }
.wb-who-technical { border-color: var(--red, #b3261e); }
.wb-next-text { font-size: 14px; }
.wb-cta-decide { background: var(--surface); color: var(--ink); border: 1px solid var(--fox); }
.wb-origin-badge { text-transform: none; letter-spacing: 0; }
.wb-next { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 11px; background: var(--accsoft); }
.wb-next .wb-cta { min-height: 40px; }
.wb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wb-img { display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.wb-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wb-img-micro { width: 28px; height: 28px; border-radius: 6px; }
.wb-img-list { width: 44px; height: 44px; }
.wb-img-card { width: 128px; height: 128px; border-radius: 12px; }
.wb-img-hero { width: 72px; height: 72px; border-radius: 12px; }
.wb-img-empty { background: var(--well); color: var(--mut); }
.wb-review { font-size: 14.5px; line-height: 1.75; max-width: 68ch; white-space: pre-wrap;
  overflow-wrap: anywhere; }
.wb-origin { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--mut); margin: 0 0 6px; }
.wb-queue { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding-top: 10px; border-top: 1px solid var(--line); }
.wb-queue-link { display: flex; gap: 10px; align-items: center; text-decoration: none;
  color: inherit; padding: 4px 8px; border-radius: 10px; }
.wb-queue-link:hover { background: var(--well); }
.wb-queue-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wb-rel { display: flex; gap: 12px; flex-wrap: wrap; }
.wb-rel-card { display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  width: 144px; padding: 8px; border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: inherit; }
.wb-rel-card:hover { border-color: var(--fox); }
.wb-rel-title { font-size: 12.5px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.cms-open { gap: 10px; }
@media (max-width: 560px) {
  .wb-title { font-size: 17px; }
  .wb-rel-card { width: calc(50% - 6px); }
  .wb-img-card { width: 100%; height: auto; aspect-ratio: 1 / 1; }
  .wb-signals { grid-template-columns: 1fr; }
  .wb-next { position: sticky; bottom: 0; z-index: 9; box-shadow: 0 -6px 16px rgba(0,0,0,.08); }
  .wb-next .wb-cta { flex: 1; text-align: center; justify-content: center; }
  .wb-actions .btn2, .wb-actions .btng { flex: 1; text-align: center; justify-content: center; }
}
.opp-next { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
@media (max-width: 560px) { .opp-next { width: 100%; } .opp-next .wf-primary { width: 100%; text-align: center; justify-content: center; } }

/* ---------- Maturity: ein Klick veröffentlicht ---------- */
.wb-publish-form { margin: 0; }
.wb-publish-btn { min-height: 40px; }
.pub-blockers { margin: 8px 0 12px; padding: 0; list-style: none; display: grid; gap: 8px; }
.pub-blockers li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.pub-blockers li b { font-size: 13.5px; }
@media (max-width: 560px) {
  .pub-blockers li { align-items: flex-start; flex-direction: column; }
  .wb-publish-btn { width: 100%; }
}
.edit-section { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 78px; }
.edit-section + .edit-section { margin-top: 26px; padding-top: 22px; border-top: 2px solid var(--line); }
.edit-section-title { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.sys-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.sys-card { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; }
.sys-card:hover { border-color: var(--fox); }
.sys-label { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 13.5px; }
.home-drafts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.home-draft { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 10px; text-decoration: none; color: inherit; }
.home-draft:hover { border-color: var(--fox); }

/* Hauptaktion: GENAU ein Veröffentlichen-Knopf (MMC 3) — am Desktop als
   Zeile im Kopf, am Telefon klebt die Leiste unten (§30). */
.wb-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wb-bar .wb-publish-btn { min-height: 40px; }
/* „⋯ Mehr": Zusatzaktionen gebündelt statt Knopfreihe. */
.wb-more { position: relative; align-self: flex-start; }
.wb-more > summary { list-style: none; cursor: pointer; }
.wb-more > summary::-webkit-details-marker { display: none; }
.wb-more-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 240px;
  display: flex; flex-direction: column; padding: 6px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.wb-more-menu a { padding: 8px 10px; border-radius: 8px; color: inherit; text-decoration: none; font-size: 13.5px; }
.wb-more-menu a:hover, .wb-more-menu a:focus-visible { background: var(--well); }
@media (max-width: 560px) {
  .wb-bar { display: flex; gap: 8px; align-items: center; position: sticky; bottom: 0; z-index: 10;
    padding: 10px 0; background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -6px 16px rgba(0,0,0,.08); }
  .wb-bar .btn2 { flex: 0 0 auto; }
  .wb-bar form { flex: 1; }
  .wb-bar .wb-publish-btn { width: 100%; min-height: 44px; }
}
.chip-sep { width: 1px; align-self: stretch; margin: 2px 4px; background: var(--line); }

/* KI & Inhalte (Chunk C): Vorschläge, Kette, Block-Diff, Testlabor. */
.cai-proposal { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 10px;
  display: flex; flex-direction: column; gap: 10px; }
.cai-blocks { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.cai-blocks li { font-size: 13.5px; }
.cai-block-text { white-space: pre-wrap; }
.cai-findings { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.cai-findings li { font-size: 13.5px; }
.cai-review { border-top: 1px dashed var(--line); padding-top: 10px; }
.cai-block-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .cai-block-diff { grid-template-columns: 1fr; } }
.cai-block-original { opacity: .75; }
.cai-inspector summary, .cai-brief summary { cursor: pointer; color: var(--ink2); }
.cai-inspector dl { margin-top: 8px; }
.cai-prompt-body { white-space: pre-wrap; font-size: 13px; line-height: 1.6; background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; max-height: 420px; overflow: auto; }
.blk-ai-btn { font-weight: 700; color: var(--fox, #c2571f); width: auto !important; padding: 0 6px; white-space: nowrap; }
.blk-ai-menu { position: absolute; right: 6px; top: 26px; z-index: 30; display: flex;
  flex-direction: column; min-width: 190px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 4px; }
.blk-ai-item { text-align: left; padding: 8px 10px; border: 0; background: none; font-size: 13px;
  border-radius: 7px; cursor: pointer; color: var(--ink); font-weight: 600; }
.blk-ai-item:hover, .blk-ai-item:focus { background: var(--bg); }

/* Chunk E: Content Workspace — Jobkarte, Timeline, Struktur, Mediengalerie. */
.cai-ws-head { position: sticky; top: 0; z-index: 6; }
.cai-jobcard { border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.cai-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cai-timeline li { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; }
.cai-timeline .tl-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto;
  background: var(--line); position: relative; top: 1px; }
.cai-timeline .tl-done .tl-dot, li.tl-done .tl-dot { background: var(--green); }
li.tl-current .tl-dot { background: var(--amber); animation: cai-pulse 1.4s ease-in-out infinite; }
li.tl-fail .tl-dot { background: var(--red); }
li.tl-pending { color: var(--mut); }
li.tl-done { color: var(--ink2); }
@keyframes cai-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { li.tl-current .tl-dot { animation: none; } }
.cai-structure { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.cai-structure li { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13.5px; }
.cai-tasks { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 4px; }
.badge.b-copper { background: color-mix(in srgb, var(--fox, #c2571f) 18%, transparent);
  color: var(--fox, #c2571f); }
.media-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.media-tile { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.media-tile.inactive { opacity: .55; }
.media-thumb { display: block; width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; padding: 0; background: var(--bg); cursor: zoom-in; }
.media-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.media-thumb:focus-visible { outline: 2px solid var(--fox, #c2571f); outline-offset: 2px; }
.media-tile-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
dialog.media-lightbox { border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  max-width: min(960px, 94vw); width: 100%; background: var(--surface); color: inherit; }
dialog.media-lightbox::backdrop { background: rgba(0,0,0,.55); }
.media-lightbox-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 16px; }
@media (max-width: 720px) { .media-lightbox-body { grid-template-columns: 1fr; } }
.media-lightbox-img { display: flex; align-items: center; justify-content: center;
  background: var(--bg); border-radius: 10px; min-height: 240px; }
.media-lightbox-img img { max-width: 100%; max-height: 70vh; object-fit: contain; }
.media-lightbox-meta { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.media-lightbox-close { margin-top: 12px; text-align: right; }
.blk-ai-head { font-weight: 700; color: var(--mut); cursor: default; }

/* Autonomous Round: KI-Werkzeugleiste + Warten/Arbeiten-Karte. */
.cai-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.cai-toolbar .cai-who { display: flex; gap: 6px; align-items: center; font-weight: 600; max-width: 100%; min-width: 0; }
.cai-toolbar .cai-who select { max-width: min(340px, 100%); min-width: 0; flex: 1 1 auto; }
.cai-wish { flex-basis: 100%; }
.cai-wish textarea { width: 100%; margin-top: 6px; }
.cai-reroute { border-top: 1px dashed var(--line); padding-top: 10px; }

/* ---------- Awin-Arbeitsplatz: Partner → Produkte → Verdienst ---------- */
.awin-nav { display: flex; flex-direction: column; gap: 6px; }
.awin-nav-tools .chip-quiet { background: transparent; border: 1px solid var(--line); font-weight: 500;
  font-size: 12px; padding: 4px 10px; color: var(--mut); }
.awin-nav-tools .chip-quiet.on { background: var(--accsoft); color: var(--accink); border-color: transparent; }
.awin-partner-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.awin-pcard { display: flex; flex-direction: column; gap: 4px; padding: 14px 15px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); min-width: 0; }
.awin-pcard-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.awin-pcard-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 14px; margin: 8px 0 0; }
.awin-pcard-facts dt { font-size: 12px; color: var(--mut); margin: 0; }
.awin-pcard-facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.awin-warn { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--ambersoft); color: var(--ink); line-height: 1.5; }
.awin-top-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.awin-top-list li { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.awin-top-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; align-items: flex-start; }
.awin-app-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.awin-app-list li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); }
.awin-app-list li:last-child { border-bottom: none; }
.awin-app-list li > div:first-child { min-width: 0; flex: 1 1 320px; }
.awin-cand-list { display: flex; flex-direction: column; gap: 10px; }
.awin-cand { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.awin-cand-main { flex: 1 1 360px; min-width: 0; }
.awin-cand-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.awin-crosslink { margin: 0 0 12px; }
.awin-cat-head { margin-bottom: 14px; }
.adm .awin-money { white-space: normal; text-align: left; }
.awin-money-why { margin-top: 3px; max-width: 42rem; line-height: 1.5; }
@media (max-width: 560px) {
  .awin-cand-side { align-items: stretch; width: 100%; }
  .awin-cand-side .btn, .awin-cand-side .btn2 { text-align: center; justify-content: center; }
  .awin-partner-cards, .awin-top-list { grid-template-columns: 1fr; }
}
.awin-promote-head { margin-bottom: 14px; }
.awin-money-box { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--well); }
/* Katalog auf dem Telefon: jede Zeile eine Karte — kein seitliches Scrollen (§31). */
@media (max-width: 700px) {
  .awin-cat-tbl, .awin-cat-tbl tbody { display: block; min-width: 0; width: 100%; }
  .awin-cat-tbl thead { display: none; }
  .awin-cat-tbl tr { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px 12px;
    padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .awin-cat-tbl td { display: block; padding: 0; border: none; min-width: 0; }
  .awin-cat-tbl td:first-child { grid-row: span 5; min-width: 0; width: auto; }
  .awin-cat-tbl td { max-width: none; }
}
@media (max-width: 560px) {
  .awin-nav-tools { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .awin-nav-tools .chip-quiet { flex: 0 0 auto; }
}

/* ---------- Produkt-Arbeitsplatz (MMC 3): Ansichten + Wissen-Leiste ---------- */
.ws-tabrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ws-tabrow .tabs { flex: 1; min-width: 0; }
.ws-knowledge { position: fixed; z-index: 30; top: 0; right: 0; bottom: 0; width: min(400px, 100vw);
  display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: -10px 0 28px rgba(0,0,0,.12); }
.ws-knowledge[hidden] { display: none; }
.ws-k-head { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ws-k-head strong { font-size: 15px; outline: none; }
.ws-k-body { overflow-y: auto; padding: 4px 16px 24px; display: flex; flex-direction: column; }
.ws-k-sec { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px;
  font-size: 13.5px; line-height: 1.55; }
.ws-k-sec h3 { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); }
.ws-k-sec p { margin: 0; }
.ws-k-ok { color: var(--green); font-weight: 600; }
.ws-k-quote { margin: 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--ink2); white-space: pre-wrap; }
.ws-k-full { white-space: pre-wrap; margin: 6px 0 0; }
.ws-k-facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; }
.ws-k-facts li { display: flex; justify-content: space-between; gap: 10px; }
.ws-k-facts li span { color: var(--mut); }
.ws-k-bullets, .ws-k-sources { margin: 0; padding-left: 18px; }
.ws-k-conflict { padding: 8px 10px; border-radius: 9px; background: var(--well); border: 1px solid var(--line); }
.ws-k-conflict ul { margin: 4px 0 0; padding-left: 18px; }
.ws-k-link { font-size: 12.5px; font-weight: 600; }
/* Ab 1200 px liegt die Leiste NEBEN dem Artikel statt darüber. */
@media (min-width: 1200px) {
  body.ws-knowledge-open .adm-main { padding-right: 400px; }
  .ws-knowledge { box-shadow: none; }
}
@media (max-width: 560px) {
  .ws-knowledge { top: auto; height: 78vh; width: 100vw; border-left: 0; border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0; }
}

/* ---------- KI am Block (MMC 3 Slice 3) ---------- */
.ai-inline-menu { min-width: 290px; max-width: min(420px, calc(100vw - 32px)); gap: 2px; }
.ai-inline-menu .blk-ai-item small { display: block; font-size: 11.5px; color: var(--mut); font-weight: 400; }
.blk-ai-note { margin: 4px 10px 8px; font-size: 12.5px; line-height: 1.5; color: var(--ink2); }
.ai-who { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 8px 10px;
  border-top: 1px solid var(--line); font-size: 12.5px; }
.ai-who-label { font-weight: 700; color: var(--mut); }
.ai-who-opt { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.ai-model { font-size: 12.5px; max-width: 100%; }
.ai-box { margin-top: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--well); display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.5; }
.ai-box p { margin: 0; }
.ai-box-run { border-style: dashed; }
.ai-box-err { border-color: var(--amber); }
.ai-box-info { border-color: var(--line); }
.ai-open-list { margin: 2px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--ink2); }
.ai-open-list li { margin: 1px 0; }
.ai-step-done { color: var(--green); }
.ai-step-failed { color: var(--red); }
.ai-head { font-weight: 700; }
.ai-who-done { font-weight: 400; color: var(--mut); }
.ai-compare { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.ai-before, .ai-after { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ai-cap { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); }
.ai-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; padding: 8px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line); }
.ai-before .ai-text { color: var(--mut); }
.ai-evidence { font-size: 12.5px; }
.ai-warn { font-size: 12.5px; color: var(--ink2); }
.ai-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ai-retry { position: relative; }
.ai-retry > summary { list-style: none; cursor: pointer; }
.ai-retry > summary::-webkit-details-marker { display: none; }
.ai-retry-menu { position: absolute; z-index: 25; bottom: calc(100% + 4px); left: 0; min-width: 170px; display: flex;
  flex-direction: column; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  box-shadow: 0 8px 22px rgba(0,0,0,.14); }
.ai-details summary { font-size: 12px; cursor: pointer; color: var(--mut); }
.ai-tech { font-size: 11.5px; color: var(--mut); overflow-wrap: anywhere; }
@media (max-width: 560px) { .ai-compare { grid-template-columns: 1fr; } }

/* ---------- Ganzer Artikel (MMC 3 Slice 4) ---------- */
.ai-article { display: flex; flex-direction: column; gap: 10px; margin: 0 0 14px; }
.ai-art-bar { position: relative; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ai-split { display: inline-flex; }
.ai-split .ai-art-go { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.ai-split .ai-art-more { border-top-left-radius: 0; border-bottom-left-radius: 0; padding-left: 10px; padding-right: 10px;
  border-left: 1px solid rgba(0,0,0,.18); }
.ai-art-auto { max-width: 36ch; }
.ai-art-check { margin: 0 0 0 auto; }
.ai-art-suggest { outline: 2px solid var(--fox, #c2571f); outline-offset: 2px; }
.ai-art-opts { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: min(460px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); box-shadow: 0 10px 28px rgba(0,0,0,.16); }
.ai-art-opts .ai-who { border-top: 0; padding: 0; }
.ai-art-wish-l { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink2); }
.ai-art-wish, .ai-custom { font: inherit; font-size: 13px; padding: 8px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); resize: vertical; }
.ai-custom { margin: 0 10px 6px; }
.ai-art-card { position: sticky; top: 8px; z-index: 5; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--well); display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.5;
  box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.ai-art-card p { margin: 0; }
.ai-art-run { border-style: dashed; }
.ai-art-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-art-step { font-size: 12.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.ai-art-step.ai-step-running { border-color: var(--fox, #c2571f); font-weight: 700; }
.ai-art-step.ai-step-waiting { color: var(--mut); }
.ai-art-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow: auto; }
.ai-art-item { padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; gap: 6px; }
.ai-art-note { font-size: 12.5px; color: var(--ink2); }
@media (max-width: 560px) {
  .ai-art-check { margin-left: 0; }
  .ai-art-card { position: static; }
}

/* ---------- Prüfbefunde am Block (MMC 3 Slice 5) ---------- */
.blk-check { margin-top: 8px; font-size: 12.5px; border-radius: 8px; padding: 4px 8px; background: var(--well); }
.blk-check > summary { cursor: pointer; color: var(--ink2); }
.blk-check-bad { border-left: 3px solid var(--red, #a33); }
.blk-check-warn { border-left: 3px solid var(--amber, #8a6d1a); }
.blk-check-ok { border-left: 3px solid var(--green, #2e6b39); }
.blk-check-info { border-left: 3px solid var(--line); }
.blk-check-f { margin: 4px 0 0; line-height: 1.5; }
.blk-check-contradicted { color: var(--red, #a33); }
.ai-art-checkline { flex-basis: 100%; }

/* ---------- Veröffentlichen-Sheet (MMC 3 Slice 5, D4) ---------- */
.pub-sheet { border: 1px solid var(--amber, #8a6d1a); }
.pub-sheet-list { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pub-hint { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 8px 10px; border-radius: 8px; background: var(--well); font-size: 13.5px; }
.pub-hint-warning { border-left: 3px solid var(--amber, #8a6d1a); }
.pub-hint-info { border-left: 3px solid var(--line); color: var(--ink2); }
.pub-hint-act { margin: 0; }
.ws-k-pick { display: inline; margin: 0 0 0 6px; }
.blk-origin { margin-top: 8px; font-size: 12.5px; color: var(--ink2); }
details.blk-origin > summary { cursor: pointer; }
.blk-origin-changed { color: var(--mut); }

/* ---------- KI › Regeln & Wissen / Automatik (MMC 3 Slice 6) ---------- */
.aic-pick-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 4px 0; }
.aic-pick-row > .sm.mut:first-child { min-width: 150px; }
.aic-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; }
.aic-group legend { padding: 0 6px; }
.aic-tasks > summary { cursor: pointer; margin: 6px 0; }
.aic-steps { margin-top: 6px; }
.aic-model { width: 170px; }
.aic-test-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0; }
.aic-rules { margin: 6px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.55; }
.aic-rules li { margin: 3px 0; }
.aic-tpl > summary { cursor: pointer; margin: 4px 0; }

/* ---------- KI › Lokale KI (MMC 3 Slice 7) ---------- */
.lab-device .ph { flex-wrap: wrap; gap: 8px; }
.lab-acts { white-space: nowrap; }
.lab-acts form, .lab-acts details { display: inline-block; vertical-align: top; margin: 0 4px 0 0; }
.lab-del > summary { list-style: none; cursor: pointer; }
.lab-del > summary::-webkit-details-marker { display: none; }
.lab-del-form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding: 8px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--well); white-space: normal; }
.lab-answer { margin: 6px 0; white-space: pre-wrap; font-size: 13px; line-height: 1.55; }
.lab-try textarea { font: inherit; font-size: 13.5px; padding: 8px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); }

/* Produkttabelle: Lebenszyklus in der Zeile (Korrektur-Chunk nach MMC 3). */
.pw-table td { vertical-align: top; }
.pw-state { min-height: 32px; padding: 4px 8px; font-size: 13.5px; }
.pw-state-published { border-color: var(--green, var(--line)); }
.pw-offline-confirm { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding: 8px;
  border-radius: 8px; background: var(--ambersoft); max-width: 240px; }
.pw-offline-confirm[hidden] { display: none; }
.pw-actions { flex-wrap: wrap; justify-content: flex-start; }
.pw-more { position: relative; }
.pw-more > summary { list-style: none; cursor: pointer; min-width: 34px; text-align: center; }
.pw-more > summary::-webkit-details-marker, .pw-confirm > summary::-webkit-details-marker { display: none; }
.pw-more-menu { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding: 6px; min-width: 230px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 22px rgba(0,0,0,.10); }
.pw-item { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none;
  color: inherit; font: inherit; font-size: 13.5px; text-align: left; text-decoration: none; cursor: pointer; }
.pw-item:hover, .pw-item:focus-visible { background: var(--well); }
.pw-confirm > summary { list-style: none; }
.pw-danger { color: var(--red); }
.pw-confirm-box { display: flex; flex-direction: column; gap: 7px; margin: 4px 0 2px; padding: 10px;
  border-radius: 8px; background: var(--redsoft); }
.pw-danger-btn { color: var(--red); border-color: var(--red); }
/* Breit genug, dass die Tabelle nicht seitlich scrollt: das Menü klappt über
   der Tabelle auf (rechtsbündig), statt die Zeile aufzuweiten. Schmal bleibt
   es in der Zeile — ein Overlay würde im Scrollbereich abgeschnitten. */
@media (min-width: 1100px) {
  .pw-scroll { overflow: visible; }
  .pw-actions { flex-wrap: nowrap; }
  .pw-more-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; width: 270px; }
}
/* MMC 4: Arbeitsqueue — Freigabe je Zeile */
.pw-ready { margin-top: 4px; }
.pw-ready-ready b, .pw-ready-live b { color: var(--green); }
.pw-open { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 2px; }
@media (max-width: 560px) {
  .wb-ready .wb-next { flex-direction: column; align-items: stretch; }
  .wb-ready .wb-next .wb-cta { width: 100%; }
}

/* MMC 5 — Qualität am Artikel: kompakt, Details einklappbar */
.ws-quality .qa-items{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.ws-quality .qa-item{display:flex;gap:8px;align-items:flex-start;line-height:1.4}
.ws-quality .qa-sym{flex:0 0 1.2em;font-weight:700;text-align:center}
.ws-quality .qa-ok .qa-sym{color:var(--green)}
.ws-quality .qa-hint .qa-sym,.ws-quality .qa-unknown .qa-sym{color:var(--amber)}
.ws-quality .qa-body{min-width:0;flex:1}
.ws-quality .qa-sum{color:var(--ink2)}
.ws-quality .qa-details ul{margin:6px 0 0;padding-left:1.1em;display:grid;gap:6px}
.ws-quality .qa-text{overflow-wrap:anywhere}
.ws-quality .qa-fix{display:inline;margin-left:6px}

/* Kaufweg & Galerie — Kaufwege kompakt, Ziel prüfbar, kein Dashboard */
.pp-card .pp-paths{display:grid;gap:10px}
.pp-card .pp-path{border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:var(--surface)}
.pp-card .pp-path.is-primary{border-color:var(--green)}
.pp-card .pp-head{display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center;margin-bottom:6px}
.pp-card .pp-facts{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px 12px;margin:0 0 8px;font-size:13px}
.pp-card .pp-facts dt{color:var(--ink2)}
.pp-card .pp-facts dd{margin:0;min-width:0}
.pp-card code,.pp-card .pp-url{overflow-wrap:anywhere;word-break:break-word}
@media (max-width: 560px){.pp-card .pp-facts{grid-template-columns:1fr}.pp-card .pp-facts dt{margin-top:4px}}

/* Anwender-Audit 29.09.2026: Speicher-Quittung — was gespeichert wurde und wie es
   weitergeht (derselbe nächste Schritt wie der Arbeitskopf). Kurz, bleibt stehen. */
.save-receipt{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 16px;border-left:4px solid var(--green)}
.save-receipt.err{border-left-color:var(--red)}
.save-receipt-msg{font-weight:600;color:var(--ink);flex:1 1 240px;min-width:0;overflow-wrap:anywhere}
.save-receipt.err .save-receipt-msg{color:var(--red)}
.save-receipt-check{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;
  background:var(--green);color:#fff;font-size:13px;margin-right:8px;vertical-align:-4px}
.save-receipt-next{white-space:normal;text-align:left}

/* Anwender-Audit: die zwei Alltagsfragen zuerst; das gerade fertige Produkt oben. */
.pw-groups .chip-strong{font-weight:700;border-width:2px}
.pw-focus{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border-left:4px solid var(--green)}
.pw-focus-title{font-size:15px;min-width:0;overflow-wrap:anywhere}
.pw-focus-links{display:flex;gap:6px;flex-wrap:wrap;margin-left:auto}
.pw-table tr.is-focus>td{background:var(--accsoft)}

/* ---------- Come-out: Marketing (Sidebar-Unterbereich, Übersicht, Pool, Kalender, Queue) ---------- */
/* Der Pfeil liegt absolut ÜBER dem Hauptlink. Kein negativer Rand am Element selbst: sonst rutscht der
   nächste Hauptpunkt über „Marketing“ und fängt dessen Klicks ab (Befund der Browser-Reise 30.09.). */
.adm-side nav details.adm-subnav { position: relative; margin: -2px 0 0; padding: 0; }
.adm-side nav .adm-subnav > summary { list-style: none; position: absolute; right: 6px; top: calc(-2px - 28px); width: 24px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center; color: var(--sidemut); cursor: pointer; border-radius: 6px; }
.adm-side nav .adm-subnav > summary::-webkit-details-marker { display: none; }
.adm-side nav .adm-subnav[open] > summary { transform: rotate(180deg); }
.adm-side nav .adm-subnav-list { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 22px; padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, .12); }
.adm-side nav .adm-subnav-list a { padding: 6px 10px; font-size: 13px; font-weight: 500; }
.mk-tabs { margin-bottom: 14px; }
.mk-outside { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.mk-outside .mk-ch { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.mk-outside .mk-ch b { font-size: 13.5px; }
.mk-next { display: flex; flex-direction: column; gap: 8px; }
.mk-next .todo-row .txt { flex: 1; }
.mk-pool td.mk-check { width: 28px; }
.mk-pool .mk-title { font-weight: 700; }
.mk-pool .mk-warn { color: var(--amber); }
.mk-bulk { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.mk-cal { display: grid; gap: 6px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mk-day { display: flex; flex-direction: column; gap: 6px; min-height: 120px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.mk-day.today { border-color: var(--fox); }
.mk-day .mk-dh { font-size: 12px; font-weight: 700; color: var(--mut); }
.mk-slot { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); font-size: 12px;
  text-decoration: none; color: inherit; border-left-width: 3px; }
.mk-slot .mk-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.mk-slot .mk-ch-lbl { font-size: 11px; color: var(--mut); }
.mk-slot.ch-instagram { border-left-color: #C13584; } .mk-slot.ch-facebook { border-left-color: #1877F2; }
.mk-slot.ch-tiktok { border-left-color: #231D17; } .mk-slot.ch-pinterest { border-left-color: #E60023; }
.mk-slot.ch-youtube_shorts { border-left-color: #FF0000; }
.mk-slot.st-failed { border-color: var(--red); } .mk-slot.st-done { opacity: .7; }
.mk-slot-wrap { position: relative; display: block; }
.mk-pop { display: none; position: absolute; z-index: 6; left: 0; top: calc(100% + 4px); width: min(240px, 70vw);
  padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.mk-pop img { width: 120px; height: auto; border-radius: 6px; }
.mk-slot-wrap:hover .mk-pop, .mk-slot-wrap:focus-within .mk-pop { display: flex; flex-direction: column; gap: 6px; }
.mk-month { display: grid; gap: 6px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mk-rail { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.mk-chip { flex: 1 1 150px; max-width: 100%; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-decoration: none; color: inherit; border-left-width: 3px; }
.mk-chip.ch-instagram { border-left-color: #C13584; }
.mk-chip.ch-facebook { border-left-color: #1877F2; }
.mk-chip.ch-pinterest { border-left-color: #E60023; }
.mk-chip.ch-tiktok { border-left-color: #231D17; }
.mk-chip.ch-youtube_shorts { border-left-color: #FF0000; }
.mk-quiet { margin: 0 0 8px; }
.mk-more > summary { cursor: pointer; }
.mk-more[open] > summary { margin-bottom: 4px; }
.mk-month > .mk-dh { font-size: 11px; font-weight: 700; color: var(--mut); }
.mk-day.mk-out { opacity: .45; }
.mk-views { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.mk-views a.on { border-color: var(--fox); }
.mk-review { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.mk-review-img { width: 120px; max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.mk-review-empty { display: flex; align-items: center; justify-content: center; min-height: 120px; color: var(--mut); font-size: 12px; }
.mk-pack { display: flex; flex-direction: column; gap: 6px; }
.mk-pack-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-pack-card { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-left-width: 3px; border-radius: 8px; padding: 8px; text-decoration: none; color: inherit; flex: 1 1 240px; max-width: 100%; }
.mk-pack-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mk-pack-copy p { margin: 0; white-space: pre-wrap; }
.mk-pack-card.on { border-color: var(--fox); }
.mk-pack-card img, .mk-pack-ph { width: 72px; min-height: 72px; height: auto; border-radius: 6px; flex: 0 0 72px; }
.mk-pack-ph { display: flex; align-items: center; justify-content: center; background: #efe8df; color: #5c564e; font-size: 11px; text-align: center; padding: 6px; }
.mk-pack-card[data-status="scheduled"] { border-left-color: #fc580b; }
.mk-pack-card[data-status="published"] { border-left-color: #1f7a4d; }
.mk-pack-card[data-status="failed"] { border-left-color: #b42318; }
.mk-pack-copy, .mk-drawer-text { overflow-wrap: anywhere; }
.mk-boards { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.mk-canva { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.mk-agenda { display: none; }
.mk-queue-day { display: flex; flex-direction: column; gap: 6px; }
.mk-queue-day h3 { margin: 10px 0 2px; font-size: 13px; color: var(--mut); }
.mk-preview { white-space: pre-wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--well); font-size: 14px; line-height: 1.55; }
.mk-assets { display: flex; gap: 10px; flex-wrap: wrap; }
.mk-assets img { width: 140px; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.mk-status-list { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 760px) {
  .mk-cal, .mk-month { display: none; }
  .mk-agenda { display: flex; flex-direction: column; gap: 8px; }
  .mk-outside { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   Prüfung (Review Foundation, Schema 44) — Geschwindigkeit vor Schönheit:
   links prüfen/korrigieren, rechts die echte Vorschau, unten entscheiden.
   --------------------------------------------------------------------------- */
.rv-nav { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.rv-nav .rv-pos { font-weight: 700; font-variant-numeric: tabular-nums; }
.rv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
.rv-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rv-preview { position: sticky; top: calc(var(--adm-head-h, 56px) + 8px); display: flex; flex-direction: column; gap: 8px; }
.rv-preview iframe { width: 100%; height: 76vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.rv-field { display: flex; flex-direction: column; gap: 4px; }
.rv-field .k { font-size: 11.5px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; }
.rv-field .v { font-size: 14px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.rv-field .v.empty-v { color: var(--mut); font-style: italic; }
.rv-blocks { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow: auto; padding-right: 4px; }
.rv-blocks .b { border-left: 3px solid var(--line); padding: 2px 0 2px 10px; font-size: 13.5px; line-height: 1.55; }
.rv-blocks .b .t { font-size: 11px; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; }
.rv-finding { font-size: 13px; line-height: 1.5; }
.rv-finding .vd { font-weight: 700; }
.rv-finding.contradicted .vd, .rv-finding.unsupported .vd { color: var(--red); }
.rv-finding.uncertain .vd { color: var(--amber); }
.rv-finding.supported .vd, .rv-finding.derived .vd, .rv-finding.advice .vd { color: var(--green); }
/* Fest am unteren Rand (der Admin scrollt das Dokument, sticky greift dort nicht) — der Platzhalter hält Inhalt frei. */
.rv-decide { position: fixed; bottom: 12px; left: calc(var(--side-w) + 24px); right: 24px; z-index: 40; display: flex; flex-wrap: wrap;
  gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; box-shadow: 0 -6px 24px rgba(0,0,0,.12); max-height: 45vh; overflow: auto; }
.rv-decide-space { height: 190px; }
.rv-decide form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin: 0; }
.rv-decide textarea { min-width: 280px; flex: 1; min-height: 44px; font: inherit; font-size: 13.5px; line-height: 1.45; }
.rv-return { flex: 1; min-width: 300px; }
.btn.rv-publish { background: var(--green); border-color: var(--green); color: #fff; }
.rv-banner { border: 2px solid var(--amber); background: var(--ambersoft); border-radius: 12px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px; }
.rv-banner .h { font-weight: 800; letter-spacing: .04em; font-size: 12.5px; color: var(--ink); }
.rv-banner blockquote { margin: 0; padding: 8px 12px; background: var(--surface); border-radius: 8px; font-size: 14px;
  line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.rv-banner.ready { border-color: var(--green); background: var(--surface); }
.rv-history { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.rv-history li { line-height: 1.5; }
/* Review Workspace 2.0: Vorschlag mit Vorher/Nachher */
.rv-proposal { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.rv-proposal + .rv-proposal { margin-top: 4px; }
.rv-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rv-diff .v { font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.rv-diff > div:last-child .v { background: var(--ambersoft, #fff7e6); border-radius: 6px; padding: 4px 6px; }
#cms-editor .blk-act[hidden] { display: none; }
@media (max-width: 900px) {
  .rv-decide { left: 12px; right: 12px; bottom: 8px; }
}
@media (max-width: 1100px) {
  .rv-grid { grid-template-columns: 1fr; }
  .rv-preview { position: static; }
  .rv-preview iframe { height: 70vh; }
}
.mk-social { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mk-outside a.mk-ch { text-decoration: none; color: inherit; }
.mk-social-head h2 { margin: 0; font-size: 1.2rem; }
.mk-social-title { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; }
.mk-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; }
.mk-facts li { display: flex; gap: 6px; align-items: center; }
.mk-setup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mk-conn { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.mk-social .mk-asset { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: flex-start;
  padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.mk-social .mk-asset > :first-child { min-width: 0; flex: 1 1 12rem; }
.mk-social-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.mk-social .mk-inline { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; max-width: 100%; }
.mk-social :is(.btn, .btn2, .btng) { width: auto; min-height: 36px; padding: 6px 12px; font-size: 13.5px; }
.mk-social .btn-danger { background: transparent; color: var(--red); border: 1px solid var(--red); }
.mk-social label.xs { display: flex; gap: 6px; align-items: flex-start; max-width: 36rem; }
.mk-chips { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.mk-chips a { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px;
  text-decoration: none; color: inherit; white-space: nowrap; }
.mk-chips a.on { border-color: var(--ink); font-weight: 700; }
.mk-cadence { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.mk-cadence input[type="number"] { width: 6rem; }
.mk-cadence input[name="windows"] { width: 100%; max-width: 18rem; }
.mk-social .empty-inline { margin: 4px 0 0; }
@media (max-width: 760px) {
  .mk-setup { grid-template-columns: 1fr; }
  .mk-social .mk-asset { flex-direction: column; }
}

.mk-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.mk-task[hidden], .mk-result[hidden], .mk-channel-detail[hidden] { display: none; }
.mk-tray { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.mk-tray .mk-slot { cursor: grab; }
.mk-slot.is-dragging { opacity: .45; }
.mk-day.is-drop { outline: 2px solid var(--fox); outline-offset: -2px; }
.mk-day.is-bad { outline: 2px solid var(--red); }
.mk-move { margin-top: 4px; }
.mk-drawer { position: fixed; z-index: 40; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
  background: var(--surface); color: inherit; border-left: 1px solid var(--line); padding: 16px; overflow: auto; }
.mk-drawer-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.mk-drawer-img { width: 100%; max-height: 280px; object-fit: contain; background: #0c1822; }
.mk-bar { display: block; height: 10px; margin: 6px 0; border-radius: 999px; background: var(--fox); max-width: 100%; }
.mk-bar span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mk-own { margin-top: 8px; }
#kanaele { margin-top: 14px; }
#kanaele summary { cursor: pointer; }
.mk-finding { border-top: 1px solid var(--line); padding: 8px 0; }
.mk-finding summary { cursor: pointer; }
.mk-hours { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.mk-hour { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 999px; font-size: 11px; padding: 2px 6px; }
.mk-day.mk-span { background: color-mix(in srgb, #fc580b 12%, transparent); }
.mk-series { display: flex; align-items: flex-end; gap: 6px; min-height: 72px; margin: 8px 0 12px; }
.mk-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; width: 18px; }
.mk-col-ok { display: block; width: 10px; background: #fc580b; }
.mk-col-bad { display: block; width: 10px; background: #b42318; }
.mk-filters input, .mk-filters select { max-width: 100%; }

/* ===========================================================================
   MARKETING CONTROL CENTER 4.0 — Premium-Arbeitsflächen.
   Baut ausschließlich auf den Tokens aus /assets/style.css auf. Jede Fläche
   bekommt eine eigene Interaktionsform über einem gemeinsamen System:
   Statuszeile, EINE Aufgabenliste, visueller Kalender, Social-Studio,
   SEO-Arbeitsfläche, echte Analytics. Kanalidentität bleibt konsistent.
   =========================================================================== */

/* -- Kanalidentität: eine Quelle für Farbe und Label je Plattform ---------- */
:root {
  --ch-instagram: #C13584; --ch-facebook: #1877F2; --ch-pinterest: #E60023;
  --ch-tiktok: #231D17; --ch-ytshorts: #FF0000; --ch-newsletter: #6B4E9E;
  --accent-find: #FC9B22; --accent-find-soft: rgb(252 155 34 / 0.18);
  --ch-rss: #E8820B; --ch-search: #33608F; --ch-default: var(--fox);
}
.mk-pf { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .01em; padding: 3px 9px 3px 7px; border-radius: var(--r-pill); white-space: nowrap;
  background: var(--well); color: var(--ink); border: 1px solid var(--line); }
.mk-pf::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ch-default); flex: 0 0 8px; }
.mk-pf.ch-instagram::before { background: var(--ch-instagram); }
.mk-pf.ch-facebook::before { background: var(--ch-facebook); }
.mk-pf.ch-pinterest::before { background: var(--ch-pinterest); }
.mk-pf.ch-tiktok::before { background: var(--ch-tiktok); }
.mk-pf.ch-youtube_shorts::before { background: var(--ch-ytshorts); }
.mk-pf.ch-newsletter::before { background: var(--ch-newsletter); }
.mk-pf.ch-rss::before { background: var(--ch-rss); }
.mk-pf.ch-search::before { background: var(--ch-search); }

.mk-eyebrow { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800;
  color: var(--fox-deep); display: block; margin: 0 0 2px; }
.panel.mk-hero { gap: 6px; }

/* -- Statuszeile (HEUTE): kompakte, klare Kacheln ------------------------- */
.mk-stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.mk-stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--r-img);
  background: var(--well); border: 1px solid var(--line); text-decoration: none; color: inherit;
  transition: transform .15s ease, border-color .15s, box-shadow .15s; }
a.mk-stat:hover { transform: translateY(-2px); border-color: var(--line); box-shadow: var(--shadow-lift); }
.mk-stat .n { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.05;
  font-variant-numeric: tabular-nums; color: var(--ink); }
.mk-stat .k { font-size: 12px; font-weight: 600; color: var(--ink2); }
.mk-stat .sub { font-size: 11px; color: var(--mut); }
.mk-stat::before { content: ""; height: 3px; width: 32px; border-radius: 3px; background: var(--line); margin-bottom: 6px; }
.mk-stat.t-problem::before { background: var(--red); } .mk-stat.t-problem .n { color: var(--red); }
.mk-stat.t-review::before { background: var(--amber); }
.mk-stat.t-ok::before { background: var(--green); }
.mk-stat.t-chance::before { background: var(--accent-find); }
.mk-stat.t-info::before { background: var(--fox); }

/* -- EINE Aufgabenliste „Das solltest du jetzt tun" ---------------------- */
.mk-do { display: flex; flex-direction: column; gap: 8px; }
.mk-do-item { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border: 1px solid var(--line);
  border-left-width: 4px; border-radius: var(--r-img); background: var(--surface);
  transition: border-color .15s, box-shadow .15s; }
.mk-do-item:hover { box-shadow: var(--shadow-lift); }
.mk-do-item.k-problem { border-left-color: var(--red); }
.mk-do-item.k-approval { border-left-color: var(--amber); }
.mk-do-item.k-planned { border-left-color: var(--fox); }
.mk-do-item.k-chance { border-left-color: var(--accent-find); }
.mk-do-item.k-optimize { border-left-color: var(--ch-search); }
.mk-do-ico { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--well); color: var(--ink2); }
.mk-do-item.k-problem .mk-do-ico { background: var(--redsoft); color: var(--red); }
.mk-do-item.k-approval .mk-do-ico { background: var(--ambersoft); color: var(--amber); }
.mk-do-item.k-chance .mk-do-ico { background: var(--accent-find-soft); color: var(--fox-deep); }
.mk-do-item.k-planned .mk-do-ico { background: var(--fox-soft); color: var(--fox-deep); }
.mk-do-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mk-do-body .ttl { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.mk-do-body .why { font-size: 12.5px; color: var(--ink2); line-height: 1.45; }
.mk-do-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.mk-tag { font-size: 11px; color: var(--ink2); background: var(--well); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 2px 8px; white-space: nowrap; }
.mk-tag.pos { color: var(--green); border-color: color-mix(in srgb, var(--green) 30%, var(--line)); }
.mk-do-act { flex: 0 0 auto; }
.mk-run { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-img); background: var(--well); }
.mk-run.is-bad { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); background: var(--redsoft); }
.mk-run.is-ok { border-color: color-mix(in srgb, var(--green) 36%, var(--line)); background: var(--greensoft); }
.mk-run .rl { font-size: 12.5px; color: var(--ink); flex: 1 1 260px; line-height: 1.5; }
.mk-run .rl b { font-weight: 800; }
.mk-prepare { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* -- PLANUNG: Kalender als Mittelpunkt ----------------------------------- */
.mk-plan-grid { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 16px; align-items: start; }
.mk-plan-main { min-width: 0; }
.mk-cal-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.mk-cal-nav { display: flex; align-items: center; gap: 8px; }
.mk-cal-nav b { font-size: 15px; font-weight: 700; min-width: 11ch; }
.mk-cal { display: grid; gap: 8px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mk-day { gap: 7px; min-height: 148px; padding: 9px; border-radius: var(--r-img); background: var(--bg); }
.mk-day.today { border-color: var(--fox); box-shadow: inset 0 0 0 1px var(--fox); }
.mk-day .mk-dh { font-size: 11.5px; font-weight: 700; color: var(--mut); display: flex; justify-content: space-between; }
.mk-hours { gap: 4px; margin: 0 0 2px; opacity: .55; transition: opacity .15s; }
.mk-day:hover .mk-hours, .mk-day:focus-within .mk-hours { opacity: 1; }
.mk-hour { border: 1px dashed var(--line); color: var(--mut); padding: 2px 7px; font-weight: 600; }
.mk-hour:hover { border-style: solid; border-color: var(--fox); color: var(--fox-deep); }
.mk-slot { gap: 3px; padding: 7px 8px; border-left-width: 3px; background: var(--surface); box-shadow: var(--shadow);
  text-decoration: none; color: inherit; }
.mk-slot:hover { border-color: var(--line); }
.mk-slot .mk-time { font-size: 11.5px; color: var(--ink); display: flex; align-items: center; gap: 5px; }
.mk-slot .mk-time::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ch-default); flex: 0 0 7px; }
.mk-slot.ch-instagram .mk-time::before { background: var(--ch-instagram); }
.mk-slot.ch-facebook .mk-time::before { background: var(--ch-facebook); }
.mk-slot.ch-pinterest .mk-time::before { background: var(--ch-pinterest); }
.mk-slot.ch-tiktok .mk-time::before { background: var(--ch-tiktok); }
.mk-slot.ch-youtube_shorts .mk-time::before { background: var(--ch-ytshorts); }
.mk-slot.has-thumb { flex-direction: row; align-items: center; gap: 7px; }
.mk-slot-thumb { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 6px; object-fit: cover;
  background: #fff; border: 1px solid var(--line); }
.mk-slot-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mk-slot-ttl { font-size: 12px; font-weight: 600; color: var(--ink); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Kalender-Raster kompakt: Titel einzeilig, Quelle und der Inline-Verschieben-Knopf
   leben im Hover/Drawer und in der Agenda, damit die Tageszellen nicht überlaufen. */
.mk-cal .mk-move, .mk-month .mk-move { display: none; }
.mk-cal .mk-slot .mk-ch-lbl, .mk-month .mk-slot .mk-ch-lbl { display: none; }
.mk-cal .mk-slot .mk-time, .mk-month .mk-slot .mk-time { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Im engen Raster trägt der Farbpunkt die Plattform; der Name entfällt, die Uhrzeit bleibt ganz lesbar. */
.mk-cal .mk-time-ch, .mk-month .mk-time-ch { display: none; }
/* Das 7-Spalten-Raster ist eng: die Miniatur entfällt hier (Plattform zeigt der Farbpunkt),
   damit Uhrzeit und Titel lesbar bleiben. Miniatur bleibt in Agenda, Tray und Drawer. */
.mk-cal .mk-slot-thumb, .mk-month .mk-slot-thumb { display: none; }
.mk-cal .mk-slot.has-thumb, .mk-month .mk-slot.has-thumb { gap: 0; }
.mk-cal .mk-slot, .mk-month .mk-slot { max-width: 100%; overflow: hidden; }
.mk-slot.st-done { opacity: .62; } .mk-slot.st-failed { border-color: var(--red); background: var(--redsoft); }
.mk-tray { flex-direction: column; flex-wrap: nowrap; gap: 8px; margin: 0; position: sticky;
  top: calc(var(--adm-head-h, 58px) + 8px); }
.mk-tray-card { display: flex; gap: 9px; align-items: flex-start; padding: 9px; border: 1px solid var(--line);
  border-left-width: 3px; border-radius: var(--r-img); background: var(--surface); cursor: grab; box-shadow: var(--shadow); }
.mk-tray-card:hover { box-shadow: var(--shadow-lift); }
.mk-tray-card img, .mk-tray-card .mk-ph { width: 46px; height: 60px; flex: 0 0 46px; border-radius: 8px; object-fit: cover;
  background: #fff; border: 1px solid var(--line); }
.mk-tray-card .mk-ph { display: grid; place-items: center; font-size: 9px; color: var(--mut); text-align: center; }
.mk-tray-card .tc { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mk-tray-card .tc b { font-size: 12.5px; line-height: 1.25; overflow-wrap: anywhere; }
.mk-tray.ch-instagram, .mk-tray-card.ch-instagram { border-left-color: var(--ch-instagram); }
.mk-tray-card.ch-facebook { border-left-color: var(--ch-facebook); }
.mk-tray-card.ch-pinterest { border-left-color: var(--ch-pinterest); }
.mk-tray-head { font-size: 12px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 2px; }
.mk-camp-strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mk-camp-chip { display: inline-flex; flex-direction: column; gap: 1px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: var(--r-img); background: var(--surface); text-decoration: none; color: inherit; min-width: 120px; }
.mk-camp-chip:hover { border-color: var(--fox); }
.mk-camp-chip.on { border-color: var(--fox); background: var(--fox-soft); }
.mk-camp-chip b { font-size: 13px; }
.mk-camp-chip .st { font-size: 11px; color: var(--mut); }
.mk-camp-progress { height: 6px; border-radius: 3px; background: var(--well2); overflow: hidden; margin-top: 4px; }
.mk-camp-progress i { display: block; height: 100%; background: var(--fox); }

/* -- Dialog/Drawer für Formulare (Kampagne anlegen) ----------------------- */
.mk-dlg { border: none; padding: 0; border-radius: var(--r-card); box-shadow: var(--shadow-lift);
  background: var(--surface); color: var(--ink); max-width: 480px; width: calc(100% - 32px); }
.mk-dlg::backdrop { background: rgb(12 24 34 / .4); }
.mk-dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px;
  border-bottom: 1px solid var(--line); }
.mk-dlg-head b { font-size: 15px; font-weight: 700; }
.mk-dlg form { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }

/* -- REDAKTION: Social Content Studio ------------------------------------ */
.mk-subnav { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-subnav a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: var(--r-pill);
  border: 1px solid var(--line); font-size: 13px; font-weight: 600; text-decoration: none; color: var(--ink2);
  background: var(--surface); }
.mk-subnav a.on { border-color: transparent; background: var(--ink); color: var(--bg); }
.mk-subnav a .cnt { font-size: 11px; font-weight: 800; background: var(--well2); color: var(--ink2);
  border-radius: var(--r-pill); padding: 0 7px; min-width: 18px; text-align: center; }
.mk-subnav a.on .cnt { background: rgb(255 255 255 / .22); color: var(--bg); }
.mk-studio { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.mk-pack { gap: 10px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface);
  padding: 14px; box-shadow: var(--shadow); }
.mk-pack-head { display: flex; gap: 11px; align-items: flex-start; }
.mk-pack-head img, .mk-pack-head .mk-ph { width: 56px; height: 56px; flex: 0 0 56px; border-radius: var(--r-img);
  object-fit: cover; background: #fff; border: 1px solid var(--line); }
.mk-pack-head img.no-photo { object-position: top; }
.mk-pack-head .mk-ph { display: grid; place-items: center; font-size: 10px; color: var(--mut); text-align: center; }
.mk-pack-head .pt { min-width: 0; }
.mk-pack-head .pt b { font-size: 14px; line-height: 1.25; display: block; overflow-wrap: anywhere; }
.mk-pack-head .pt .src { font-size: 11.5px; color: var(--mut); }
.mk-pack-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.mk-post { border: 1px solid var(--line); border-radius: var(--r-img); overflow: hidden;
  background: var(--surface); display: flex; flex-direction: column; box-shadow: var(--shadow); min-width: 0; }
.mk-post-top { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-bottom: 1px solid var(--line); }
.mk-post-top .mk-pf { border: none; background: transparent; padding: 0; font-size: 12px; }
.mk-post-top .st { margin-left: auto; font-size: 11px; }
.mk-post-img { width: 100%; display: block; background: #fff; object-fit: cover; object-position: top center; }
/* Textkarte (kein Produktfoto): kompaktes Markenbanner statt großer leerer Fläche. */
.mk-post.no-photo .mk-post-img { height: 136px; }
/* Echtes Produktfoto: groß und mittig im jeweiligen Format. */
.mk-post.has-photo .mk-post-img { object-position: center; }
.mk-post.has-photo.pin .mk-post-img { aspect-ratio: 2 / 3; max-height: 300px; }
.mk-post.has-photo.ig .mk-post-img { aspect-ratio: 1 / 1; max-height: 260px; }
.mk-post.has-photo.fb .mk-post-img { aspect-ratio: 1.91 / 1; }
.mk-post-ph { width: 100%; height: 108px; display: grid; place-items: center; color: var(--mut);
  font-size: 11.5px; text-align: center; padding: 0 10px; background: var(--well); }
.mk-post-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.mk-post-cap { font-size: 12.5px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; white-space: pre-wrap; }
.mk-post-meta { display: flex; flex-wrap: wrap; gap: 5px 8px; font-size: 11px; color: var(--mut); align-items: center; }
.mk-post-foot { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 12px; border-top: 1px solid var(--line); }
.mk-stock-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* -- WACHSTUM: SEO-Arbeitsfläche ----------------------------------------- */
.mk-growth-nav { margin-bottom: 4px; }
.mk-ready { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.mk-ready .r { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--r-img);
  background: var(--well); border: 1px solid var(--line); }
.mk-ready .r .n { font-family: var(--font-display); font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; }
.mk-ready .r .k { font-size: 11.5px; color: var(--ink2); font-weight: 600; }
.mk-ready .r.blk .n { color: var(--red); } .mk-ready .r.warn .n { color: var(--amber); }
.mk-ready .r.ok .n { color: var(--green); }
.mk-gate { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; padding: 4px 11px;
  border-radius: var(--r-pill); }
.mk-gate.locked { background: var(--redsoft); color: var(--red); }
.mk-gate.open { background: var(--greensoft); color: var(--green); }
.mk-seo-group { border: 1px solid var(--line); border-radius: var(--r-img); overflow: hidden; background: var(--surface); }
.mk-seo-group + .mk-seo-group { margin-top: 8px; }
.mk-seo-group > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; }
.mk-seo-group > summary::-webkit-details-marker { display: none; }
.mk-seo-group > summary::after { content: "▸"; margin-left: auto; color: var(--mut); transition: transform .15s; }
.mk-seo-group[open] > summary::after { transform: rotate(90deg); }
.mk-seo-group .gc { font-family: var(--font-display); font-weight: 800; font-size: 20px; min-width: 2.2ch; text-align: right;
  font-variant-numeric: tabular-nums; }
.mk-seo-group.sev-blocker .gc { color: var(--red); }
.mk-seo-group.sev-warning .gc { color: var(--amber); }
.mk-seo-group.sev-opportunity .gc { color: var(--fox-deep); }
.mk-seo-group .gl { flex: 1; min-width: 0; }
.mk-seo-group .gl b { font-size: 13.5px; display: block; }
.mk-seo-group .gl .d { font-size: 11.5px; color: var(--mut); }
.mk-seo-items { border-top: 1px solid var(--line); padding: 4px 14px 10px; }
.mk-seo-item { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.mk-seo-item:last-child { border-bottom: none; }
.mk-seo-item .it { font-weight: 600; color: var(--ink); }
.mk-dist { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.mk-dist .d { display: flex; flex-direction: column; gap: 3px; padding: 11px 13px; border: 1px solid var(--line);
  border-left-width: 3px; border-radius: var(--r-img); background: var(--surface); }
.mk-dist .d.on { border-left-color: var(--green); }
.mk-dist .d.off { opacity: .8; }
.mk-dist .d b { font-size: 13px; }
.mk-dist .d .s { font-size: 11px; color: var(--mut); }

/* -- ERGEBNISSE: echte Analytics ----------------------------------------- */
.mk-kpi { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.mk-kpi .k { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--r-img);
  background: var(--well); border: 1px solid var(--line); }
.mk-kpi .k .n { font-family: var(--font-display); font-weight: 800; font-size: 28px; font-variant-numeric: tabular-nums; color: var(--ink); }
.mk-kpi .k .l { font-size: 12px; color: var(--ink2); font-weight: 600; }
.mk-kpi .k .u { font-size: 11px; color: var(--mut); }
.mk-kpi .k.unknown .n { color: var(--mut); font-size: 20px; }
.mk-chart-wrap { border: 1px solid var(--line); border-radius: var(--r-img); background: var(--surface); padding: 14px; }
.mk-chart { width: 100%; height: auto; display: block; overflow: visible; }
.mk-chart .ax { stroke: var(--line); stroke-width: 1; }
.mk-chart .gl { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; opacity: .7; }
.mk-chart .lbl { fill: var(--mut); font-size: 10px; }
.mk-chart .ok { fill: var(--fox); }
.mk-chart .bad { fill: var(--red); }
.mk-chart .area { fill: var(--fox-soft); }
.mk-chart .line { fill: none; stroke: var(--fox); stroke-width: 2; }
.mk-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 11.5px; color: var(--ink2); }
.mk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mk-legend i { width: 11px; height: 11px; border-radius: 3px; }
.mk-compare { display: flex; flex-direction: column; gap: 8px; }
.mk-compare .row { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; }
.mk-compare .track { height: 12px; border-radius: var(--r-pill); background: var(--well2); overflow: hidden; }
.mk-compare .track i { display: block; height: 100%; background: var(--fox); border-radius: var(--r-pill); }
.mk-compare .track i.pub { background: var(--green); }
.mk-inactive { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-inactive .c { font-size: 11.5px; color: var(--mut); border: 1px dashed var(--line); border-radius: var(--r-pill); padding: 3px 10px; }

@media (max-width: 1040px) {
  .mk-plan-grid { grid-template-columns: 1fr; }
  .mk-tray { position: static; flex-direction: row; flex-wrap: wrap; }
  .mk-tray-card { flex: 1 1 200px; }
}
@media (max-width: 760px) {
  .mk-cal { display: none; }
  .mk-stat .n { font-size: 26px; }
  .mk-do-item { flex-wrap: wrap; }
  .mk-do-act { flex-basis: 100%; }
  .mk-studio { grid-template-columns: 1fr; }
}

/* Heute im Control-Center-Stand. Nur dieser Bereich, die übrigen Flächen bleiben. */
.mcc { display: flex; flex-direction: column; gap: 18px; }
.mcc-head, .mcc-section, .mcc-row, .mcc-metrics, .mcc-actions { display: flex; align-items: center; }
.mcc-head, .mcc-section { justify-content: space-between; gap: 16px; }
.mcc h2, .mcc-copy h3 { font-family: var(--font-display); font-weight: 700; margin: 0; }
.mcc h2 { font-size: 20px; }
.mcc-quiet { margin: 4px 0 0; color: var(--mut); font-size: 13px; }
.mcc-actions { gap: 8px; flex: none; }
.mcc-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.mcc-row { gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.mcc-tag { flex: none; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 600; }
.mcc-tag.tone-problem { background: var(--redsoft); color: var(--red); }
.mcc-tag.tone-approval { background: var(--ambersoft); color: var(--amber); }
.mcc-tag.tone-plan, .mcc-tag.tone-search { background: var(--bluesoft); color: var(--blue); }
.mcc-tag.tone-chance { background: var(--accsoft); color: var(--acc); }
.mcc-copy { flex: 1; min-width: 0; }
.mcc-copy h3 { font-size: 16px; }
.mcc-copy p { margin: 3px 0 0; color: var(--ink2); font-size: 13px; line-height: 1.4; }
.mcc-metrics { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 8px; }
.mcc-stat { flex: 1; padding: 0 20px; }
.mcc-stat b { display: block; font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.mcc-stat strong { display: block; font-size: 14px; margin-top: 2px; }
.mcc-stat span { color: var(--mut); font-size: 13px; }
.mcc-rule { width: 1px; height: 52px; background: var(--line); flex: none; }
@media (max-width: 760px) {
  .mcc-head, .mcc-row, .mcc-metrics { flex-wrap: wrap; }
  .mcc-rule { display: none; }
  .mcc-stat { flex: 1 1 40%; padding: 8px 12px; }
}
.mcc-nav, .mcc-sys, .mcc-tools, .mcc-flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mcc-nav a, .mcc-sys span, .mcc-flow li {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600;
}
.mcc-nav a.on, .mcc-flow li.on { background: var(--acc); color: #fff; border-color: transparent; }
.mcc-flow { list-style: none; margin: 0; padding: 0; }
.mcc-tag.tone-blocker { background: var(--redsoft); color: var(--red); }
.mcc-tag.tone-warning { background: var(--ambersoft); color: var(--amber); }
.mcc-tag.tone-opportunity { background: var(--accsoft); color: var(--acc); }
.mcc-card, .mcc-area {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.mcc-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.mcc-area b { font-family: var(--font-display); }
.mcc-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 16px; }
.mcc-bars { display: flex; align-items: flex-end; gap: 2px; height: 120px; }
.mcc-bars i { flex: 1; min-width: 3px; background: var(--acc); border-radius: 3px 3px 0 0; }
.mcc-bars i.miss { height: 100%; background: repeating-linear-gradient(135deg, transparent, transparent 3px, var(--line) 3px, var(--line) 4px); }
.mcc-thumb { width: 36px; height: 48px; object-fit: cover; border-radius: 8px; flex: none; background: var(--well); }
.mcc-thumb.empty { display: grid; place-items: center; font-size: 10px; color: var(--mut); text-align: center; }
.mcc-pick { flex: none; }
.mcc-row .btn, .mcc-row .btn2, .mcc-row form { flex: none; }
.mcc .mk-cal { gap: 6px; }
.mcc .mk-day { min-height: 148px; border-radius: 12px; background: var(--surface); }
@media (max-width: 760px) {
  .mcc .mk-cal, .mcc .mk-month { display: none; }
  .mcc .mk-agenda { display: flex; flex-direction: column; gap: 8px; }
  .mcc-split { grid-template-columns: 1fr; }
}
.mcc-studio { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.mcc-studio-main, .mcc-studio-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mcc-studio-side { position: sticky; top: 12px; }
.mcc-studio-side img { width: 100%; height: auto; border-radius: 12px; }
.mcc-studio textarea, .mcc-card textarea, .mcc-card input { width: 100%; }
@media (max-width: 980px) {
  .mcc-studio { grid-template-columns: 1fr; }
  .mcc-studio-side { position: static; }
}
