/* ── Reset & Base ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Markenpalette – die einzigen Farbwerte im Dashboard */
    --brand-red: #E62D35;
    --brand-charcoal: #333333;
    --brand-dark: #1B201B;
    --brand-teal: #005050;
    --brand-light: #F5F5F5;
    --brand-mint: #B9FFD6;
    --brand-lime: #D6FE05;
    --brand-cyan: #63FFFF;
    --brand-greenmint: #05FEA9;

    /* Farbrollen: jede Farbe hat genau eine Aufgabe.
       Lime = Call-to-Action, Navigation = neutral, Status = drei Töne. */
    --cta: var(--brand-lime);
    --cta-text: var(--brand-dark);
    --nav-active-bg: rgba(255, 255, 255, 0.1);
    --nav-active-text: #ffffff;
    --select-active-bg: var(--brand-dark);
    --select-active-text: #ffffff;
    --status-done-bg: var(--brand-mint);
    --status-done-text: var(--brand-teal);
    --status-neutral-bg: var(--brand-light);
    --status-neutral-text: var(--brand-charcoal);
    --status-attention: var(--brand-red);
    --status-attention-bg: #E62D3514;
    --status-attention-text: var(--brand-red); /* Markenrot aus dem Logo (#E62D35); nur für kurze, fette Hinweise, keine Fließtexte */
    /* Diagramme: Cyan, Grünmint und Petrol nur hier */
    --chart-1: var(--brand-teal);
    --chart-2: var(--brand-greenmint);
    --chart-3: var(--brand-dark);
    --chart-4: var(--brand-cyan);
    --chart-5: #9a9a9a;
    --chart-6: var(--brand-mint);

    --font-mono: 'Courier New';

    --sidebar-bg: var(--brand-dark);
    --accent: var(--brand-red);
    --bg-page: #dfdfdf;
    --bg-card: #ffffff;
    --bg-hover: var(--brand-light);
    --border: rgba(0, 0, 0, 0.08);
    --text-primary: var(--brand-dark);
    --text-muted: #777777;
    --text-faint: #aaaaaa;
    /* Alt-Namen, auf die Rollen umgelenkt */
    --green: var(--status-done-text);
    --green-light: var(--status-done-bg);
    --green-dark: var(--brand-teal);
    --amber: var(--status-neutral-text);
    --red: var(--brand-red);
    --red-trans: var(--status-attention-bg);
    --white: #ffffff;
    --mehrwert: var(--brand-lime);
    --expired: var(--status-attention-bg);

    --radius: 8px;
    --radius-lg: 12px;

    /* Einheitlicher Abstand im Raster der Startseite */
    --gap: 20px;

    --half-px: 0.5px;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s ease;
    --transition-slow: 0.7s ease;
}

@font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-weight: 300;
    src: url(../fonts/material_icons.woff2) format('woff2');
}

.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

.sidebar .material-icons {
    font-size: 18px;
    color: var(--white);
}



.material-icons.right {
    margin: 0 0 0 auto;
    font-size: 14px;
    color: var(--text-muted);
}
button span.material-icons {
    font-size: 12pt;
    vertical-align: middle;
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    src: url(../fonts/OpenSans-Regular.ttf) format('truetype');
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 500;
    src: url(../fonts/OpenSans-Bold.ttf) format('truetype');
}

@font-face {
    font-family: 'Open Sans Semi Condensed';
    font-style: normal;
    font-weight: 400;
    src: url(../fonts/OpenSans_SemiCondensed-Bold.ttf) format('truetype');
}

html, body {
    height: 100%;
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
    font-optical-sizing: auto;
    font-size: 10pt;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "wdth" 100;

    background: var(--bg-page);
    color: var(--text-primary);

    word-break: break-word;
    hyphens: auto;
}

.sidebar-username {
    display: block;
    color: var(--white);
    font-size: 12pt;
    margin-bottom: 2rem;
    padding: 1rem 1rem;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-username.left svg path {
    fill: var(--white);
}

.sidebar-username.left {
    display: flex;
    border-bottom-left-radius: 0;
}

.sidebar-username.right {
    flex: 1;
    margin-left: 4px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* ── Layout ── */
.dash {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.round-bg {
    display: inline-block;
    min-width: 50%;
    text-align: center;

    color: var(--white);
    font-weight: 500;
    padding: 0.25rem 1rem;
    border-radius: var(--radius-lg);
}

.round-bg.bg-green {
    color: var(--status-done-text);
    background-color: var(--status-done-bg);
}

.round-bg.bg-amber {
    color: var(--status-neutral-text);
    background-color: var(--status-neutral-bg);
}

.round-bg.bg-red {
    color: var(--status-attention-text);
    background-color: var(--status-attention-bg);
}

/* dekorativ, kein CTA → neutral */
.bg-primary {
    background: var(--brand-light);
}

.bg-white {
    background: var(--white);
}

.bg-accent {
    background: var(--accent);
}

.center {
    text-align: center;
}

/* ── Sidebar ── */
.sidebar {
    width: 250px;
    padding-bottom: 4rem;
    flex-shrink: 0;
    display: flex;
    overflow-y: auto;
    scrollbar-width: none;
    flex-direction: column;
    background: var(--sidebar-bg);
    z-index: 100;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar-logo {
    display: flex;
    min-height: 14rem;
    justify-content: center;
    flex-direction: column;

    padding: 20px 16px 16px;
    margin-bottom: 4px;
    border-bottom: var(--half-px) solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo .logo {
    width: 100%;
    content: url("https://dashboard.mehrwert.us/static/src/mehrwert-logo-weiss.png");
}

.logo-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--white);
    letter-spacing: 0.02em;
}

.logo-sub {
    font-size: 11px;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 6px;
}

.sidebar-section {
    padding: 1.5rem 0;
    border-bottom: var(--half-px) solid rgba(255, 255, 255, 0.08);
    margin: 0;
}

.sidebar-section .nav-item:first-of-type {
    margin-top: 1rem;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section.logout {
    padding: 0;
}

.sidebar-label__icon {
    font-size: 14px !important;
    vertical-align: -2px;
    margin-right: 6px;
}

.sidebar-label {
    font-size: 9pt;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0 1rem;
}

.nav-item,
.nav-item-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    cursor: pointer;
    font-size: 10pt;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.52);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: background 0.12s, color 0.12s;
}

.nav-item.log-out:hover .material-icons.log-out,
.nav-item.log-out:hover{
    color: var(--red);

}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
}

.nav-item.active {
    color: var(--nav-active-text);
    font-weight: 600;
    border-left-color: transparent;
    background: var(--nav-active-bg);
}

.nav-item.active span {
    color: var(--nav-active-text);
}

.nav-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Main area ── */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-page);
}

hr {
    display: block;
    margin: 3rem 2rem;
    height: 1px;
    border: none;
    background: var(--text-faint);
}

/* ── Default Grid System ── */
.grid-layout {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, 1fr);
}
.grid-layout.col-3 {
    grid-template-columns: repeat(3, 1fr);
}
.grid-layout.col-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ── Topbar ── */
.topbar {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem 1.5rem 1rem;
    background: var(--sidebar-bg);
    flex-shrink: 0;
    border-bottom: var(--half-px) solid rgba(255, 255, 255, 0.08);
}

.topbar-title {
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--white);
    line-height: 1.2;
    flex: 1;
}

.topbar-meta {
    font-size: 14px;
    color: var(--text-faint);
    padding-top: 6px;
}
.topbar .topbar-icons {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Datum direkt neben dem Seitentitel statt mittig */
#provider-title {
    flex: 0 1 auto;
}

#provider-title + .topbar-meta {
    padding-left: 1rem;
}

.topbar a.toolbar-btn {
    position: relative;
    line-height: 0;
}

.topbar a.toolbar-btn span {
    color: var(--white);
    flex-flow: column;
    text-align: center;
}
.topbar a.toolbar-btn:hover span {
    color: rgba(255, 255, 255, 0.7);
}

.topbar #logout {
    line-height: 0;
    padding: 0.75rem 1rem;
    background: var(--text-muted);
}

.topbar #logout:hover {
    background: var(--red);
}

.topbar #logout span {
    font-size: 12pt;
    color: var(--white);
}

/* ── Badges ── */

.badge {
    font-size: 10pt;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
    white-space: nowrap;
}
.badge.todo {
    font-size: 8pt;
    color: var(--white);
    padding: 2px 8px;
}
.badge.todo.dfont {
    color: var(--brand-charcoal);
}
.badge.external {
    font-size: 12pt;
    color: var(--text-muted);
    padding: 0;
}
.badge.small {
    font-size: 8pt;
    color: var(--white);
    padding: 2px 8px;
}
.badge.nl-type {
    display: inline-block;
    min-width: 64px;
    color: var(--white);
    font-size: 10px;
    text-align: center;
}
.badge.nl-type.badge-gray {
    color: var(--text-primary);
}

/* Status: drei Töne – erledigt / neutral / Achtung */
.badge-green {
    background: var(--status-done-bg);
    color: var(--status-done-text);
}

/* Klasse bleibt für JS, optisch neutral */
.badge-amber {
    background: var(--status-neutral-bg);
    color: var(--status-neutral-text);
}

.badge-gray {
    background: var(--status-neutral-bg);
    color: var(--status-neutral-text);
}

.badge-red {
    background: var(--status-attention-bg);
    color: var(--status-attention-text);
}

.badge.provider {
    display: inline-block;
    color: var(--text-primary);
    margin: 4px 8px 4px 0;
}

.badge.number {
    display: inline-block;
    color: var(--white);
    font-weight: 400;
    margin-right: 1rem;
    background: var(--brand-dark);
}

.badge.unread_badge {
    position: absolute;
    top: -4px;
    right: -8px;
    font-size: 8pt;
    padding: 0;
    color: var(--white);
    background: var(--red);

    aspect-ratio: 1 / 1;
    width: 16px;
    justify-content: center;
    display: flex;
}

#nav-messages-badge.badge {
font-size: 10px;
color: var(--text-primary);
border-radius: var(--radius);
margin: 0 0 0 auto;
background: var(--white);
}

/* ── Prio Dot ── */
.prio-legend {
    padding: 0 1rem 1rem;
}
.prio {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
}

/* ── Buttons ── */
button,
a.btn-primary {
    font-weight: 500;
    font-size: 10pt;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    background: var(--cta);
    transition: all 0.12s;

    border: solid 0.5px var(--border);
}
.btn-primary.small {
    font-size: 9pt;
    padding: 6px 12px;
    min-height: 32px;
}
.btn-primary {
    color: var(--cta-text);
    background: var(--cta);
}

.btn-primary:hover {
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--cta) 50%, transparent);
}

.btn-primary.save {
    color: var(--cta-text);
    background: var(--cta);
}

.btn-primary.save:hover {
    background: color-mix(in srgb, var(--cta) 50%, transparent);
}

/* CTA wie .btn-primary */
.btn-primary.green {
    color: var(--cta-text);
    background: var(--cta);
}

.btn-primary.icon,
.btn-secondary.icon {
    line-height: 0;
    padding: 0.33rem 0.75rem;
    border: none;
}
.btn-primary.icon span,
.btn-secondary.icon span {
    font-size: 12pt;
}

.btn-primary.log-out{
    background: var(--red);
}

.btn-primary.icon.show-all,
.btn-secondary.icon.show-all {
    padding: 6px 12px;
    display: flex;
    align-items: center;
    min-height: 32px;
    background: var(--white);
}
.btn-primary.icon.show-all span.material-icons,
.btn-secondary.icon.show-all span.material-icons {
    font-size: 12pt;
    margin-right: 8px;
}
.btn-primary.icon.show-all span.text,
.btn-secondary.icon.show-all span.text {
    font-size: 9pt;

}

.btn-secondary {
    font-size: 10pt;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.12s;

    color: var(--text-muted);
    border: 0.5px solid var(--text-faint);
    background: var(--white);
}
.btn-secondary.small {
    padding: 4px 8px;
}

.btn-secondary:hover {
    color: var(--text-primary);
    border-radius: var(--radius-lg);
    background: var(--border);
}

.btn-tertiary {
    color: var(--white);
    border: 0.5px solid var(--brand-dark);
    background: var(--brand-dark);
}

.btn-tertiary:hover {
    color: var(--white);
    background: var(--brand-charcoal);
}

.btn-icon {
    aspect-ratio: 1 / 1;
    display: inline-flex;
    padding: 6px;

    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    background: var(--brand-light);
    transition: all 0.12s;
    border: solid 0.5px var(--border);
}
.btn-icon:hover {
    border-radius: var(--radius-lg);
    background: var(--border);
}
.btn-icon span {
    font-size: 12pt;
    color: var(--text-primary);
}
.btn-icon.edit {
    color: var(--text-primary);
    background: var(--brand-light);
}
.btn-icon.edit:hover {
    background: var(--brand-dark);
}
.btn-icon.edit:hover span {
    color: var(--white);
}
.btn-icon.delete {
    color: var(--red);
    background: var(--status-attention-bg);
}
.btn-icon.delete:hover {
    background: var(--red);
}
.btn-icon.delete:hover span {
    color: var(--white);
}
.btn-icon.reset {
    display: none;
    aspect-ratio: auto;
    padding: 6px 12px;
}

.modal-overlay .btn-secondary:hover {
    color: var(--white);
    border: 0.5px solid transparent;
    background: var(--text-muted);
}
.modal-overlay .btn-tertiary:hover {
    color: var(--white);
    border: 0.5px solid transparent;
    background: var(--brand-charcoal);
}
.modal-overlay .btn-secondary.btn-delete:hover {
    background: color-mix(in srgb, var(--red) 50%, transparent);
}

a.btn-primary.btn-to-top {
    padding: 4px 12px;
    margin: 0 1rem 0 auto;
    background: none;
}
a.btn-primary.btn-to-top:hover {
    background: var(--brand-light);
}
a.btn-primary.btn-to-top span {
    color: var(--text-primary);
    font-size: 14pt;
    padding: 6px 0;
}

.btn-edit {
    color: var(--text-primary);
    border: 0.5px solid var(--border);
    background: var(--brand-light);
}

.btn-edit:hover {
    color: var(--white);
    background: var(--brand-dark);
}

.btn-delete {
    color: var(--white);
    border: 0.5px solid var(--border);
    background: var(--red);
}

.btn-delete:hover {
    color: var(--white);
    background: var(--red);
}


.btn-note {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 2px 4px;
    border-radius: 4px;
    transition: transform 0.1s;
    line-height: 1;
}

.btn-note:hover {
    transform: scale(1.2);
}

button.btn-direction {
    border: 0.5px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    padding: 1px 6px;
    font-size: 12px;
    color: var(--white);
    background: var(--text-primary);
}
button.btn-direction:hover {
    background: var(--text-faint);
}

/* normaler Filter (Übersicht „mehrwert“), nicht destruktiv → neutral dunkel */
.btn-accent {
    color: var(--white);
    background: var(--brand-dark);
}
.btn-accent:hover {
    color: var(--white);
    background: var(--brand-charcoal);
}

/* ── Content ── */
.content {
    padding: 1rem 1rem 10rem 1rem;
    flex: 1;
    overflow-y: auto;
}

/* iFrame-View braucht kein Padding und kein Scroll */
.content:has(#view-iframe:not([style*="display: none"])) {
    padding: 0;
    overflow: hidden;
}

.content:has(#view-iframe:not([style*="display: block"])) {
    padding: 1rem 1rem 10rem 1rem;
    overflow: auto;
}

#view-iframe {
height: 100%;
}

/* ── Brainstorming ── */
#bs-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, 1fr);
}
.bs-card {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
}
.bs-buttons {
    display: grid;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* ── KPI Grid ── */
.kpi-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 16px;
}

.kpi-card {
    background: var(--bg-card);
    border: var(--half-px) solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
}

.kpi-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1;
}

.kpi-delta {
    font-size: 11px;
    margin-top: 4px;
}

.delta-up {
    color: var(--brand-teal);
}

.delta-down {
    color: var(--brand-red);
}

/* ── Charts ── */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.charts-row.three-columns {
    grid-template-columns: repeat(3, 1fr);
}

/* Startseite: High-/Lowlights über volle Breite, wenn keine Updates angezeigt werden */
#view-start .charts-row:has(> #updates-row[style*="display: none"]) {
    grid-template-columns: 1fr;
}

.chart-card {
    background: var(--bg-card);
    border: var(--half-px) solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
}

.chart-title {
    font-size: 12pt;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* ── Table ── */
.table-card {
    border: 0 solid var(--border);
    border-radius: var(--radius);
    overflow-y: auto;
    margin-bottom: 1rem;
    background: var(--bg-card);
}

.table-card.no-data,
.table-card.no-data tr.muted:hover td {
    border: none;
    /*box-shadow: none;*/
    background: rgba(255, 255, 255, 0.6);
}

.table-card.no-data table td {
    padding: 0 2rem 2rem;
}

.table-card.no-data table td.muted span {
    display: inline-block;
    color: var(--text-primary);
    background-color: var(--red-trans);
    padding: 1rem 2rem;
}

.table-card.no-data table thead {
    display: none;
}

.filter-bar.table-header {
    box-shadow: rgba(0, 0, 0, 0.2) 0 0 0.75rem;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}
#updates-list div.row {
padding: 1rem;
border-bottom: var(--half-px) solid var(--border)
}
#updates-list div.row:last-child {
border: none;
}
#updates-list div.row:hover {
background: var(--bg-hover);
}

#updates-list div.update-desc {
color:var(--text-muted);
/*
 *   max-width: 100ch;
 *   white-space: nowrap;
 *   overflow: hidden;
 *   text-overflow: ellipsis;
 *   float: left;
 */
}
#updates-list div.update-desc.full {
white-space: normal;
}
#updates-list span.expand {
color: var(--sidebar-bg);
background: var(--brand-light);
font-size: 14px;
padding: 6px;
border-radius: var(--radius);
float: right;
}

.table-title {
    font-size: 12pt;
    color: var(--text-primary);
    font-weight: 500;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10pt;
}

thead {
    color: var(--white);
    background: var(--sidebar-bg);
}
#view-start thead {
    color: var(--text-primary);
    background: var(--bg-card);
}

thead.subheader {
    color: var(--text-primary);
    background: var(--brand-light);
}

tbody.tr-line tr {
    border-bottom: solid 0.5px var(--border);
}

th {
    font-family: 'Open Sans Semi Condensed', monospace;
    font-size: 11pt;
    text-align: left;
    padding: 8px 10px;
    border-bottom: var(--half-px) solid var(--border);
    white-space: nowrap;
}

td {
    color: var(--text-primary);
    padding: 8px 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
    vertical-align: middle;
    border-bottom: var(--half-px) solid var(--border);
}
td.muted {
    max-width: 450px;
    white-space: normal;
}
td.nowrap {
    white-space: nowrap !important;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--bg-hover);
}
tr.no-hover:hover td {
    background: var(--bg-card);
}
tr.no-hover td table tr:hover td {
    background: var(--bg-hover);
}

tr.muted td:first-child {
    font-size: 10pt;
    font-weight: 400;
    text-align: center;
    padding: 3rem 2rem;
}

tr.muted:hover td {
    background: var(--bg-card);
}

/* Startseite: leere Tabellen ohne Spaltenköpfe, kompakte Leerzeile */
#view-start table:has(tbody tr.muted) thead {
    display: none;
}

#view-start tr.muted td:first-child {
    padding: 1rem;
    color: var(--text-muted);
}

/* Startseite: Leer-Zustand mit blassem Icon, Satz und optionaler Aktion */
#view-start .start-empty__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-weight: 400;
}

#view-start .start-empty__icon {
    font-size: 40px;
    color: var(--text-primary);
    opacity: 0.2;
}

#view-start .start-empty__text {
    color: var(--text-muted);
}

tr td:first-child {
    font-weight: 500;
    vertical-align: middle;
}

td.line {
    height: 10px;
    padding: 0;
}
tfoot.buttons td.border {
    padding: 12px;
    border-top: solid 2px var(--sidebar-bg);
    background: var(--brand-light);
}

tfoot.buttons td.border div.flex {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.sort-indicator {
    font-size: 10px;
    color: var(--brand-dark);
    margin-left: 0.5rem;
}

.mail {
    padding: 0 0 0 2rem;
}

.mail a {
    font-size: 2rem;
    text-decoration: none;
    transition-duration: 350ms;
}

/* Plattform-Punkt neutral – der Name daneben sagt, welche Plattform */
.provider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-faint);
    display: inline-block;
    flex-shrink: 0;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.dot-green {
    background: var(--status-done-text);
}

.dot-amber {
    background: var(--brand-charcoal);
}

.dot-red {
    background: var(--brand-red);
}

.dot-blue {
    background: var(--chart-5);
}

/* ── Laufzeit-Fortschrittsbalken ── */
.progress-bar {
    margin-top: 4px;
    height: 4px;
    background: var(--brand-light);
    border-radius: 2px;
    overflow: hidden;
    width: 80%;
    display: block;
    vertical-align: middle;
}

.progress-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--brand-teal);
    transition: width 0.3s;
}

.progress-fill.green {
    background: var(--brand-teal);
}

.progress-fill.yellow {
    background: var(--brand-charcoal);
}

.progress-fill.red {
    background: var(--brand-red);
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 100;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#delete-modal.modal-overlay {
z-index: 200;
}

#highlight-modal.modal-overlay select {
width: 100%;
max-width: none;
}

.hidden {
    display: none !important;
}

.invisible {
    opacity: 0 !important;
}

.hide-me {
    display: none;
}

.modal {
    width: 560px;
    max-width: 95vw;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 0.5px solid var(--border);
    font-weight: 500;
    font-size: 14px;
    background: var(--brand-light);
}

.modal-close {
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--white);
    background: var(--sidebar-bg);
}

.modal-close:hover {
    background: var(--white);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem 1rem;
    overflow-y: auto;
    flex: 1;
    background: var(--bg-card);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 20px;
    border-top: 0.5px solid var(--border);
    background: var(--sidebar-bg);
}

/*
 * . *modal-footer .btn-primary {
 * margin-left: auto;
 * }
 * .modal-footer .btn-secondary {
 * margin-right: auto;
 * }
 * .modal-footer .btn-tertiary {
 * margin-left: auto;
 * margin-right: auto;
 * }
 */

/* ── Modal Note ── */
#note-modal-overlay p {
font-size: 13px;
color: var(--text-primary);
line-height: 1.7;
white-space: pre-wrap;
padding: 1rem;
background: var(--bg-hover);
}

#note-modal-overlay label {
display: block;
font-weight: 500;
padding: 1rem 0;
}

/* ── Formular ── */
.form-grid,
.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.checkbox-grid {
    margin-top: 6px;
}

.form-full {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 1rem;
}
.form-group.border {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 0.5px solid var(--border);
}
.form-group label {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}
.form-group label span {
    text-transform: capitalize;
}
.form-group label span.val {
    font-weight: 400;
    margin-left: 0.25rem;
}

.form-group input,
.form-group select {
    max-width: 21rem;

    padding: 8px 10px;
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-card);
    outline: none;
    transition: border-color 0.12s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--text-primary);
}

.form-group input:disabled,
.form-group select:disabled {
    background: var(--brand-light);
}

.form-group.form-full {
    input,
    select {
        max-width: 50rem;
    }
}

.form-hint {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 2px;
}

.checkbox-grid label {
    text-transform: none;
    margin-bottom: 0;
}

textarea {
    width: 100%;
    padding: 8px 10px;

    font-family: inherit;
    font-size: 13px;
    color: var(--text-primary);

    outline: none;
    resize: vertical;
    field-sizing: content;

    border-radius: var(--radius);
    border: 0.5px solid var(--border);
    background: var(--bg-card);
}

.blocker {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.75);
}

.unlock {
    position: absolute;
    top: auto;
    left: auto;
    right: auto;
}

.checklist-item {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 4px;
    padding: 8px 10px;
    background: rgb(246, 246, 246);
}


/* ── Reporting-Grid ── */

.reporting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
    margin-bottom: 2rem;
}

/** Reporting Card **/
.reporting-card {
    transition: all var(--transition-normal);
    position: relative;
    text-decoration: none;
    display: block;
}

.reporting-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--brand-dark);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.reporting-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.reporting-card.no-file {
    opacity: 0.66;
}

.reporting-card:hover {
    opacity: 1;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.20);
}

.reporting-card:hover::before {
    transform: scaleX(1);
}

.reporting-card img {
    padding: 4px;
    margin: -4px;
}

.reporting-card:hover img {
    padding: 0;
    transition: all 0.25s;
}


.reporting-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 1rem;
}

.reporting-card-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.folder .reporting-card-icon {
    width: 80px;
    height: 80px;
    font-size: 48pt;
}

.reporting-card-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reporting-card-sub {
    font-size: 12px;
    color: var(--text-faint);
    margin-top: 4px;

    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.reporting-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 1rem 1rem;
    text-align: center;
}

.reporting-card-comment {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 1rem 1rem;
    text-align: center;
}

.reporting-card-footer {
    display: flex;
    flex-direction: row;
    gap: 6px;
    padding: 0.5rem;
    text-align: center;
    border-top: 0.5px solid var(--border);

    /*
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    opacity: 0;
    background: var(--sidebar-bg);
    */
    background: var(--bg-hover);
}

.folder .reporting-card-footer {
    left: auto;
    right: 0;
}

.reporting-card:hover .reporting-card-footer {
    opacity: 1;
    transition: opacity 0.25s ease 0.5s;
}

/*
.reporting-card-footer button:first-child {
    flex: 1;
}

.reporting-card-footer button:last-child {
    flex: 1;
}
*/

.reporting-card-footer div.spacer {
    flex: 6;
}

.reporting-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.reporting-toolbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px 14px;
    margin-bottom: 1rem;

    border-radius: var(--radius);
    background: var(--white);
}

.reporting-iframe-title {
    font-size: 16pt;
    font-weight: 500;
    text-transform: uppercase;
    margin-left: auto;
}

.reporting-iframe-sub {
    display: block;
    font-size: 12pt;
    font-weight: 400;
    margin-top: 0.5rem;
    margin-left: auto;
}

/* view-reporting-iframe als flex wenn sichtbar */
#view-reporting-iframe.visible {
display: flex;
}

/* ── Filterleiste (Übersicht) ── */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: flex-start;

    border-radius: var(--radius);
    background: var(--white);
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 10px 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.12s;
}

.filter-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Einheitlicher Aktiv-Zustand für Tabs/Filter: dunkle Pille */
.filter-btn.active,
.filter-btn.active:hover {
    background: var(--select-active-bg);
    border-color: var(--select-active-bg);
    color: var(--select-active-text);
}

#ep-month-nav .filter-btn {
display: flex;
align-items: center;
}
#ep-month-nav .filter-btn span {
font-size: 14px;
color: var(--text-muted);
margin-right: 8px;
}
#ep-month-nav .filter-btn:hover span {
color: var(--text-primary);
}

.filter-count {
    margin-left: auto;
    font-weight: 500;
    font-size: 10pt;
    cursor: default;
    color: var(--white);
    padding: 0.75rem 1rem;
    white-space: nowrap;
    border-radius: var(--radius);
    background: var(--sidebar-bg);
}

.filter-count.start,
#ep-container .filter-count {
margin-left: 0;
}

/* ── Startseite: Widgets ── */
#view-start .charts-row {
    gap: var(--gap);
    margin-bottom: var(--gap);
}

#view-start .table-card {
    margin-bottom: 0;
    height: 100%;
    border-left: 4px solid transparent;
    box-shadow: 0 1px 3px var(--border);
    transition: border-color 0.15s ease;
}

#view-start .table-card:hover {
    border-left-color: var(--brand-dark);
}

#view-start .start-widget__header {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

#view-start .start-widget__icon {
    font-size: 20px;
    color: var(--text-primary);
}

/* Zähler-Badge: dunkel bei Einträgen, grau bei 0 */
#view-start .start-badge {
    min-width: 1.75rem;
    padding: 0.125rem 0.5rem;
    font-size: 9pt;
    font-weight: 500;
    text-align: center;
    color: var(--white);
    background: var(--brand-dark);
    border-radius: var(--radius-lg);
}

#view-start .start-badge.is-zero {
    color: var(--text-muted);
    background: var(--bg-page);
}

#view-start .start-widget__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    /* gleiche Kopfhöhe, auch wenn ein Widget keinen Anlege-Button hat */
    min-height: 32px;
}

/* "+ ToDo" im Widget-Header: gefüllter Hauptbutton, damit das Anlegen von ToDos sofort auffällt */
#view-start .start-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding-left: 10px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

#view-start .start-add-btn .material-icons {
    font-size: 16px;
    color: inherit;
}

#view-start .start-add-btn:hover,
#view-start .start-add-btn:focus-visible {
    border-radius: var(--radius);
}

/* Erklärzeile unter dem Widget-Titel, eingerückt auf Höhe des Titels */
#view-start .start-widget__hint {
    flex-basis: 100%;
    margin: -0.25rem 0 0 calc(20px + 0.5rem);
    font-size: 9pt;
    color: var(--text-muted);
}

#view-start .start-link {
    font-size: 10pt;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    text-decoration: none;
}

#view-start .start-link:hover,
#view-start .start-link:focus-visible {
    text-decoration: underline;
}

/* Startseite: Spaltenköpfe als dezente Labels, damit der Kartentitel dominiert */
#view-start th {
    font-size: 8pt;
    font-weight: 400;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
    #view-start .table-card {
        transition: none;
    }
}

/* ── Datumsfilter ── */
.filter-date-group {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
    flex-wrap: wrap;
}

.filter-date-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.filter-date-input {
    max-width: 10rem;
    padding: 8px 10px;
    border: 0.5px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-card);
    outline: none;
    cursor: pointer;
    transition: border-color 0.12s;
}

.filter-date-input:focus {
    border-color: var(--brand-dark);
}

.filter-date-input::-webkit-calendar-picker-indicator {
    opacity: 0.5;
    cursor: pointer;
}

select.filter-date-input {
    border-radius: 6px;
}

.filter-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 0.5px solid var(--text-faint);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: all 0.12s;
    white-space: nowrap;
}

.filter-reset-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ── Kollapsierbare Sidebar-Sections ── */
.collapsible-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    user-select: none;
    padding-right: 16px;
}

.collapsible-label:hover {
    color: rgba(255, 255, 255, 0.7);
}

.collapse-arrow {
    margin-left: auto;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.collapse-arrow.open {
    transform: rotate(90deg);
    color: rgba(255, 255, 255, 0.6);
}

.collapsible-items {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
}

.collapsible-items.open {
    max-height: 400px;
}

.collapsible-items.open .nav-item:first-child {
    margin-top: 1rem;
}

/* ── Burger-Button ── */
.burger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-right: 8px;
    border-radius: var(--radius);
    color: var(--white);
    flex-shrink: 0;
    transition: background 0.12s;
}

.burger-btn:hover {
    background: var(--bg-hover);
}

.burger-btn svg {
    display: block;
}

.burger-btn:hover svg {
    color: var(--text-primary);
}

/* ── Sidebar-Overlay (Mobile) ── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 49;
}

.sidebar-overlay.visible {
    display: block;
}

a {
    color: var(--text-muted);
    font-weight: 500;
}
a.button {
    text-decoration: none;
}
a.button:hover span {
    color: var(--white);
    background: var(--brand-dark);
}

th.icon-center {
    padding: 8px 14px;
}

.primary {
    color: var(--text-primary);
}

.amber {
    color: var(--amber);
}

.accent {
    color: var(--accent);
}

.green {
    color: var(--green);
}

.muted {
    color: var(--text-muted);
}

.faint {
    color: var(--text-faint);
}

.white {
    color: var(--white);
}

.bold {
    font-weight: 500 !important;
}

.italic {
    font-style: italic;
}

.clickable {
    cursor: context-menu;
}

.circle-span {
    aspect-ratio: 1 / 1;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.5rem;
    font-size: 10px;
    color: var(--text-primary);
    border-radius: 50%;
    background-color: var(--brand-light);
}

/* ── FAB Chatbot ── */
.chatbot {
    position: fixed;
    right: 2rem;
    bottom: 5rem;
    z-index: 99;
    cursor: pointer;
    transition: filter 0.8s ease;
}

.chatbot img {
    cursor: pointer;
    width: 6rem;
    border-radius: 4rem;
    background: var(--white);
}

@keyframes hover-pulse {
    from {
        transform: scale(0.9);
    }
    to {
        transform: scale(1.0);
    }
}

.chatbot:hover {
    filter: brightness(1.1);
}

/* ── Floating Action Button ── */
.fab {
    width: 4rem;
    height: 4rem;
    position: fixed;
    right: 3rem;
    bottom: 6rem;
    background: var(--cta);
    border-radius: 4rem;
    box-shadow: 0 0 1rem rgba(0, 0, 0, 0.48);

    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#start .fab {
display: none;
}

.fab span {
    display: flex;
    align-self: center;
    color: var(--sidebar-bg);
    font-size: 3rem;
    line-height: 0;
}

.fab:hover {
    filter: brightness(0.95);
}

div.data-loading {
    max-width: 480px;
    padding: 4rem 2rem;
    margin: 4rem auto;
    text-align: center;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 25%, rgba(223, 223, 223, 1) 100%);
}
div.data-loading img {
    width: 50%;
    margin-top: 2rem;
    transition: filter 1s ease;
    animation: hover-pulse 2s ease infinite alternate;
}
div.loading-placeholder {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
}

/* ── Footer ── */
.mehrwert-ci {
    color: var(--white);
}

footer .claim .mehrwert-ci {
    color: var(--white);
}

footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;

    display: flex;
    width: 100%;
    color: var(--white);
    text-align: center;
    padding: 1rem 2rem;
    background: var(--sidebar-bg);
}

footer .mehrwert {
    flex: 1;
}

footer h2 {
    font-size: 12pt;
    display: inline-block;
}

footer h2 span {
    font-weight: 300;
}

footer .date {
    font-size: 10pt;
    font-weight: 400;
    padding-right: 1rem;
}

ul {
    display: flex;
}

ul li {
    list-style-type: none;
}

ul li::marker {
    content: "";
}

ul li a {
    color: var(--white);
}

ul li:not(:last-child)::after {
    content: "";
    border-inline-start-width: 2px;
    border-inline-start-style: solid;
    margin-inline: calc(1rem);
}

/* ── ToDo-Bereich ── */

.todo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
#todo-comment-list {
max-height: 70vh;
overflow-y: auto;
padding: 1rem;
}

/* ── Löschen-Bestätigungs-Dialog ── */
.delete-modal {
    width: 400px;
    max-width: 95vw;
}

.delete-modal-icon {
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--status-attention-bg);
    margin: 0 auto 14px;
    font-size: 20px;
    display: none;
}

.delete-modal-title {
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.delete-modal-name {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    word-break: break-word;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--bg-hover);
}

.btn-danger {
    color: var(--white);
    font-size: 10pt;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    background: var(--red);
    transition: opacity 0.12s;

    border: 0.5px solid transparent;
}

.btn-danger:hover {
    opacity: 0.88;
}

.checkbox-grid label span.role {
    font-size: 10px;
    color: var(--text-faint);
    text-transform: uppercase;
}


/* -- MouseOver Span -- */
span.mouseover {
    display: block;
    margin-top: 4px;
    padding: 0.5rem;
    font-weight: 100;
    border-left: solid 5px var(--brand-dark);
}
td.desc {
    font-size: 9pt;
    text-overflow: ellipsis;
    white-space: pre-wrap;
}
span.desc {
    font-size: 9pt;
    font-weight: 400;
}
#view-overview span.desc,
#aa-tbody span.desc {
display: inline-block;
margin: 0.5rem 0;
}
#view-todos span.desc {
display: inline-block;
margin-top: 0.5rem;
}

table tr {
    position: relative;
    transform: translate(0);
}

td:hover span.mouseover {
    display: grid;
}

table tr.sum {
    font-weight: 500;
    font-size: 14px;
    border-top: 2px solid var(--border);
    background: var(--brand-light);
}
table tr.sum:hover td {
    background: var(--brand-light);
}
table tr.sum td {
    padding: 16px 10px;
}

/* -- Table Header Width -- */
#view-todos table th.name {
width: 15%
}

#view-todos table th.customer {
width: 8%
}

#view-todos table th.campaign {
width: 15%
}

#view-todos table th.user {
width: 8%
}

#view-todos table th.deadline {
width: 8%
}

#view-todos table th.progress {
width: 15%
}
#view-todos table th.progress-short {
width: 5%
}

#view-todos table th.icon {
width: 2%
}

table th.large {
    width: 15%
}

table th.default {
    width: 10%
}

table th.small {
    width: 5%
}

table th.tiny {
    width: 2%
}

/* ── Analytics Kanal-Badges ── */
.channel-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    background: var(--bg-hover);
    color: var(--text-muted);
}

.channel-badge.channel-organic_search {
    background: var(--status-neutral-bg);
    color: var(--status-neutral-text);
}

.channel-badge.channel-paid_search {
    background: var(--status-neutral-bg);
    color: var(--status-neutral-text);
}

.channel-badge.channel-direct {
    background: var(--status-neutral-bg);
    color: var(--status-neutral-text);
}

.channel-badge.channel-social {
    background: var(--status-neutral-bg);
    color: var(--status-neutral-text);
}

.channel-badge.channel-email {
    background: var(--status-neutral-bg);
    color: var(--status-neutral-text);
}

.channel-badge.channel-referral {
    background: var(--status-neutral-bg);
    color: var(--status-neutral-text);
}

.channel-badge.channel-display {
    background: var(--status-neutral-bg);
    color: var(--status-neutral-text);
}

/* ── Card Style ── */
.card {
    padding: 1rem;
    /*margin-bottom: 14px;*/
    border-radius: var(--radius-lg);
    background: var(--white);
    transition: box-shadow 0.15s;
}
.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

/* ── Reporting Kommentare ── */
button {
    font-family: 'Open Sans';
    font-weight: 500;
}
.btn-comment {
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.12s;

    color: var(--text-muted);
    border: 0.5px solid var(--text-faint);
    background: var(--white);
}
.btn-comment:hover {
    color: var(--text-primary);
    border-radius: var(--radius-lg);
    background: var(--border);
}

.btn-comment.empty {
    color: var(--text-muted);
    background: var(--bg-hover);
}
.btn-comment.none {
    font-weight: 500;
}
.btn-comment.has-comments {
    color: var(--text-primary);
    background: var(--brand-light);
}
.btn-comment.check-list {
    justify-content: center;
    align-items: center;
    display: flex;
}
.btn-comment.check-list span {
    margin-right: 4px;
}
.btn-comment.check-list.none {
    flex: 0;
}
.btn-comment.check-list.none span {
    margin: 0;
}
.btn-comment.check-done,
.btn-comment.check-done span {
    background: var(--status-done-bg);
    color: var(--status-done-text) !important;
}

.comment-item {
    border-bottom: 0.5px solid var(--border);
    margin-bottom: 1rem;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-own .comment-author {
    color: var(--brand-dark);
    font-weight: 700;
}

.comment-header {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 4px;
}
.comment-header.reverse {
    flex-direction: row-reverse;
}

.comment-author {
    font-weight: 500;
    padding: 0.5rem 1rem;

    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.comment-client {
    font-size: 8pt;
    color: var(--text-primary);
}

.comment-date {
    flex: 1;
    font-size: 10pt;
    color: var(--text-faint);
    text-align: right;
}

.comment-actions {
    display: flex;
    gap: 2px;
    opacity: 1;
    transition: opacity 0.12s;
}

.comment-item:hover .comment-actions {
    opacity: 1;
}

.comment-text {
    font-size: 12px;
    font-family: var(--font-mono, monospace);
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;

    padding: 1rem;
    margin: 0 0 1rem;
    border-radius: var(--radius);
    background: var(--bg-hover);
}
.comment-text.own {
    background: var(--brand-light);
}
.comment-edit-form {
    padding-bottom: 1rem;
}

.comment-edit-input {
    flex: 1;
    padding: 0.5rem;
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-card);
    outline: none;
    resize: vertical;
    font-family: inherit;
}


/* ── Grid | Flex System ── */

.flex {
    display: flex !important;
    gap: 0.5rem;
}
.flex-reverse {
    flex-flow: row-reverse;
}
.grid {
    display: grid !important;
    gap: 1rem;
}


/* ── Nachrichten ── */
.messages-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1rem;
    height: calc(100vh - 180px);
    overflow: hidden;
}

.messages-sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.messages-tabs {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-bottom: 1rem;
}

.msg-tab {
    flex: 1;
    padding: 10px;
    background: none;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.12s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    border: 2px solid var(--text-muted);
    border-radius: var(--radius);
    background: var(--bg-card);
}

.msg-tab.active {
    color: var(--select-active-text);
    font-weight: 800;
    border-color: var(--select-active-bg);
    background: var(--select-active-bg);
}

.messages-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;

    border-radius: var(--radius);
    background: var(--bg-card);
}

.messages-compose-btn {
    padding: 1rem;
    flex-shrink: 0;

    border-radius: var(--radius);
    background: var(--bg-card);
}

.msg-list-item {
    padding: 12px 14px;
    border-bottom: 0.5px solid var(--border);
    cursor: pointer;
    transition: background 0.1s;
}

.msg-list-item:hover {
    background: var(--bg-hover);
}

.msg-list-item.active {
    background: var(--bg-hover);
    border-left: 3px solid var(--select-active-bg);
}

.msg-list-item.unread {
    background: var(--status-attention-bg);
}

.msg-list-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.msg-unread-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.msg-list-from {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.msg-list-date {
    font-size: 10px;
    color: var(--text-faint);
    white-space: nowrap;
}

.msg-list-subject {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.msg-list-preview {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Detail */
.messages-detail {
    display: flex;
    flex-direction: column;
    overflow-y: auto;

    border-radius: var(--radius);
    background: var(--bg-card);
}

.messages-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.msg-detail-header {
    padding: 16px 20px 12px;
    border-bottom: 0.5px solid var(--border);
    flex-shrink: 0;
}

.msg-detail-subject {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.msg-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
}

.msg-meta-tag {
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: 10px;
}

.msg-detail-body {
    padding: 16px 20px;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.msg-replies-section {
    border-top: 0.5px solid var(--border);
    padding: 12px 20px;
}

.msg-replies-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.msg-reply-item {
    padding: 10px 0;
    border-bottom: 0.5px solid var(--border);
}

.msg-reply-item:last-child {
    border-bottom: none;
}

.msg-reply-header {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.msg-reply-sender {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.msg-reply-date {
    font-size: 11px;
    color: var(--text-faint);
}

.msg-reply-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.msg-reply-form {
    padding: 12px 20px 16px;
    border-top: 0.5px solid var(--border);
    margin-top: auto;
    flex-shrink: 0;
}

/* Recipient Chips */
.recipient-input-wrap {
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    cursor: text;
    background: var(--bg-card);
    min-height: 38px;
}

.recipient-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-hover);
    border: 0.5px solid var(--border);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    color: var(--text-primary);
}

.chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 10px;
    color: var(--text-muted);
    padding: 0;
    line-height: 1;
}

.chip-remove:hover {
    color: var(--red);
}

#recipient-select {
border: none;
outline: none;
background: transparent;
font-size: 12px;
color: var(--text-muted);
cursor: pointer;
min-width: 160px;
}

div.no-data {
    font-size: 12pt;
    font-weight: 500;
    text-align: center;
}
div.no-data img {
    width: 20rem;
    display: block;
    margin: 0 auto;
    filter: brightness(1.25) grayscale(1) drop-shadow(0 0 12px var(--text-muted));
    animation: hover-pulse 2s ease infinite alternate;
}
div.no-data p {
    font-size: 10pt;
    font-weight: 400;
    padding-top: 1rem;
}
div.overflow-x-auto {
    overflow-x: auto;
}

/* ── Redaktionsplan ── */
#ep-month-nav {
padding: 0;
border: none;
box-shadow: none;
background: none;
}

.ep-status {
    position: relative;
    text-align: center;
}
.ep-status-badge {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    opacity: 0.2;
}
.ep-status span {
    display: block;
    padding: 4px 12px;
    text-align: center;

    font-size: 9pt;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
}

/* ── Toggle ── */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle input { display: none; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-page);
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 0.2s;
}
/* Schalter ist Bedienelement, kein Status → dunkel */
.toggle input:checked + .toggle-slider { background: var(--brand-dark); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── Sidebar Version ── */

.sidebar-version {
    font-size: 8pt;
    color: #666;
    text-align: center;
    display: block;
    margin-top: 2rem;
}