/* =========================================================================
   SG Crussow Vereinsportal - Oberfläche
   Basis ist das Designsystem des Portalkerns (Papier, Haarlinien, Tabellen-
   ziffern). Vereinsfarben: Anthrazit für Primäraktionen und aktive Navigation,
   Gold (#cc9714) als Markenakzent; für Text ein abgedunkeltes Gold (Kontrast).
   ========================================================================= */

:root {
    --paper:         #f2f3f1;
    --surface:       #ffffff;
    --surface-2:     #f7f8f6;
    --line:          #e1e4e0;
    --line-strong:   #c9cec9;
    --ink:           #181b1d;
    --ink-2:         #3d4347;
    --muted:         #687076;
    --muted-2:       #98a0a5;

    --accent:        #8a6100;
    --accent-strong: #6b4b00;
    --accent-ink:    #ffffff;
    --accent-soft:   #f7efdc;
    --accent-line:   #e6d3a3;
    --brand:         #cc9714;
    --primary:       #22262a;
    --primary-strong:#0f1113;
    --primary-ink:   #ffffff;
    --info:          #1d5f8a;
    --info-soft:     #e3eef6;

    --ok:            #1e7a4b;
    --ok-soft:       #e3f2e9;
    --warn:          #a2600c;
    --warn-soft:     #fbeed8;
    --danger:        #b3261e;
    --danger-soft:   #fbe7e5;

    /* Aliase für ältere Inline-Stile */
    --bg:            var(--paper);
    --bg-deep:       #e9ebe8;

    --shadow-float:  0 12px 32px -12px rgba(24, 27, 29, .28), 0 2px 6px rgba(24, 27, 29, .08);

    --r-ctl:  6px;
    --r-card: 10px;
    --r-dlg:  14px;
    --r-sm:   var(--r-ctl);
    --r:      var(--r-card);
    --r-lg:   var(--r-dlg);

    --side-w: 240px;
    --font:         "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-small:   "Segoe UI Variable Small", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --mono:         "Cascadia Mono", Consolas, "SFMono-Regular", "Liberation Mono", monospace;

    --t: 150ms ease;
}

html[data-theme="dark"] {
    --paper:         #141617;
    --surface:       #1c1f21;
    --surface-2:     #232628;
    --line:          #2c3033;
    --line-strong:   #3c4145;
    --ink:           #e7e9e6;
    --ink-2:         #c3c8c6;
    --muted:         #8f979b;
    --muted-2:       #6a7276;

    --accent:        #e2b44d;
    --accent-strong: #f0c969;
    --accent-ink:    #17140c;
    --accent-soft:   #2e2614;
    --accent-line:   #5a4a22;
    --brand:         #cc9714;
    --primary:       #e2b44d;
    --primary-strong:#f0c969;
    --primary-ink:   #17140c;
    --info:          #7fb8df;
    --info-soft:     #16293a;

    --ok:            #57c283;
    --ok-soft:       #15301f;
    --warn:          #e0a44a;
    --warn-soft:     #33260f;
    --danger:        #f08a80;
    --danger-soft:   #3a1c19;

    --bg-deep:       #0f1112;
    --shadow-float:  0 16px 40px -12px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }

html, body { height: 100%; }
html { background: var(--paper); color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: tabular-nums;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -.012em;
    line-height: 1.25;
    color: var(--ink);
}
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
h4 { font-size: .95rem; }
p  { margin: 0 0 .8em; }

/* Seitenüberschrift innerhalb des Inhalts */
.page-h { font-size: 1.6rem; letter-spacing: -.02em; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--r-ctl);
}

.skip {
    position: absolute; left: -9999px; top: 0; z-index: 200;
    background: var(--accent); color: var(--accent-ink);
    padding: .6rem 1rem; border-radius: 0 0 var(--r-ctl) 0;
}
.skip:focus { left: 0; }

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

/* ------------------------------------------------------------------ Layout */

.shell { display: flex; min-height: 100%; }

.side {
    width: var(--side-w);
    flex: 0 0 var(--side-w);
    background: var(--paper);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 60;
}

.side-top { display: flex; align-items: center; gap: .5rem; padding: 1.1rem 1rem .6rem; }

.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); flex: 1; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 30px; height: 30px; flex: none;
    display: grid; place-items: center;
    border-radius: 7px;
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--font-display);
    font-weight: 700; font-size: .95rem;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand-text strong { font-family: var(--font-display); font-size: .95rem; letter-spacing: -.01em; }
.brand-sub { font-size: .76rem; color: var(--muted); }

.side-close { display: none; }

.nav { display: flex; flex-direction: column; gap: 1px; padding: .5rem .6rem; overflow-y: auto; }
.nav-sub { padding-top: .6rem; }

.nav-item {
    display: flex; align-items: center; gap: .6rem;
    min-height: 36px;
    padding: .4rem .65rem;
    border-radius: var(--r-ctl);
    color: var(--ink-2);
    font-size: .9rem;
    font-weight: 500;
    transition: background var(--t), color var(--t);
}
.nav-item { position: relative; }
.nav-item:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
/* Aktiver Punkt als Pille (Cloudflare-Stil) */
.nav-item.is-active { background: var(--nav-active); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.nav-item.is-active .i { color: var(--brand); }
:root { --nav-active: #ffffff; --nav-ease: cubic-bezier(.2, .8, .2, 1); }
html[data-theme="dark"] { --nav-active: #272b2e; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) { --nav-active: #272b2e; } }
.nav-item .i { flex: none; opacity: .8; }
.nav-item.is-active .i { opacity: 1; }

.side-foot { margin-top: auto; flex: none; border-top: 1px solid var(--line); padding-bottom: .4rem; }

.whoami {
    display: flex; align-items: center; gap: .5rem;
    padding: .5rem 1.25rem .6rem; color: var(--muted); font-size: .82rem;
}
.whoami span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.side-backdrop {
    position: fixed; inset: 0; background: rgba(24, 27, 29, .45);
    z-index: 55;
}

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: .75rem;
    min-height: 58px;
    padding: .5rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.topbar-title {
    font-family: var(--font-display);
    font-size: 1.05rem; font-weight: 600; flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar-right { display: flex; align-items: center; gap: .6rem; }

.nav-toggle { display: none; }

.main { padding: 1.5rem; max-width: 1400px; width: 100%; }


/* ------------------------------------------------------------- Bausteine */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
}
.card + .card { margin-top: 1rem; }
.card-head {
    display: flex; align-items: center; gap: .6rem;
    padding: .9rem 1.15rem .6rem;
}
.card-head h2, .card-head h3 { flex: 1; min-width: 0; }
.card-head .i { color: var(--accent); }
.card-body { padding: .5rem 1.15rem 1.15rem; }
.card > .card-body:first-of-type { padding-top: 1.15rem; }   /* ohne Kopfzeile davor */
.card > .card-head + .card-body { padding-top: .35rem; }
.card-body.tight { padding: .35rem 1.15rem 1rem; }
.card > .table-wrap { border-top: 1px solid var(--line); }
.card > .card-body + .table-wrap { border-top: 0; }

/* Kleine Überschrift über einer Gruppe - Satzschreibung, keine Versalien */
.eyebrow {
    font-family: var(--font-small);
    font-size: .8rem; color: var(--muted); font-weight: 500;
    margin: 0 0 .1rem;
}

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.row-end { margin-left: auto; }
.spacer { flex: 1; }

/* Kennzahlen: eine flache Reihe, getrennt durch Haarlinien. Umbrechende
   Zeilen bekommen ihre Trennlinie ueber den negativen Rand, der Rahmen
   schneidet die ueberstehenden Linien ab. */
.grid-4:has(> .stat) {
    display: flex; flex-wrap: wrap; gap: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    overflow: hidden;
}
.stat {
    flex: 1 1 160px;
    padding: .9rem 1.15rem;
    display: flex; flex-direction: column; gap: .1rem;
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
    margin: -1px 0 0 -1px;
    min-width: 0;
}
.stat-label { font-family: var(--font-small); font-size: .8rem; color: var(--muted); }
.stat-value {
    font-family: var(--font-display);
    font-size: 1.9rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.1;
    margin-top: .1rem;
}
.stat-hint { font-family: var(--font-small); font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.stat-accent { color: var(--accent); }

.trend { font-size: .8rem; font-weight: 600; display: inline-flex; align-items: center; gap: .2rem; }
.trend-up { color: var(--ok); }
.trend-down { color: var(--danger); }
.trend-flat { color: var(--muted); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 36px;
    padding: .4rem .9rem;
    border-radius: var(--r-ctl);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink);
    font: inherit; font-size: .875rem; font-weight: 500;
    cursor: pointer;
    transition: background var(--t), border-color var(--t), color var(--t);
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: var(--muted-2); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); }
.btn-danger { background: var(--surface); border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: transparent; }
.btn-sm { min-height: 30px; padding: .25rem .65rem; font-size: .8rem; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .i { width: 16px; height: 16px; }

.icon-btn {
    width: 36px; height: 36px; display: grid; place-items: center;
    border-radius: var(--r-ctl); border: 1px solid transparent;
    background: transparent; color: var(--muted); cursor: pointer;
    transition: background var(--t), color var(--t);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

.i { width: 18px; height: 18px; }

/* Chips / Tags */
.chip {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .15rem .5rem; border-radius: 5px;
    background: var(--surface-2); border: 1px solid var(--line);
    font-family: var(--font-small);
    font-size: .78rem; color: var(--ink-2); font-weight: 500;
    white-space: nowrap; line-height: 1.5;
}
.chip .i { width: 14px; height: 14px; }
.chip-quarter { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.chip-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.chip-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.chip-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.chip-strong { background: var(--warn-soft); border-color: transparent; color: var(--warn); }

.tag {
    display: inline-block; padding: .05rem .45rem; border-radius: 4px;
    background: var(--accent-soft); color: var(--accent);
    font-family: var(--font-small); font-size: .74rem; font-weight: 500;
}

/* Formulare */
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
.field > label, .lbl { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.field .hint { font-family: var(--font-small); font-size: .78rem; color: var(--muted); }

input:not([type]), input[type=text], input[type=password], input[type=date], input[type=time],
input[type=number], input[type=search], input[type=url], input[type=email], input[type=tel],
select, textarea {
    width: 100%;
    min-height: 38px;
    padding: .45rem .65rem;
    font: inherit; font-size: .9rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-ctl);
    transition: border-color var(--t), box-shadow var(--t);
}
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
select {
    appearance: none; padding-right: 2rem;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                      linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
input[type=file] { font-size: .875rem; }
input[type=number] { font-variant-numeric: tabular-nums; }

.form-grid { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }

.check { display: flex; align-items: flex-start; gap: .5rem; font-size: .875rem; cursor: pointer; }
.check input { margin-top: .2rem; accent-color: var(--accent); width: 16px; height: 16px; }

fieldset {
    border: 1px solid var(--line); border-radius: var(--r-card);
    padding: .9rem 1rem .6rem; margin: 0 0 1rem;
    min-inline-size: 0;      /* sonst erzwingt der Browser die Mindestbreite des Inhalts */
}
legend { font-family: var(--font-display); font-size: .9rem; font-weight: 600; color: var(--ink); padding: 0 .4rem; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .875rem; }
.tbl th, .tbl td { padding: .55rem .8rem; text-align: left; vertical-align: top; }
.tbl thead th {
    font-family: var(--font-small);
    font-size: .8rem; color: var(--muted); font-weight: 600;
    border-bottom: 1px solid var(--line);
    white-space: nowrap; position: sticky; top: 0; background: var(--surface);
}
.tbl tbody tr { border-bottom: 1px solid var(--line); }
.tbl tbody tr:last-child { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl a.rowlink { color: var(--ink); font-weight: 600; }
/* Bearbeitbare Tabellen (Kriterienkatalog): Felder nicht unter Lesbarkeit schrumpfen lassen */
.tbl td input:not([type=checkbox]), .tbl td select { min-width: 120px; }
.tbl td textarea { min-width: 220px; min-height: 58px; }
.tbl td input[type=number] { min-width: 72px; }

.sortable th[data-sort] { cursor: pointer; user-select: none; }
.sortable th[data-sort]:hover { color: var(--ink); }
.sortable th .arrow { opacity: .5; font-size: .7em; }

/* Fortschritt */
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.bar.ok > span { background: var(--ok); }
.bar.warn > span { background: var(--warn); }
.bar.danger > span { background: var(--danger); }



/* Meldungen */
.toast {
    padding: .6rem .85rem; border-radius: var(--r-ctl);
    font-size: .875rem; margin-bottom: 1rem;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
}
.toast-ok   { background: var(--ok-soft);     border-color: transparent; color: var(--ok); }
.toast-err  { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.toast-warn { background: var(--warn-soft);   border-color: transparent; color: var(--warn); }
.toast-info { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 120; display: flex; flex-direction: column; gap: .5rem; }
.toasts .toast { box-shadow: var(--shadow-float); margin: 0; min-width: 220px; }

.empty { text-align: center; padding: 2.2rem 1rem; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: .3rem; }
.empty .btn { margin-top: .6rem; }

.notice {
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    padding: .65rem .9rem; border-radius: 0 var(--r-ctl) var(--r-ctl) 0;
    font-size: .87rem; color: var(--ink);
}
.notice-warn   { border-color: var(--warn);   background: var(--warn-soft); }
.notice-danger { border-color: var(--danger); background: var(--danger-soft); }

.muted { color: var(--muted); }
.small { font-size: .82rem; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.mt { margin-top: 1rem; }
.mb { margin-bottom: 1rem; }
.center { text-align: center; }

/* Dialoge */
dialog.confirm, dialog.sheet {
    border: 1px solid var(--line); border-radius: var(--r-dlg);
    padding: 0; background: var(--surface); color: var(--ink);
    box-shadow: var(--shadow-float); max-width: 420px; width: calc(100% - 2rem);
}
dialog::backdrop { background: rgba(24, 27, 29, .5); }
dialog.confirm form { padding: 1.25rem; }
dialog.confirm h3 { margin-bottom: .4rem; }
dialog.confirm p { color: var(--ink-2); font-size: .9rem; }
dialog.confirm menu { display: flex; justify-content: flex-end; gap: .5rem; margin: 1.1rem 0 0; padding: 0; }

/* Login / Setup */
.auth-body { background: var(--paper); display: grid; place-items: center; padding: 1.5rem; }
.auth-wrap { width: 100%; max-width: 420px; }
.auth-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-dlg); padding: 1.75rem;
}
.auth-card.wide { max-width: none; }
.auth-wrap.wide { max-width: 640px; }
.auth-brand { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.4rem; font-family: var(--font-display); font-size: 1.05rem; }
.auth-card h2 { font-size: 1.35rem; margin-bottom: .3rem; }
.auth-card .sub { color: var(--muted); font-size: .875rem; margin-bottom: 1.2rem; }
.auth-note { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 1rem; }

.otp-input {
    font-family: var(--mono); font-size: 1.5rem; letter-spacing: .4em;
    text-align: center; padding: .55rem .3rem .55rem .7rem;
}

.qr { display: block; margin: 0 auto; border-radius: var(--r-ctl); max-width: 100%; height: auto; background: #fff; }
.seed {
    font-family: var(--mono); font-size: .95rem; letter-spacing: .06em;
    background: var(--surface-2); border: 1px dashed var(--line-strong);
    border-radius: var(--r-ctl); padding: .55rem .7rem; text-align: center;
    word-break: break-all;
}
.codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .4rem; }
.codes code {
    font-family: var(--mono); font-size: .9rem; text-align: center;
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: var(--r-ctl); padding: .4rem;
}

.steps { display: flex; gap: .4rem; margin-bottom: 1.2rem; }
.step { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.step.done { background: var(--brand); }

/* Kacheln der Portal-Startseite */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.tile {
    display: flex; flex-direction: column; gap: .45rem;
    padding: 1.25rem; border-radius: var(--r-card);
    background: var(--surface); border: 1px solid var(--line);
    color: var(--ink);
    transition: border-color var(--t), background var(--t);
}
a.tile:hover { text-decoration: none; border-color: var(--accent); }
.tile-icon {
    width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent); margin-bottom: .3rem;
}
.tile-icon .i { width: 20px; height: 20px; }
.tile strong { font-family: var(--font-display); font-size: 1.05rem; }
.tile span { font-size: .86rem; color: var(--muted); }
.tile.disabled { color: var(--muted); border-style: dashed; background: transparent; }
.tile.disabled .tile-icon { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }

/* Diagramme */
.chartbox { width: 100%; overflow-x: auto; }
svg.chart { display: block; width: 100%; height: auto; }
svg.chart .axis { stroke: var(--line-strong); stroke-width: 1; }
svg.chart .gridline { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
svg.chart .lbl { fill: var(--muted); font-size: 11px; font-family: var(--font-small); }
svg.chart .ser { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.chart .pt { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
svg.chart .barfill { fill: var(--accent); }
svg.chart .barfill.soft { fill: var(--accent-line); }

.legend { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: .3rem; }

/* Anhänge */
.att-list { display: flex; flex-direction: column; gap: .4rem; }
.att {
    display: flex; align-items: center; gap: .6rem;
    padding: .45rem .6rem; border: 1px solid var(--line); border-radius: var(--r-ctl);
    background: var(--surface-2); font-size: .85rem;
}
.att .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mailbox {
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-ctl);
    padding: .7rem .85rem; font-size: .87rem; white-space: pre-wrap; word-break: break-word;
    max-height: 380px; overflow: auto;
}

.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem; align-items: end; }
.filters .field { margin-bottom: 0; }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); overflow: hidden; }
.seg a { padding: .3rem .7rem; min-height: 30px; display: inline-flex; align-items: center;
    font-size: .82rem; color: var(--muted); background: var(--surface); }
.seg a + a { border-left: 1px solid var(--line); }
.seg a:hover { text-decoration: none; background: var(--surface-2); color: var(--ink); }
.seg a.is-active { background: var(--primary); color: var(--primary-ink); font-weight: 600; }

.pager { display: flex; gap: .35rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.pager a, .pager span {
    min-width: 34px; min-height: 34px; display: inline-flex; align-items: center; justify-content: center;
    padding: .3rem .5rem;
    border: 1px solid var(--line); border-radius: var(--r-ctl);
    font-size: .82rem; color: var(--muted); background: var(--surface);
}
.pager a:hover { text-decoration: none; color: var(--ink); border-color: var(--line-strong); }
.pager .is-active { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }

/* ------------------------------------------------------ Vereinsportal */

.brand-logo { width: 34px; height: 34px; flex: none; object-fit: contain; }
html[data-theme="dark"] .brand-logo { filter: invert(1) brightness(1.1); }

/* Navigation in Gruppen */
.nav-top { padding-bottom: .35rem; margin-bottom: .35rem; border-bottom: 1px solid var(--line); }
.nav-group > summary {
    list-style: none; cursor: pointer; user-select: none;
    display: flex; align-items: center; gap: .6rem; min-height: 36px; padding: .4rem .65rem;
    border-radius: var(--r-ctl); font-size: .9rem; font-weight: 600; color: var(--ink-2);
    transition: background var(--t), color var(--t);
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary .i { flex: none; opacity: .8; }
.nav-group > summary > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-group > summary::after {
    content: ""; flex: none; width: 6px; height: 6px; margin-right: 3px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: translateY(-1px) rotate(-45deg); transition: transform .25s var(--nav-ease); opacity: .6;
}
.nav-group[open] > summary::after { transform: translateY(-3px) rotate(45deg); }
.nav-group > summary:hover { background: var(--surface); color: var(--ink); }
.nav-group.has-active > summary { color: var(--ink); }
.nav-group.has-active > summary .i { color: var(--brand); opacity: 1; }
/* Unterpunkte: Führungslinie unter dem Gruppen-Icon, aktiver Punkt leuchtet auf der Linie */
.nav-items { position: relative; margin-left: calc(.65rem + 8px); padding: .15rem 0 .3rem .7rem; overflow: hidden; }
.nav-items::before { content: ""; position: absolute; left: 0; top: .15rem; bottom: .3rem; width: 1px; background: var(--line); }
.nav-group .nav-item { min-height: 32px; padding: .3rem .65rem; font-size: .86rem; font-weight: 450; transition: background var(--t), color var(--t), transform .2s var(--nav-ease); }
.nav-group .nav-item:hover { transform: translateX(2px); }
.nav-group .nav-item .i { display: none; }
.nav-group .nav-item.is-active { font-weight: 600; transform: none; }
.nav-group .nav-item.is-active::before {
    content: ""; position: absolute; left: calc(-.7rem); top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--brand);
    animation: navGlow .35s var(--nav-ease) both;
}
.nav-group.is-closing > summary::after { transform: translateY(-1px) rotate(-45deg); }
.nav-group.is-opening .nav-items > * { animation: navIn .32s var(--nav-ease) both; animation-delay: calc(var(--i, 0) * 22ms); }
@keyframes navIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes navGlow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.side { transition: width .25s var(--nav-ease), flex-basis .25s var(--nav-ease); }
@media (prefers-reduced-motion: reduce) {
    .nav-group.is-opening .nav-items > *, .nav-group .nav-item.is-active::before { animation: none; }
    .side, .nav-group .nav-item { transition: none; }
}

/* Einklappen auf eine Icon-Leiste */
.side-mini {
    flex: none; width: 28px; height: 28px; border: 0; border-radius: var(--r-ctl); background: transparent;
    color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1;
}
.side-mini:hover { background: var(--surface); color: var(--ink); }
@media (min-width: 901px) {
    html.nav-mini { --side-w: 60px; }
    html.nav-mini .side-top { flex-direction: column; padding: .9rem .5rem .4rem; }
    html.nav-mini .brand { flex: none; }
    html.nav-mini .side-mini { transform: rotate(180deg); }
    html.nav-mini .brand-text, html.nav-mini .nav-item > span, html.nav-mini .nav-group > summary > span,
    html.nav-mini .nav-group > summary::after, html.nav-mini .nav-fav, html.nav-mini .whoami span { display: none; }
    html.nav-mini .nav { padding: .5rem .45rem; }
    html.nav-mini .nav-item, html.nav-mini .nav-group > summary { justify-content: center; padding: .4rem; }
    html.nav-mini .nav-group > :not(summary) { display: none; }
    html.nav-mini .whoami { justify-content: center; padding: .5rem 0 .6rem; }
}

/* Globale Suche */
.gsearch {
    flex: 1; max-width: 560px; position: relative;
    display: flex; align-items: center; gap: .45rem;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-ctl);
    padding: 0 .6rem; color: var(--muted);
}
.gsearch:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.gsearch input { border: 0 !important; box-shadow: none !important; background: transparent !important; padding-left: 0; min-height: 36px; }
.gsearch kbd {
    font-family: var(--mono); font-size: .72rem; color: var(--muted);
    border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 .35rem;
}
.gsearch-pop {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 80;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
    box-shadow: var(--shadow-float); max-height: 70vh; overflow: auto; padding: .3rem;
}
.gsearch-pop a { display: flex; gap: .6rem; align-items: baseline; padding: .45rem .6rem; border-radius: var(--r-ctl); color: var(--ink); }
.gsearch-pop a:hover, .gsearch-pop a.is-sel { background: var(--accent-soft); text-decoration: none; }
.gsearch-pop .k { font-family: var(--font-small); font-size: .74rem; color: var(--muted); min-width: 88px; }
.gsearch-pop .s { color: var(--muted); font-size: .8rem; margin-left: auto; }
.gsearch-pop .none { padding: .6rem; color: var(--muted); font-size: .86rem; }

.bell { position: relative; }
.bell-n {
    position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 8px; background: var(--danger); color: #fff; font-size: .65rem; font-weight: 700;
    display: grid; place-items: center; line-height: 1;
}

/* Kopf einer Seite */
.crumbs { display: flex; flex-wrap: wrap; gap: .35rem; font-size: .82rem; color: var(--muted); margin-bottom: .5rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.page-top { display: flex; align-items: flex-end; gap: .5rem 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-top .page-h { flex: 0 1 auto; }
.page-sub { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .88rem; flex: 1 1 auto; }
.page-actions { display: flex; gap: .45rem; flex-wrap: wrap; margin-left: auto; }

/* Tabs */
.tabs {
    display: flex; gap: .15rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: thin;
}
.tab {
    padding: .55rem .85rem; color: var(--muted); font-size: .88rem; font-weight: 500; white-space: nowrap;
    border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: .4rem; align-items: center;
}
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.is-active { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.tab-n { font-size: .72rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 0 .4rem; color: var(--muted); }

/* Chips: weitere Arten */
.chip-info { background: var(--info-soft); border-color: transparent; color: var(--info); }
.chip-muted { background: transparent; color: var(--muted); }
.chip-brand { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }

.req { color: var(--danger); }
form.inline { display: inline; margin: 0; }
.th-sort { color: inherit; display: inline-flex; gap: .2rem; }
.th-sort:hover { color: var(--ink); text-decoration: none; }

/* Definitionslisten auf Detailseiten */
.dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: .45rem 1rem; margin: 0; font-size: .9rem; }
.dl dt { color: var(--muted); font-size: .84rem; }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Gespeicherte Filter */
.sfbar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .6rem 0 0; }
.sf { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); font-size: .8rem; }
.sf a { padding: .15rem .5rem; color: var(--ink-2); }
.sf-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 .4rem; font-size: 1rem; line-height: 1; }
.sf-x:hover { color: var(--danger); }
.sf-save > summary { list-style: none; }
.sf-save > summary::-webkit-details-marker { display: none; }
.sf-save[open] form { margin-top: .4rem; }
.sf-save input { max-width: 220px; }

/* Massenaktionen */
.bulkbar {
    position: sticky; bottom: .5rem; z-index: 30;
    display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
    padding: .6rem 1rem; background: var(--primary); color: var(--primary-ink);
    border-radius: var(--r-card); margin-top: .8rem; box-shadow: var(--shadow-float);
}
.bulkbar[hidden] { display: none; }
.bulkbar select, .bulkbar input { max-width: 240px; min-height: 34px; width: auto; }
.bulkbar .btn { min-height: 34px; }
.tbl td.sel, .tbl th.sel { width: 34px; padding-right: 0; }
.tbl input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); }

/* Timeline */
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl li { position: relative; padding: 0 0 1rem 1.6rem; }
.tl li::before {
    content: ""; position: absolute; left: 3px; top: 6px; width: 9px; height: 9px; border-radius: 50%;
    background: var(--surface); border: 2px solid var(--line-strong);
}
.tl li.k-note::before { border-color: var(--brand); }
.tl li.k-task::before { border-color: var(--info); }
.tl li.k-mail::before { border-color: var(--ok); }
.tl li.k-finance::before { border-color: var(--accent); }
.tl-head { display: flex; gap: .5rem; flex-wrap: wrap; align-items: baseline; font-size: .88rem; }
.tl-head strong { font-weight: 600; }
.tl-meta { font-family: var(--font-small); font-size: .76rem; color: var(--muted); }
.tl-text { font-size: .85rem; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .1rem; }

/* Kopf einer Detailseite */
.hero { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.avatar {
    width: 52px; height: 52px; border-radius: 50%; flex: none;
    display: grid; place-items: center; background: var(--primary); color: var(--brand);
    font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
}
html[data-theme="dark"] .avatar { color: var(--primary-ink); }
.hero-main { flex: 1; min-width: 220px; }
.hero-main h1 { font-size: 1.5rem; letter-spacing: -.02em; }
.hero-meta { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-top: .3rem; color: var(--muted); font-size: .86rem; }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: .5rem 0; border-top: 1px solid var(--line); display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.list-plain li:first-child { border-top: 0; }

.mask { font-family: var(--mono); letter-spacing: .02em; }
details.more > summary { cursor: pointer; color: var(--accent); font-size: .86rem; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { margin-bottom: .6rem; }

.grid-side { display: grid; gap: 1rem; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.actions-row { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; margin-top: .4rem; }
.row-danger td { background: var(--danger-soft); }
.row-warn td { background: var(--warn-soft); }

/* -------------------------------------------------------------- Responsiv */

@media (max-width: 900px) {
    .grid-side { grid-template-columns: 1fr; }
    .gsearch kbd { display: none; }
    .side {
        position: fixed; inset: 0 auto 0 0;
        background: var(--surface);
        transform: translateX(-100%);
        transition: transform .18s ease;
        box-shadow: var(--shadow-float);
    }
    body.nav-open .side { transform: none; }
    body:not(.nav-open) .side-backdrop { display: none; }
    .side-close { display: grid; place-items: center; width: 36px; height: 36px;
        border: 0; background: transparent; color: var(--muted); font-size: 1.4rem; cursor: pointer; border-radius: var(--r-ctl); }
    .nav-toggle { display: grid; }
    .side-mini { display: none; }
    .nav-item { min-height: 44px; }
    .main { padding: 1rem; }
    .topbar { padding: .5rem .9rem; }
    .btn, .btn-sm { min-height: 40px; }
    .stat { flex-basis: 45%; }
}

@media (max-width: 560px) {
    body { font-size: 14.5px; }
    .page-h { font-size: 1.35rem; }
    .stat-value { font-size: 1.5rem; }
    .card-head { padding: .8rem .9rem .5rem; }
    .card-body { padding: .35rem .9rem .9rem; }
    .tiles { grid-template-columns: 1fr; }
    .dl { grid-template-columns: 1fr; gap: .1rem; }
    .dl dd { margin-bottom: .45rem; }
    .page-actions { margin-left: 0; }
    .tbl .hide-sm { display: none; }
    .filters { grid-template-columns: 1fr 1fr; gap: .45rem; }
    .filters .field:first-child, .filters .field:last-child { grid-column: 1 / -1; }
    .filters .field > label { font-size: .78rem; }
}

/* ---------------------------------------------------------------- Drucken */

@media print {
    :root { --paper: #fff; --surface: #fff; --line: #d4d4d4; --ink: #000; --ink-2: #222; --muted: #555; }
    .side, .topbar, .toasts, .side-backdrop, .no-print,
    .btn, .icon-btn, dialog, .pager, .filters { display: none !important; }
    body { background: #fff; font-size: 11pt; }
    .shell { display: block; }
    .main { padding: 0; max-width: none; }
    .card { border: 1px solid #ddd; break-inside: avoid; page-break-inside: avoid; }
    .print-only { display: block !important; }
    a { color: #000; text-decoration: none; }
    @page { margin: 16mm 14mm; }
}
.print-only { display: none; }

.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-align: left; }
.linkbtn:hover { text-decoration: underline; }
a.stat-link { color: var(--ink); }
a.stat-link:hover { background: var(--surface-2); text-decoration: none; }

.mailframe { width: 100%; min-height: 520px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: #fff; }

/* Dokumentansicht */
.doc-view { overflow: hidden; }
.doc-frame { display: block; width: 100%; height: calc(100vh - 220px); min-height: 480px; border: 0; background: #525659; }
.doc-img { text-align: center; }
.doc-img img { max-width: 100%; height: auto; }
.doc-text { margin: 0; padding: 16px; max-height: calc(100vh - 220px); overflow: auto; font-size: .85rem; white-space: pre-wrap; }

/* Texteditor */
.rte-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--surface-2); }
.rte-btn { min-width: 32px; height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; }
.rte-btn:hover, .rte-btn:focus-visible { background: var(--surface); border-color: var(--line-strong); }
.rte-ph { width: auto; height: 30px; margin-left: auto; padding: 0 8px; font-size: .85rem; }
.rte-area { min-height: 280px; max-height: 60vh; overflow: auto; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 0 0 8px 8px; background: var(--surface); color: var(--ink); line-height: 1.55; }
.rte-area:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.rte-area p { margin: 0 0 .7em; }
.rte-area h2, .rte-area h3 { margin: .8em 0 .4em; font-size: 1.05rem; }
.rte-area ul, .rte-area ol { margin: 0 0 .7em 1.4em; padding: 0; }
.minutes-body h2, .minutes-body h3 { font-size: 1.05rem; margin: 1em 0 .4em; }
.minutes-body p { margin: 0 0 .7em; }
mark { background: var(--accent-soft); color: inherit; padding: 0 1px; }

/* Online-Antrag */
.apply-docs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.apply-photo-preview { max-width: 140px; max-height: 180px; border-radius: 8px; border: 1px solid var(--line); margin-top: .4rem; }
.doc-public { width: 100%; height: 75vh; border: 0; border-radius: 8px; background: #525659; }
input[type=file] { color: var(--ink-2); font: inherit; font-size: .88rem; max-width: 100%; }
input[type=file]::file-selector-button { margin-right: .7rem; padding: .4rem .8rem; font: inherit; color: var(--ink); background: var(--surface-2);
    border: 1px solid var(--line-strong); border-radius: var(--r-ctl); cursor: pointer; }
input[type=file]::file-selector-button:hover { border-color: var(--muted-2); }

/* Livesuche für Zuordnungen */
.pick-wrap { position: relative; }
.pick-pop { position: absolute; z-index: 80; left: 0; right: 0; top: calc(100% + 2px); max-height: 300px; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.pick-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: .45rem .7rem; border: 0; border-bottom: 1px solid var(--line);
    background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.pick-item span { font-size: .78rem; color: var(--muted); }
.pick-item:hover, .pick-item.is-sel { background: var(--accent-soft); }
.pick-chosen { color: var(--ok, #2e7d32); }
/* Einstellungen */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; align-items: start; }
.logo-preview { display: flex; align-items: center; gap: 1rem; padding: .8rem; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--surface-2); }
.logo-preview img { max-height: 80px; max-width: 200px; }
pre.cmd { white-space: pre-wrap; word-break: break-all; margin: 0 0 .5rem; padding: .6rem .7rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; user-select: all; }

/* Mailclient (eigenes Fenster) */
.mc-body { margin: 0; background: var(--paper); color: var(--ink); height: 100vh; display: flex; flex-direction: column; }
.mc-top { display: flex; align-items: center; gap: .8rem; padding: .55rem 1rem; background: var(--surface); border-bottom: 1px solid var(--line); flex: none; }
.mc-brand { display: flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; min-width: 0; }
.mc-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-search { flex: 1; max-width: 420px; margin-left: auto; }
.mc-shell { flex: 1; display: grid; grid-template-columns: 190px minmax(260px, 380px) 1fr; min-height: 0; }
.mc-folders { border-right: 1px solid var(--line); padding: .5rem; overflow-y: auto; background: var(--paper); }
.mc-folders-h { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: .8rem .4rem .3rem; }
.mc-folder { display: flex; justify-content: space-between; align-items: center; padding: .4rem .6rem; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-size: .88rem; }
.mc-folder:hover { background: var(--surface); }
.mc-folder.is-active { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.mc-count { font-size: .72rem; font-weight: 700; background: var(--brand); color: #22262a; border-radius: 10px; padding: 0 .45rem; }
.mc-list { border-right: 1px solid var(--line); overflow-y: auto; background: var(--surface); }
.mc-list-h { display: flex; justify-content: space-between; align-items: center; padding: .5rem .8rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.mc-item { display: flex; flex-direction: column; gap: 1px; padding: .55rem .8rem; border-bottom: 1px solid var(--line); color: var(--ink-2); text-decoration: none; border-left: 3px solid transparent; }
.mc-item:hover { background: var(--surface-2); }
.mc-item.is-active { background: var(--accent-soft); border-left-color: var(--brand); }
.mc-item.is-unread .mc-from, .mc-item.is-unread .mc-subj { font-weight: 700; color: var(--ink); }
.mc-row { display: flex; justify-content: space-between; gap: .5rem; }
.mc-from { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-date { font-size: .75rem; color: var(--muted); flex: none; }
.mc-subj { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-prev { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-read { overflow-y: auto; display: flex; flex-direction: column; min-width: 0; }
.mc-read-h { padding: .9rem 1.1rem .6rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.mc-read-h h1 { font-size: 1.15rem; margin: 0 0 .4rem; }
.mc-actions { margin-top: .6rem; flex-wrap: wrap; }
.mc-atts { padding: .5rem 1.1rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.mc-frame { flex: 1; width: 100%; min-height: 60vh; border: 0; background: #fff; }
.mc-pad { padding: .6rem .8rem; }
.mc-empty { margin: auto; padding: 2rem; text-align: center; }
.mc-compose { max-width: 900px; width: 100%; margin: 1rem auto; padding: 0 1rem; overflow-y: auto; }
@media (max-width: 900px) {
    .mc-shell { grid-template-columns: 1fr; }
    .mc-folders { display: flex; flex-wrap: wrap; gap: .2rem; border-right: 0; border-bottom: 1px solid var(--line); }
    .mc-folders-h { display: none; }
    .mc-list { border-right: 0; max-height: 45vh; }
}

/* Favoriten in der Navigation */
.nav-row { display: flex; align-items: center; }
.nav-row .nav-item { flex: 1; min-width: 0; }
.nav-fav { flex: none; width: 26px; height: 26px; border: 0; background: transparent; color: var(--muted-2); cursor: pointer; border-radius: 6px; font-size: 14px; line-height: 1; opacity: 0; }
.nav-row:hover .nav-fav, .nav-fav:focus-visible, .nav-fav.is-on { opacity: 1; }
.nav-fav.is-on { color: var(--brand); }
.nav-fav:hover { background: var(--surface); color: var(--brand); }
