/* Zeeh Kundenportal */
:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #f0f2f5;
    --border: #e3e6eb;
    --text: #1b1f27;
    --muted: #6b7280;
    --primary: #1f4fd8;
    --primary-ink: #ffffff;
    --success: #13804b;
    --warn: #b45309;
    --danger: #c02626;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    --sidebar: #11151c;
    --sidebar-ink: #c9d0db;

    --meta: #1877f2;
    --google: #34a853;
    --youtube: #ff0000;
    --tiktok: #111111;
    --snapchat: #f7d300;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1218;
        --surface: #171b23;
        --surface-2: #1e232d;
        --border: #2a303c;
        --text: #e7eaf0;
        --muted: #949cab;
        --primary: #5b8cff;
        --primary-ink: #0b1020;
        --success: #3ccf86;
        --warn: #f0a44b;
        --danger: #ff6b6b;
        --shadow: none;
        --sidebar: #0b0e13;
        --tiktok: #e7eaf0;
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
img, video { max-width: 100%; display: block; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.code { background: var(--surface-2); padding: .75rem 1rem; border-radius: 8px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.danger { color: var(--danger) !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; color: var(--muted); margin: 0 0 .25rem; font-weight: 600; }
.prose { white-space: normal; overflow-wrap: anywhere; }

/* ---- Shell ---- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
    background: var(--sidebar); color: var(--sidebar-ink);
    display: flex; flex-direction: column; padding: 1.25rem 1rem;
    position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 700; margin-bottom: 1.5rem; text-decoration: none !important; }
.brand__mark {
    display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
    background: linear-gradient(135deg, #3b6cff, #1a3fb0); color: #fff; font-weight: 800;
}
.brand__mark--lg { width: 56px; height: 56px; font-size: 1.6rem; border-radius: 14px; margin-bottom: 1rem; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { color: var(--sidebar-ink); padding: .55rem .75rem; border-radius: 8px; text-decoration: none; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.is-active { background: rgba(91,140,255,.18); color: #fff; font-weight: 600; }
.nav__sep { height: 1px; background: rgba(255,255,255,.08); margin: .75rem 0; }
.sidebar__foot { margin-top: auto; display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; }
.sidebar__foot a, .sidebar__foot .linklike { color: var(--sidebar-ink); }
.who { display: flex; flex-direction: column; margin-bottom: .5rem; }
.who strong { color: #fff; }
.who span { font-size: .8rem; opacity: .7; }
.version { opacity: .4; margin-top: .5rem; }

.main { padding: 2rem clamp(1rem, 3vw, 2.5rem) 4rem; max-width: 1400px; width: 100%; min-width: 0; }
.nav-toggle { display: none; }

.preview-bar {
    background: #fef3c7; color: #78350f; padding: .5rem 1rem; text-align: center; font-size: .9rem;
    position: sticky; top: 0; z-index: 20;
}
.preview-bar a { color: inherit; font-weight: 700; margin-left: .75rem; text-decoration: underline; }

@media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; inset: 0 30% 0 0; z-index: 30; transform: translateX(-100%); transition: transform .2s ease; height: 100%; }
    .sidebar.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
    .nav-toggle { display: inline-block; margin-bottom: 1rem; background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: .4rem .8rem; border-radius: 8px; font: inherit; }
    .main { padding-top: 1rem; }
}

/* ---- Blank layout / login ---- */
.blank { min-height: 100vh; display: grid; place-items: center; }
.blank__main { width: 100%; max-width: 420px; padding: 1.5rem; }
.login__brand { text-align: center; margin-bottom: 1.5rem; }
.login__brand .brand__mark { margin-inline: auto; }
.center-card { text-align: center; }

/* ---- Page head ---- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.crumbs { margin: 0 0 .75rem; font-size: .9rem; }
.actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

/* ---- Cards & grids ---- */
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.25rem; box-shadow: var(--shadow); margin-bottom: 1.25rem; min-width: 0;
}
.card--flush { padding: 0; overflow-x: auto; }
.card--error { border-color: var(--danger); }
.card--danger { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 0 1rem; }
.card .grid--2 { gap: 0 1rem; }
.form-narrow { max-width: 760px; }
.layout-aside { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.5rem; align-items: start; }
@media (max-width: 1100px) { .layout-aside { grid-template-columns: 1fr; } }

.empty { text-align: center; padding: 3rem 1rem; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }

/* ---- Stats ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; display: flex; flex-direction: column; color: inherit; text-decoration: none !important; box-shadow: var(--shadow); }
a.stat:hover { border-color: var(--primary); }
.stat__label { font-size: .8rem; color: var(--muted); }
.stat__value { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.notice { display: block; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); color: var(--text); padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; }

/* ---- Campaign cards ---- */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1rem; }
.ccard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none !important; box-shadow: var(--shadow); transition: transform .12s ease, border-color .12s ease; }
.ccard:hover { transform: translateY(-2px); border-color: var(--primary); }
.ccard__media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.ccard__media img, .ccard__media video { width: 100%; height: 100%; object-fit: cover; }
.ccard__placeholder { width: 100%; height: 100%; min-height: 140px; display: grid; place-items: center; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.ccard__count { position: absolute; right: .5rem; bottom: .5rem; background: rgba(0,0,0,.65); color: #fff; font-size: .75rem; padding: .1rem .45rem; border-radius: 999px; }
.ccard__body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.ccard__meta { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.ccard__title { margin: .2rem 0 0; font-size: 1rem; overflow-wrap: anywhere; }
.ccard__dates { color: var(--muted); font-size: .85rem; }
.ccard__stats { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem .75rem; margin: .5rem 0 0; }
.ccard__stats dt { font-size: .72rem; color: var(--muted); }
.ccard__stats dd { margin: 0; font-weight: 600; font-size: .9rem; font-variant-numeric: tabular-nums; }

.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: .25rem; }
.progress span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.progress--lg { height: 10px; margin-top: .5rem; }

/* ---- Badges ---- */
.badge, .platform { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge--active, .badge--approved { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.badge--scheduled, .badge--pending { background: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--primary); }
.badge--paused, .badge--changes_requested { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.badge--ended, .badge--draft, .badge--withdrawn { background: var(--surface-2); color: var(--muted); }
.platform { color: #fff; }
.platform--meta { background: var(--meta); }
.platform--google { background: var(--google); }
.platform--youtube { background: var(--youtube); }
.platform--tiktok { background: var(--tiktok); color: var(--bg); }
.platform--snapchat { background: var(--snapchat); color: #111; }

/* ---- History ---- */
.year { margin-bottom: 2.5rem; scroll-margin-top: 1rem; }
.year__head { display: flex; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--border); padding-bottom: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.year__head h2 { font-size: 1.5rem; margin: 0; }
.year-nav { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.year-nav a { padding: .3rem .8rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); }

/* ---- Gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 1rem; margin-bottom: 1rem; }
.gallery--sm { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.gallery__item { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.gallery__item img, .gallery__item video { width: 100%; max-height: 520px; object-fit: contain; background: var(--surface-2); }
.gallery__item figcaption { padding: .6rem .75rem; font-size: .9rem; display: flex; flex-direction: column; gap: .25rem; overflow-wrap: anywhere; }
.gallery__item figcaption.row-between { flex-direction: row; }
.gallery__item figcaption p { margin: 0; color: var(--muted); font-size: .85rem; }

/* ---- Approvals list ---- */
.alist { display: flex; flex-direction: column; gap: .6rem; }
.arow { display: grid; grid-template-columns: 96px 1fr auto; gap: 1rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem; color: inherit; text-decoration: none !important; box-shadow: var(--shadow); }
.arow:hover { border-color: var(--primary); }
.arow--pending { border-left: 4px solid var(--primary); }
.arow--changes_requested { border-left: 4px solid var(--warn); }
.arow__thumb { width: 96px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font-size: .75rem; color: var(--muted); }
.arow__thumb img { width: 100%; height: 100%; object-fit: cover; }
.arow__body h3 { margin: 0 0 .25rem; overflow-wrap: anywhere; }
.arow__meta { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
@media (max-width: 560px) {
    .arow { grid-template-columns: 64px 1fr; }
    .arow__thumb { width: 64px; height: 56px; }
    .arow__status { grid-column: 2; }
}

/* ---- Timeline ---- */
.timeline { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.timeline__item { border-left: 3px solid var(--border); padding-left: .75rem; }
.timeline__item--approved { border-color: var(--success); }
.timeline__item--changes_requested { border-color: var(--warn); }
.timeline__item--reopened { border-color: var(--primary); }
.timeline__head { display: flex; gap: .4rem; flex-wrap: wrap; align-items: baseline; font-size: .9rem; }
.timeline__head time { margin-left: auto; }
.decide { border-color: var(--primary); }
.decide__buttons { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---- Tables ---- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: .6rem .75rem; border-bottom: 1px solid var(--border); }
.table td { padding: .65rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th.right, .table td.right { text-align: right; }
.card:not(.card--flush) .table td:first-child, .card:not(.card--flush) .table th:first-child { padding-left: 0; }
.card:not(.card--flush) .table td:last-child, .card:not(.card--flush) .table th:last-child { padding-right: 0; }
tr.is-muted td { opacity: .55; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; }
.plain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }

/* ---- Forms ---- */
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; border: 0; padding: 0; min-width: 0; }
.field > span, .field legend { font-size: .85rem; font-weight: 600; }
.field small { font-size: .78rem; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
    width: 100%; font: inherit; color: var(--text); background: var(--surface);
    border: 1px solid var(--border); border-radius: 8px; padding: .55rem .7rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 40%, transparent); border-color: var(--primary); }
input:disabled, select:disabled { background: var(--surface-2); color: var(--muted); }
input[type=file] { padding: .45rem; }
textarea { resize: vertical; }
.check { display: inline-flex; align-items: center; gap: .45rem; margin: 0 1rem .75rem 0; }
.checks { display: flex; flex-wrap: wrap; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.filters select, .filters input { width: auto; min-width: 160px; }
.filters.card { padding: .75rem; }
.form-actions { margin-top: .5rem; }
form.inline { display: inline; }
.upload-inline { margin-top: 1rem; }

details.add { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: .75rem; }
details.add summary { cursor: pointer; color: var(--primary); font-weight: 600; margin-bottom: .75rem; }
.popover { position: relative; display: inline-block; }
.popover summary { cursor: pointer; color: var(--primary); list-style: none; }
.popover summary::-webkit-details-marker { display: none; }
.popover__body { position: absolute; right: 0; top: 1.6rem; z-index: 10; width: 280px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: 0 10px 30px rgba(0,0,0,.15); text-align: left; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    font: inherit; font-weight: 600; font-size: .9rem; padding: .55rem 1rem; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none !important; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn--primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--success { background: var(--success); border-color: var(--success); color: #fff; }
.btn--warn { background: transparent; border-color: var(--warn); color: var(--warn); }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--sm { padding: .3rem .65rem; font-size: .8rem; }
.btn--block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; text-align: left; }
.linklike:hover { text-decoration: underline; }

/* ---- Flash ---- */
.flash { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid; }
.flash--success { background: color-mix(in srgb, var(--success) 10%, var(--surface)); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.flash--error { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.flash--info { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }

/* ---- Statistik ---- */
.kv--inline { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: .25rem; }
.kv--inline div { display: flex; flex-direction: column; }
.card__title { padding: .9rem 1rem .2rem; margin: 0; }
.table--num th:not(:first-child), .table--num td:not(:first-child) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table--num td:first-child { min-width: 9rem; }
.bar { height: 4px; background: var(--surface-2); border-radius: 0 4px 4px 0; margin-top: .3rem; }
.bar span { display: block; height: 100%; background: var(--primary); border-radius: inherit; min-width: 2px; }
.datatable { margin: .75rem 0 1.5rem; }
.datatable summary, .ad__details summary { cursor: pointer; color: var(--primary); font-size: .9rem; margin-bottom: .5rem; }
.datatable .card { max-height: 420px; overflow: auto; }

.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1rem; }
.chart { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem 1.6rem; box-shadow: var(--shadow); }
.chart__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem; }
.chart__label { font-size: .85rem; color: var(--muted); }
.chart__total { font-weight: 700; font-variant-numeric: tabular-nums; }
.chart__plot { position: relative; }
.chart__plot svg { display: block; width: 100%; height: 150px; overflow: visible; }
.chart__grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.chart__axis { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart__line { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart__area { fill: var(--primary); opacity: .1; }
.chart__cross { stroke: var(--muted); stroke-width: 1; }
.chart__ymax, .chart__xmin, .chart__xmax { position: absolute; font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart__ymax { top: -2px; left: 0; background: var(--surface); padding-right: .3rem; }
.chart__xmin { bottom: -1.1rem; left: 0; }
.chart__xmax { bottom: -1.1rem; right: 0; }
.chart__tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--text); color: var(--bg); font-size: .75rem; padding: .25rem .5rem; border-radius: 6px; white-space: nowrap; pointer-events: none; z-index: 2; }

/* ---- Anzeigen mit Kennzahlen ---- */
.ads { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 1rem; }
.ad { display: grid; grid-template-columns: 150px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ad__media { background: var(--surface-2); min-height: 150px; }
.ad__media img, .ad__media video { width: 100%; height: 100%; max-height: 320px; object-fit: cover; }
.ad__body { padding: .8rem 1rem; display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.ad__body h3 { margin: 0; font-size: .95rem; overflow-wrap: anywhere; }
.ad__text { margin: 0; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.ad__stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: .4rem .75rem; margin: 0; }
.ad__stats dt { font-size: .7rem; color: var(--muted); }
.ad__stats dd { margin: 0; font-weight: 600; font-size: .88rem; font-variant-numeric: tabular-nums; }
.ad__details .kv { font-size: .85rem; }
.textad { display: flex; flex-direction: column; gap: .2rem; padding: .7rem; font-size: .78rem; height: 100%; background: var(--surface); border-right: 1px solid var(--border); }
.textad__tag { font-weight: 700; font-size: .68rem; }
.textad__url { color: var(--muted); overflow-wrap: anywhere; }
.textad__title { color: var(--primary); font-size: .85rem; line-height: 1.25; }
.textad__desc { color: var(--muted); }
@media (max-width: 560px) { .ad { grid-template-columns: 1fr; } .textad { border-right: 0; border-bottom: 1px solid var(--border); } }

/* ---- Beiträge, Team, Protokoll ---- */
.platform--instagram { background: #c13584; }
.channels { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.channel { display: flex; align-items: center; gap: .6rem; padding: .5rem .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: inherit; text-decoration: none !important; }
.channel.is-active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.channel img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.channel span { display: flex; flex-direction: column; line-height: 1.25; }
.post:hover { transform: none; border-color: var(--border); }
.post__text { margin: 0; font-size: .88rem; overflow-wrap: anywhere; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 1rem; }
.grid--bd { grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); align-items: start; }
.table--num { font-size: .86rem; }
.table--num th, .table--num td { padding: .5rem .55rem; }
.table--num td:first-child { min-width: 7rem; padding-left: 1rem; }
.table--num th:first-child { padding-left: 1rem; }
.table--num td:last-child, .table--num th:last-child { padding-right: 1rem; }
.grid--bd .card { max-height: 560px; overflow: auto; }
.grid--bd thead th { position: sticky; top: 0; background: var(--surface); }

/* ---- Geplante Beiträge ---- */
.badge--failed { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.postprev { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); max-width: 560px; }
.postprev__head { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; padding: .7rem .9rem; border-bottom: 1px solid var(--border); }
.postprev__text { padding: .9rem; overflow-wrap: anywhere; }
.postprev__link { display: block; padding: 0 .9rem .9rem; overflow-wrap: anywhere; }
.postprev__media { display: grid; gap: 2px; background: var(--surface-2); }
.postprev__media--2 { grid-template-columns: 1fr 1fr; }
.postprev__media--3 { grid-template-columns: 1fr 1fr 1fr; }
.postprev__media img, .postprev__media video { width: 100%; height: 100%; max-height: 560px; object-fit: cover; }
.postprev__media--1 img, .postprev__media--1 video { object-fit: contain; }

/* ---- Sprachumschalter ---- */
.lang { display: flex; gap: .25rem; margin-top: .4rem; }
.lang__item { font-size: .72rem; font-weight: 700; padding: .15rem .45rem; border-radius: 6px; border: 1px solid rgba(255,255,255,.15); color: var(--sidebar-ink); text-decoration: none !important; }
.lang__item.is-active { background: rgba(91,140,255,.25); color: #fff; border-color: transparent; }
.blank .lang { justify-content: center; margin-top: 1.25rem; }
.blank .lang__item { border-color: var(--border); color: var(--muted); }
.blank .lang__item.is-active { background: var(--primary); color: var(--primary-ink); }

/* ---- Einladungslink, Login-Zusätze ---- */
.sharelink label { display: block; font-weight: 600; margin-bottom: .4rem; }
.sharelink__row { display: flex; gap: .5rem; }
.sharelink__row input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.login__forgot { text-align: center; margin: .9rem 0 0; font-size: .9rem; }

/* ---- Zeitraum und Vergleich ---- */
.rangebar { margin-bottom: 1rem; }
.rangebar__custom { display: inline-flex; gap: .4rem; align-items: center; }
.rangebar__custom input { min-width: 0; width: auto; }
.delta { font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: .15rem; }
.delta--good { color: var(--success); }
.delta--bad { color: var(--danger); }
.delta--neutral { color: var(--muted); font-weight: 400; }

/* ---- Nutzungs-Auswertung ---- */
.weekbars { display: inline-flex; align-items: flex-end; gap: 2px; height: 28px; vertical-align: middle; }
.weekbars__bar { display: block; width: 7px; background: var(--primary); border-radius: 2px 2px 0 0; }
.weekbars__bar.is-empty { background: var(--border); }
.rangebar__custom[hidden] { display: none; }

/* ---- Kundenlogo, Ansprechperson, Kalender ---- */
.clientlogo { background: #fff; border-radius: 10px; padding: .6rem; margin-bottom: 1rem; display: grid; place-items: center; }
.clientlogo img { max-height: 54px; max-width: 100%; object-fit: contain; }
.manager { display: flex; flex-direction: column; gap: .1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem 1rem; font-size: .9rem; box-shadow: var(--shadow); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); gap: 1px; }
.cal__head { background: var(--surface-2); font-size: .75rem; font-weight: 600; color: var(--muted); padding: .4rem .5rem; text-transform: uppercase; letter-spacing: .04em; }
.cal__day { background: var(--surface); min-height: 108px; padding: .35rem; display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.cal__day--out { background: var(--surface-2); }
.cal__day--today .cal__num { background: var(--primary); color: var(--primary-ink); border-radius: 999px; }
.cal__num { font-size: .78rem; color: var(--muted); align-self: flex-start; padding: 0 .4rem; font-variant-numeric: tabular-nums; }
.cal__item { display: block; font-size: .74rem; line-height: 1.25; padding: .2rem .35rem; border-radius: 6px; border-left: 3px solid var(--muted); background: var(--surface-2); color: var(--text); text-decoration: none !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.cal__item:hover { outline: 1px solid var(--primary); }
.cal__item--planned { border-left-color: var(--primary); }
.cal__item--pending { border-left-color: var(--warn); }
.cal__item--published { border-left-color: var(--success); }
.cal__item--campaign { border-left-color: var(--muted); font-style: italic; }
.cal-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin: .75rem 0; }
.cal-legend span::before { content: ''; display: inline-block; width: 3px; height: .9em; margin-right: .35rem; vertical-align: -1px; background: var(--muted); }
.cal-legend .l-planned::before { background: var(--primary); } .cal-legend .l-pending::before { background: var(--warn); } .cal-legend .l-published::before { background: var(--success); }
@media (max-width: 760px) { .cal { grid-template-columns: 1fr; } .cal__head, .cal__day--out { display: none; } .cal__day { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; } .cal__day:not(:has(.cal__item)) { display: none; } }

/* ---- Freigabe je Datei, Markierungen, Vergleich ---- */
.pinwrap { position: relative; line-height: 0; }
.pinwrap img { width: 100%; }
.pinwrap.is-pinning { cursor: crosshair; outline: 3px solid var(--primary); outline-offset: -3px; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 50%; background: var(--warn); color: #fff; border: 2px solid #fff; font-size: .75rem; font-weight: 700; line-height: 20px; text-align: center; text-decoration: none !important; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.pin--draft { background: var(--primary); }
.pin--inline { position: static; display: inline-block; transform: none; width: 20px; height: 20px; line-height: 16px; font-size: .7rem; vertical-align: middle; }
.pinform { margin-top: .5rem; padding: .6rem; background: var(--surface-2); border-radius: 8px; }
.filedecide { display: flex; gap: .5rem; align-items: flex-start; flex-wrap: wrap; margin-top: .35rem; }
.filedecide details { flex: 1; min-width: 160px; }
.filedecide summary { list-style: none; display: inline-flex; }
.filedecide summary::-webkit-details-marker { display: none; }
.filedecide details[open] summary { margin-bottom: .5rem; }
.gallery__item figcaption details > summary { cursor: pointer; color: var(--primary); }
:target.gallery__item, li:target { outline: 2px solid var(--primary); outline-offset: 2px; }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1rem; }
.compare img, .compare video { width: 100%; max-height: 80vh; object-fit: contain; background: var(--surface-2); }

/* ---- Beste / schwächste Anzeigen ---- */
.ad__marks { display: flex; gap: .35rem; flex-wrap: wrap; }
.mark { font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; }
.mark--good { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.mark--weak { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }

/* ---- Bildauswahl ---- */
.imgpick { display: flex; gap: .75rem; flex-wrap: wrap; }
.imgpick label { display: flex; flex-direction: column; gap: .25rem; width: 130px; cursor: pointer; }
.imgpick img { width: 130px; height: 100px; object-fit: cover; border-radius: 8px; border: 2px solid var(--border); }
.imgpick input { position: absolute; opacity: 0; }
.imgpick input:checked + img { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.imgpick input:focus-visible + img { outline: 2px solid var(--primary); outline-offset: 2px; }
.imgpick--posts label { width: 170px; }
.imgpick--posts img, .imgpick__text { width: 170px; height: 130px; }
.imgpick__text { display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--border); border-radius: 8px; color: var(--muted); font-size: .8rem; }
.imgpick input:checked + .imgpick__text { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }

/* ---- Baukasten in Schritten, Zielgebiet ---- */
.step > summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; align-items: center; gap: .6rem; }
.step > summary::-webkit-details-marker { display: none; }
.step[open] > summary { margin-bottom: 1rem; }
.step__no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-size: .9rem; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .25rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .15rem .3rem .15rem .7rem; font-size: .85rem; }
.chip button { border: 0; background: none; cursor: pointer; font-size: 1rem; line-height: 1; color: var(--muted); padding: 0 .3rem; }
.georesults { margin-top: .4rem; gap: .2rem; font-size: .9rem; }

/* ---- Kunden-Arbeitsbereich im Admin ---- */
.workspace { margin: -0.5rem 0 1.5rem; }
.workspace__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.workspace__title { display: flex; align-items: center; gap: .6rem; font-size: 1.35rem; font-weight: 700; }
.workspace__title a { color: inherit; text-decoration: none; }
.workspace__title img { height: 32px; max-width: 110px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px 4px; border: 1px solid var(--border); }
.workspace__new { width: 320px; display: flex; flex-direction: column; gap: .15rem; padding: .5rem; }
.workspace__new a { display: flex; flex-direction: column; padding: .55rem .7rem; border-radius: 8px; color: var(--text); text-decoration: none !important; }
.workspace__new a:hover { background: var(--surface-2); }
.workspace__new span { font-size: .8rem; color: var(--muted); }
.popover summary.btn { color: var(--primary-ink); }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs a { padding: .55rem .9rem; color: var(--muted); text-decoration: none !important; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 600; font-size: .92rem; }
.tabs a:hover { color: var(--text); }
.tabs a.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.clientpick { margin: .15rem 0 .35rem; }
.clientpick select { background: rgba(255,255,255,.07); color: #fff; border-color: rgba(255,255,255,.14); font-size: .88rem; padding: .4rem .5rem; }
.clientpick select option { color: #000; }
.clientgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.clientcard { display: flex; flex-direction: column; gap: .35rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; color: inherit; text-decoration: none !important; box-shadow: var(--shadow); }
.clientcard:hover { border-color: var(--primary); }
.clientcard strong { font-size: 1.02rem; }
.clientcard__meta { display: flex; gap: .4rem; flex-wrap: wrap; font-size: .8rem; color: var(--muted); align-items: center; }

/* ---- Anzeigen-Vorschau und Freigabe je Anzeige ---- */
.adgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.adcard { margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.adcard figcaption { display: flex; flex-direction: column; gap: .35rem; }
.adprev { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.adprev__head { display: flex; flex-direction: column; padding: .6rem .8rem .3rem; line-height: 1.25; }
.adprev__text { padding: .3rem .8rem .6rem; font-size: .92rem; overflow-wrap: anywhere; }
.adprev img { width: 100%; display: block; }
.adprev__foot { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .6rem .8rem; background: var(--surface-2); }
.adprev__foot > div { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.adprev__host { font-size: .72rem; color: var(--muted); text-transform: uppercase; }
.adprev__cta { flex: none; font-size: .8rem; font-weight: 600; padding: .35rem .7rem; border-radius: 6px; background: var(--border); white-space: nowrap; }
:target.adcard { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: var(--radius); }
.adlist { display: flex; flex-direction: column; gap: .5rem; margin: .75rem 0; }
.adrow { display: grid; grid-template-columns: 22px 76px minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .55rem .6rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
label.adrow { cursor: pointer; }
.adrow__thumb { width: 76px; height: 60px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.adrow__thumb img { width: 100%; height: 100%; object-fit: cover; }
.adrow__body { min-width: 0; overflow-wrap: anywhere; }
.submitbar { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: 1rem; }
@media (max-width: 700px) { .adrow { grid-template-columns: 22px 56px minmax(0, 1fr); } .adrow .actions { grid-column: 2 / -1; } .adrow__thumb { width: 56px; height: 46px; } }
.checklist { display: flex; flex-direction: column; max-height: 180px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: .5rem .6rem; margin-top: .3rem; }
.checklist .check { margin: 0 0 .3rem; }

/* Leads */
.leads { display: grid; gap: .75rem; }
.lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); gap: 1.25rem; margin: 0; border-left: 3px solid var(--border); }
.lead--new { border-left-color: var(--primary); }
.lead--contacted { border-left-color: var(--warn); }
.lead--done { border-left-color: var(--success); }
.lead__head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.lead__name { font-size: 1.05rem; }
.lead__contact { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-top: .3rem; overflow-wrap: anywhere; }
.lead__fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .5rem 1rem; margin: .75rem 0 0; }
.lead__fields dt { font-size: .75rem; color: var(--muted); }
.lead__fields dd { margin: 0; overflow-wrap: anywhere; }
.lead__source { margin: .75rem 0 0; }
.lead__side form { display: grid; gap: .4rem; }
.lead__side textarea { resize: vertical; }
.lead__side .btn { justify-self: start; }
.badge--lead-new { background: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--primary); }
.badge--lead-contacted { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.badge--lead-done { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
@media (max-width: 760px) { .lead { grid-template-columns: 1fr; } }
.nav__count { display: inline-block; min-width: 1.25rem; margin-left: .35rem; padding: 0 .35rem; border-radius: 999px; background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700; text-align: center; line-height: 1.25rem; }

/* Website-Statistik */
.path { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; overflow-wrap: anywhere; }
.webbox .stats { margin-bottom: .5rem; }
.webbox .stat { box-shadow: none; background: var(--surface-2); border-color: transparent; }
.ad__webhead { margin: .75rem 0 .3rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-top: 1px solid var(--border); padding-top: .6rem; }
.webbox__groups { margin: .25rem 0 .75rem; }

/* Monatsbericht */
.report { max-width: 1000px; }
.report__head h1 { margin-bottom: .4rem; }
.report__intro { font-size: 1.1rem; line-height: 1.55; max-width: 62ch; margin: .25rem 0 .75rem; }
.report__section { margin-top: 2.25rem; }
.report__section > h2 { margin-bottom: .5rem; }
.report__findings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1rem; }
.report__findings .card { margin: 0; }
.report__findings h3 { margin: 0 0 .4rem; }
.report__findings p { margin: 0; }
.report .stat .delta + .delta { margin-top: 0; }
.report__foot { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.barchart .chart__plot svg { height: 190px; }
.barchart__bar--0 { fill: var(--primary); }
.barchart__bar--1 { fill: color-mix(in srgb, var(--muted) 45%, var(--surface)); }
.barchart__x { font-size: 11px; fill: var(--muted); }
.barchart__legend { display: inline-flex; gap: .9rem; font-size: .78rem; color: var(--muted); }
.barchart__key { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.barchart__key--0 { background: var(--primary); }
.barchart__key--1 { background: color-mix(in srgb, var(--muted) 45%, var(--surface)); }
.reportedit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 1.5rem; align-items: start; }
.reportedit__form { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
.reportedit__form textarea { min-height: 5rem; }
.reportedit__finding { border-top: 1px solid var(--border); padding-top: .6rem; margin-top: .6rem; }
@media (max-width: 1100px) { .reportedit { grid-template-columns: 1fr; } .reportedit__form { position: static; max-height: none; } }
@media print {
    .sidebar, .preview-bar, .topbar, .workspace, .flash, .no-print, .reportedit__form, .menu-toggle { display: none !important; }
    body, .shell, .main, main { background: #fff !important; display: block !important; margin: 0 !important; padding: 0 !important; }
    .reportedit { display: block; }
    .report { max-width: none; }
    .report__section, .stat, .card, .chart, tr { break-inside: avoid; }
    .card, .stat, .chart { box-shadow: none !important; }
    .grid--bd .card { max-height: none; overflow: visible; }
    a { color: inherit; text-decoration: none; }
}
.rating { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; margin: .25rem 0 1rem; }
.rating__stars { color: #e0a100; letter-spacing: .05em; }
.codeblock { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: .6rem .75rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; overflow-x: auto; white-space: pre; user-select: all; margin: .5rem 0; }
.tokencheck { background: var(--surface-2); border-radius: 8px; padding: .6rem .8rem; margin-bottom: .9rem; font-size: .86rem; }
.tokencheck p { margin: 0 0 .3rem; }
.tokencheck__list { list-style: none; margin: 0 0 .6rem; padding: 0; }
.tokencheck__list li.is-ok { color: var(--success); }
.tokencheck__list li.is-missing { color: var(--muted); }
.tokencheck__list code { color: var(--muted); font-size: .78rem; }
.reportedit__stand { margin: 0 0 .75rem; color: var(--muted); }
.reportedit__danger { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; align-items: center; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--border); }
.reportedit__danger form { margin-left: .35rem; }

/* Grafisches Profil im Kundenformular */
.brandform .colorfield { display: flex; gap: .4rem; align-items: center; }
.brandform .colorfield input[type=color] { width: 2.6rem; height: 2.3rem; padding: .15rem; flex: none; }
.swatch { display: inline-block; width: .95rem; height: .95rem; border-radius: 3px; vertical-align: -2px; margin: 0 .2rem 0 .5rem; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.nav__count--warn { background: var(--warn); }
