/* Aus ui-mockups/shared.css übernommen (verbindliche Vorlage, Stand M1). Änderungen am Design zuerst im Mockup. */

/* Gemeinsame Styles aller Mockups - kein Framework, kein Build-Schritt.
   Referenz für Optik und Verhalten ist mailbox.html (siehe Kommentar dort).

   Grundmuster jeder App-Seite (außer login.html und dem Email-Fenster read.html):
   .app > .split-layout > .pane-accounts (linke Spalte: Navigation des aktuellen
                                          Moduls + unten die Modulauswahl)
                        + .pane-list    (optionale mittlere Liste, z. B. Mails/Kontakte)
                        + .pane-detail  (rechter Inhaltsbereich)
   Module: Emails (mailbox.html, compose.html), Kontakte, Einstellungen, Profil.
   Die erste Zeile von .pane-list und .pane-detail ist immer 60px hoch, damit die
   Trennlinien spaltenübergreifend auf einer Linie liegen. */

:root
{
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: #eaf1ff;
    --bg: #fff;
    --bg-app: #f5f6f8;
    --bg-muted: #f0f2f5;
    --bg-sidebar: #f7f8fa;
    --bg-hover: #f1f4f9;
    --bg-pressed: #e5e8ed;
    --text: #1f2933;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --border-light: #edeef1;
    --unread-dot: #2563eb;
    --highlight: #ffe175;
    --radius: 10px;
    --radius-pill: 999px;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
    --gap: 12px;
    --row-height: 60px;
}

*
{
    box-sizing: border-box;
}

[hidden]
{
    display: none !important;
}

body
{
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Arial, sans-serif;
    color: var(--text);
    background: var(--bg-app);
    font-size: 15px;
}

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

h1
{
    font-size: 22px;
    margin: 0 0 16px;
}

/* ---------------------------------------------------------------------------
   Grundgerüst
   ------------------------------------------------------------------------- */

.app
{
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.split-layout
{
    display: flex;
    flex: 1;
    min-height: 0;
}

/* ---------------------------------------------------------------------------
   Buttons: sekundäre Buttons sind überall grau (wie die Email-Buttons in
   mailbox.html), nur die Hauptaktion einer Ansicht ist blau (.btn-primary).
   Bewusst keine roten Warn-Buttons - auch Löschen/Abmelden sind grau.
   ------------------------------------------------------------------------- */

button,
.btn
{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: var(--bg-muted);
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    line-height: 18px;
    text-decoration: none;
    white-space: nowrap;
}

button:hover,
.btn:hover
{
    background: var(--bg-pressed);
}

.btn-primary
{
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover
{
    background: var(--accent-hover);
}

.btn-small
{
    padding: 4px 10px;
    font-size: 12px;
}

.menu-toggle
{
    display: none;
}

.detail-close
{
    display: none;
}

/* ---------------------------------------------------------------------------
   Formulare
   ------------------------------------------------------------------------- */

input,
select,
textarea
{
    font-family: inherit;
    font-size: 14px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
}

input:focus,
select:focus,
textarea:focus
{
    outline: 2px solid var(--accent-soft);
    border-color: var(--accent);
}

input:disabled
{
    background: var(--bg-muted);
    color: var(--text-muted);
}

label
{
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--text-muted);
}

.field
{
    margin-bottom: var(--gap);
}

.field input,
.field select
{
    width: 100%;
}

/* Label und Feld in einer Zeile (Von/An/Cc/Betreff in compose.html,
   alle Formulare in settings.html und profile.html). */

.field-row
{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--gap);
}

.field-row > label
{
    width: 64px;
    flex-shrink: 0;
    margin-bottom: 0;
    text-align: right;
}

.field-row > input,
.field-row > select,
.field-row > .password-field,
.field-row > .inline-group,
.field-row > .checkbox-row
{
    flex: 1;
    min-width: 0;
}

.form-wide
{
    max-width: 760px;
}

.form-wide .field-row > label
{
    width: 210px;
    text-align: left;
}

.inline-group
{
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.inline-group input[type="number"]
{
    width: 72px;
}

.inline-group label
{
    margin: 0;
    color: var(--text);
    font-size: 14px;
}

.inline-group select
{
    flex: 1;
    min-width: 0;
}

.inline-group input[type="text"]
{
    flex: 1;
    min-width: 0;
}

.form-actions
{
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

.form-wide .form-actions
{
    padding-left: 220px;
}

/* Passwortfelder haben immer einen Augen-Button zum Sichtbarschalten. */

.password-field
{
    position: relative;
}

.password-field input
{
    width: 100%;
    padding-right: 40px;
}

.password-toggle
{
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px 8px;
    color: var(--text-muted);
    font-size: 16px;
}

.password-toggle:hover
{
    color: var(--text);
    background: none;
}

.checkbox-row
{
    display: flex;
    align-items: center;
    gap: 6px;
}

.checkbox-row input
{
    width: auto;
}

.checkbox-row label
{
    margin: 0;
    color: var(--text);
    font-size: 14px;
}

/* ---------------------------------------------------------------------------
   Inhaltselemente
   ------------------------------------------------------------------------- */

.muted-box
{
    border-radius: var(--radius);
    padding: var(--gap);
    color: var(--text-muted);
    text-align: center;
    background: var(--bg-muted);
}

.muted
{
    color: var(--text-muted);
    font-size: 12px;
}

.section-title
{
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 28px 0 10px;
}

.section-title:first-child
{
    margin-top: 0;
}

table
{
    width: 100%;
    border-collapse: collapse;
}

table th,
table td
{
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}

table th
{
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

table tr.selected td
{
    background: var(--accent-soft);
}

.info-grid
{
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px 16px;
    margin: 0;
    font-size: 14px;
}

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

.info-grid dd
{
    margin: 0;
}

.avatar
{
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.avatar-small
{
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.avatar-large
{
    width: 56px;
    height: 56px;
    font-size: 20px;
}

.row-icon
{
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.person-header
{
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.person-header h1
{
    margin: 0;
}

mark
{
    background: var(--highlight);
    color: var(--text);
    padding: 0 2px;
    border-radius: 2px;
}

.tag
{
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent);
    margin-right: 4px;
}

/* Tag-Chips in Liste und Lesebereich (F13, UI22/UI23): ✕ entfernt den Tag,
   "+ Tag" vergibt einen vorhandenen oder neuen Tag. Ein Klick auf den Chip füllt
   künftig das Suchfeld mit "#tag". */

.tag-list
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 0 0 16px;
}

.tag-list .tag
{
    margin-right: 0;
    cursor: pointer;
}

.tag .tag-remove
{
    margin-left: 4px;
    opacity: 0.6;
}

.tag-add
{
    display: inline-block;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: var(--radius-pill);
    border: 1px dashed var(--border);
    color: var(--text-muted);
    background: none;
    cursor: pointer;
}

.mail-row .mail-tags
{
    display: inline-flex;
    gap: 4px;
    margin-left: 4px;
}

.mail-row .mail-tags .tag
{
    font-size: 10px;
    padding: 1px 6px;
    margin-right: 0;
}

/* Fähnchen vor dem Datum markierter Emails (F26). */

.mail-row .mail-flag
{
    color: var(--accent);
    margin-right: 4px;
}

.attachment
{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 6px 12px;
    margin: 4px 8px 0 0;
    font-size: 13px;
    background: var(--bg-muted);
}

/* ---------------------------------------------------------------------------
   Listen-Zeilen (Mails, Kontakte, Einstellungs-Navigation): zweizeilig,
   oben fett (Absender/Name + Datum), darunter dünner (Betreff/Beschreibung).
   ------------------------------------------------------------------------- */

.mail-list
{
    list-style: none;
    margin: 0;
    padding: 0;
}

.mail-row
{
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    border-radius: var(--radius);
    color: inherit;
    text-decoration: none;
}

.mail-row:hover
{
    background: var(--bg-hover);
}

.mail-row.selected
{
    background: var(--accent-soft);
}

.mail-row .unread-dot
{
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--unread-dot);
    margin-top: 7px;
    flex-shrink: 0;
}

.mail-row:not(.unread) .unread-dot
{
    background: transparent;
}

.mail-row .mail-main
{
    flex: 1;
    min-width: 0;
}

.mail-row .mail-top
{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.mail-row .mail-from
{
    min-width: 0;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mail-row.unread .mail-from
{
    font-weight: 700;
}

/* Absender, Tags, Datum rechts: gekürzt wird der Absender, nicht Tags oder Datum. */

.mail-row .mail-top .mail-tags
{
    flex-shrink: 0;
    align-self: center;
}

.mail-row .mail-date
{
    flex-shrink: 0;
    margin-left: auto;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.mail-row .mail-subject
{
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 400;
    white-space: normal;
    overflow-wrap: break-word;
}

.mail-row.unread .mail-subject
{
    color: var(--text);
}

.mail-row .mail-account-tag
{
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-muted);
    border-radius: var(--radius-pill);
    padding: 1px 8px;
    margin-top: 2px;
    display: inline-block;
}

/* ---------------------------------------------------------------------------
   Spalte 1: Modul-Navigation (.pane-accounts)
   Oben die Navigation des aktuellen Moduls (Emails: "+ Neue E-Mail" und
   Postfächer/Ordner; Kontakte: "+ Neuer Kontakt" und Gruppen; Einstellungen:
   Bereiche; Profil: Abschnitte), unten fix die Modulauswahl
   (.pane-accounts-footer) immer mit allen Modulen in fester Reihenfolge; das
   aktuelle ist hinterlegt (.active) und führt zurück zu seiner Startansicht.
   "Emails" in den Kontakten ersetzt so jeden Zurück-Button.
   ------------------------------------------------------------------------- */

.pane-accounts
{
    width: 240px;
    flex-shrink: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.pane-accounts-scroll
{
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: var(--gap);
}

.module-action
{
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

/* Navigationseinträge der Module Kontakte/Einstellungen/Profil - gleiche Optik
   wie die Postfach-Kopfzeilen im Email-Modul (aktiv = hellblau). */

.module-nav
{
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.module-nav a
{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
}

.module-nav a:hover
{
    background: var(--bg-hover);
}

.module-nav a.active
{
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.module-nav .count
{
    margin-left: auto;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 400;
}

/* Gruppen verwalten (Kontakte, UI26): Stift beim Überfahren, "+ Neue Gruppe" darunter. */

.module-nav .nav-edit
{
    visibility: hidden;
    color: var(--text-muted);
    font-size: 12px;
}

.module-nav a:hover .nav-edit
{
    visibility: visible;
}

.module-nav a.module-nav-add
{
    color: var(--text-muted);
    font-size: 13px;
}

.module-nav-title
{
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 18px 12px 6px;
}

/* Überschrift eines Moduls ohne Hauptaktion (Importieren, UI30): an der Stelle von "+ Neue E-Mail". */

.module-nav-title.module-nav-heading
{
    margin-top: 4px;
    font-size: 13px;
}

.pane-accounts-footer
{
    flex-shrink: 0;
    padding: 8px var(--gap) var(--gap);
    border-top: 1px solid var(--border-light);
}

.pane-accounts-footer a
{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
}

.pane-accounts-footer a:hover
{
    background: var(--bg-hover);
}

.pane-accounts-footer a.active
{
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

/* Accordion: immer nur ein Postfach aufgeklappt */

.account-header
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border-radius: var(--radius-pill);
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.account-header:hover
{
    background: var(--bg-hover);
}

.account-header.active
{
    background: var(--accent-soft);
    color: var(--accent);
}

/* Statt des Aufklapp-Pfeils (Phase 4, D147): "⋯" mit dem Menü des Kontos
   ("Einstellungen"); bei "Zusammengefasst" bleibt der Platz leer. */

.account-header .folder-menu-btn
{
    font-weight: 400;
}

.account-header:hover .folder-menu-btn,
.account-header:focus-visible .folder-menu-btn
{
    visibility: visible;
}

.account-header:hover .folder-menu-btn.empty
{
    visibility: hidden;
}

.account-folders
{
    display: none;
    flex-direction: column;
    padding: 2px 0 8px 14px;
}

.account-folders.open
{
    display: flex;
}

.account-folders a
{
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 13px;
}

.account-folders a:hover
{
    background: var(--bg-hover);
    color: var(--text);
}

.account-folders a.active
{
    background: var(--bg);
    color: var(--accent);
    font-weight: 600;
    box-shadow: var(--shadow);
}

.account-folders .count
{
    color: var(--text-muted);
    font-size: 12px;
}

/* Gespeicherte Filter: klappen nur unter dem aktiven Ordner auf,
   linksbündig wie der Ordnername (stärker eingerückt), Anzahl rechtsbündig. */

.folder-item
{
    display: flex;
    flex-direction: column;
}

.folder-filters
{
    display: none;
    flex-direction: column;
    padding: 2px 0 4px 28px;
}

.folder-filters.open
{
    display: flex;
}

.folder-filters a
{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    font-size: 12.5px;
}

.folder-filters .count
{
    font-size: 11px;
}

/* Phase 4 (UI29, F30–F34): eigene Ordner und Unterordner als Baum.
   Unterordner stehen eingerückt unter ihrem Ordner, nach dessen Filtern;
   ▸/▾ klappt auf und zu. Zugeklappt zeigt die Zahl grau "(+n)" für die
   Unterordner. "⋯" beim Überfahren öffnet das Kontextmenü. */

.folder-children
{
    display: none;
    flex-direction: column;
    padding-left: 14px;
}

.folder-children.open
{
    display: flex;
}

.folder-link .folder-name
{
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.folder-link .folder-name > span:last-child
{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-toggle
{
    display: inline-block;
    width: 12px;
    flex: none;
    color: var(--text-muted);
    font-size: 10px;
    cursor: pointer;
}

.folder-toggle.none
{
    visibility: hidden;
}

.folder-link .folder-end,
.filter-link .folder-end
{
    display: flex;
    align-items: center;
    gap: 6px;
    flex: none;
}

.count-sub
{
    display: none;
    color: var(--text-muted);
    opacity: 0.7;
}

.folder-item.collapsed > .folder-link .count-sub
{
    display: inline;
}

.folder-menu-btn
{
    visibility: hidden;
    display: inline-block;
    width: 18px;
    flex: none;
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    text-align: center;
    cursor: pointer;
}

/* Der Platz für "⋯" ist bei jedem Ordner und Filter reserviert, damit die
   Zahlen bündig stehen; ohne Menü (Postausgang) bleibt er leer. */

.folder-link:hover .folder-menu-btn,
.folder-link:focus-within .folder-menu-btn,
.filter-link:hover .folder-menu-btn,
.filter-link:focus-within .folder-menu-btn
{
    visibility: visible;
}

.folder-menu-btn.empty,
.folder-link:hover .folder-menu-btn.empty
{
    visibility: hidden;
    cursor: default;
}

/* Filter sind Ansichten, keine Ordner: Trichter-Symbol, kursiv, gedämpft (UI29,
   D146). Der Name steht eine Ebene tiefer, bündig mit den Namen der Unterordner,
   der Trichter links daneben an der Stelle ihres Aufklapp-Pfeils. */

.folder-item > .folder-filters
{
    padding-left: 14px;
}

.filter-link .filter-name
{
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    font-style: italic;
}

.filter-link .filter-name::before
{
    content: "";
    flex: none;
    width: 13px;
    height: 11px;
    background: currentColor;
    opacity: 0.75;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 2h14l-5.5 6.5V14l-3-1.5v-4z'/%3E%3C/svg%3E") right center / 11px 11px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 2h14l-5.5 6.5V14l-3-1.5v-4z'/%3E%3C/svg%3E") right center / 11px 11px no-repeat;
}

.filter-link .filter-name > span
{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (hover: none)
{
    .folder-menu-btn
    {
        visibility: visible;
    }
}

.folder-menu-btn:hover
{
    background: var(--bg-hover);
    color: var(--text);
}

.folder-new
{
    color: var(--text-muted);
    font-size: 12.5px;
}

.folder-menu
{
    position: fixed;
    z-index: 60;
    min-width: 200px;
    padding: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.14);
}

.folder-menu[hidden]
{
    display: none;
}

.folder-menu button
{
    display: block;
    width: 100%;
    padding: 7px 12px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.folder-menu button:hover
{
    background: var(--bg-hover);
}

.folder-menu button:disabled
{
    color: var(--text-muted);
    cursor: default;
    background: none;
}

.folder-menu hr
{
    margin: 4px 6px;
    border: 0;
    border-top: 1px solid var(--border);
}

/* Mehrere Adressen je Kontakt (Phase 4, F35): je Zeile Adresse, "Standard", ✕. */

.address-list
{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
}

.address-row
{
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.address-row input[type="email"]
{
    flex: 1;
    min-width: 0;
}

.address-default
{
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 12.5px;
    white-space: nowrap;
}

/* F41, D159: Absenderadressen eines Kontos (Kontoadresse und Aliase) im Konto-Editor. */
.alias-row input[type="text"]
{
    flex: 1;
    min-width: 0;
}

.alias-account
{
    flex: 1;
    font-size: 12.5px;
}

.alias-ignored
{
    font-size: 12.5px;
}

/* F41, D159: Hinweis auf einen unbekannten Alias im Lesebereich. */
.alias-hint
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.alias-hint input[type="text"]
{
    min-width: 12em;
}

/* Einfache Dialoge (Phase 4/5): Ordner anlegen, umbenennen, verschieben,
   löschen; Kontakt suchen. Native <dialog>, Buttons rechts, Hauptaktion blau. */

.app-dialog
{
    width: min(420px, calc(100vw - 32px));
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.18);
    color: var(--text);
}

.app-dialog::backdrop
{
    background: rgba(16, 24, 40, 0.25);
}

.app-dialog h3
{
    margin: 0 0 12px;
    font-size: 16px;
}

.app-dialog p
{
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 13px;
}

.app-dialog input[type="text"],
.app-dialog select
{
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
}

.app-dialog .dialog-error
{
    color: #b42318;
    font-size: 12.5px;
}

.app-dialog .dialog-buttons
{
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.folder-pick
{
    max-height: 220px;
    overflow: auto;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
}

.folder-pick label
{
    display: block;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
}

.folder-pick label:hover
{
    background: var(--bg-hover);
}

.folder-pick label.disabled
{
    color: var(--text-muted);
    cursor: default;
}

/* ---------------------------------------------------------------------------
   Spalte 2: Liste (.pane-list)
   ------------------------------------------------------------------------- */

.pane-list
{
    width: 360px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-light);
    background: var(--bg);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.pane-list-header
{
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    height: var(--row-height);
    padding: 0 12px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg);
    flex-shrink: 0;
}

.search-status
{
    padding: 8px 14px 0;
}

.pane-list-header input[type="search"]
{
    flex: 1;
    min-width: 0;
    border-radius: var(--radius-pill);
    background: var(--bg-muted);
    border: 1px solid transparent;
    padding: 9px 14px;
}

/* Suchfeld mit "✕" zum Leeren: erscheint bei Mausberührung oder Fokus, solange
   Text drinsteht; auf Touch-Geräten (ohne Hover) immer, wenn Text drinsteht.
   Das eingebaute Löschkreuz des Browsers ist ausgeblendet. */

.search-field
{
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
}

.pane-list-header .search-field input[type="search"]
{
    padding-right: 36px;
}

.search-field input[type="search"]::-webkit-search-cancel-button
{
    -webkit-appearance: none;
    display: none;
}

.search-clear
{
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    visibility: hidden;
}

.search-clear:hover
{
    background: var(--border-light);
    color: var(--text);
}

.search-field:hover input:not(:placeholder-shown) + .search-clear,
.search-field:focus-within input:not(:placeholder-shown) + .search-clear
{
    visibility: visible;
}

@media (hover: none)
{
    .search-field input:not(:placeholder-shown) + .search-clear
    {
        visibility: visible;
    }
}

/* Schnellfilter (Alle/Ungelesen/Markiert) und andere Umschalter:
   aktiver Eintrag grau hinterlegt, NICHT blau unterstrichen. */

.pane-list-tabs
{
    position: sticky;
    top: var(--row-height);
    z-index: 1;
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg);
}

.segmented
{
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.pane-list-tabs a,
.segmented a
{
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
}

.pane-list-tabs a:hover,
.segmented a:hover
{
    background: var(--bg-hover);
}

.pane-list-tabs a.active,
.segmented a.active
{
    background: var(--bg-muted);
    color: var(--text);
    font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Spalte 3: Inhalt (.pane-detail)
   ------------------------------------------------------------------------- */

.pane-detail
{
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg);
    container-type: inline-size;
}

/* Schmaler Inhaltsbereich (kleines Fenster, Smartphone): breite Formulare
   stapeln Label über Feld, Tabellen scrollen in ihrem eigenen Bereich. */

.table-wrap
{
    overflow-x: auto;
}

@container (max-width: 640px)
{
    .form-wide .field-row
    {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .form-wide .field-row > label
    {
        width: auto;
    }

    .form-wide .form-actions
    {
        padding-left: 0;
    }
}

.detail-toolbar
{
    display: flex;
    align-items: center;
    gap: 8px;
    height: var(--row-height);
    padding: 0 16px;
    border-bottom: 1px solid var(--border-light);
    flex-wrap: nowrap;
    overflow-x: auto;
    flex-shrink: 0;
}

.detail-toolbar > *
{
    flex-shrink: 0;
}

.detail-toolbar::-webkit-scrollbar
{
    display: none;
}

.detail-toolbar
{
    scrollbar-width: none;
}

/* Buttonzeile immer einzeilig: passt sie nicht in die Breite (z. B. 1280px-
   Laptop mit drei Spalten), verlieren zuerst die nachrangigen Buttons
   (.btn-label.optional, z. B. Löschen/Spam) ihre Beschriftung, reicht das nicht,
   alle - es bleibt das Icon, die Beschriftung steht im Tooltip (title).
   Gesteuert von fitToolbars() in shared.js, je Zeile nur so weit wie nötig. */

.detail-toolbar.compact-1 .btn-label.optional,
.detail-toolbar.compact-2 .btn-label
{
    display: none;
}

.toolbar-title
{
    font-size: 16px;
    font-weight: 700;
    margin-right: 8px;
}

.toolbar-status
{
    margin-left: auto;
    color: var(--text-muted);
    font-size: 12px;
}

.detail-body
{
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.detail-reply
{
    padding: 12px 16px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-muted);
}

.detail-reply input
{
    width: 100%;
    border-radius: var(--radius-pill);
    background: var(--bg);
    border: 1px solid var(--border-light);
}

/* settings.html: je Bereich eine Liste (.settings-section in .pane-list) und je
   Eintragsart ein Editor (.detail-panel in .pane-detail) - nur einer sichtbar. */

.settings-section,
.detail-panel
{
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.settings-section.active,
.detail-panel.active
{
    display: flex;
}

/* Gruppenüberschrift innerhalb einer Liste (z. B. Filter / Tags) */

.list-group-title
{
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 16px 10px 6px;
}

/* ---------------------------------------------------------------------------
   Verfassen (compose.html): ohne Überschrift, ganze Breite. Kompakter Kopf aus
   randlosen Zeilen mit Trennlinie, darunter die Formatleiste und der Text über
   die gesamte restliche Höhe ohne eigenen Rahmen.
   ------------------------------------------------------------------------- */

.compose
{
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
}

.compose-notice
{
    padding: 6px 16px;
    font-size: 13px;
    background: var(--accent-soft);
    border-bottom: 1px solid var(--border-light);
}

.compose-notice.fail
{
    background: #fdecec;
    color: #b42318;
}

.compose-head
{
    flex-shrink: 0;
}

.compose-field
{
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-light);
}

.compose-field > label
{
    width: 52px;
    flex-shrink: 0;
    margin: 0;
    font-size: 13px;
}

.compose-field:focus-within > label
{
    color: var(--accent);
}

.compose-field > input,
.compose-field > select
{
    flex: 1;
    min-width: 0;
    padding: 6px 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 14px;
}

.compose-field > input:focus,
.compose-field > select:focus,
.recipient-chips input:focus
{
    outline: none;
}

.compose-field > select
{
    width: auto;
    flex: 0 1 auto;
    cursor: pointer;
}

.compose-subject
{
    font-weight: 600;
}

/* Empfänger als Chips: eine Adresse wird nach Komma, Semikolon, Enter oder beim
   Verlassen des Feldes zur Kachel; ungültige Adressen rot. */

.recipient-chips
{
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.recipient-chips input
{
    flex: 1;
    min-width: 160px;
    padding: 4px 0;
    border: none;
    background: transparent;
}

.recipient-chip
{
    display: inline-flex;
    align-items: center;
    gap: 2px;
    max-width: 100%;
    padding: 2px 2px 2px 10px;
    border-radius: var(--radius-pill);
    background: var(--bg-muted);
    font-size: 13px;
    line-height: 20px;
    cursor: default;
}

.recipient-chip span
{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recipient-chip.invalid
{
    background: #fdecec;
    color: #b42318;
}

.recipient-chip button
{
    padding: 0 6px;
    border-radius: var(--radius-pill);
    background: none;
    font-size: 11px;
    line-height: 20px;
    color: var(--text-muted);
}

.recipient-chip button:hover
{
    background: var(--bg-pressed);
    color: var(--text);
}

.field-links
{
    display: flex;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.field-check label
{
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    cursor: pointer;
}

.field-links button
{
    padding: 2px 8px;
    background: none;
    font-size: 13px;
    color: var(--text-muted);
}

.field-links button:hover
{
    background: var(--bg-muted);
    color: var(--text);
}

.suggestions
{
    position: absolute;
    z-index: 20;
    left: 76px;
    right: 16px;
    top: 100%;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 6px 18px rgb(0 0 0 / 12%);
    max-height: 280px;
    overflow-y: auto;
}

.suggestions li
{
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding: 6px 10px;
    cursor: pointer;
}

.suggestions li.active,
.suggestions li:hover
{
    background: var(--accent-soft);
}

.suggestion-address
{
    color: var(--text-muted);
    font-size: 12px;
}

/* Anhänge unter dem Betreff, mit Gesamtgröße (Grenze D76). */

.compose-attachments
{
    flex-wrap: wrap;
    padding-top: 4px;
    padding-bottom: 4px;
}

.compose-attachments .attachment
{
    margin: 0;
    padding: 3px 4px 3px 10px;
    gap: 4px;
}

.compose-attachments .attachment button
{
    padding: 0 6px;
    background: none;
    font-size: 11px;
    color: var(--text-muted);
}

.attachment-total
{
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
}

/* Formatleiste: einzeilig, scrollt bei schmalem Fenster waagrecht. Aktive
   Formate (Cursor in fettem Text usw.) sind hinterlegt. */

.format-toolbar
{
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px 12px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-sidebar);
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}

.format-toolbar button
{
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 7px;
    gap: 2px;
    border-radius: 6px;
    background: transparent;
    font-size: 14px;
    flex-shrink: 0;
}

.format-toolbar button:hover
{
    background: var(--bg-pressed);
}

.format-toolbar button[aria-pressed="true"]
{
    background: var(--accent-soft);
    color: var(--accent);
}

.format-toolbar select
{
    height: 30px;
    padding: 0 4px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
}

.format-toolbar select:hover
{
    background: var(--bg-pressed);
}

.format-sep
{
    width: 1px;
    height: 20px;
    margin: 0 5px;
    background: var(--border);
    flex-shrink: 0;
}

.color-swatch
{
    display: block;
    width: 14px;
    height: 3px;
    margin-top: 1px;
    border-radius: 1px;
}

.color-button
{
    flex-direction: column;
    line-height: 14px;
}

/* Schwebende Felder im Verfassen: Farbauswahl, Link, Bildgröße. */

.popover
{
    position: absolute;
    z-index: 30;
    padding: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 6px 18px rgb(0 0 0 / 12%);
}

.color-grid
{
    display: grid;
    grid-template-columns: repeat(6, 22px);
    gap: 5px;
}

.color-grid button
{
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid rgb(0 0 0 / 12%);
    border-radius: 4px;
}

.color-grid .color-auto
{
    grid-column: 1 / -1;
    width: auto;
    height: 26px;
    justify-content: center;
    font-size: 12px;
    background: var(--bg-muted);
}

.link-popover
{
    width: 340px;
    max-width: calc(100% - 32px);
}

.link-popover .field-row
{
    margin-bottom: 8px;
}

.link-popover .field-row > label
{
    width: 56px;
}

.link-popover .form-actions
{
    margin-top: 4px;
    justify-content: flex-end;
}

.image-bar
{
    display: flex;
    gap: 2px;
    padding: 4px;
}

.image-bar button
{
    padding: 4px 10px;
    font-size: 12px;
    background: transparent;
}

.image-bar button:hover
{
    background: var(--bg-pressed);
}

.image-bar button[aria-pressed="true"]
{
    background: var(--accent-soft);
    color: var(--accent);
}

/* Text der Email: ganze Breite und restliche Höhe, ohne Rahmen. */

.editor-body
{
    flex: 1;
    min-height: 220px;
    padding: 12px 16px;
    overflow-wrap: break-word;
    line-height: 1.5;
    outline: none;
}

.editor-body:empty::before
{
    content: attr(data-placeholder);
    color: var(--text-muted);
}

.editor-body img
{
    max-width: 100%;
    height: auto;
    cursor: pointer;
}

.editor-body img.selected
{
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.editor-body blockquote
{
    margin: 0 0 0 4px;
    padding-left: 10px;
    border-left: 2px solid #c8d0da;
}

.editor-body .quote-head
{
    color: var(--text-muted);
}

/* Beim Ziehen von Dateien: zwei Zielflächen über dem Verfassen. */

.drop-overlay
{
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgb(255 255 255 / 85%);
}

.drop-zone
{
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 15px;
    text-align: center;
}

.drop-zone strong
{
    font-size: 17px;
    color: var(--text);
}

.drop-zone.over
{
    border-color: var(--accent);
    background: var(--accent-soft);
}

/* Signatur je Konto (settings.html): kleiner Editor mit Formatleiste. */

.signature-editor
{
    position: relative;
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.signature-editor .format-toolbar
{
    border-radius: var(--radius) var(--radius) 0 0;
}

.signature-editor .editor-body
{
    min-height: 90px;
    padding: 8px 10px;
    font-size: 14px;
}

@media (max-width: 700px)
{
    .compose-field
    {
        padding: 0 12px;
    }

    .compose-field > label
    {
        width: 40px;
    }

    .suggestions
    {
        left: 12px;
        right: 12px;
    }

    .recipient-chips input
    {
        min-width: 100px;
    }
}

/* ---------------------------------------------------------------------------
   Login (ohne App-Navigation)
   ------------------------------------------------------------------------- */

.login-page
{
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 48px 16px;
}

.login-card
{
    width: 100%;
    max-width: 380px;
    background: var(--bg);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 24px rgba(16, 24, 40, 0.08);
}

.login-card .btn-primary
{
    width: 100%;
    justify-content: center;
}

/* ---------------------------------------------------------------------------
   Responsive (NF08): unter 700px wird die linke Spalte zum ausklappbaren
   Overlay (☰), Listen nehmen die volle Breite ein, der Detailbereich öffnet
   sich bei Auswahl als Vollbild-Overlay (✕ schließt ihn). Seiten ohne Liste
   (compose, profile) zeigen ihren Inhalt direkt.
   ------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
   Ergänzungen aus dem Use-Case-Katalog (D36–D53)
   ------------------------------------------------------------------------- */

/* Griff zum Sortieren per Ziehen (Postfächer, Konten, Filter, D47) und
   "Jetzt abrufen" am Postfach (D45). */

.drag-grip
{
    cursor: grab;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: -2px;
    margin-right: 6px;
    user-select: none;
}

.account-header .account-name
{
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-header .nav-refresh
{
    color: var(--text-muted);
    font-weight: 400;
    margin-right: 8px;
    visibility: hidden;
}

.account-header.active .nav-refresh,
.account-header:hover .nav-refresh
{
    visibility: visible;
}

/* Mehrfachauswahl (D42): Checkbox je Zeile, Auswahl-Buttonzeile statt Schnellfilter. */

.mail-row .row-check
{
    margin: 3px 0 0;
    flex-shrink: 0;
}

.selection-bar
{
    position: sticky;
    top: var(--row-height);
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-light);
    background: var(--accent-soft);
    flex-wrap: wrap;
}

.selection-bar .selection-count
{
    font-size: 13px;
    font-weight: 600;
    margin-right: 6px;
}

/* Umschalter "In diesem Ordner / In allen Ordnern" unter dem Suchfeld (UI17)
   und Aktion über der Liste ("Papierkorb leeren", D41). */

.search-scope
{
    display: flex;
    gap: 4px;
    padding: 6px 12px 0;
}

.search-scope a
{
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}

.search-scope a.active
{
    background: var(--bg-muted);
    color: var(--text);
    font-weight: 600;
}

.folder-action
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 14px;
    font-size: 12px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
}

/* Fehlermeldungen (Login, UI20) und Ergebnis-Hinweisboxen (Testergebnisse, UI27). */

.form-error
{
    color: #b42318;
    font-size: 13px;
    margin: 10px 0 0;
}

.result-box
{
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
    background: var(--bg-muted);
}

.result-box .ok
{
    color: #067647;
    font-weight: 600;
}

.result-box .fail
{
    color: #b42318;
    font-weight: 600;
}

/* Absender-Menü im Lesebereich ("Als Kontakt speichern", D44). */

.sender-menu
{
    position: relative;
    display: inline-block;
}

.sender-menu > summary
{
    list-style: none;
    cursor: pointer;
}

.sender-menu > summary::-webkit-details-marker
{
    display: none;
}

.sender-menu .menu
{
    position: absolute;
    z-index: 5;
    top: 100%;
    left: 0;
    margin-top: 4px;
    min-width: 200px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 4px;
}

.sender-menu .menu a
{
    display: block;
    padding: 8px 10px;
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
}

.sender-menu .menu a:hover
{
    background: var(--bg-hover);
}

/* Emailkopf (D118, D122): Kontoadresse als Chip vorne in "an" (bzw. in Gesendet hinter einem abweichenden
   Absender), "mehr…" am Zeilenende klappt die Original-Kopfzeilen auf. */

.mailbox-chip
{
    display: inline-block;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-muted);
    border-radius: var(--radius-pill);
    padding: 1px 8px;
    margin-right: 4px;
    font-weight: 400;
}

.mail-headers-toggle
{
    white-space: nowrap;
}

.mail-headers
{
    margin: -4px 0 16px;
    padding: 10px 12px;
    max-height: 320px;
    overflow: auto;
    background: var(--bg-muted);
    border-radius: var(--radius);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Burger-Menü der Buttonzeile (☰ Mehr): Markieren, Ungelesen, Verschieben, Löschen, Spam, Quelltext. Liegt
   fest über der Seite, weil die Buttonzeile selbst waagrecht scrollt und ein Klappmenü abschneiden würde. */

.toolbar-menu
{
    position: fixed;
    z-index: 50;
    min-width: 220px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 4px;
}

.toolbar-menu button
{
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--radius);
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.toolbar-menu button:hover,
.toolbar-menu button:focus-visible
{
    background: var(--bg-hover);
}

.toolbar-menu button.active
{
    color: var(--accent);
    font-weight: 600;
}

.toolbar-menu hr
{
    border: 0;
    border-top: 1px solid var(--border-light);
    margin: 4px 0;
}

/* Quelltext (UC227): ersetzt Kopf und Inhalt durch ein reines Textfeld. */

.mail-source
{
    flex: 1;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 16px 24px;
    border: 0;
    border-radius: 0;
    resize: none;
    background: var(--bg);
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Kontakte: Detail und Formular teilen sich den Detailbereich (UI26); Aufbau wie .detail-panel. */

.contact-view,
.contact-form
{
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

/* Platzhalter für den QR-Code der Authenticator-Einrichtung (UI20, UI28). */

.qr-placeholder
{
    width: 140px;
    height: 140px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 12px;
}

@media (max-width: 700px)
{
    .menu-toggle,
    .detail-close
    {
        display: inline-flex;
    }

    .pane-accounts
    {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 10;
        transform: translateX(-100%);
        transition: transform 0.15s ease;
        width: 80%;
        max-width: 280px;
    }

    .pane-accounts.open
    {
        transform: translateX(0);
    }

    .pane-list
    {
        width: 100%;
    }

    .pane-detail
    {
        display: none;
    }

    .pane-detail.open
    {
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 5;
    }

    .pane-detail.pane-main
    {
        display: flex;
    }
}


/* Info-Karte zu Postfach und Ordner (mailbox.html, Abschnitt 6): erscheint nach 1 s Verweilen
   rechts neben der Navigation; auf Touch-Geräten nach langem Drücken als Blatt von unten. */

.info-card
{
    position: fixed;
    z-index: 50;
    width: 340px;
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    overflow-y: auto;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.16);
    padding: 12px 14px;
    font-size: 13px;
    color: var(--text);
    animation: info-card-in 0.12s ease-out;
}

.info-card[hidden]
{
    display: none;
}

@keyframes info-card-in
{
    from
    {
        opacity: 0;
        transform: translateY(2px);
    }
}

.info-card-head
{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.info-card-title
{
    font-weight: 600;
    font-size: 14px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.info-card-sub
{
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.info-card-stats
{
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    gap: 6px;
    margin-bottom: 10px;
}

.info-card-stats > div
{
    display: flex;
    flex-direction: column;
    background: var(--bg-muted);
    border-radius: 8px;
    padding: 7px 9px;
}

.info-card-stats b
{
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}

.info-card-stats span
{
    color: var(--text-muted);
    font-size: 11px;
}

.info-card-stats .err b
{
    color: #b42318;
}

.info-card-table
{
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

.info-card-table th
{
    color: var(--text-muted);
    font-weight: 400;
    text-align: right;
    padding: 2px 0 4px 8px;
    border-bottom: 1px solid var(--border-light);
}

.info-card-table td
{
    text-align: right;
    padding: 3px 0 3px 8px;
    white-space: nowrap;
}

.info-card-table th:first-child,
.info-card-table td:first-child
{
    text-align: left;
    padding-left: 0;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-card-table .muted-row td
{
    color: var(--text-muted);
}

.info-card-section
{
    border-top: 1px solid var(--border-light);
    padding-top: 8px;
    margin-top: 8px;
}

.info-card-section h4
{
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.info-card-log
{
    list-style: none;
    margin: 0;
    padding: 0;
}

.info-card-log li
{
    display: grid;
    grid-template-columns: 18px auto 1fr auto;
    gap: 6px;
    padding: 2px 0;
    font-size: 12px;
}

.info-card-log .when
{
    color: var(--text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.info-card-log .what
{
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.info-card-log .dur
{
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.info-card-line
{
    display: flex;
    gap: 6px;
    padding: 2px 0;
    font-size: 12px;
}

.info-card .state
{
    display: inline-block;
    width: 18px;
    flex: none;
    text-align: center;
    color: var(--text-muted);
}

.info-card .state.ok
{
    color: #15803d;
}

.info-card .state.err,
.info-card .state.stop
{
    color: #b42318;
}

.info-card-error
{
    margin-top: 8px;
    padding: 7px 9px;
    border-radius: 8px;
    background: #fef3f2;
    color: #b42318;
    font-size: 12px;
}

.info-card-foot
{
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.info-card-foot a
{
    color: var(--accent);
    text-decoration: none;
}

.info-card-close
{
    float: right;
    margin: -4px -4px 0 8px;
    border: none;
    background: var(--bg-muted);
    border-radius: var(--radius-pill);
    width: 28px;
    height: 28px;
    color: var(--text-muted);
}

/* Touch: als Blatt vom unteren Rand, über der aufgeklappten Navigation */

.info-card.sheet
{
    left: 0 !important;
    right: 0;
    top: auto !important;
    bottom: 0;
    width: auto;
    max-width: none;
    max-height: 75vh;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    animation-name: info-sheet-in;
}

@keyframes info-sheet-in
{
    from
    {
        transform: translateY(100%);
    }
}

.pane-accounts [data-info]
{
    -webkit-touch-callout: none;
}
