/* ==========================================================================
   content.hallid.ch – Stylesheet v2 (Basis: bestehendes style.css, erweitert)
   Farben aus dem haller.id-Logo: Anthrazit #2F3030, Gelb #F4BD30
   ========================================================================== */

/* Inter lokal eingebunden (keine Übertragung an Google, revDSG) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/inter-latin-700-normal.woff2') format('woff2'); }

:root {
    /* bestehende Variablen (Namen beibehalten) */
    --primary: #2f3030;
    --primary-hover: #1b1c1c;
    --bg-color: #f4f5f7;
    --card-bg: #ffffff;
    --text-main: #2f3030;
    --text-muted: #6b7178;
    --border: #e3e5e9;
    --success: #2f855a;
    --warning: #b7791f;
    --danger: #c53030;
    --sidebar-width: 248px;

    /* Erweiterung */
    --brand: #f4bd30;
    --brand-soft: #fdf3d6;
    --brand-ink: #7a5a00;
    --surface-2: #f8f9fa;
    --line-strong: #d3d6db;
    --radius-s: 6px;
    --radius: 10px;
    --radius-l: 16px;
    --shadow-1: 0 1px 2px rgba(47, 48, 48, .06);
    --shadow-2: 0 10px 30px rgba(47, 48, 48, .12);
    --focus: 0 0 0 3px rgba(244, 189, 48, .55);

    /* Status */
    --st-bearbeitung: #5f6670;      --st-bearbeitung-bg: #eef0f2;
    --st-pruefung_chef: #9a6400;    --st-pruefung_chef-bg: #fcefcf;
    --st-freigegeben_chef: #0f6b6b; --st-freigegeben_chef-bg: #d8f0ee;
    --st-pruefung_kunde: #4a4fb3;   --st-pruefung_kunde-bg: #e5e6fa;
    --st-zurueckgewiesen: #b42318;  --st-zurueckgewiesen-bg: #fde4e1;
    --st-freigegeben_kunde: #22743f;--st-freigegeben_kunde-bg: #dcf2e3;
    --st-bereitgestellt: #2f3030;   --st-bereitgestellt-bg: #e2e3e5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
}
[hidden] { display: none !important; }
.pipe-step .num, .review-progress strong { font-variant-numeric: tabular-nums; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

h1, h2, h3, h4 { color: var(--text-main); margin-bottom: .5rem; line-height: 1.25; }
h1 { font-size: 24px; font-weight: 650; letter-spacing: -.015em; }
h2 { font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 15px; font-weight: 600; }
p + p { margin-top: .6em; }
a { color: var(--primary); text-decoration: underline; text-decoration-color: rgba(47,48,48,.25); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--brand); }
img { max-width: 100%; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

.text-muted, .muted { color: var(--text-muted); }
.small { font-size: 12.5px; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 10px; } .mt-3 { margin-top: 15px; } .mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 10px; } .mb-3 { margin-bottom: 15px; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--primary); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 2000; }
.skip-link:focus { left: 12px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 16px; border-radius: 8px; font: inherit; font-weight: 600; font-size: 13.5px;
    cursor: pointer; border: 1px solid transparent; text-align: center; text-decoration: none;
    transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
    line-height: 1.2; white-space: nowrap;
}
.btn .icon { flex: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-brand { background: var(--brand); color: #2f3030; }
.btn-brand:hover { background: #e9ae16; }
.btn-secondary { background: #fff; color: var(--text-main); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn-ghost { background: transparent; color: var(--text-main); }
.btn-ghost:hover { background: rgba(47,48,48,.06); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #276749; }
.btn-danger { background: #fff; color: var(--danger); border-color: #f1c4bf; }
.btn-danger:hover { background: #fdecea; }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { padding: 12px 20px; font-size: 15px; }
.btn-text { background: transparent; color: var(--primary); padding: 0; border: 0; font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(47,48,48,.25); text-underline-offset: 2px; }
.btn-text:hover { text-decoration-color: var(--brand); }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--text-muted); background: transparent; border: 0; cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: rgba(47,48,48,.07); color: var(--text-main); }

/* --------------------------------------------------------------------------
   Layout & Sidebar
   -------------------------------------------------------------------------- */
.app-container { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
    width: var(--sidebar-width); flex: none; background: var(--card-bg); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; padding: 20px 0 0;
}
.sidebar .logo { padding: 0 22px 18px; border-bottom: 0; }
.sidebar .logo a { display: block; text-decoration: none; }
.sidebar .logo img.logo { display: block; width: 150px; height: auto; }
.sidebar-cta { margin: 4px 18px 14px; }
.sidebar nav { flex: 1; margin-top: 4px; display: flex; flex-direction: column; gap: 2px; padding: 0 10px; overflow-y: auto; }
.sidebar nav a {
    position: relative; display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; border-radius: 8px; color: var(--text-muted); font-weight: 500; text-decoration: none;
}
.sidebar nav a .icon { color: #9aa0a7; }
.sidebar nav a:hover { background: var(--surface-2); color: var(--text-main); }
.sidebar nav a.active { background: var(--brand-soft); color: var(--text-main); font-weight: 600; border-right: 0; }
.sidebar nav a.active .icon { color: var(--text-main); }
.sidebar nav a.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.sidebar .user-info { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 18px; border-top: 1px solid var(--border); font-size: 13px; }
.user-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.user-text strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-text small { color: var(--text-muted); }
.avatar {
    display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
    background: var(--primary); color: #fff; font-weight: 600; font-size: 12px; letter-spacing: .02em;
}
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.sidebar-toggle { display: none; }

.main-content { flex: 1; min-width: 0; padding: 28px 36px 120px; overflow-y: auto; position: relative; }
.topbar, .page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--text-muted); margin-top: 3px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.breadcrumb { font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card { background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-1); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-flush { padding: 0; overflow: hidden; }
.section-title { font-size: 13px; font-weight: 650; color: var(--text-main); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.section-title .muted { font-weight: 500; }

/* --------------------------------------------------------------------------
   Filter
   -------------------------------------------------------------------------- */
.filter-bar {
    display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
    background: var(--card-bg); border-radius: var(--radius); padding: 14px 16px;
    border: 1px solid var(--border); margin-bottom: 18px; box-shadow: var(--shadow-1);
}
.filter-item { display: flex; flex-direction: column; min-width: 150px; }
.filter-item.grow { flex: 1; min-width: 200px; }
.filter-item label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; text-transform: none; }
.filter-item select, .filter-item input {
    padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; outline: none; background: #fff; font: inherit; color: var(--text-main); min-height: 37px;
}
.filter-item select:focus, .filter-item input:focus { border-color: var(--primary); box-shadow: var(--focus); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; gap: 2px; }
.seg a, .seg button, .seg label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 7px; color: var(--text-muted); font-weight: 600; font-size: 12.5px; text-decoration: none; border: 0; background: transparent; cursor: pointer; }
.seg a.active, .seg button.active, .seg input:checked + span { background: #fff; color: var(--text-main); box-shadow: var(--shadow-1); }
.seg label { padding: 0; }
.seg label span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 7px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }

/* --------------------------------------------------------------------------
   Workflow-Pipeline (Dashboard)
   -------------------------------------------------------------------------- */
.pipeline { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; margin-bottom: 18px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1); overflow: hidden; }
.pipe-step { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 14px 18px; text-decoration: none; color: var(--text-main); border-right: 1px solid var(--border); min-width: 0; }
.pipe-step:last-child { border-right: 0; }
.pipe-step::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--pc, var(--border)); opacity: .9; }
.pipe-step .num { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.pipe-step .lbl { font-size: 12.5px; color: var(--text-muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipe-step .hint { font-size: 11.5px; color: var(--pc); font-weight: 600; }
.pipe-step:hover { background: var(--surface-2); }
.pipe-step.active { background: var(--surface-2); }
.pipe-step.active::after { height: 5px; }
.pipe-step.is-zero .num { color: #b6bac0; }
.pipe-step.alert .num { color: var(--st-zurueckgewiesen); }

/* --------------------------------------------------------------------------
   Beitragsliste (Dashboard)
   -------------------------------------------------------------------------- */
.week-group + .week-group { margin-top: 22px; }
.week-head { display: flex; align-items: baseline; gap: 10px; margin: 0 2px 8px; }
.week-head h2 { font-size: 15px; margin: 0; }
.week-head .muted { font-size: 12.5px; }
.week-head .is-now { background: var(--brand); color: #2f3030; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.post-list { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1); overflow: hidden; }
.post-row {
    display: grid; grid-template-columns: 52px 92px minmax(0, 1fr) 190px 150px 36px; gap: 16px; align-items: center;
    padding: 12px 16px; border-top: 1px solid var(--border); text-decoration: none; color: inherit;
}
.post-row:first-child { border-top: 0; }
.post-row:hover { background: #fbfbfc; }
.post-row:hover .post-title { text-decoration: underline; text-decoration-color: var(--brand); text-underline-offset: 3px; }
.post-thumb { width: 52px; height: 65px; border-radius: 6px; background: var(--surface-2) center/cover no-repeat; border: 1px solid var(--border); display: grid; place-items: center; color: #aab0b6; position: relative; overflow: hidden; }
.post-thumb .count { position: absolute; right: 3px; top: 3px; background: rgba(0,0,0,.65); color: #fff; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 10px; }
.post-date { display: flex; flex-direction: column; line-height: 1.3; }
.post-date strong { font-size: 13.5px; }
.post-date span { font-size: 12px; color: var(--text-muted); }
.post-main { min-width: 0; }
.post-kunde { font-size: 12px; color: var(--text-muted); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.post-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.post-snippet { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-channels { display: flex; flex-wrap: wrap; gap: 4px; }
.post-status { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.post-owner { display: flex; justify-content: flex-end; }
.tag-story { font-size: 11px; color: #c0262d; font-weight: 600; }
.fb-flag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--st-zurueckgewiesen); }

/* Board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.board-col { background: #eceef1; border-radius: var(--radius); padding: 10px; min-height: 200px; }
.board-col h3 { font-size: 13px; display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 10px; }
.board-col h3 .cnt { color: var(--text-muted); font-weight: 600; }
.board-col h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pc); margin-right: 8px; flex: none; }
.board-col h3 span:first-child { flex: 1; }
.board-card { display: grid; grid-template-columns: 44px 1fr; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 9px; text-decoration: none; color: inherit; box-shadow: var(--shadow-1); }
.board-card + .board-card { margin-top: 8px; }
.board-card:hover { border-color: var(--line-strong); }
.board-card .post-thumb { width: 44px; height: 55px; }
.board-card strong { display: block; font-size: 13px; line-height: 1.3; }
.board-card small { color: var(--text-muted); font-size: 11.5px; }

/* --------------------------------------------------------------------------
   Badges & Chips
   -------------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; background: #edf0f2; color: #4a5568; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.status-bearbeitung { background: var(--st-bearbeitung-bg); color: var(--st-bearbeitung); }
.status-pruefung_chef { background: var(--st-pruefung_chef-bg); color: var(--st-pruefung_chef); }
.status-freigegeben_chef { background: var(--st-freigegeben_chef-bg); color: var(--st-freigegeben_chef); }
.status-pruefung_kunde { background: var(--st-pruefung_kunde-bg); color: var(--st-pruefung_kunde); }
.status-zurueckgewiesen { background: var(--st-zurueckgewiesen-bg); color: var(--st-zurueckgewiesen); }
.status-freigegeben_kunde { background: var(--st-freigegeben_kunde-bg); color: var(--st-freigegeben_kunde); }
.status-bereitgestellt { background: var(--st-bereitgestellt-bg); color: var(--st-bereitgestellt); }
/* Ideen-Status */
.status-neu { background: var(--brand-soft); color: var(--brand-ink); }
.status-in_verwendung { background: var(--st-freigegeben_chef-bg); color: var(--st-freigegeben_chef); }
.status-archiviert { background: #eceef1; color: #7b8189; }
/* Batch */
.status-offen { background: var(--st-pruefung_kunde-bg); color: var(--st-pruefung_kunde); }
.status-abgeschlossen { background: var(--st-freigegeben_kunde-bg); color: var(--st-freigegeben_kunde); }
.status-widerrufen { background: #eceef1; color: #7b8189; }

.chip-plattform { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; border-radius: 20px; border: 1px solid var(--border); font-size: 12px; font-weight: 500; background: #fff; white-space: nowrap; }
.chip-plattform b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; background: var(--pf); color: var(--pft, #fff); font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.chip-plattform.compact { padding: 0; border: 0; background: transparent; font-size: 0; gap: 0; }
.chip-plattform.compact b { font-size: 10px; }
.chip-plattform .dot { width: 7px; height: 7px; border-radius: 50%; background: #c4c8cd; }
.pub-dot { position: relative; }
.pub-dot::after { content: ""; position: absolute; right: -2px; top: -2px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid #fff; background: var(--dot, #c4c8cd); }
.pub-geplant { --dot: #4a4fb3; } .pub-veroeffentlicht { --dot: #22743f; } .pub-fehler { --dot: #c53030; } .pub-in_arbeit { --dot: #b7791f; } .pub-manuell { --dot: #2f3030; }

/* --------------------------------------------------------------------------
   Formulare
   -------------------------------------------------------------------------- */
.form-group { margin-bottom: 14px; }
.form-group label, .label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 5px; color: var(--text-main); }
.form-group label .opt { color: var(--text-muted); font-weight: 500; }
.form-group input, .form-group select, .form-group textarea,
input.input, select.input, textarea.input {
    width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font: inherit; color: var(--text-main); background: #fff; min-height: 40px;
}
.form-group textarea, textarea.input { resize: vertical; line-height: 1.55; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus, .input:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
.form-group input[disabled], .form-group select[disabled], .form-group textarea[disabled] { background: var(--surface-2); color: #7b8189; }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 14px; }
.col-12 { grid-column: span 12; } .col-9 { grid-column: span 9; } .col-8 { grid-column: span 8; } .col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; } .col-5 { grid-column: span 5; } .col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; } .col-2 { grid-column: span 2; }
.field-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.field-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.counter.over { color: var(--danger); font-weight: 600; }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.check-tile { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 9px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; background: #fff; font-weight: 500; user-select: none; }
.check-tile input { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; }
.check-tile:has(input:checked) { border-color: var(--primary); background: #f7f7f6; }
.check-tile .conn { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.check-tile .conn.ok { color: var(--success); }
.check-inline { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.check-inline input { accent-color: var(--primary); width: 16px; height: 16px; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; background: #fff; }
.radio-card input { margin-top: 3px; accent-color: var(--primary); }
.radio-card strong { display: block; font-size: 13px; }
.radio-card small { color: var(--text-muted); font-size: 12px; line-height: 1.4; display: block; }
.radio-card:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.radio-card:has(input:disabled) { opacity: .6; cursor: not-allowed; }

/* --------------------------------------------------------------------------
   Tabellen
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table th { color: var(--text-muted); font-weight: 600; text-transform: none; font-size: 12px; background: var(--surface-2); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #fbfbfc; }
.data-table .cell-sub { display: block; font-size: 12px; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Alerts, Toasts, leere Zustände
   -------------------------------------------------------------------------- */
.alert { padding: 11px 14px; border-radius: 9px; border: 1px solid var(--border); background: #fff; margin-bottom: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert-success { background: #e9f6ee; border-color: #c3e6cf; color: #1f5f36; }
.alert-error { background: #fdeceb; border-color: #f4c7c2; color: #8f1d14; }
.alert-warning { background: #fff7e0; border-color: #f7df9a; color: #6d4b00; }
.alert-info { background: #eef0fb; border-color: #d4d7f4; color: #353a8f; }
.alert ul { margin: 4px 0 0 18px; }

.toast-stack { position: fixed; right: 20px; top: 18px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 40px)); }
.toast { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--primary); color: #fff; box-shadow: var(--shadow-2); font-weight: 500; animation: toast-in .25s ease-out; }
.toast-success { border-left: 5px solid #48bb78; }
.toast-error { border-left: 5px solid #fc8181; }
.toast-warning { border-left: 5px solid var(--brand); }
.toast-info { border-left: 5px solid #a3a8f0; }
.toast span { flex: 1; }
.toast-close { background: transparent; border: 0; color: #fff; opacity: .7; font-size: 20px; line-height: 1; cursor: pointer; }
@keyframes toast-in { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }

.empty { text-align: center; padding: 44px 20px; color: var(--text-muted); }
.empty h3 { color: var(--text-main); margin-bottom: 6px; }
.empty .btn { margin-top: 14px; }

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.modal { position: fixed; inset: 0; background: rgba(28, 29, 29, .5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal-content { background: white; padding: 24px; border-radius: 14px; width: 100%; max-width: 520px; box-shadow: var(--shadow-2); max-height: calc(100vh - 40px); overflow-y: auto; }
.modal-content.wide { max-width: 720px; }
.modal-content h3 { font-size: 18px; margin-bottom: 4px; }
.modal-content .sub { color: var(--text-muted); margin-bottom: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Beitrag-Editor
   -------------------------------------------------------------------------- */
.editor-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.editor-head h1 { margin: 0; }
.editor-head .meta { display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; color: var(--text-muted); font-size: 13px; }

.stepper { display: flex; align-items: center; gap: 0; margin: 4px 0 20px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; overflow-x: auto; box-shadow: var(--shadow-1); }
.step { display: flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--text-muted); font-size: 12.5px; font-weight: 600; }
.step .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); font-size: 11px; background: #fff; }
.step.done { color: var(--text-main); }
.step.done .n { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.current { color: var(--text-main); }
.step.current .n { background: var(--brand); border-color: var(--brand); color: #2f3030; box-shadow: 0 0 0 4px var(--brand-soft); }
.step.warn .n { background: var(--st-zurueckgewiesen); border-color: var(--st-zurueckgewiesen); color: #fff; box-shadow: 0 0 0 4px var(--st-zurueckgewiesen-bg); }
.step.warn { color: var(--st-zurueckgewiesen); }
.step-line { flex: 1; min-width: 18px; height: 2px; background: var(--border); margin: 0 10px; }
.step-line.done { background: var(--primary); }

.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 22px; align-items: start; }
.editor-side { position: sticky; top: 0; }
.editor-form .card { padding: 20px 22px; }
.locked-note { display: flex; gap: 10px; align-items: center; }

.action-bar {
    position: sticky; bottom: -120px; margin: 22px -36px -120px; padding: 14px 36px; background: rgba(255,255,255,.96);
    border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; z-index: 20;
    backdrop-filter: blur(6px);
}
.action-bar .left, .action-bar .right { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.save-state { font-size: 12.5px; color: var(--text-muted); }
.save-state.dirty { color: var(--warning); font-weight: 600; }

/* Feedback-Verlauf */
.feedback-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); }
.feedback-item:first-child { border-top: 0; padding-top: 0; }
.feedback-item .who { font-size: 12px; color: var(--text-muted); }
.feedback-item .feld { display: inline-block; font-size: 11px; font-weight: 700; color: var(--text-main); background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0 6px; margin-right: 6px; }
.feedback-item.erledigt { opacity: .55; }
.feedback-item.kunde .avatar { background: var(--st-zurueckgewiesen); }

/* --------------------------------------------------------------------------
   Smartphone-Mockup & Positionierung
   -------------------------------------------------------------------------- */
.mockup-card { padding: 16px; }
.mockup-stage {
    position: relative; width: 100%; max-width: 330px; margin: 0 auto; aspect-ratio: 1486 / 2800;
    user-select: none; -webkit-user-select: none;
}
.mockup-window {
    position: absolute; left: 9.4886%; top: 21.2857%; width: 81.0902%; height: 54.0714%;
    overflow: hidden; background: #e9eaec; cursor: grab; touch-action: none;
}
.mockup-window.dragging { cursor: grabbing; }
.mockup-window.is-locked { cursor: default; }
.mockup-window img.mockup-img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; will-change: transform; pointer-events: none; }
.mockup-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mockup-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #6b7178; padding: 18px; font-size: 13px; }
.mockup-empty strong { display: block; color: var(--text-main); margin: 8px 0 2px; }
.mockup-window.drop-active { outline: 3px dashed var(--brand); outline-offset: -6px; background: var(--brand-soft); }
.mockup-hint { text-align: center; font-size: 12px; color: var(--text-muted); margin: 10px 0 0; min-height: 18px; }
.mockup-tools { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-top: 12px; }
.mockup-tools input[type=range] { width: 100%; accent-color: var(--primary); }
.mockup-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.video-badge { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }

.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 4px; }
.thumb { position: relative; flex: none; width: 54px; height: 68px; border-radius: 7px; border: 2px solid transparent; background: var(--surface-2) center/cover no-repeat; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px var(--border); }
.thumb.active { border-color: var(--brand); }
.thumb .nr { position: absolute; left: 3px; top: 3px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 8px; }
.thumb.dragover { outline: 2px dashed var(--primary); }
.thumb-add { display: grid; place-items: center; color: var(--text-muted); border: 1.5px dashed var(--line-strong); background: #fff; box-shadow: none; }
.thumb-add:hover { color: var(--text-main); border-color: var(--primary); }
.upload-progress { height: 4px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.upload-progress span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }

/* --------------------------------------------------------------------------
   Kanäle
   -------------------------------------------------------------------------- */
.kunden-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.kanal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.kanal-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-1); position: relative; }
.kanal-card.is-off { background: var(--surface-2); }
.kanal-card .kopf { display: flex; gap: 12px; align-items: center; }
.kanal-logo { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--pft, #fff); font-weight: 700; font-size: 14px; background: var(--pf); flex: none; }
.kanal-card h3 { margin: 0; }
.kanal-account { display: flex; gap: 10px; align-items: center; padding: 10px; background: var(--surface-2); border-radius: 9px; border: 1px solid var(--border); }
.kanal-account img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.kanal-account .name { font-weight: 600; }
.kanal-meta { font-size: 12px; color: var(--text-muted); }
.kanal-card .foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.conn-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.conn-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.conn-verbunden { color: var(--success); }
.conn-nicht_verbunden { color: #8a9097; }
.conn-auswahl { color: var(--warning); }
.conn-fehler, .conn-abgelaufen { color: var(--danger); }
.setup-fehlt { font-size: 12px; color: var(--brand-ink); background: var(--brand-soft); border-radius: 7px; padding: 6px 9px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 34px; height: 20px; border-radius: 20px; background: #cfd3d8; position: relative; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .track, .switch .track.on { background: var(--primary); }
.switch input:checked + .track::after, .switch .track.on::after { transform: translateX(14px); }
button.switch { font: inherit; color: var(--text-main); cursor: pointer; }
.switch input:focus-visible + .track { box-shadow: var(--focus); }
details.setup { font-size: 12.5px; color: var(--text-muted); }
details.setup summary { cursor: pointer; font-weight: 600; color: var(--text-main); }
details.setup ol { margin: 8px 0 0 18px; }
details.setup li + li { margin-top: 4px; }

/* --------------------------------------------------------------------------
   Ideen
   -------------------------------------------------------------------------- */
.ideen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.idee-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-1); }
.idee-card .text { white-space: pre-wrap; font-size: 14px; line-height: 1.55; flex: 1; }
.idee-card .meta { font-size: 12px; color: var(--text-muted); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.idee-card.archiviert { background: var(--surface-2); }
.idee-quick { display: grid; grid-template-columns: 220px 1fr auto; gap: 10px; align-items: start; }

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 14px 1fr; background: var(--bg-color); }
.login-page::before { content: ""; background: var(--brand); }
.login-wrap { display: flex; align-items: center; justify-content: center; padding: 30px 20px; }
.login-card { background: white; padding: 40px 38px; border-radius: 16px; box-shadow: var(--shadow-2); width: 100%; max-width: 410px; text-align: left; }
.login-card img.logo { width: 170px; height: auto; display: block; margin-bottom: 26px; }
.login-card h2 { text-align: left; margin-bottom: 4px; font-size: 22px; }
.login-card .subtitle { text-align: left; color: var(--text-muted); margin-bottom: 24px; }

/* --------------------------------------------------------------------------
   Kunden-Review (öffentliche Ansicht)
   -------------------------------------------------------------------------- */
.review-body { background: var(--bg-color); }
.review-shell { min-height: 100vh; display: grid; grid-template-columns: 12px 1fr; }
.review-shell::before { content: ""; background: var(--brand); }
.review-layout { max-width: 1080px; width: 100%; margin: 0 auto; padding: 34px 24px 120px; }
.review-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.review-top img.logo { width: 150px; display: block; margin-bottom: 18px; }
.review-top h1 { font-size: 28px; margin-bottom: 4px; }
.review-progress { min-width: 260px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-1); }
.review-progress .bar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; display: flex; margin: 8px 0; }
.review-progress .bar span { display: block; height: 100%; }
.review-progress .legend { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.post-card { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 30px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-l); padding: 26px; margin-bottom: 22px; box-shadow: var(--shadow-1); }
.post-card.decided-ok { border-color: #bfe3cb; }
.post-card.decided-fb { border-color: #f3c3bd; }
.post-card .mockup-stage { max-width: 300px; }
.post-card .mockup-window { cursor: default; background: #ddd; }
.post-card .mockup-window img { width: 100%; height: 100%; object-fit: cover; position: static; }
.post-card .carousel-nav { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 10px; font-size: 12.5px; color: var(--text-muted); }
.post-card h2 { font-size: 19px; margin: 6px 0 2px; }
.post-card .story { color: #c0262d; font-weight: 600; font-size: 13px; }
.post-card .caption { white-space: pre-wrap; font-size: 15px; line-height: 1.6; margin-top: 14px; }
.post-card .hashtags { color: #3c5a99; font-size: 14px; margin-top: 10px; }
.field-block { position: relative; padding: 10px 12px; margin: 0 -12px; border-radius: 9px; }
.field-block:hover { background: var(--surface-2); }
.field-block .comment-btn { position: absolute; right: 8px; top: 8px; opacity: 0; }
.field-block:hover .comment-btn, .field-block:focus-within .comment-btn { opacity: 1; }
.field-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); align-items: center; }
.review-form { margin-top: 14px; padding: 14px; background: #fff8f7; border: 1px solid #f3d1cc; border-radius: 10px; }
.review-comments { margin-top: 12px; }
.review-comment { font-size: 13px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; margin-top: 6px; }
.review-comment b { font-size: 11.5px; }
.review-finish { position: sticky; bottom: 0; background: rgba(255,255,255,.97); border-top: 1px solid var(--border); padding: 14px 24px; display: flex; justify-content: center; gap: 12px; align-items: center; flex-wrap: wrap; z-index: 50; }
.centered-login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
    .post-row { grid-template-columns: 52px 86px minmax(0, 1fr) 150px 140px; }
    .post-row .post-owner { display: none; }
    .editor-layout { grid-template-columns: minmax(0, 1fr) 360px; }
}
@media (max-width: 1100px) {
    .pipeline { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .pipe-step:nth-child(4) { border-right: 0; }
    .pipe-step:nth-child(n+5) { border-top: 1px solid var(--border); }
    .editor-layout { grid-template-columns: minmax(0, 1fr) !important; }
    .editor-side { position: static; order: -1; }
    .post-card { grid-template-columns: 240px minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 900px) {
    .post-row { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "thumb main status" "thumb date channels"; row-gap: 6px; }
    .post-row .post-thumb { grid-area: thumb; }
    .post-row .post-main { grid-area: main; }
    .post-row .post-date { grid-area: date; flex-direction: row; gap: 6px; }
    .post-row .post-channels { grid-area: channels; justify-content: flex-end; }
    .post-row .post-status { grid-area: status; align-items: flex-end; }
    .idee-quick { grid-template-columns: 1fr; }
}
@media screen and (max-width: 768px) {
    .app-container { flex-direction: column; height: auto; min-height: 100vh; overflow: visible; }
    .sidebar { position: fixed; z-index: 1500; inset: 0 auto 0 0; width: 270px; transform: translateX(-100%); transition: transform .2s ease-out; box-shadow: var(--shadow-2); }
    .sidebar.open { transform: none; }
    .sidebar-toggle { display: inline-grid; place-items: center; position: fixed; z-index: 1400; left: 12px; top: 12px; width: 42px; height: 42px; border-radius: 10px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-1); cursor: pointer; color: var(--text-main); }
    .main-content { padding: 70px 15px 120px; overflow: visible; }
    .topbar, .page-head { align-items: flex-start; }
    .topbar .actions, .page-head .actions { width: 100%; }
    .pipeline { display: flex; overflow-x: auto; scroll-snap-type: x proximity; }
    .pipe-step { flex: 0 0 132px; border-top: 0 !important; border-right: 1px solid var(--border) !important; scroll-snap-align: start; }
    .pipe-step .num { font-size: 22px; }
    .filter-item { min-width: calc(50% - 6px); flex: 1; }
    .form-grid > [class*="col-"] { grid-column: span 12; }
    .radio-cards { grid-template-columns: 1fr; }
    .action-bar { margin: 22px -15px -120px; padding: 12px 15px; }
    .post-card { grid-template-columns: 1fr; padding: 18px; }
    .post-card .mockup-stage { max-width: 260px; }
    .review-layout { padding: 24px 14px 120px; }
    .review-top h1 { font-size: 23px; }
    .login-page { grid-template-columns: 8px 1fr; }
    .login-card { padding: 30px 24px; }
    .stepper { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
    .sidebar, .sidebar-toggle, .action-bar, .filter-bar, .toast-stack { display: none !important; }
    .main-content { padding: 0; overflow: visible; }
    .app-container { height: auto; overflow: visible; }
}
