/* DIR4B Booster – Gestaltung nach DIR4B-CI (Tokens aus timoschreck/dir4b, tokens/nexovia_design_tokens.css).
   Schriften: Orbitron/Inter werden NICHT von Drittservern geladen (Datenschutz); Fallback gemäß Token-Stack. */
html { background: var(--nx-color-bg-primary); min-height: 100%; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh; position: relative; isolation: isolate; background: transparent;
  color: var(--nx-color-text-primary); font: 16px/1.55 var(--nx-font-body);
}
body::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: var(--nx-color-bg-primary) url("/assets/nexovia_cosmic_background_animated.svg") center / cover no-repeat; }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(1,9,29,.35) 0%, rgba(1,9,29,.62) 60%, rgba(1,9,29,.78) 100%); }
a { color: var(--nx-color-brand-cyan); }
h1, h2, h3 { font-family: var(--nx-font-display); line-height: 1.15; letter-spacing: .02em; margin: 0 0 var(--nx-space-16); }
h1 { font-size: clamp(26px, 4vw, 38px); }
h2 { font-size: clamp(20px, 2.6vw, 26px); }
h3 { font-size: 17px; }
p { margin: 0 0 var(--nx-space-16); }
.muted { color: var(--nx-color-text-secondary); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--nx-color-surface-primary); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Kopfzeile */
.topbar { position: sticky; top: 0; z-index: var(--nx-z-sticky, 20); display: flex; align-items: center; gap: var(--nx-space-24);
  padding: 10px max(16px, env(safe-area-inset-left)); background: rgba(1,9,29,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,200,255,.18); }
.brandmark { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brandmark .logo { width: 140px; height: auto; display: block; }
.brandmark .product { font: 700 13px var(--nx-font-display); letter-spacing: .22em; text-transform: uppercase;
  background: var(--nx-gradient-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar { flex-wrap: wrap; row-gap: 6px; }
/* Navigation: umbrechen statt verdeckt scrollen – alle Ziele bei jeder Breite sichtbar (vorher „Bibliothek“ als „B“ abgeschnitten) */
.mainnav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 480px; min-width: 0; }
.mainnav a:focus-visible, .userbox a:focus-visible, .brandmark:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--nx-color-brand-cyan); outline-offset: 2px; }
.mainnav a { color: var(--nx-color-text-secondary); text-decoration: none; padding: 10px 14px; border-radius: 12px; white-space: nowrap; font-weight: 600; }
.mainnav a:hover { color: var(--nx-color-text-primary); background: rgba(0,200,255,.08); }
.mainnav a[aria-current="page"] { color: var(--nx-color-text-primary); background: rgba(0,200,255,.14); box-shadow: inset 0 -2px 0 var(--nx-color-brand-cyan); }
.userbox { display: flex; align-items: center; gap: 10px; color: var(--nx-color-text-secondary); font-size: 14px; flex: none; }

main { max-width: 1200px; margin: 0 auto; padding: var(--nx-space-32) 16px var(--nx-space-96); outline: none; }

/* Karten, Raster */
.card { background: rgba(12,16,51,.84); border: 1px solid rgba(0,200,255,.16); border-radius: var(--nx-radius-card);
  padding: var(--nx-space-24); box-shadow: var(--nx-shadow-card); }
.grid { display: grid; gap: var(--nx-space-16); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.stack > * + * { margin-top: var(--nx-space-16); }
.row { display: flex; gap: var(--nx-space-16); flex-wrap: wrap; align-items: center; }
.split { display: grid; gap: var(--nx-space-24); grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: var(--nx-space-24); }
.pagehead h1 { margin: 0; }
.eyebrow { color: var(--nx-color-brand-cyan); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; margin-bottom: 6px; }

/* Formulare */
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.hint { display: block; font-weight: 400; color: var(--nx-color-text-secondary); font-size: 13px; margin-top: 4px; }
input, select, textarea { width: 100%; font: inherit; color: var(--nx-color-text-primary); background: rgba(1,9,29,.72);
  border: 1px solid rgba(169,184,208,.32); border-radius: 12px; padding: 11px 13px; min-height: 46px; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
textarea.big { min-height: 320px; }
.post-preview { border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 14px; display: grid; gap: 12px; max-width: 520px; }
.post-head { display: flex; justify-content: space-between; gap: 8px; }
/* Vorschau im Instagram-Feedformat 4:5; das Bild wird ganz gezeigt, nicht beschnitten */
.post-image { aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0; border-radius: 10px; background: rgba(1,9,29,.72); overflow: hidden; }
.post-text { white-space: pre-wrap; line-height: 1.5; }
.post-image img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
input:focus, select:focus, textarea:focus { border-color: var(--nx-color-brand-cyan); box-shadow: var(--nx-shadow-focus); outline: none; }
.field { margin-bottom: var(--nx-space-16); }
.fields2 { display: grid; gap: 0 var(--nx-space-16); grid-template-columns: 1fr 1fr; }
.counter { font-size: 12px; color: var(--nx-color-text-secondary); text-align: right; margin-top: 4px; }
.counter.over { color: var(--nx-color-error); font-weight: 700; }
fieldset { border: 1px solid rgba(169,184,208,.22); border-radius: 14px; padding: 16px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: var(--nx-radius-button); border: 1px solid var(--nx-color-brand-cyan); background: transparent;
  color: var(--nx-color-text-primary); font: 650 15px var(--nx-font-body); cursor: pointer; text-decoration: none;
  transition: transform var(--nx-motion-fast), box-shadow var(--nx-motion-fast); }
.btn:hover { box-shadow: 0 0 0 3px rgba(0,200,255,.18); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--nx-gradient-primary); border: 0; }
.btn.ghost { border-color: rgba(169,184,208,.35); }
.btn.danger { border-color: var(--nx-color-error); color: #FFD5DB; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Badges & Listen */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  border: 1px solid rgba(169,184,208,.35); color: var(--nx-color-text-secondary); white-space: nowrap; }
.badge.sim { border-color: var(--nx-color-warning); color: var(--nx-color-warning); background: rgba(245,185,66,.08); }
.badge.ok, .badge.fertig, .badge.freigegeben { border-color: var(--nx-color-success); color: var(--nx-color-success); }
.badge.fehler, .badge.fehlgeschlagen { border-color: var(--nx-color-error); color: var(--nx-color-error); }
.badge.hinweis, .badge.in_pruefung, .badge.wartend, .badge.laeuft { border-color: var(--nx-color-info); color: var(--nx-color-info); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 14px 0; border-bottom: 1px solid rgba(169,184,208,.14); display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.list > li:last-child { border-bottom: 0; }
.itemtitle { font-weight: 650; color: var(--nx-color-text-primary); text-decoration: none; }
a.itemtitle:hover { color: var(--nx-color-brand-cyan); }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(244,246,250,.5); }
.quality li { justify-content: flex-start; padding: 8px 0; flex-wrap: nowrap; align-items: flex-start; }
.notice { margin: 12px 0 0; border-left: 4px solid var(--nx-color-warning); background: rgba(245,185,66,.08); padding: 12px 14px; border-radius: 0 12px 12px 0; }
.notice.info { border-color: var(--nx-color-info); background: rgba(69,163,255,.08); }
.notice.err { border-color: var(--nx-color-error); background: rgba(255,93,115,.08); }
.empty { text-align: center; padding: 40px 16px; color: var(--nx-color-text-secondary); }
.filters { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 20px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; min-height: 46px; }
.check input { width: 20px; min-height: 20px; height: 20px; }
.preview { white-space: pre-wrap; background: rgba(1,9,29,.6); border-radius: 12px; padding: 14px; border: 1px solid rgba(169,184,208,.18); max-height: 420px; overflow: auto; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--nx-color-text-secondary); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: var(--nx-z-toast, 80);
  background: var(--nx-color-surface-primary); border: 1px solid var(--nx-color-brand-cyan); border-radius: 14px; padding: 12px 18px;
  box-shadow: var(--nx-shadow-card); max-width: calc(100% - 32px); }
.toast.err { border-color: var(--nx-color-error); }
.login { max-width: 420px; margin: 8vh auto 0; }
.login .logo { width: 180px; margin-bottom: 8px; }
/* Ab 480 px die Fassung mit Claim (CI-Mindestbreite 360 px); darunter die claimlose Fassung */
@media (min-width: 480px) { .login .logo { width: 360px; height: auto; } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(0,200,255,.25); border-top-color: var(--nx-color-brand-cyan); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; gap: 8px 12px; }
  .mainnav { order: 3; flex-basis: 100%; }
  .userbox #who { display: none; }
  .userbox { margin-left: auto; }
}
@media (max-width: 560px) {
  .fields2 { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  main { padding-top: 20px; }
  .btn { width: 100%; }
  .row .btn, .btn.small { width: auto; }
}

/* ---------- Etappe 2 ---------- */
.row.between { justify-content: space-between; }
.break { overflow-wrap: anywhere; }
/* Markenlogo auf hellem Feld, damit dunkle Schrift im Logo lesbar bleibt */
.brandlogo { max-height: 48px; max-width: 160px; object-fit: contain; align-self: flex-start; background: #F4F6FA; border-radius: 8px; padding: 6px 8px; }
.logo-preview { max-height: 96px; max-width: 260px; object-fit: contain; background: rgba(244,246,250,.06); border-radius: 12px; padding: 8px; }
.product-img { max-height: 160px; max-width: 100%; object-fit: contain; border-radius: 12px; align-self: flex-start; }
.hints { margin: 0; padding-left: 20px; color: var(--nx-color-text-secondary); font-size: 14px; }
details > summary { cursor: pointer; font-weight: 650; padding: 8px 0; color: var(--nx-color-brand-cyan); }
details[open] > summary { margin-bottom: 8px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--nx-color-text-primary); font: inherit; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(0,200,255,.5); text-underline-offset: 3px; }
.linkbtn:hover { color: var(--nx-color-brand-cyan); }
.list.compact > li { padding: 6px 0; font-size: 14px; }
.hook { border-top: 1px solid rgba(169,184,208,.18); padding-top: 12px; }
code { background: rgba(1,9,29,.7); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; font-size: 13px; }
.cal-title { margin: 0; text-transform: capitalize; font-size: 20px; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head { text-align: center; font-weight: 700; color: var(--nx-color-text-secondary); font-size: 13px; padding: 4px 0; }
.cal-day { min-height: 96px; background: rgba(1,9,29,.55); border: 1px solid rgba(169,184,208,.14); border-radius: 12px; padding: 6px; overflow: hidden; }
.cal-day.today { border-color: var(--nx-color-brand-cyan); box-shadow: inset 0 0 0 1px var(--nx-color-brand-cyan); }
.cal-day.empty-day { background: transparent; border-color: transparent; }
.cal-date { font-size: 12px; color: var(--nx-color-text-secondary); margin-bottom: 4px; }
.cal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cal-item { font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.cal-item .badge { font-size: 10px; padding: 1px 6px; }
.cal-item.idea { border-left: 3px solid var(--nx-color-brand-violet); padding-left: 5px; }
.cal-item.content { border-left: 3px solid var(--nx-color-brand-cyan); padding-left: 5px; }
dialog.dlg { color: var(--nx-color-text-primary); max-width: min(560px, calc(100% - 32px)); width: 100%; }
dialog.dlg::backdrop { background: rgba(1,9,29,.72); }
@media (max-width: 760px) {
  .calendar { display: block; }
  .cal-head, .cal-day.empty-day, .cal-day.no-items { display: none; }
  .cal-day { min-height: 0; margin-bottom: 8px; }
  .cal-date { font-size: 14px; font-weight: 700; color: var(--nx-color-text-primary); }
  .cal-item { font-size: 14px; }
}

/* ---------- Etappe 3 ---------- */
.small { font-size: 13px; }
.chat-thread { display: grid; gap: 12px; max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.msg { border-radius: 14px; padding: 12px 14px; border: 1px solid rgba(169,184,208,.18); max-width: 92%; }
.msg.user { justify-self: end; background: rgba(0,200,255,.10); border-color: rgba(0,200,255,.35); }
.msg.assistant { justify-self: start; background: rgba(1,9,29,.6); }
.msg.abgebrochen, .msg.fehler { opacity: .7; }
.msg-head { display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 700; color: var(--nx-color-text-secondary); margin-bottom: 4px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.reflist { display: grid; gap: 0 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); max-height: 220px; overflow-y: auto; }
.reflist .check { min-height: 36px; font-weight: 500; font-size: 14px; }
.reflist.wide { grid-template-columns: 1fr; gap: 12px; max-height: none; }
.reflist.wide .check { align-items: flex-start; padding: 12px; background: var(--nx-color-surface-primary); border-radius: 10px; }
.reflist.wide .check input { margin-top: 2px; }
.adder { flex-wrap: nowrap; }
.adder input { flex: 1; min-width: 0; }
.list a[aria-current="page"] { color: var(--nx-color-brand-cyan); }
@media (max-width: 560px) { .msg { max-width: 100%; } .chat-thread { max-height: none; } }
/* Etappe 4.3: Ideen-Swipe */
.swipecard { touch-action: pan-y; user-select: none; transition: transform .18s ease, opacity .18s ease; outline: none; }
.swipecard:focus-visible { box-shadow: var(--nx-shadow-focus); }
.swipecard.links { transform: translateX(-36px) rotate(-2deg); opacity: .55; }
.swipecard.rechts { transform: translateX(36px) rotate(2deg); opacity: .55; }
.swipecard h2 { overflow-wrap: anywhere; }
.swipeactions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.swipeactions .btn { min-height: 52px; font-size: 17px; }
@media (max-width: 1400px) { .mainnav { gap: 0; } .mainnav a { padding: 10px 8px; } .userbox { gap: 6px; } }
@media (max-width: 560px) { .mainnav a { padding: 8px 8px; } }
/* KI-Status */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checklist li.ok { color: var(--nx-color-text-primary); }
.checklist li.offen { color: var(--nx-color-text-secondary); }
/* Etappe 4.4: Ads-Board */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.boardcol { background: rgba(1,9,29,.45); border: 1px solid rgba(0,200,255,.12); border-radius: var(--nx-radius-card); padding: 12px; min-width: 0; }
.boardcol h3 { margin: 0 0 10px; font-size: 16px; }
ul.plain { list-style: none; margin: 0; padding: 0; }
.actioncard { padding: 14px; overflow-wrap: anywhere; }
.badge.prio1 { border-color: var(--nx-color-error); }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }
.userbox .helplink { color: var(--nx-color-text-secondary); font-weight: 600; text-decoration: none; padding: 6px 8px; border-radius: 10px; }
.userbox .helplink:hover, .userbox .helplink[aria-current="page"] { color: var(--nx-color-text-primary); background: rgba(0,200,255,.12); }
.userbox .helplink { color: var(--nx-color-text-secondary); font-weight: 600; text-decoration: none; padding: 6px 8px; border-radius: 10px; }
.userbox .helplink:hover, .userbox .helplink[aria-current="page"] { color: var(--nx-color-text-primary); background: rgba(0,200,255,.12); }
/* Markenanlage: Bildarchiv-Vorschau */
.thumb { margin: 0; display: grid; gap: 4px; justify-items: start; }
.thumb img { width: 100%; max-width: 180px; height: 110px; object-fit: contain; background: rgba(255,255,255,.06); border-radius: 10px; }
.thumb figcaption { font-size: 12px; color: var(--nx-color-text-secondary); overflow-wrap: anywhere; }

/* Videoauftrag (Simulation): Player im Markenstil */
.videoplayer { display: block; width: 100%; max-width: 480px; border-radius: var(--nx-radius-card); background: #000; }
.joblist { list-style: none; padding: 0; margin: 0; }
