:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #f1f3f6;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --accent: #c8102e;
  --accent-hover: #ad0d27;
  --accent-soft: #fdecef;
  --accent-ring: rgba(200, 16, 46, .18);
  --red: #e5484d; --red-soft: #fdecec; --red-ink: #b42318;
  --yellow: #f5a524; --yellow-soft: #fff5db; --yellow-ink: #8a5300;
  --green: #12a150; --green-soft: #e3f7ea; --green-ink: #0e7a3d;
  --grey: #94a3b8; --grey-soft: #eef1f5; --grey-ink: #475569;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 4px 14px rgba(15, 23, 42, .05);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, .18);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar: 248px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.hidden { display: none !important; }
.ico { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -3px; }
.ico.sm { width: 15px; height: 15px; vertical-align: -2px; }
.ico.lg { width: 26px; height: 26px; }
:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; border-radius: 6px; }
.boot { padding: 60px; color: var(--muted); display: flex; gap: 12px; align-items: center; }

/* ---------------- Layout ---------------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 18px 14px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; text-decoration: none; }
.traffic { display: grid; gap: 3px; background: #1e2329; padding: 5px 6px; border-radius: 9px; box-shadow: inset 0 0 0 1px #000; }
.traffic i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.traffic i:nth-child(1) { background: var(--red); } .traffic i:nth-child(2) { background: var(--yellow); } .traffic i:nth-child(3) { background: var(--green); }
.brand b { font-size: 15.5px; display: block; letter-spacing: -.01em; }
.brand small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; text-decoration: none; color: var(--text-2); font-weight: 550; }
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav a .count { margin-left: auto; background: var(--yellow); color: #3b2500; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 0 7px; min-width: 20px; text-align: center; }
.nav .section { margin: 18px 11px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.me { margin-top: auto; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); display: flex; gap: 10px; align-items: center; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--text); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex: none; }
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { font-size: 11.5px; color: var(--muted); }
.icon-btn { border: 0; background: transparent; padding: 7px; border-radius: 8px; cursor: pointer; color: var(--muted); display: inline-grid; place-items: center; text-decoration: none; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.main { min-width: 0; }
.content { padding: 28px 36px 120px; max-width: 1320px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); text-decoration: none; font-size: 13px; margin-bottom: 8px; }
.back:hover { color: var(--text); }
.demo-banner { background: linear-gradient(90deg, #1e3a8a, #312e81); color: #e0e7ff; font-size: 12.5px; padding: 7px 16px; text-align: center; }
.mobile-top { display: none; }

/* ---------------- Bausteine ---------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px 22px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.card-title { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.card-title .ico { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border-strong); background: var(--surface); padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s, box-shadow .12s; box-shadow: var(--shadow-sm); }
.btn:hover { background: var(--surface-2); border-color: #b9c0ca; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.success { background: var(--green); border-color: var(--green); color: #fff; }
.btn.success:hover { filter: brightness(.94); }
.btn.dark { background: var(--text); border-color: var(--text); color: #fff; }
.btn.danger-ghost { color: var(--red-ink); border-color: transparent; background: transparent; box-shadow: none; }
.btn.danger-ghost:hover { background: var(--red-soft); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 11px 18px; font-size: 15px; }
.btn.block { width: 100%; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.divider { height: 1px; background: var(--border); margin: 18px 0; }

label.field { display: block; }
label.field > .lbl { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--text-2); }
label.field > .lbl em { font-style: normal; font-weight: 400; color: var(--muted); }
.field + .field { margin-top: 16px; }
.input { width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; transition: border-color .12s, box-shadow .12s; }
textarea.input { resize: vertical; min-height: 96px; line-height: 1.55; }
.input:hover { border-color: #b9c0ca; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.input[readonly] { background: var(--surface-2); color: var(--text-2); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 2px; width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { appearance: none; width: 38px; height: 22px; background: #cbd2db; border-radius: 999px; position: relative; cursor: pointer; transition: background .15s; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(16px); }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 11px; padding: 3px; gap: 2px; border: 1px solid var(--border); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--muted); display: inline-flex; gap: 7px; align-items: center; font-size: 13px; }
.seg button.on { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }
.seg button .n { font-size: 11.5px; background: var(--surface-3); border-radius: 999px; padding: 0 6px; color: var(--muted); }
.seg button.on .n { background: var(--surface-3); }
input[type=range] { width: 100%; accent-color: var(--accent); }

/* ---------------- Ampel ---------------- */
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot.red { background: var(--red); } .dot.yellow { background: var(--yellow); } .dot.green { background: var(--green); } .dot.grey { background: var(--grey); }
.dot.pulse { box-shadow: 0 0 0 0 rgba(229,72,77,.5); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(229,72,77,0); } 100% { box-shadow: 0 0 0 0 rgba(229,72,77,0); } }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.badge.red { background: var(--red-soft); color: var(--red-ink); }
.badge.yellow { background: var(--yellow-soft); color: var(--yellow-ink); }
.badge.green { background: var(--green-soft); color: var(--green-ink); }
.badge.grey { background: var(--grey-soft); color: var(--grey-ink); }
.badge.outline { background: #fff; border: 1px solid var(--border); color: var(--text-2); }
.ampel-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.ampel-card { position: relative; text-align: left; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 18px 20px; cursor: pointer; box-shadow: var(--shadow-sm); display: flex; gap: 16px; align-items: center; transition: box-shadow .15s, transform .15s, border-color .15s; overflow: hidden; }
.ampel-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; }
.ampel-card.red::before { background: var(--red); } .ampel-card.yellow::before { background: var(--yellow); } .ampel-card.green::before { background: var(--green); }
.ampel-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.ampel-card.selected { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.ampel-card .light { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ampel-card.red .light { background: var(--red-soft); } .ampel-card.yellow .light { background: var(--yellow-soft); } .ampel-card.green .light { background: var(--green-soft); }
.ampel-card .light .dot { width: 16px; height: 16px; }
.ampel-card .num { font-size: 30px; font-weight: 750; line-height: 1; letter-spacing: -.02em; }
.ampel-card .lbl { font-weight: 650; margin-top: 4px; }
.ampel-card .sub { font-size: 12.5px; color: var(--muted); }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 36px; }

.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 12px 18px 12px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; position: relative; transition: border-color .12s, box-shadow .12s; }
.item::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; }
.item.red::before { background: var(--red); } .item.yellow::before { background: var(--yellow); } .item.green::before { background: var(--green); } .item.grey::before { background: var(--grey); }
.item:hover { border-color: #c7cdd6; box-shadow: var(--shadow); }
.thumb { width: 64px; height: 64px; border-radius: 10px; background: var(--surface-3) center/cover no-repeat; display: grid; place-items: center; color: var(--muted); }
.item .title { font-weight: 650; font-size: 15px; }
.item .meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.item .next { font-size: 12.5px; color: var(--text-2); margin-top: 3px; display: flex; gap: 6px; align-items: center; }
.item .right { text-align: right; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.sep::before { content: "·"; color: #c0c6cf; }
.empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty .ico { width: 40px; height: 40px; color: #c0c6cf; margin-bottom: 10px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }

.ch { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 10.5px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.ch.facebook { background: #1877f2; } .ch.instagram { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); } .ch.linkedin { background: #0a66c2; } .ch.youtube { background: #ff0000; }
.chs { display: inline-flex; gap: 4px; }

/* ---------------- Formular ---------------- */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.step-head .n { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; font-size: 13px; font-weight: 750; flex: none; border: 1px solid var(--border); }
.step-head.done .n { background: var(--green); color: #fff; border-color: var(--green); }
.step-head .t { font-weight: 650; font-size: 15.5px; }
.step-head .d { font-size: 12.5px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: #fff; text-align: left; display: flex; gap: 11px; align-items: flex-start; transition: border-color .12s, background .12s; }
.tile:hover { border-color: #9aa3ae; }
.tile .ico { color: var(--muted); margin-top: 2px; }
.tile b { display: block; font-size: 13.5px; }
.tile small { color: var(--muted); font-size: 12px; line-height: 1.35; display: block; margin-top: 2px; }
.tile.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.tile.on .ico { color: var(--accent); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--border-strong); border-radius: 999px; padding: 6px 14px 6px 6px; cursor: pointer; background: #fff; font-weight: 600; transition: all .12s; }
.chip:hover:not(:disabled) { border-color: #9aa3ae; }
.chip.on { border-color: var(--text); background: var(--text); color: #fff; }
.chip:disabled { opacity: .38; cursor: not-allowed; }
.chip .tick { width: 16px; height: 16px; display: none; }
.chip.on .tick { display: inline-block; }
.drop { border: 2px dashed #cbd2db; border-radius: 14px; padding: 26px; text-align: center; color: var(--muted); cursor: pointer; background: var(--surface-2); transition: all .12s; }
.drop:hover { border-color: #9aa3ae; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.drop .ico { width: 28px; height: 28px; margin-bottom: 6px; }
.drop b { color: var(--text); }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-top: 14px; }
.file { position: relative; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; font-size: 11.5px; }
.file .pv { height: 86px; background: var(--surface-3) center/cover no-repeat; display: grid; place-items: center; color: var(--muted); }
.file .nm { padding: 5px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file button { position: absolute; top: 5px; right: 5px; border: 0; background: rgba(15,23,42,.7); color: #fff; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; display: grid; place-items: center; }
.sticky { position: sticky; top: 20px; }
.checklist { list-style: none; padding: 0; margin: 4px 0 0; }
.checklist li { display: flex; gap: 9px; align-items: center; padding: 5px 0; font-size: 13px; color: var(--muted); }
.checklist li .c { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #cbd2db; display: grid; place-items: center; flex: none; }
.checklist li.ok { color: var(--text); }
.checklist li.ok .c { background: var(--green); border-color: var(--green); color: #fff; }
.info { display: flex; gap: 10px; align-items: flex-start; background: #eff5ff; border: 1px solid #d6e4fb; color: #1e3a8a; border-radius: 12px; padding: 11px 14px; font-size: 13px; }
.info .ico { margin-top: 1px; }
.info.warn { background: var(--yellow-soft); border-color: #f7dc9f; color: var(--yellow-ink); }
.info.err { background: var(--red-soft); border-color: #f7c6c7; color: var(--red-ink); }
.info.ok { background: var(--green-soft); border-color: #bfe8cf; color: var(--green-ink); }

/* ---------------- Pflichtfelder & Fehler ---------------- */
.req { color: var(--red); font-weight: 800; margin-left: 2px; }
.req-legend { font-size: 12px; color: var(--muted); margin: -6px 0 10px; text-align: right; }
.req-title { font-weight: 600; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.req-box { border-radius: 12px; transition: box-shadow .15s, background .15s; }
.err-msg { display: none; }
.field-error .err-msg { display: flex; gap: 6px; align-items: center; margin-top: 7px; color: var(--red-ink); font-weight: 700; font-size: 13px; }
label.field.field-error > .lbl, .field-error .req-title, .field-error .check span { color: var(--red-ink); font-weight: 700; }
.field-error .input, .field-error .drop { border-color: var(--red) !important; background: #fff7f7; box-shadow: 0 0 0 4px rgba(229, 72, 77, .18); }
.req-box.field-error { background: #fff7f7; box-shadow: 0 0 0 2px var(--red), 0 0 0 7px rgba(229, 72, 77, .15); padding: 8px 10px; margin: 0 -10px; }
.req-box.field-error[data-req="rights"] { margin: -6px -8px; padding: 6px 8px; }
.field-error .chip:not(.on):not(:disabled) { border-color: #f1a7a9; }
.flash { animation: flashRed 1.2s ease-out 1; }
@keyframes flashRed {
  0%, 30% { box-shadow: 0 0 0 3px var(--red), 0 0 22px 6px rgba(229, 72, 77, .55); }
  100% { box-shadow: 0 0 0 2px var(--red), 0 0 0 7px rgba(229, 72, 77, .15); }
}
label.field.flash .input, label.field.flash textarea { animation: flashRed 1.2s ease-out 1; }
.btn.primary.is-incomplete { background: #c3c9d1; border-color: #c3c9d1; color: #fff; box-shadow: none; }
.btn.primary.is-incomplete:hover { background: #b5bcc6; }
.missing { margin-top: 12px; }
.missing-title { display: flex; gap: 6px; align-items: center; font-weight: 700; color: var(--red-ink); font-size: 13px; }
.missing ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 4px; }
.missing li button { border: 0; background: var(--red-soft); color: var(--red-ink); font-weight: 700; font-size: 13px; padding: 5px 10px; border-radius: 8px; cursor: pointer; width: 100%; text-align: left; }
.missing li button::before { content: "→ "; }
.missing li button:hover { background: #fbd5d6; }
.missing .ready { display: flex; gap: 6px; align-items: center; color: var(--green-ink); font-weight: 700; font-size: 13px; }
.checklist li[data-goto] { cursor: pointer; }
.checklist li.bad { color: var(--red-ink); font-weight: 700; }
.checklist li.bad .c { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------------- Detail ---------------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.stepper { display: flex; align-items: center; gap: 0; margin: 4px 0 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; overflow-x: auto; }
.stepper .s { display: flex; align-items: center; gap: 9px; white-space: nowrap; color: var(--muted); font-weight: 600; font-size: 13px; }
.stepper .s .c { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #cbd2db; display: grid; place-items: center; font-size: 11.5px; background: #fff; }
.stepper .s.done { color: var(--text); }
.stepper .s.done .c { background: var(--green); border-color: var(--green); color: #fff; }
.stepper .s.current { color: var(--text); }
.stepper .s.current .c { border-color: var(--yellow); background: var(--yellow-soft); }
.stepper .s.current.red .c { border-color: var(--red); background: var(--red-soft); }
.stepper .line { flex: 1; min-width: 24px; height: 2px; background: var(--border); margin: 0 12px; }
.stepper .line.done { background: var(--green); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 14px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tab { border: 0; background: none; padding: 14px 14px 12px; cursor: pointer; font-weight: 650; color: var(--muted); border-bottom: 2px solid transparent; display: inline-flex; gap: 9px; align-items: center; white-space: nowrap; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--accent); }
.tab .warn { color: var(--red); }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; padding: 20px 22px 22px; }
.locked { background: repeating-linear-gradient(-45deg, #f6f7f9, #f6f7f9 8px, #f1f3f6 8px, #f1f3f6 16px); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-top: 16px; }
.locked .lk-head { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--grey-ink); margin-bottom: 8px; }
.locked pre { margin: 0; white-space: pre-wrap; font: inherit; color: var(--text-2); }
.tagline { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 1px 8px; font-size: 12.5px; color: var(--text-2); }
.preview-wrap { background: var(--surface-3); border-radius: 16px; padding: 16px; }
.preview-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.preview { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow); max-width: 440px; margin: 0 auto; }
.preview .ph { display: flex; gap: 10px; align-items: center; padding: 12px 14px; }
.preview .av { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 750; font-size: 13px; }
.preview .pt { padding: 0 14px 14px; white-space: pre-wrap; word-wrap: break-word; font-size: 13.5px; line-height: 1.5; }
.preview .pm { position: relative; background: #e9edf2 center/cover no-repeat; aspect-ratio: 4/3; display: grid; place-items: center; color: var(--muted); }
.preview .pm.ig { aspect-ratio: 1/1; }
.preview .pm.vid { aspect-ratio: 16/9; background-color: #0f172a; }
.preview .pm video { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview .pm .state { position: absolute; inset: auto 10px 10px auto; background: rgba(15,23,42,.75); color: #fff; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; }
.preview .pm-real { position: relative; background: #0f172a; }
.preview .pm-real img, .preview .pm-real video { width: 100%; display: block; max-height: 560px; object-fit: contain; margin: 0 auto; }
.preview .pm-real .state { position: absolute; inset: auto 10px 10px auto; background: rgba(15,23,42,.75); color: #fff; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; }
.preview .more { border: 0; background: none; padding: 0; margin-left: 2px; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.preview .yt-title { font-weight: 700; padding: 12px 14px 4px; font-size: 15px; }
.counter { font-size: 12px; color: var(--muted); text-align: right; margin-top: 8px; }
.counter.over { color: var(--red); font-weight: 700; }
.notes { background: var(--yellow-soft); border: 1px solid #f7dc9f; border-radius: 12px; padding: 12px 14px; white-space: pre-wrap; font-size: 13.5px; color: #5c3b00; }
.action-dock { position: sticky; bottom: 16px; z-index: 15; margin-top: 16px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 12px 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dirty { display: inline-flex; gap: 7px; align-items: center; font-size: 13px; color: var(--yellow-ink); font-weight: 600; }
.saved { display: inline-flex; gap: 7px; align-items: center; font-size: 13px; color: var(--muted); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid #9aa3ad; }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline li b { font-weight: 650; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery a { position: relative; aspect-ratio: 1; border-radius: 10px; background: var(--surface-3) center/cover no-repeat; border: 1px solid var(--border); text-decoration: none; color: var(--muted); display: grid; place-items: center; }
.gallery a .st { position: absolute; left: 5px; bottom: 5px; background: rgba(15,23,42,.72); color: #fff; font-size: 10.5px; border-radius: 999px; padding: 1px 7px; }
.raw { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; font-size: 13.5px; max-height: 240px; overflow: auto; }
.processing { display: flex; gap: 16px; align-items: center; padding: 46px 28px; }
.spinner { width: 24px; height: 24px; border: 3px solid #e2e5ea; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-list { list-style: none; padding: 0; margin: 0; }
.result-list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.result-list li:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.skeleton { background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 50%, #eef0f3 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------------- Admin ---------------- */
.subnav { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.subnav button { border: 0; background: none; padding: 10px 14px; font-weight: 650; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; margin-bottom: -1px; }
.subnav button.on { color: var(--text); border-bottom-color: var(--accent); }
.header-current { background: repeating-conic-gradient(#e9ecf0 0% 25%, #fff 0% 50%) 50% / 16px 16px; border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: grid; place-items: center; min-height: 110px; }
.header-current img { max-width: 100%; max-height: 180px; display: block; }
.previews { display: grid; grid-template-columns: 1fr .62fr 1.5fr; gap: 14px; align-items: end; }
.previews figure { margin: 0; }
.previews img { width: 100%; display: block; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-3); }
.previews figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; text-align: center; }
.range-row { display: grid; grid-template-columns: 1fr 56px; gap: 12px; align-items: center; }
.range-row output { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; background: var(--surface-2); }
.tbl th:first-child { border-top-left-radius: var(--radius); } .tbl th:last-child { border-top-right-radius: var(--radius); }
.save-dock { position: sticky; bottom: 16px; z-index: 15; margin-top: 20px; display: flex; justify-content: flex-end; }
.save-dock .inner { background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px 12px; display: flex; gap: 10px; align-items: center; }
.pill { font-size: 12px; padding: 2px 9px; border-radius: 999px; font-weight: 650; }
.pill.ok { background: var(--green-soft); color: var(--green-ink); } .pill.no { background: var(--grey-soft); color: var(--grey-ink); }

/* ---------------- Login ---------------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: radial-gradient(1200px 600px at -10% -10%, #2b3340, #0f141a); color: #e6eaf0; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art h1 { font-size: 34px; color: #fff; max-width: 440px; letter-spacing: -.02em; }
.login-art p { color: #aab4c0; max-width: 420px; font-size: 15px; }
.big-traffic { display: inline-grid; gap: 12px; background: #0b0f13; padding: 16px 14px; border-radius: 26px; box-shadow: inset 0 0 0 1px #2a313a, 0 20px 50px rgba(0,0,0,.4); margin-bottom: 30px; }
.big-traffic i { width: 34px; height: 34px; border-radius: 50%; display: block; }
.big-traffic i:nth-child(1) { background: var(--red); box-shadow: 0 0 24px rgba(229,72,77,.6); }
.big-traffic i:nth-child(2) { background: var(--yellow); box-shadow: 0 0 24px rgba(245,165,36,.55); }
.big-traffic i:nth-child(3) { background: var(--green); box-shadow: 0 0 24px rgba(18,161,80,.55); }
.login-side { display: grid; place-items: center; padding: 32px; }
.login { width: 100%; max-width: 380px; }
.login h2 { font-size: 22px; margin-bottom: 4px; }
.demo-users { display: grid; gap: 8px; margin-top: 12px; }
.ms-btn { background: #2f2f2f; border-color: #2f2f2f; color: #fff; gap: 12px; }
.ms-btn:hover { background: #1f1f1f; }
.ms-btn .ico { width: 20px; height: 20px; }
.install-btn { margin: 8px 0 0; }
.demo-user { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; border: 1px solid var(--border); background: #fff; border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.demo-user:hover { border-color: #b9c0ca; box-shadow: var(--shadow); }
.demo-user .who { flex: 1; }
.demo-user .who b { display: block; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 22px 0 6px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------------- Modal / Toast ---------------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.45); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .12s; }
.modal { width: 100%; max-width: 500px; padding: 24px; box-shadow: var(--shadow-lg); animation: pop .15s; }
.modal h2 { margin-bottom: 8px; font-size: 19px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(6px) scale(.98); opacity: 0; } }
.radio-card { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px 14px; cursor: pointer; margin-bottom: 8px; transition: border-color .12s, background .12s; }
.radio-card:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.radio-card input { margin-top: 3px; accent-color: var(--green); }
#toast-root { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--text); color: #fff; padding: 11px 15px; border-radius: 12px; box-shadow: var(--shadow-lg); max-width: 400px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; animation: pop .15s; }
.toast .ico { color: #6ee7a0; margin-top: 1px; }
.toast.err { background: #7f1d1d; }
.toast.err .ico { color: #fca5a5; }

/* ---------------- Responsive ---------------- */
.detail-grid > *, .form-grid > *, .editor > * { min-width: 0; }
@media (max-width: 1280px) {
  .detail-grid { grid-template-columns: 1fr; }
  .previews { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .shell.nav-open .sidebar { transform: none; }
  .mobile-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
  .content { padding: 18px 16px 110px; }
  .form-grid, .editor, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .ampel-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .ampel-card { padding: 12px 12px 12px 16px; }
  .ampel-card .light, .ampel-card .sub { display: none; }
  .ampel-card .num { font-size: 24px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .item { grid-template-columns: 52px 1fr; }
  .thumb { width: 52px; height: 52px; }
  .item .right { grid-column: 2; align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .previews { grid-template-columns: 1fr; }
}
