/* ============================================================
   Admin-Styles – Einstellungen, Wizard-Konfiguration
   ============================================================ */

/* ── Settings-Tabs ─────────────────────────────────────────── */
.settings-tabs {
    display: flex;
    gap: .4rem;
    margin-bottom: 1.75rem;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0;
}
.settings-tab {
    padding: .55rem 1.1rem;
    border-radius: var(--radius) var(--radius) 0 0;
    font-size: .88rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-decoration: none;
    border: 1px solid transparent;
    border-bottom: none;
    transition: color .15s, background .15s;
    margin-bottom: -2px;
}
.settings-tab:hover { color: var(--color-primary); text-decoration: none; }
.settings-tab--active {
    color: var(--color-primary);
    background: var(--color-surface);
    border-color: var(--color-border);
    border-bottom-color: var(--color-surface);
}

/* ── Farbpalette ───────────────────────────────────────────── */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: .85rem;
}
.color-field {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #fafafa;
}
.color-swatch {
    width: 48px;
    height: 48px;
    border: 2px solid var(--color-border-dk);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 2px;
    flex-shrink: 0;
    background: none;
}
.color-field__info { flex: 1; min-width: 0; }
.color-field__info .form-label { margin-bottom: .2rem; font-size: .82rem; }
.color-hex-input { font-family: var(--font-mono); font-size: .85rem; padding: .3rem .6rem; }
/* InDesign-Formatnamen: Monospace, aber Groß-/Kleinschreibung frei wählbar */
.idtt-style-input { font-family: var(--font-mono); font-size: .9rem; letter-spacing: .03em; }

/* ── Settings-Aktionsleiste ────────────────────────────────── */
.settings-actions {
    display: flex;
    gap: .75rem;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
}

/* ── Wizard-Admin-Abschnitt ────────────────────────────────── */
.wizard-admin-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.wizard-admin-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .9rem 1.35rem;
    background: linear-gradient(to right, #f8f9fb, #ffffff);
    border-bottom: 1px solid var(--color-border);
}
.wizard-admin-section__header h2 {
    font-size: 1rem;
    color: var(--color-primary);
    font-family: var(--font-heading);
}
.wizard-admin-section__header h2 small {
    font-size: .78rem;
    color: var(--color-text-muted);
    font-weight: 400;
}
.wizard-admin-section .data-table { margin: 0; }
.wizard-admin-section .data-table th:first-child,
.wizard-admin-section .data-table td:first-child { width: 32px; }

.wizard-admin-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.sort-handle {
    cursor: grab;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    user-select: none;
}
.sort-handle:active { cursor: grabbing; }

.table-actions { white-space: nowrap; }
.table-actions .btn { margin-right: .3rem; }

.btn--icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .3rem .4rem;
    line-height: 1;
}

/* Download-Button: primär, gleiche Höhe wie Öffnen-Button */
.btn--download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .3rem .55rem;
    line-height: 1;
    margin-left: .5rem;
    vertical-align: middle;
}
.col-actions .btn--ghost,
.col-actions .btn--download {
    vertical-align: middle;
    height: 2rem;
    box-sizing: border-box;
}

/* ── Toggle-Checkbox ───────────────────────────────────────── */
.toggle-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    font-size: .9rem;
}
.toggle-label input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    accent-color: var(--color-accent-dk);
}

/* ── Settings-Form generell ────────────────────────────────── */
.settings-form .form-section { margin-bottom: 1.5rem; }

/* ── Dashboard-Übersicht ───────────────────────────────────── */
.stat-card--link { text-decoration: none; display: block; transition: box-shadow .15s, transform .15s; }
.stat-card--link:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.dashboard-actions { margin-top: 1rem; }

/* ── Filter-Leiste ──────────────────────────────────────────── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: .6rem .9rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.filter-select {
    width: auto;
    min-width: 120px;
    font-size: .82rem;
    padding: .3rem .6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    color: var(--color-text);
}
.filter-search-wrap { flex: 1 1 180px; max-width: 300px; position: relative; }
.filter-search      { width: 100%; padding: .3rem .8rem; font-size: .82rem; border-radius: var(--radius-md); }
.filter-count { margin-left: auto; font-size: .8rem; color: var(--color-text-muted); white-space: nowrap; }

/* ── Sort-Switch ────────────────────────────────────────────── */
.sort-switch {
    display: inline-flex;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
}
.sort-switch__btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .3rem .65rem;
    font-size: .82rem;
    font-weight: 500;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: background .15s, color .15s;
}
.sort-switch__btn + .sort-switch__btn {
    border-left: 1px solid var(--color-border);
}
.sort-switch__btn:hover {
    background: var(--color-bg);
    color: var(--color-text);
}
.sort-switch__btn--active {
    background: var(--color-primary);
    color: #fff;
}
.sort-switch__btn--active:hover {
    background: var(--color-primary-dark, var(--color-primary));
    color: #fff;
}

/* ── Gruppiert-Toggle ───────────────────────────────────────── */
.filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .82rem;
    font-weight: 500;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: .3rem .65rem;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.filter-toggle-btn:hover {
    background: var(--color-bg);
    color: var(--color-text);
}
.filter-toggle-btn--on {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.filter-toggle-btn--on:hover {
    background: var(--color-primary-dark, var(--color-primary));
}

/* ── Submissions-Gruppe ─────────────────────────────────────── */
.submission-group {
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.submission-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem 1.1rem;
    background: linear-gradient(to right, #f4f6fb, #fff);
    border-bottom: 1px solid var(--color-border);
}
.submission-group__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: .95rem;
    color: var(--color-primary);
}
.submission-group__count {
    background: var(--color-accent);
    color: #fff;
    border-radius: 999px;
    padding: .1rem .6rem;
    font-size: .75rem;
    font-weight: 700;
}

/* ── Ausgaben-Trennlinie in der Listenansicht ─── */
.issue-separator-row td {
    padding: .4rem 1rem;
    background: linear-gradient(to right, var(--color-primary), color-mix(in srgb, var(--color-primary) 70%, transparent));
    border-top: 2px solid var(--color-primary);
}
.issue-separator-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    font-size: .82rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.issue-separator-date {
    font-weight: 400;
    font-size: .78rem;
    opacity: .85;
    text-transform: none;
    letter-spacing: 0;
}

/* ── Ausgaben-Schnellzugriff (Pill-Navigation) ── */
.issue-header__quick-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .5rem .75rem .6rem;
    border-top: 1px solid rgba(255,255,255,.15);
    width: 100%;
    flex-basis: 100%;
}
.issue-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .18rem .65rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.3);
    color: rgba(255,255,255,.85);
    background: rgba(255,255,255,.1);
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}
.issue-pill:hover {
    background: rgba(255,255,255,.22);
    border-color: rgba(255,255,255,.6);
    color: #fff;
}
.issue-pill--active {
    background: rgba(255,255,255,.25);
    border-color: rgba(255,255,255,.7);
    color: #fff;
    font-weight: 600;
}
.issue-pill--in-arbeit:not(.issue-pill--active) {
    border-color: rgba(255,255,255,.5);
    color: #fff;
}
.issue-pill__dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
}

/* ── Paginierung ─────────────────────────────── */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.25rem 0;
}
.pagination-bar__info {
    font-size: .85rem;
    color: var(--color-text-muted);
}


/* ── Submission-Zeilen ──────────────────────────────────────── */
.submission-table { margin: 0; }
.sub-title__link { font-weight: 700; color: var(--color-text); }
.sub-title__link:hover { color: var(--color-primary); }
.sub-title__sub { font-size: .8rem; color: var(--color-text-muted); margin-top: .1rem; }
.sub-meta { font-size: .78rem; color: var(--color-text-muted); margin-top: .2rem; }
.sub-date { font-size: .8rem; color: var(--color-text-muted); white-space: nowrap; }
.sub-exports { white-space: nowrap; }
.sub-exports .btn { margin-right: .2rem; }

/* ── Status-Farben (einheitliches Farbschema) ───────────────── */
/* Gilt für: .status-badge--* UND .status-select--* */
:root {
    --s-eingegangen-bg: #dbeafe; --s-eingegangen-color: #1d4ed8; --s-eingegangen-border: #93c5fd;
    --s-aenderung-bg:   #fef3c7; --s-aenderung-color:   #92400e; --s-aenderung-border:   #fcd34d;
    --s-verarbeitet-bg: #ede9fe; --s-verarbeitet-color: #5b21b6; --s-verarbeitet-border: #c4b5fd;
    --s-abgelehnt-bg:   #fee2e2; --s-abgelehnt-color:   #991b1b; --s-abgelehnt-border:   #fca5a5;
    --s-zurueck-bg:     #f1f5f9; --s-zurueck-color:     #475569; --s-zurueck-border:     #cbd5e1;
    --s-gesetzt-bg:     #d1fae5; --s-gesetzt-color:     #065f46; --s-gesetzt-border:     #6ee7b7;
}

.status-badge--eingegangen    { background: var(--s-eingegangen-bg); color: var(--s-eingegangen-color); border-color: var(--s-eingegangen-border); }
.status-badge--aenderung      { background: var(--s-aenderung-bg);   color: var(--s-aenderung-color);   border-color: var(--s-aenderung-border); }
.status-badge--verarbeitet    { background: var(--s-verarbeitet-bg); color: var(--s-verarbeitet-color); border-color: var(--s-verarbeitet-border); }
.status-badge--abgelehnt      { background: var(--s-abgelehnt-bg);   color: var(--s-abgelehnt-color);   border-color: var(--s-abgelehnt-border); }
.status-badge--zurueckgezogen { background: var(--s-zurueck-bg);     color: var(--s-zurueck-color);     border-color: var(--s-zurueck-border); }
.status-badge--gesetzt        { background: var(--s-gesetzt-bg);     color: var(--s-gesetzt-color);     border-color: var(--s-gesetzt-border); }

.status-select--eingegangen    { background-color: var(--s-eingegangen-bg); color: var(--s-eingegangen-color); border-color: var(--s-eingegangen-border); }
.status-select--aenderung      { background-color: var(--s-aenderung-bg);   color: var(--s-aenderung-color);   border-color: var(--s-aenderung-border); }
.status-select--verarbeitet    { background-color: var(--s-verarbeitet-bg); color: var(--s-verarbeitet-color); border-color: var(--s-verarbeitet-border); }
.status-select--abgelehnt      { background-color: var(--s-abgelehnt-bg);   color: var(--s-abgelehnt-color);   border-color: var(--s-abgelehnt-border); }
.status-select--zurueckgezogen { background-color: var(--s-zurueck-bg);     color: var(--s-zurueck-color);     border-color: var(--s-zurueck-border); }
.status-select--gesetzt        { background-color: var(--s-gesetzt-bg);     color: var(--s-gesetzt-color);     border-color: var(--s-gesetzt-border); }

/* ── Detail-Layout ──────────────────────────────────────────── */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}
.detail-sidebar { position: sticky; top: 1.5rem; }
.detail-sidebar .form-section { margin-bottom: 1rem; }

.richtext-preview {
    line-height: 1.7;
    font-size: .95rem;
}
.richtext-preview h2 { font-size: 1.2rem; margin: 1rem 0 .5rem; }
.richtext-preview h3 { font-size: 1rem; margin: .8rem 0 .4rem; }
.richtext-preview p  { margin-bottom: .75rem; }
.richtext-preview ul, .richtext-preview ol { padding-left: 1.5rem; margin-bottom: .75rem; }

.submission-notes {
    margin-top: 1rem;
    padding: .85rem 1rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    font-size: .9rem;
}

.meta-list { font-size: .88rem; }
.meta-list dt { font-weight: 700; color: var(--color-text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; margin-top: .6rem; }
.meta-list dd { margin: 0 0 .1rem; }

/* ── Status-Ampel (Badge-Select) ──────────────────────────────────────────── */
.inline-status-select {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    border-radius: 999px;
    padding: .2rem 1.5rem .2rem .65rem;
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-body);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23475569'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .5rem center;
    transition: box-shadow .15s;
    width: auto;
    max-width: 9rem;
    white-space: nowrap;
}
.inline-status-select:focus { outline: none; box-shadow: 0 0 0 2px rgb(66 122 170 / .35); }
.status-select--eingegangen    { background-color: #dbeafe; color: #1d4ed8; }
.status-select--aenderung      { background-color: #fef3c7; color: #92400e; }
.status-select--verarbeitet    { background-color: #ede9fe; color: #5b21b6; }
.status-select--abgelehnt      { background-color: #fee2e2; color: #991b1b; }
.status-select--zurueckgezogen { background-color: #f1f5f9; color: #475569; }
.status-select--gesetzt        { background-color: #d1fae5; color: #065f46; }

/* ── Ort-Kürzel-Badge ─────────────────────────────────────────────────────── */
.loc-badge {
    display: inline-block;
    padding: .12rem .45rem;
    border-radius: 4px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .05em;
    background: #e2e8f0;
    color: #334155;
    vertical-align: middle;
    margin-right: .2rem;
}
.loc-badge--pfoerring,
.loc-badge--pförring    { background: #dbeafe; color: #1e40af; }
.loc-badge--mittelstetten { background: #fef9c3; color: #78350f; }
.loc-badge--oberdolling { background: #dcfce7; color: #14532d; }
.loc-badge--allgemein   { background: #f3e8ff; color: #581c87; }
.loc-badge--diversis    { background: #fff7ed; color: #7c2d12; }

/* Typ-Badge */
.type-badge {
    display: inline-block;
    padding: .15rem .4rem;
    border-radius: 4px;
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .03em;
    background: #f1f5f9;
    color: var(--color-text-muted);
    vertical-align: middle;
}
.type-badge--beitrag   { background: #dbeafe; color: #1e40af; }
.type-badge--vaz,
.type-badge--veranstaltung,
.type-badge--veranstaltungsanzeige { background: #fef3c7; color: #92400e; }
.type-badge--leserbrief { background: #f3e8ff; color: #6b21a8; }
.type-badge--nachruf    { background: #f1f5f9; color: #475569; }
.type-badge--leer       { background: transparent; color: #cbd5e1; }

/* Anhang-Indikator */
.attach-badge {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    font-size: .72rem;
    font-weight: 600;
    color: var(--color-blue);
    background: #dbeafe;
    border-radius: 3px;
    padding: .05rem .35rem;
    margin-left: .35rem;
    vertical-align: middle;
}

/* Notiz-Badge */
.notes-badge {
    display: inline-flex;
    align-items: center;
    gap: .18rem;
    font-size: .67rem;
    font-weight: 700;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    border-radius: 3px;
    padding: .05rem .3rem;
    margin-top: .2rem;
    vertical-align: middle;
    cursor: pointer;
    line-height: 1.4;
}
.notes-badge:hover { background: #fde68a; }

/* Modal */
.notes-modal {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}
.notes-modal[hidden] { display: none; }
.notes-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / .35);
}
.notes-modal__box {
    position: relative;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg, 0 8px 32px rgb(0 0 0 / .18));
    max-width: 480px;
    width: calc(100% - 2rem);
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.notes-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1.1rem;
    border-bottom: 1px solid var(--color-border);
    background: #fffbeb;
}
.notes-modal__title {
    font-weight: 700;
    font-size: .9rem;
    color: #92400e;
}
.notes-modal__close {
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 0 .2rem;
}
.notes-modal__close:hover { color: var(--color-text); }
.notes-modal__body {
    padding: 1.1rem;
    font-size: .9rem;
    line-height: 1.65;
    color: var(--color-text);
    white-space: pre-wrap;
    overflow-y: auto;
}
body.modal-open { overflow: hidden; }

/* Änderungsdatum */
.sub-date-changed {
    font-size: .72rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* Abschnitt-Spalte */
.sub-abschnitt { white-space: nowrap; }

/* ── Spaltenbreiten Submission-Tabelle ───────────────────────── */
.submission-table .col-typ     { width: 4rem; white-space: nowrap; }
.submission-table .col-status  { width: 10rem; white-space: nowrap; }
.submission-table .col-date    { width: 6rem;  white-space: nowrap; }
.submission-table .col-ort     { width: 3rem;  text-align: center; white-space: nowrap; }
.submission-table .col-von     { width: 14rem; }
.submission-table .col-beitrag { width: 18rem; }
.submission-table .col-info    { width: 5rem;  white-space: nowrap; }
.col-info-inner { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.submission-table .col-actions { width: 9rem;  white-space: nowrap; text-align: right; }

/* Etwas kompaktere Zeilen in der Einsendungsliste */
.submission-table td { padding: .45rem .75rem; }

/* Von-Spalte: Verein oben fett, Name darunter klein */
.sub-von__org--primary { font-weight: 700; font-size: .88rem; color: var(--color-text); }
.sub-von__name         { font-size: .78rem; color: var(--color-text-muted); margin-top: .1rem; }

/* Textlängen-Badge */
.len-badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    border-radius: 3px;
    padding: .05rem .3rem;
    margin-top: .2rem;
    vertical-align: middle;
}
.len--kurz   { background: #dcfce7; color: #166534; }
.len--mittel { background: #fef9c3; color: #78350f; }
.len--lang   { background: #fee2e2; color: #991b1b; }

/* ── Hinweis-Spalte (Einsender-Hinweis in der Liste) ────────── */
.submission-table .col-hinweis { width: 2.4rem; text-align: center; white-space: nowrap; }

.hinweis-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    transition: background .12s;
    padding: 0;
    vertical-align: middle;
}
.hinweis-btn--unread            { color: #d97706; background: #fef3c7; }
.hinweis-btn--unread:hover      { background: #fde68a; }
.hinweis-btn--read              { color: #94a3b8; background: transparent; }
.hinweis-btn--read:hover        { background: #f1f5f9; }

/* Modal-Footer */
.notes-modal__footer {
    padding: .65rem 1.1rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
}

/* ── Einsender-Infobar (Detail-Ansicht, oben) ──────────────── */
.sender-bar {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: .75rem;
    overflow: hidden;
}
.sender-bar__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem 1rem;
    flex-wrap: wrap;
}
.sender-bar__left  { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .55rem; min-width: 0; flex: 1; }
.sender-bar__right { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.sender-bar__back  { font-size: .8rem; color: var(--color-text-muted); text-decoration: none; white-space: nowrap; }
.sender-bar__back:hover { color: var(--color-primary); }
.sender-bar__name  { font-weight: 700; color: var(--color-text); }
.sender-bar__org   { color: var(--color-text); font-size: .88rem; }
.sender-bar__sep   { color: var(--color-border-dk); }
.sender-bar__chip  { font-size: .78rem; background: #e2e8f0; color: #334155; padding: .15rem .45rem; border-radius: 99px; font-weight: 600; }
.sender-bar__chip--muted { background: #f1f5f9; color: #64748b; }
.sender-bar__detail-btn { font-size: .82rem; }
.sender-bar__dl-btn     { font-size: .9rem; font-weight: 700; padding: .45rem 1.1rem; }
.sender-bar__detail {
    padding: .6rem 1rem .75rem;
    border-top: 1px solid var(--color-border);
    background: #fafafa;
}
.meta-list--inline {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem 1.5rem;
}
.meta-list--inline dt {
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--color-text-muted);
}
.meta-list--inline dd { font-size: .85rem; margin-left: 0; }

/* ── Text-Stats ─────────────────────────────────────────────── */
.text-stats {
    font-size: .78rem;
    font-weight: 400;
    color: var(--color-text-muted);
}

/* ── Datei-Vorschau ─────────────────────────────────────────── */
.file-item-detail {
    display: grid;
    grid-template-columns: 5.5rem 1fr auto;
    column-gap: .85rem;
    align-items: start;
    padding: .65rem .75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #fafafa;
}
.file-item-detail__thumb {
    width: 5.5rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
    background: #e2e8f0;
    flex-shrink: 0;
}
.file-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}
.file-item-detail__info  { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.file-item-detail__action { align-self: center; }
.file-type-badge--lg {
    font-size: .75rem;
    padding: .25rem .55rem;
}

/* ── Einsender-Hinweis (Detail-Ansicht) ─────────────────────── */
.submission-notes--prominent {
    display: flex;
    flex-direction: column;
    padding: .9rem 1.1rem;
    background: #fffbeb;
    border: 2px solid #fcd34d;
    border-radius: var(--radius-lg);
    font-size: .9rem;
    margin-bottom: 1.25rem;
}
.submission-notes__label {
    font-weight: 700;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #92400e;
}

/* ── Datei-Liste (Detail-Ansicht) ───────────────────────────── */
.file-list-detail { display: flex; flex-direction: column; gap: .6rem; }

.file-item-detail__name    { font-weight: 600; font-size: .88rem; word-break: break-word; }
.file-item-detail__meta    { font-size: .76rem; color: var(--color-text-muted); }
.file-item-detail__caption { font-size: .8rem; font-style: italic; color: var(--color-text-muted); }
.file-item-detail__credit  { font-size: .76rem; color: var(--color-text-muted); }

.file-type-badge {
    display: inline-block;
    padding: .15rem .4rem;
    border-radius: 4px;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    background: #e2e8f0;
    color: #475569;
}
.file-type-badge--img  { background: #dbeafe; color: #1e40af; }
.file-type-badge--pdf  { background: #fee2e2; color: #991b1b; }
.file-type-badge--doc  { background: #f3e8ff; color: #6b21a8; }

/* ── Aktive-Ausgabe-Banner (prominent) ──────────────────────── */
.issue-active-banner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 2px solid #f97316;
    border-radius: var(--radius);
    padding: .9rem 1.2rem;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
}
.issue-active-banner__label {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #c2410c;
    white-space: nowrap;
}
.issue-active-banner__current {
    flex: 1;
    min-width: 0;
}
.issue-active-banner__current--warn { color: #dc2626; }
.issue-active-banner__title {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: #9a3412;
    line-height: 1.2;
}
.issue-active-banner__date {
    font-size: .78rem;
    color: #c2410c;
}
.issue-active-banner__change {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}
.issue-active-banner__select {
    padding: .35rem .8rem;
    font-size: .84rem;
    border: 1px solid #fed7aa;
    border-radius: var(--radius);
    background: #fff;
    color: var(--color-text);
    cursor: pointer;
    max-width: 220px;
}
.issue-active-banner__select:focus { outline: 2px solid #f97316; outline-offset: 1px; }
.issue-active-banner__fb { font-size: .85rem; font-weight: 700; min-width: 1.2rem; }

/* ── Ausgaben-Toolbar ───────────────────────────────────────── */
.issues-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}
.issues-toolbar__search {
    flex: 1;
    max-width: 280px;
    padding: .35rem .8rem;
    font-size: .88rem;
}

/* ── Ausgaben-Grid ──────────────────────────────────────────── */
.issues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: .9rem;
}

/* ── Einzelne Kachel ────────────────────────────────────────── */
.issue-tile {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgb(0 0 0 / .07);
    border-top: 3px solid var(--color-border);
    transition: box-shadow .15s, transform .1s;
}
.issue-tile:hover { box-shadow: 0 4px 14px rgb(0 0 0 / .1); transform: translateY(-1px); }

/* Farb-Akzent oben */
.issue-tile--nicht_geöffnet{ border-top-color: #d1d5db; opacity: .85; }
.issue-tile--offen        { border-top-color: #60a5fa; }
.issue-tile--in_arbeit    { border-top-color: #f97316; }
.issue-tile--korrektur    { border-top-color: #eab308; }
.issue-tile--freigegeben  { border-top-color: #22c55e; }
.issue-tile--abgeschlossen{ border-top-color: #94a3b8; opacity: .8; }

/* ── Kopf ── */
.issue-tile__head {
    padding: .8rem .9rem .65rem;
    flex: 1;
}
.issue-tile__head-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .4rem;
}
.issue-tile__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    line-height: 1.25;
    flex: 1;
}
.issue-tile__next-chip {
    display: inline-block;
    background: #6366f1;
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: .15rem .5rem;
    border-radius: 999px;
    flex-shrink: 0;
    margin-top: .1rem;
}
.issue-tile__status-row {
    display: flex;
    align-items: center;
    gap: .4rem;
}
.issue-tile__status-sel {
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: .15rem 1.4rem .15rem .55rem;
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-body);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .45rem center;
    background-size: 7px;
    line-height: 1.5;
}
.issue-tile__status-sel:focus { outline: 2px solid rgb(99 102 241 / .35); outline-offset: 1px; }
.issue-tile__status-sel--nicht_geöffnet{ background-color: #f3f4f6; color: #6b7280; border-color: #d1d5db; }
.issue-tile__status-sel--offen        { background-color: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.issue-tile__status-sel--in_arbeit    { background-color: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.issue-tile__status-sel--korrektur    { background-color: #fffbeb; color: #92400e; border-color: #fde68a; }
.issue-tile__status-sel--freigegeben  { background-color: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.issue-tile__status-sel--abgeschlossen{ background-color: #f8fafc; color: #64748b; border-color: #e2e8f0; }
.issue-tile__status-static {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}
.issue-tile__status-fb { font-size: .72rem; font-weight: 700; }

/* ── Termine ── */
.issue-tile__dates {
    padding: .4rem .9rem .5rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: .18rem;
}
.issue-tile__date-row {
    display: grid;
    grid-template-columns: 9.5rem 1fr auto;
    align-items: baseline;
    gap: .3rem;
    font-size: .76rem;
}
.issue-tile__date-lbl  { color: var(--color-text-muted); font-size: .71rem; }
.issue-tile__date-val  { font-weight: 600; color: var(--color-text); font-variant-numeric: tabular-nums; }
.issue-tile__date-delta{ font-size: .67rem; color: var(--color-text-muted); text-align: right; }
.issue-tile__date-row--urgent .issue-tile__date-val  { color: #dc2626; }
.issue-tile__date-row--urgent .issue-tile__date-delta{ color: #dc2626; font-weight: 700; }
.issue-tile__date-row--past   .issue-tile__date-val,
.issue-tile__date-row--past   .issue-tile__date-delta{ color: #94a3b8; }

/* ── Dateien-Leiste ── */
.issue-tile__files {
    padding: .35rem .9rem;
    border-top: 1px solid #f1f5f9;
}
.issue-tile__files-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .75rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color .12s;
}
.issue-tile__files-link:hover { color: var(--color-primary); }

/* ── Footer ── */
.issue-tile__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .4rem .75rem .45rem;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    gap: .4rem;
}
.issue-tile__count {
    font-size: .78rem;
    color: var(--color-text-muted);
    text-decoration: none;
    flex: 1;
}
.issue-tile__count:hover { color: var(--color-primary); }
.issue-tile__count strong { color: var(--color-text); }
.issue-tile__actions { display: flex; align-items: center; gap: .25rem; }
.issue-tile__del-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: .3rem;
    border-radius: 4px;
    color: #94a3b8;
    transition: color .12s, background .12s;
    line-height: 0;
}
.issue-tile__del-btn:hover { color: #ef4444; background: #fee2e2; }

/* ── Ausgaben-Karten (Legacy, behalten) ─────────────────────── */
.issue-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.issue-card--im_satz    { border-left: 4px solid #8b5cf6; }
.issue-card--freigegeben{ border-left: 4px solid #f59e0b; }
.issue-card--veroeffentlicht { border-left: 4px solid #22c55e; }
.issue-card--abgeschlossen   { border-left: 4px solid #94a3b8; }

.issue-card__head {
    padding: .85rem 1rem .6rem;
    border-bottom: 1px solid var(--color-border);
}
.issue-card__title-row {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}
.issue-card__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    flex: 1;
}
.issue-card__desc {
    margin: .35rem 0 0;
    font-size: .82rem;
    color: var(--color-text-muted);
}

/* Status-Badges für Issues */
.status-badge--issue-offen          { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.status-badge--issue-in_arbeit      { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.status-badge--issue-im_satz        { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.status-badge--issue-freigegeben    { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.status-badge--issue-veroeffentlicht{ background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.status-badge--issue-abgeschlossen  { background: #f8fafc; color: #64748b; border: 1px solid #cbd5e1; }

/* Timeline */
.issue-timeline {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    padding: .75rem 1rem;
    flex-wrap: wrap;
}
.issue-timeline__arrow {
    color: var(--color-border-dk);
    font-size: .9rem;
    padding-top: 1.35rem;
    flex-shrink: 0;
}
.issue-timeline__item {
    flex: 1;
    min-width: 7rem;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}
.issue-timeline__label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-text-muted);
    font-weight: 600;
}
.issue-timeline__date {
    font-size: .92rem;
    font-weight: 700;
    color: var(--color-text);
}
.issue-timeline__date--empty { color: var(--color-text-muted); font-weight: 400; }
.issue-timeline__delta {
    font-size: .76rem;
    color: var(--color-text-muted);
}
.issue-timeline__item--urgent .issue-timeline__date  { color: #dc2626; }
.issue-timeline__item--urgent .issue-timeline__delta { color: #dc2626; font-weight: 600; }
.issue-timeline__item--past   .issue-timeline__label { opacity: .6; }
.issue-timeline__item--past   .issue-timeline__date  { color: var(--color-text-muted); font-weight: 400; }

/* Footer */
.issue-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .6rem 1rem;
    border-top: 1px solid var(--color-border);
    background: #fafafa;
    flex-wrap: wrap;
}
.issue-card__stats { font-size: .85rem; }
.issue-card__stat-link { color: var(--color-text); text-decoration: none; }
.issue-card__stat-link:hover { color: var(--color-primary); text-decoration: underline; }
.badge-new {
    display: inline-block;
    background: #fee2e2;
    color: #991b1b;
    font-size: .7rem;
    font-weight: 700;
    padding: .1rem .4rem;
    border-radius: 99px;
    margin-left: .3rem;
}
.issue-card__actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

/* Abgeschlossene: eingeklappte Details */
.past-issues-details { }
.past-issues-summary {
    cursor: pointer;
    font-size: .88rem;
    font-weight: 600;
    color: var(--color-text-muted);
    padding: .5rem 0;
    list-style: none;
    user-select: none;
}
.past-issues-summary::-webkit-details-marker { display: none; }
.past-issues-summary::before { content: '▾ '; }
details[open] .past-issues-summary::before { content: '▴ '; }

/* ── Ausgabe-Formular: 2-Spalten-Layout ─────────────────────── */
.issue-form-wrap {
    max-width: 860px;
}
.issue-form-grid {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 1.25rem;
}
.issue-form-sidebar {
    position: sticky;
    top: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: .9rem 1rem 1.1rem;
}
.issue-form-sidebar .form-group { margin-bottom: .65rem; }
.issue-form-sidebar .form-group:last-child { margin-bottom: 0; }
.issue-form__title-input { max-width: 55%; min-width: 200px; }

@media (max-width: 720px) {
    .issue-form-grid { grid-template-columns: 1fr; }
    .issue-form-sidebar { position: static; }
    .issue-form__title-input { max-width: 100%; }
}

/* Datum-Raster im Formular */
.issue-date-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .85rem;
}
.issue-date-hint {
    margin-top: .5rem;
    padding: .5rem .75rem;
    background: #eff6ff;
    border-radius: var(--radius);
    font-size: .82rem;
    color: #1d4ed8;
}

/* ── Speicherverwaltung ─────────────────────────────────────── */
.storage-header {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.storage-header__meta {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    flex-wrap: wrap;
}
.storage-header__used {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}
.storage-header__limit {
    font-size: .85rem;
    color: var(--color-text-muted);
}
.storage-header__config-link {
    margin-left: auto;
    font-size: .8rem;
    color: var(--color-primary);
    text-decoration: none;
}
.storage-header__config-link:hover { text-decoration: underline; }

.storage-header__detail {
    display: flex;
    gap: .6rem;
    font-size: .85rem;
    color: var(--color-text-muted);
}
.storage-pct--warn    { color: #d97706; font-weight: 700; }
.storage-pct--danger  { color: var(--color-error); font-weight: 700; }

.storage-bar {
    width: 100%;
    height: 10px;
    background: var(--color-border);
    border-radius: 99px;
    overflow: hidden;
}
.storage-bar__fill {
    height: 100%;
    border-radius: 99px;
    transition: width .4s ease;
}
.storage-bar__fill--ok     { background: #22c55e; }
.storage-bar__fill--warn   { background: #f59e0b; }
.storage-bar__fill--danger { background: var(--color-error); }

/* ── Segmentierter Balken ───────────────────────────────────── */
.storage-seg-bar {
    width: 100%;
    height: 18px;
    border-radius: 99px;
    overflow: hidden;
    display: flex;
    background: var(--color-border);
    gap: 1px;
}
.storage-seg-bar__seg {
    height: 100%;
    transition: width .4s ease;
    min-width: 2px;
}
/* 8 Farben im Cycle */
.storage-seg-bar__seg--1 { background: #3b82f6; }
.storage-seg-bar__seg--2 { background: #10b981; }
.storage-seg-bar__seg--3 { background: #f59e0b; }
.storage-seg-bar__seg--4 { background: #8b5cf6; }
.storage-seg-bar__seg--5 { background: #ef4444; }
.storage-seg-bar__seg--6 { background: #06b6d4; }
.storage-seg-bar__seg--7 { background: #f97316; }
.storage-seg-bar__seg--0 { background: #84cc16; }
.storage-seg-bar__seg--rest { background: #cbd5e1; }

/* Legende */
.storage-seg-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .9rem;
    font-size: .78rem;
    color: var(--color-text-muted);
}
.storage-seg-legend__item {
    display: flex;
    align-items: center;
    gap: .3rem;
}
.storage-seg-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.storage-seg-legend__size {
    font-weight: 600;
    color: var(--color-text);
}

.storage-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-top: .25rem;
}
.storage-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .1rem;
}
.storage-stat--warn .storage-stat__val { color: #d97706; }
.storage-stat__val {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}
.storage-stat__lbl {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-text-muted);
}

.storage-table .col-num           { width: 5.5rem; text-align: right; }
.storage-table .col-size          { width: 7rem;   text-align: right; }
.storage-table .col-date-sm       { width: 7.5rem; white-space: nowrap; }
.storage-table .col-status-sm     { width: 8rem; }
.storage-table .col-actions-storage { width: 18rem; text-align: right; white-space: nowrap; }
.storage-table .storage-issue-title-cell { font-weight: 600; font-size: .88rem; }
.storage-issue-date--muted        { color: var(--color-text-muted); font-size: .78rem; }

.storage-issue-title {
    font-weight: 600;
    font-size: .88rem;
}
.storage-issue-date {
    font-size: .76rem;
    color: var(--color-text-muted);
    margin-left: .4rem;
}

.storage-size-pill {
    display: inline-block;
    padding: .15rem .5rem;
    border-radius: 99px;
    background: #e2e8f0;
    font-size: .78rem;
    font-weight: 600;
    color: #334155;
}
.storage-size-pill--final {
    background: color-mix(in srgb, var(--color-accent) 15%, #e2e8f0);
    color: var(--color-accent-dk);
}

/* Größen-Breakdown unter der Hauptgröße */
.storage-size-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .5rem;
    margin-top: .2rem;
    font-size: .72rem;
    color: var(--color-text-muted);
}
.storage-size-breakdown__finaldoc {
    color: var(--color-accent-dk);
    font-weight: 600;
}

/* Sektions-Gesamtgröße neben Überschrift */
.storage-section-total {
    font-size: .78rem;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-left: .5rem;
}

/* Systemdateien-Badge */
.storage-sys-badge {
    display: inline-block;
    padding: .1rem .45rem;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    font-size: .72rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.storage-expand-row > td { padding: 0; }
.storage-expand-cell { padding: 0 !important; }
.storage-expand-inner {
    padding: .75rem 1rem;
    background: #f8fafc;
    border-top: 1px solid var(--color-border);
}
.storage-expand-loading {
    font-size: .85rem;
    color: var(--color-text-muted);
}

/* ── Danger-Button ──────────────────────────────────────────── */
.btn--danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
.btn--danger:hover {
    background: #fca5a5;
    color: #7f1d1d;
}

/* ── Einsender-Konten ───────────────────────────────────────── */
.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #991b1b;
    color: #fff;
    border-radius: 99px;
    font-size: .7rem;
    font-weight: 800;
    min-width: 1.3em;
    height: 1.3em;
    padding: 0 .35em;
    margin-left: .35rem;
    vertical-align: middle;
}
.badge-expired {
    display: inline-block;
    padding: .1rem .4rem;
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 700;
    background: #fee2e2;
    color: #991b1b;
    margin-left: .35rem;
}
.badge-warning {
    display: inline-block;
    padding: .1rem .4rem;
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 700;
    background: #fef3c7;
    color: #92400e;
    margin-left: .35rem;
}
.row--muted td { opacity: .65; }

.einreicher-expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .85rem;
    color: var(--color-text-muted);
    padding: 0 .3rem 0 0;
    vertical-align: middle;
    transition: color .15s;
}
.einreicher-expand-btn:hover { color: var(--color-primary); }
.einreicher-expand-row > td { padding: 0; }
.einreicher-expand-cell { padding: 0 !important; border-top: none !important; }
.einreicher-expand-inner {
    padding: .6rem 1rem .75rem 2.5rem;
    background: #f8fafc;
    border-top: 1px solid var(--color-border);
}

/* ── Page-Header auf PC ausblenden (Sidebar zeigt Kontext) ─── */
@media (min-width: 769px) {
    .dashboard-header { display: none; }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .detail-layout { grid-template-columns: 1fr; }
    .detail-sidebar { position: static; }
}
@media (max-width: 640px) {
    .color-grid { grid-template-columns: 1fr; }
    .settings-tabs { flex-wrap: wrap; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-select { width: 100%; }
    .storage-table .col-actions-storage { width: auto; }
    .storage-stats { gap: 1rem; }
}

/* ── Sidebar: Nav-Icons + Collapse ─────────────────────────── */
.sidebar__nav a {
    display: flex;
    align-items: center;
    gap: .65rem;
}
.nav-icon { flex-shrink: 0; opacity: .7; }
.sidebar__nav a.active .nav-icon,
.sidebar__nav a:hover .nav-icon { opacity: 1; }

.sidebar__section-label {
    margin-top: .75rem;
    padding: .25rem 1.25rem;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #475569;
    list-style: none;
}

.sidebar__ext-link {
    padding: .75rem 1.25rem;
    border-top: 1px solid var(--color-border);
}

.sidebar__toggle-btn {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    padding: .5rem 1rem;
    background: none;
    border: none;
    border-top: 1px solid rgba(255 255 255 / .08);
    cursor: pointer;
    color: #64748b;
    transition: color .15s;
    gap: .4rem;
    font-size: .78rem;
}
.sidebar__toggle-btn:hover { color: #94a3b8; }

/* Smooth sidebar width transition */
.sidebar { transition: width .2s ease; }

/* Collapsed state */
.sidebar--collapsed { width: 3.25rem !important; overflow: hidden; }
.sidebar--collapsed .sidebar__logo { display: none; }
.sidebar--collapsed .sidebar__section-label { display: none; }
.sidebar--collapsed .sidebar__ext-link { display: none; }
.sidebar--collapsed .sidebar__nav a {
    padding: .7rem;
    justify-content: center;
    gap: 0;
}
.sidebar--collapsed .nav-label { display: none; }
.sidebar--collapsed .sidebar__user { display: none; }
.sidebar--collapsed .sidebar__toggle-btn {
    justify-content: center;
    padding: .55rem;
}
.sidebar--collapsed .sidebar__toggle-btn .toggle-label { display: none; }

/* ── Ausgaben-Header (Einsendungsliste) ─────────────────────── */
.issue-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: .55rem 0 .75rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: .9rem;
    flex-wrap: wrap;
}
.issue-header__brand {
    display: flex;
    flex-direction: column;
    gap: .05rem;
    flex-shrink: 0;
}
.issue-header__eyebrow {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--color-text-muted);
}
.issue-header__title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--color-text);
    white-space: nowrap;
}
.issue-header__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    flex: 1;
}
.issue-header__status-pill {
    display: inline-flex;
    align-items: center;
    padding: .2rem .7rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    border: 1px solid;
}
.issue-header__status-pill--freigegeben  { background:#dcfce7; color:#166534; border-color:#bbf7d0; }
.issue-header__status-pill--abgeschlossen{ background:#f1f5f9; color:#475569; border-color:#cbd5e1; }
.issue-header__nav {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-left: auto;
    flex-shrink: 0;
}
.issue-header__select {
    font-size: .82rem;
    padding: .3rem .65rem;
    width: auto;
    max-width: 220px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text);
}
.issue-header__nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .32rem .44rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    transition: background .12s;
    line-height: 1;
}
.issue-header__nav-btn:hover:not(:disabled) { background: var(--color-bg); }
.issue-header__nav-btn:disabled { opacity: .35; cursor: not-allowed; }

/* Legacy: keep .issue-bar aliased for JS compatibility */
.issue-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: .6rem 1rem;
    margin-bottom: .75rem;
}
.issue-bar__left { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.issue-bar__eyebrow { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); }
.issue-bar__title { font-size: .95rem; font-weight: 700; color: var(--color-text); white-space: nowrap; }
.issue-bar__chips { display: flex; flex-wrap: wrap; gap: .35rem; flex: 1; }
.issue-chip {
    display: inline-flex;
    align-items: center;
    font-size: .75rem;
    font-weight: 600;
    padding: .2rem .65rem;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}
.issue-chip--ok      { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.issue-chip--urgent  { background: #fef9c3; color: #854d0e; border-color: #fde047; }
.issue-chip--overdue { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.issue-bar__right { display: flex; align-items: center; gap: .35rem; margin-left: auto; flex-shrink: 0; }
.issue-bar__select { font-size: .82rem; padding: .28rem .6rem; width: auto; max-width: 200px; }
.issue-bar__nav { padding: .28rem .6rem; font-size: 1rem; line-height: 1; }

/* Ausgabe verschieben pro Zeile */
.submission-table .col-issue { width: 2.6rem; text-align: center; }
.col-issue-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
}
.issue-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: .25rem;
    color: var(--color-text-muted);
    border-radius: 4px;
    transition: background .12s, color .12s;
    line-height: 0;
}
.issue-nav-btn:hover { background: var(--color-bg-alt); color: var(--color-primary); }
.issue-nav-btn:disabled { opacity: .3; cursor: default; pointer-events: none; }

/* ── Gesetzt-Button (Einsendungsliste) ──────────────────────── */
.status-cell {
    display: flex;
    align-items: center;
    gap: .4rem;
}
.gesetzt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #cbd5e1;
    padding: .15rem;
    border-radius: 50%;
    flex-shrink: 0;
    transition: color .15s, transform .1s;
    line-height: 0;
}
.gesetzt-btn:hover { color: #16a34a; transform: scale(1.12); }
.gesetzt-btn--active { color: #16a34a; }
.gesetzt-btn--active:hover { color: #14532d; }

/* ── Satz-Button (Einsendungsliste) ────────────────────────── */
.satz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #cbd5e1;
    padding: .15rem;
    border-radius: 50%;
    flex-shrink: 0;
    transition: color .15s, transform .1s;
    line-height: 0;
}
.satz-btn:not([disabled]):hover { color: #6366f1; transform: scale(1.12); }
.satz-btn--active { color: #6366f1; }
.satz-btn--active:not([disabled]):hover { color: #4338ca; }
.satz-btn[disabled] { opacity: .3; cursor: default; pointer-events: none; }

/* Gedimmte Zeile wenn Status = gesetzt */
.submission-row--gesetzt td { color: #94a3b8; }
.submission-row--gesetzt .sub-title__link { color: #94a3b8; }
.submission-row--gesetzt .sub-von__org--primary,
.submission-row--gesetzt .sub-von__name { color: #94a3b8; }
.submission-row--gesetzt .loc-badge,
.submission-row--gesetzt .type-badge { opacity: .45; }
.submission-row--gesetzt .gesetzt-btn--active { color: #16a34a !important; }

/* ── Suchfeld in der Filterleiste ──────────────────────────── */
.filter-search-wrap { flex: 1 1 220px; min-width: 160px; max-width: 360px; position: relative; }
.filter-search {
    width: 100%;
    padding: .4rem .75rem .4rem 2rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20' width='16' height='16'%3E%3Cpath stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round' d='M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zm4.75 9.75L17 16.5'/%3E%3C/svg%3E") no-repeat .5rem center;
    background-size: 16px;
}

/* ── Such-Dropdown ──────────────────────────────────────────── */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgb(0 0 0 / .13);
    margin-top: .25rem;
    overflow: hidden;
}
.search-drop__item {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    padding: .5rem .75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border);
    transition: background .1s;
}
.search-drop__item:last-child { border-bottom: none; }
.search-drop__item:hover,
.search-drop__item--active { background: #f0f4ff; }
.search-drop__title { font-size: .85rem; font-weight: 600; color: var(--color-text); }
.search-drop__sub { font-size: .75rem; color: var(--color-text-muted); }
.search-drop__item mark { background: #fef08a; color: #713f12; border-radius: 2px; font-style: normal; padding: 0 .1rem; }

/* ── Kontakt-Grid (Detail-Ansicht Aufklapp-Bereich) ─────────── */
.contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 2.5rem;
    padding: .65rem 1rem .75rem;
    align-items: flex-start;
}
.contact-item {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
}
.contact-item__label {
    font-size: .71rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--color-text-muted);
    white-space: nowrap;
    line-height: 1.2;
}
.contact-item__value {
    font-size: .88rem;
    color: var(--color-text);
    line-height: 1.4;
}
.contact-item__value a { color: var(--color-primary); text-decoration: none; }
.contact-item__value a:hover { text-decoration: underline; }

/* ── Schriften-Tab ───────────────────────────────────────────────────────── */
.font-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}
.font-picker-field { display: flex; flex-direction: column; gap: .4rem; }
.font-preview {
    margin-top: .35rem;
    padding: .55rem .75rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.font-preview--body  { font-size: .95rem; font-weight: 400; }
.font-preview--mono  { font-size: .88rem; font-weight: 400; font-family: monospace; }

.font-size-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.font-size-slider {
    flex: 1;
    max-width: 320px;
    accent-color: var(--color-primary);
    height: 4px;
    cursor: pointer;
}
.font-size-control__label { font-size: .82rem; color: var(--color-text-muted); white-space: nowrap; }
.font-size-control__current {
    font-size: .92rem;
    font-weight: 700;
    color: var(--color-primary);
    min-width: 4rem;
    text-align: right;
}

/* ── Entwicklungslog / Changelog ─────────────────────────────────────────── */
.changelog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid var(--color-border);
}
.changelog-header__sub { color: var(--color-text-muted); font-size: .9rem; margin-bottom: .35rem; }
.changelog-header__meta { font-size: .85rem; color: var(--color-text-muted); }
.changelog-header__total { text-align: right; flex-shrink: 0; }
.changelog-total__value { display: block; font-size: 2rem; font-weight: 800; color: var(--color-primary); line-height: 1; }
.changelog-total__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); }

.changelog { display: flex; flex-direction: column; gap: 0; }

.cl-phase {
    display: grid;
    grid-template-columns: 2.75rem 1fr;
    gap: 0 1.25rem;
    margin-bottom: 0;
}
.cl-phase__sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.cl-phase__num {
    width: 2.25rem; height: 2.25rem;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 800; letter-spacing: .02em;
    flex-shrink: 0;
    background: var(--color-primary); color: #fff;
}
.cl-phase--done   .cl-phase__num { background: var(--color-accent-dk); }
.cl-phase--wip    .cl-phase__num { background: var(--color-warning, #c0830b); }
.cl-phase--open   .cl-phase__num { background: var(--color-border); color: var(--color-text-muted); }
.cl-phase__line {
    flex: 1;
    width: 2px;
    background: var(--color-border);
    margin: .3rem 0;
    min-height: 1.5rem;
}
.cl-phase:last-child .cl-phase__line { display: none; }

.cl-phase__body {
    padding-bottom: 1.75rem;
}
.cl-phase__header {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .65rem;
    padding-top: .25rem;
}
.cl-phase__title { font-size: 1rem; font-weight: 700; margin: 0; }
.cl-phase__badges { display: flex; gap: .4rem; flex-wrap: wrap; }

.cl-badge {
    display: inline-flex; align-items: center;
    padding: .15rem .6rem;
    border-radius: 999px;
    font-size: .72rem; font-weight: 700;
    border: 1px solid transparent;
}
.cl-badge--done  { background: color-mix(in srgb, var(--color-accent-dk) 12%, transparent); color: var(--color-green-xdk); border-color: color-mix(in srgb, var(--color-accent-dk) 30%, transparent); }
.cl-badge--wip   { background: color-mix(in srgb, var(--color-warning, #c0830b) 12%, transparent); color: var(--color-warning, #c0830b); border-color: color-mix(in srgb, var(--color-warning, #c0830b) 30%, transparent); }
.cl-badge--open  { background: var(--color-bg); color: var(--color-text-muted); border-color: var(--color-border); }
.cl-badge--hours { background: var(--color-bg); color: var(--color-text-muted); border-color: var(--color-border); font-weight: 600; }

.cl-items {
    list-style: none; padding: 0; margin: 0 0 .5rem;
    display: flex; flex-direction: column; gap: .3rem;
}
.cl-item {
    display: flex; align-items: baseline; gap: .6rem;
    font-size: .875rem; line-height: 1.5; color: var(--color-text);
}
.cl-item__dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--color-primary); flex-shrink: 0;
    margin-top: .45em;
}
.cl-phase--done .cl-item__dot { background: var(--color-accent-dk); }

.cl-notes {
    font-size: .82rem; color: var(--color-text-muted); font-style: italic;
    padding: .5rem .75rem;
    border-left: 3px solid var(--color-border);
    margin-top: .5rem;
}

.changelog-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    font-size: .8rem;
    color: var(--color-text-muted);
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

@media print {
    .sidebar, .dashboard-header, .changelog-header__total { display: none !important; }
    .dashboard-main { padding: 0; }
    .cl-phase { break-inside: avoid; }
}

/* ── Korrektur & Freigabe ────────────────────────────────────────────────── */

/* Leerzustand + Index */
.proof-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
}
.proof-index-list { display: flex; flex-direction: column; gap: .5rem; }
.proof-index-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .9rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text);
    transition: border-color .15s, background .15s;
}
.proof-index-item:hover { border-color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 4%, var(--color-surface)); }
.proof-index-item__title { font-weight: 600; }

/* Header */
.proof-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}
.proof-header__title { font-size: 1.3rem; font-weight: 700; margin: 0 0 .35rem; }
.proof-header__meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.proof-header__date { font-size: .82rem; color: var(--color-text-muted); }
.proof-header__actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

/* Zwei-Spalten-Layout */
.proof-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
    align-items: start;
}
.proof-layout__main { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.proof-layout__aside { position: sticky; top: 1rem; }

/* Runden-Karte */
.proof-round-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}
.proof-round-card--current { border-color: var(--color-primary); }
.proof-round-card__header {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem 1rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}
.proof-round-card--current .proof-round-card__header {
    background: color-mix(in srgb, var(--color-primary) 7%, var(--color-surface));
}
.proof-round-card__label { font-weight: 700; font-size: .88rem; }
.proof-round-card__badge {
    font-size: .68rem; font-weight: 700;
    background: var(--color-primary); color: #fff;
    border-radius: 999px; padding: .1rem .55rem;
}

/* Abzug-Karte (innerhalb einer Runde) */
.proof-abzug-card {
    padding: .75rem 1rem;
    background: var(--color-surface);
}
.proof-abzug-card + .proof-abzug-card { border-top: 1px solid var(--color-border); }
.proof-abzug-card--final {
    background: color-mix(in srgb, var(--color-accent) 7%, var(--color-surface));
}
.proof-abzug-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.proof-abzug-card__info { display: flex; flex-direction: column; gap: .2rem; min-width: 0; flex: 1; }
.proof-abzug-card__name { font-weight: 600; font-size: .92rem; word-break: break-word; }
.proof-abzug-card__meta { font-size: .78rem; color: var(--color-text-muted); }
.proof-abzug-card__notes { font-size: .8rem; color: var(--color-text-muted); font-style: italic; }
.proof-abzug-card__actions { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; flex-wrap: wrap; }

/* Inline-Korrektur-Formular */
.proof-korr-form {
    padding: .75rem 1rem;
    background: color-mix(in srgb, var(--color-warning, #c0830b) 5%, var(--color-surface));
    border-top: 1px solid color-mix(in srgb, var(--color-warning, #c0830b) 20%, var(--color-border));
}
.proof-korr-form__label {
    font-size: .75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--color-warning, #c0830b);
    margin-bottom: .6rem;
}
.proof-korr-form__inner { display: flex; flex-direction: column; gap: .75rem; }
.proof-korr-form__fields { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }

/* Korrekturanweisungen-Liste */
.proof-korr-list {
    padding: .6rem 1rem .75rem;
    border-top: 1px solid var(--color-border);
    background: color-mix(in srgb, var(--color-bg) 60%, var(--color-surface));
}
.proof-korr-list__label {
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--color-text-muted);
    margin-bottom: .4rem;
}

/* Datei-Zeile (Korrekturanweisungen) */
.proof-file-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    padding: .35rem 0;
}
.proof-file-row + .proof-file-row { border-top: 1px solid color-mix(in srgb, var(--color-border) 50%, transparent); }
.proof-file-row__info { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.proof-file-row__name { color: var(--color-primary); font-weight: 600; font-size: .88rem; text-decoration: none; word-break: break-all; }
.proof-file-row__name:hover { text-decoration: underline; }
.proof-file-row__meta { font-size: .76rem; color: var(--color-text-muted); }
.proof-file-row__notes { font-size: .78rem; color: var(--color-text-muted); font-style: italic; }
.proof-file-row__del { flex-shrink: 0; }

/* Abzug hochladen (Details-Element unten) */
.proof-new-abzug {
    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
}
.proof-new-abzug__summary {
    padding: .7rem 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: .88rem;
    color: var(--color-primary);
    list-style: none;
    user-select: none;
}
.proof-new-abzug__summary::-webkit-details-marker { display: none; }
details[open].proof-new-abzug { background: var(--color-surface); }
details[open].proof-new-abzug .proof-new-abzug__summary { border-bottom: 1px solid var(--color-border); }
.proof-new-abzug .proof-korr-form__inner { padding: .75rem 1rem 1rem; }

/* Freigaben-Sidebar-Karte */
.proof-approvals-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}
.proof-approvals-card__title {
    font-size: .88rem; font-weight: 700;
    display: flex; align-items: center; gap: .5rem;
    margin-bottom: .75rem;
}
.proof-approvals-card__count {
    font-size: .75rem; font-weight: 700;
    background: var(--color-primary); color: #fff;
    border-radius: 999px; padding: .1rem .55rem;
}
.proof-approvals-card__hint { font-size: .85rem; color: var(--color-text-muted); }

.proof-approval-list { list-style: none; padding: 0; margin: 0 0 .5rem; display: flex; flex-direction: column; gap: .6rem; }
.proof-approval-item { display: flex; align-items: flex-start; gap: .5rem; font-size: .85rem; }
.proof-approval-item__icon { color: var(--color-accent-dk); font-weight: 700; margin-top: .05em; }
.proof-approval-item__body { display: flex; flex-direction: column; gap: .1rem; }
.proof-approval-item__name { font-weight: 600; }
.proof-approval-item__date { color: var(--color-text-muted); font-size: .76rem; }
.proof-approval-item__comment { color: var(--color-text-muted); font-style: italic; font-size: .8rem; }

.proof-my-approval { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--color-border); }
.proof-approval-mine-hint { font-size: .82rem; color: var(--color-text-muted); margin-left: .5rem; }

/* Finale-Badge */
.proof-final-badge {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .15rem .55rem;
    background: color-mix(in srgb, var(--color-accent) 15%, transparent);
    color: var(--color-green-xdk, #1b5e20);
    border-radius: 999px; font-size: .75rem; font-weight: 700;
}

/* "Bereits angeheftet"-Hinweis neben finalem Abzug */
.proof-pinned-hint {
    font-size: .78rem; font-weight: 600;
    color: var(--color-accent-dk);
    display: inline-flex; align-items: center; gap: .25rem;
}

/* Finales Druckdokument-Karte (Ausgaben-Formular) */
.final-doc-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1.1rem;
    background: color-mix(in srgb, var(--color-accent) 7%, var(--color-surface));
    border: 1px solid color-mix(in srgb, var(--color-accent-dk) 25%, var(--color-border));
    border-radius: var(--radius);
}
.final-doc-card__info { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.final-doc-card__name { font-weight: 600; font-size: .92rem; word-break: break-word; }
.final-doc-card__meta { font-size: .78rem; color: var(--color-text-muted); }
.final-doc-card__hint { font-size: .76rem; color: var(--color-text-muted); font-style: italic; }
.final-doc-card__actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

/* Proof-Typ-Badges */
.proof-type-badge {
    display: inline-block;
    padding: .1rem .4rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    vertical-align: middle;
    margin-left: .35rem;
}
.proof-type-badge--abzug      { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.proof-type-badge--druckdaten { background: #fdf4ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.proof-type-badge--webversion  { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.proof-type-badge--korrektur  { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }

/* Druckdaten / Webversion Sektion innerhalb einer Runde */
.proof-final-section {
    margin-top: .5rem;
    border-top: 1px dashed var(--color-border);
    padding-top: .5rem;
}
.proof-final-section__label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-text-muted);
    margin-bottom: .35rem;
}
.proof-abzug-card--finaldoc {
    background: color-mix(in srgb, var(--color-accent) 5%, var(--color-surface));
    border-color: color-mix(in srgb, var(--color-accent-dk) 20%, var(--color-border));
}

/* Freigabe-Buttons nebeneinander */
.proof-approval-buttons {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

/* Mein Status-Block */
.proof-my-approval__current {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    font-weight: 600;
    padding: .4rem .65rem;
    border-radius: var(--radius);
}
.proof-my-approval__current--freigegeben      { background: #ecfdf5; color: #065f46; }
.proof-my-approval__current--korrektur_gewuenscht { background: #fff7ed; color: #c2410c; }

/* Approval-Liste: Korrekturwunsch-Einträge */
.proof-approval-item--freigegeben .proof-approval-item__icon { color: #059669; }
.proof-approval-item--korrektur_gewuenscht .proof-approval-item__icon { color: #d97706; }
.proof-approval-item__status-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--color-text-muted);
}
.proof-approval-item--korrektur_gewuenscht .proof-approval-item__status-label { color: #c2410c; }
.proof-approval-item--freigegeben .proof-approval-item__status-label { color: #065f46; }

/* Angeheftetes Dokument in der Seitenleiste */
.proof-pinned-doc-card {
    margin-top: 1rem;
    padding: .75rem;
    background: color-mix(in srgb, var(--color-accent) 7%, var(--color-surface));
    border: 1px solid color-mix(in srgb, var(--color-accent-dk) 25%, var(--color-border));
    border-radius: var(--radius);
}
.proof-pinned-doc-card__label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-text-muted);
    margin-bottom: .3rem;
}
.proof-pinned-doc-card__name { font-weight: 600; font-size: .88rem; word-break: break-word; }
.proof-pinned-doc-card__meta { font-size: .75rem; color: var(--color-text-muted); margin-top: .15rem; }
.proof-pinned-doc-card__actions { display: flex; gap: .4rem; margin-top: .6rem; flex-wrap: wrap; }

/* Warnungs-Button */
.btn--warning {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}
.btn--warning:hover {
    background: #ffedd5;
    border-color: #fdba74;
}

/* Löschen-Button (Ghost-Danger) */
.proof-del-btn {
    color: var(--color-error) !important;
    border-color: transparent !important;
    background: transparent !important;
}
.proof-del-btn:hover {
    background: color-mix(in srgb, var(--color-error) 10%, transparent) !important;
    border-color: var(--color-error) !important;
}

/* Status-Badges */
.status-badge--nicht_geöffnet { background: #e0e0e0; color: #555; border: 1px solid #ccc; }
.status-badge--offen           { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.status-badge--in_arbeit       { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.status-badge--korrektur       { background: #fff3cd; color: #856404; border: 1px solid #fde68a; }
.status-badge--freigegeben     { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.status-badge--abgeschlossen   { background: #f8fafc; color: #64748b; border: 1px solid #cbd5e1; }

@media (max-width: 900px) {
    .proof-layout { grid-template-columns: 1fr; }
    .proof-layout__aside { position: static; }
}

/* ── Ausgaben-Bar: Toggle abgeschlossene ──────────────────── */
.issue-bar-toggle-closed {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    white-space: nowrap;
    padding: .25rem .5rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border-dk);
    background: transparent;
    transition: background .15s, color .15s, border-color .15s;
    user-select: none;
}
.issue-bar-toggle-closed:hover {
    background: #f1f5f9;
    color: var(--color-text);
    border-color: var(--color-border-dk);
}
.issue-bar-toggle-closed input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--color-primary);
}
