/* =================================================================
   1. Farben & Themes (Punkt 14)
   -----------------------------------------------------------------
   Alle Farben der Anwendung werden hier zentral festgelegt – einmal
   für das dunkle Design (Standard) und einmal für das helle Design
   («🎨 Design wechseln» → body.light-theme).
   In den Seiten bitte nur noch diese Variablen verwenden, z. B.
   color: var(--text-muted); background: var(--surface-2);
   ================================================================== */
:root {
    --marke-text: #ffffff;      /* billding-Wortmarke: Weiss auf dunklen Farbschemas, Markenblau auf hellen (Punkt 91) */
    /* Flächen */
    --bg-main: #0f1a2f;         /* Seitenhintergrund */
    --bg-sidebar: #1a202c;
    --card-bg: #1a202c;
    --surface: #1a202c;         /* Eingabefelder, Karten-Innenflächen */
    --surface-2: #222b38;       /* abgesetzte Flächen, Tabellenkopf, Hover */
    --surface-3: #2d3748;       /* Menüs, Dropdowns */

    /* Rahmen */
    --border-color: #2d3748;    /* feine Linien */
    --border-strong: #4a5568;   /* Rahmen von Eingabefeldern */

    /* Text */
    --text-main: #e2e8f0;
    --text-strong: #f7fafc;     /* Überschriften */
    --text-muted: #a0aec0;
    --text-faint: #718096;

    /* Akzente & Status */
    --accent: #3182ce;          /* Schaltflächen */
    --accent-hover: #2b6cb0;
    --link: #63b3ed;            /* Links, Kontonummern Soll */
    --success: #48bb78;
    --success-strong: #2f855a;  /* Hintergrund grüner Schaltflächen */
    --danger: #f56565;
    --danger-strong: #c53030;
    --warning: #f6ad55;         /* Kontonummern Haben, Hinweise */
    --warning-strong: #b7791f;
    --neutral-strong: #4a5568;  /* Hintergrund grauer Schaltflächen */
    --on-strong: #ffffff;       /* Text auf farbigen Schaltflächen */

    /* Meldungen */
    --alert-success-bg: rgba(72, 187, 120, 0.12);
    --alert-error-bg: rgba(229, 62, 62, 0.12);
    --alert-warning-bg: rgba(214, 158, 46, 0.12);
    --alert-info-bg: rgba(49, 130, 206, 0.12);

    --shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    --nav-active: #203547;      /* aktiver Menüpunkt */
}

body.light-theme {
    --marke-text: #3D638A;
    --bg-main: #f0f2f5;
    --bg-sidebar: #ffffff;
    --card-bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f7fafc;
    --surface-3: #edf2f7;

    --border-color: #e2e8f0;
    --border-strong: #cbd5e0;

    --text-main: #2d3748;
    --text-strong: #1a202c;
    --text-muted: #4a5568;
    --text-faint: #718096;

    --accent: #3182ce;
    --accent-hover: #2b6cb0;
    --link: #2b6cb0;
    --success: #2f855a;
    --success-strong: #2f855a;
    --danger: #c53030;
    --danger-strong: #c53030;
    --warning: #b7791f;
    --warning-strong: #b7791f;
    --neutral-strong: #718096;
    --on-strong: #ffffff;

    --alert-success-bg: #f0fff4;
    --alert-error-bg: #fff5f5;
    --alert-warning-bg: #fffaf0;
    --alert-info-bg: #ebf8ff;

    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --nav-active: #ebf8ff;
}

/* ---- Grafit: neutrales Dunkelgrau mit Indigo-Akzent ---- */
body.theme-grau {
    --bg-main: #18181b; --bg-sidebar: #232326; --card-bg: #232326;
    --surface: #232326; --surface-2: #2c2c30; --surface-3: #3a3a3f;
    --border-color: #3a3a3f; --border-strong: #52525b;
    --text-main: #e4e4e7; --text-strong: #fafafa; --text-muted: #a1a1aa; --text-faint: #71717a;
    --accent: #6366f1; --accent-hover: #4f46e5; --link: #a5b4fc;
    --success: #4ade80; --success-strong: #16a34a;
    --danger: #f87171; --danger-strong: #dc2626;
    --warning: #fbbf24; --warning-strong: #d97706;
    --neutral-strong: #52525b; --on-strong: #ffffff;
    --alert-success-bg: rgba(74, 222, 128, 0.10); --alert-error-bg: rgba(248, 113, 113, 0.10);
    --alert-warning-bg: rgba(251, 191, 36, 0.10); --alert-info-bg: rgba(99, 102, 241, 0.12);
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.45); --nav-active: #312e81;
}

/* ---- Sand: warmes, helles Papier-Design ---- */
body.theme-sand {
    --marke-text: #3D638A;
    --bg-main: #f5f1ea; --bg-sidebar: #fbf8f3; --card-bg: #fffdf9;
    --surface: #fffdf9; --surface-2: #f3ede3; --surface-3: #ebe3d6;
    --border-color: #e6dccd; --border-strong: #d4c6b1;
    --text-main: #3d342a; --text-strong: #2a231c; --text-muted: #6b5d4f; --text-faint: #8a7b6b;
    --accent: #b45309; --accent-hover: #92400e; --link: #9a3412;
    --success: #3f7d3a; --success-strong: #3f7d3a;
    --danger: #b42318; --danger-strong: #b42318;
    --warning: #a16207; --warning-strong: #a16207;
    --neutral-strong: #8a7b6b; --on-strong: #ffffff;
    --alert-success-bg: #eef6ec; --alert-error-bg: #fbeceb;
    --alert-warning-bg: #fbf3e0; --alert-info-bg: #f8ece2;
    --shadow: 0 4px 12px rgba(61, 52, 42, 0.08); --nav-active: #f3e3c7;
}

/* ---- Wald: dunkles Grün ---- */
body.theme-wald {
    --bg-main: #0f1a14; --bg-sidebar: #16231b; --card-bg: #16231b;
    --surface: #16231b; --surface-2: #1d2e24; --surface-3: #26392d;
    --border-color: #26392d; --border-strong: #3d5747;
    --text-main: #e3efe7; --text-strong: #f4faf6; --text-muted: #9fb8a8; --text-faint: #6f8a79;
    --accent: #2f855a; --accent-hover: #276749; --link: #68d391;
    --success: #68d391; --success-strong: #2f855a;
    --danger: #fc8181; --danger-strong: #c53030;
    --warning: #f6ad55; --warning-strong: #b7791f;
    --neutral-strong: #3d5747; --on-strong: #ffffff;
    --alert-success-bg: rgba(104, 211, 145, 0.10); --alert-error-bg: rgba(252, 129, 129, 0.10);
    --alert-warning-bg: rgba(246, 173, 85, 0.10); --alert-info-bg: rgba(104, 211, 145, 0.08);
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.45); --nav-active: #1f3d2c;
}

/* ---- Hoher Kontrast: Schwarz/Weiss/Gelb, für schlechte Lichtverhältnisse ---- */
body.theme-kontrast {
    --bg-main: #000000; --bg-sidebar: #000000; --card-bg: #000000;
    --surface: #000000; --surface-2: #111111; --surface-3: #1a1a1a;
    --border-color: #777777; --border-strong: #ffffff;
    --text-main: #ffffff; --text-strong: #ffffff; --text-muted: #e5e5e5; --text-faint: #cccccc;
    --accent: #ffd400; --accent-hover: #ffea00; --link: #ffd400;
    --success: #5cff5c; --success-strong: #5cff5c;
    --danger: #ff6b6b; --danger-strong: #ff6b6b;
    --warning: #ffd400; --warning-strong: #ffd400;
    --neutral-strong: #cccccc; --on-strong: #000000;   /* schwarze Schrift auf hellen Schaltflächen */
    --alert-success-bg: #001a00; --alert-error-bg: #1a0000;
    --alert-warning-bg: #1a1500; --alert-info-bg: #1a1500;
    --shadow: none; --nav-active: #333333;
}

/* =================================================================
   2. Base & Typography
   ================================================================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}
/* 1. Der Haupt-Container füllt exakt den Bildschirm und verhindert das globale Scrollen */
body, .app-layout {
    margin: 0;
    height: 100vh;
    overflow: hidden; /* Verhindert den Standard-Scrollbalken des gesamten Fensters */
    display: flex;
    flex-direction: row;
}

/* 2. Die Navigation bleibt starr und scrollt nicht mit */
.app-navigation {
    flex-shrink: 0;
    height: 100vh;
    overflow-y: auto;
}

/* 3. Nur der Main-Bereich scrollt */
.app-main {
    flex-grow: 1;
    height: 100vh;
    overflow-y: auto;
    box-sizing: border-box;
}
h1, h2, h3 {
    color: var(--text-strong);
    margin-top: 0;
}
h1, h2 {
    font-size: 22px;
}
h3 {
    font-size: 16px;
}
a {
    color: var(--link);
}

.wrapper {
    width:100% !important;
    margin: 0 auto;
}


/* =================================================================
   3. Layout & Structure
   ================================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

.app-sidebar-left {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 0 20px 30px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-shrink: 0;
    /* Fest am Fenster: Abmelden/Design bleiben immer sichtbar, Menü scrollt bei Bedarf selbst */
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.app-main {
    flex: 1 1 auto;
    width: calc(100vw - 260px) !important;
    max-width: none !important;
    padding: 40px;
    padding-top: 0;
    overflow-y: auto;
    box-sizing: border-box;
}
@media (max-width: 768px) {
    .app-main {
        width: 100% !important;
        padding: 15px;
        padding-top: 0;
    }
}
/* 📌 Navigation fixieren – nur im Design «Fokus» (design-fokus.css), sonst ausgeblendet */
.nav-pin-wrap { display: none; }
/* Themenleiste aus-/einblenden – nur im Design «Register» (design-register.css), sonst ausgeblendet */
.rg-leiste-schalter { display: none; }

/* Volle Breite auch bei wenig Inhalt (sonst rutscht z. B. die Leiste oben rechts auf dem Handy nach links) */
.app-container { flex: 1 1 auto; min-width: 0; }

/* -----------------------------------------------------------------
   Globale Leiste oben rechts (public/index.php, erstes Element in <main>):
   Name, Rolle, 👤 → Benutzer, Ein/Aus-Symbol → Abmelden. Scrollt mit.
   «Klassisch»: eigene Zeile über dem Titel, bündig oben rechts.
   «Modern»/«Fokus»: in der Ecke neben dem Titel (design-modern.css).
   ----------------------------------------------------------------- */
.global-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    margin: 0 -40px 16px auto; /* bis an den rechten Rand (.app-main hat 40px Abstand) */
    padding: 8px 16px 8px 18px;
    background: var(--card-bg);
    border-left: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border-bottom-left-radius: 8px;
}
.global-bar form { margin: 0; display: flex; }
.global-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    text-decoration: none;
}
/* Name und Rolle oben im Benutzer-Menü (seit 18.11.2026 nicht mehr in der Leiste) */
.global-menu-kopf { display: flex; flex-direction: column; line-height: 1.25; padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.global-menu-kopf strong { font-size: 14px; color: var(--text-strong); }
.global-menu-kopf small { font-size: 12px; color: var(--text-muted); }
.global-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 17px;
    line-height: 1;
    background: var(--surface-2);
    transition: background 0.15s ease;
}
.global-icon.active,
.global-user:hover .global-icon,
.global-menu[open] .global-icon { background: var(--nav-active); }
/* Benutzer-Menü (Punkt 56): Klick auf Name/👤 öffnet Mein Profil und Einstellungen */
.global-menu { position: relative; }
.global-menu > summary { list-style: none; cursor: pointer; }
.global-menu > summary::-webkit-details-marker { display: none; }
/* unsichtbare Brücke über die Lücke zum Namen, damit das Menü beim Hinüberfahren offen bleibt */
.global-menu-liste::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.global-menu-liste {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 200; min-width: 190px; padding: 6px;
    background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}
.global-menu-liste a {
    display: block; padding: 9px 12px; border-radius: 8px; color: var(--text-main); text-decoration: none; font-size: 14px; white-space: nowrap;
}
.global-menu-liste a:hover, .global-menu-liste a.active { background: var(--nav-active); color: var(--text-strong); }
.global-bar button.global-logout,
.global-bar button.global-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    background: transparent;
    color: var(--text-main);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.global-bar button.global-logout svg,
.global-bar button.global-search svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
}
.global-bar button.global-search { border-color: var(--border-color); }
.global-bar button.global-search:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--alert-info-bg);
}
.global-bar button.global-logout:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--alert-error-bg);
}
@media (max-width: 768px) {
    /* Handy: ohne Name/Rolle; Höhe wie der Menü-Knopf links */
    .global-bar { margin-right: -15px; padding: 8px 12px; gap: 10px; }
}

/* =================================================================
   4. Navigation & Sidebar Items
   ================================================================== */
.nav-item {
    margin-bottom: 8px;
}
/* Firmen-Kopf in der Navigation – voll nur im Design «Modern» (css/design-modern.css).
   In «Klassisch» erscheint nur ein hochgeladenes Firmenlogo (Einstellungen → Firmendaten). */
.nav-brand { display: none; }
body:not(.design-modern) .nav-brand.has-logo { display: block; text-align: center; padding: 6px 0 14px; }
body:not(.design-modern) .nav-brand.has-logo .nav-brand-text { display: none; }
body:not(.design-modern) .nav-brand.has-logo img { display: inline-block; max-width: 100%; max-height: 70px; object-fit: contain; }
/* Vorschau in den Einstellungen */
.bg-preview { display: block; width: 320px; max-width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-strong); }
.logo-preview { max-width: 220px; max-height: 90px; object-fit: contain; padding: 8px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--bg-main); }

.nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-main);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 6px;
    background: var(--surface-2);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.nav-link:hover,
.nav-link.active {
    background: var(--nav-active);
    color: var(--text-strong);
}

.submenu {
    display: none;
    padding-left: 15px;
    margin-top: 6px;
    border-left: 2px solid var(--border-color);
}

.submenu.open {
    display: block;
}

.submenu a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.submenu a:hover,
.submenu a.active {
    color: var(--text-strong);
    background: var(--surface-3);
}

/* Legacy Top Nav (falls noch verwendet) */
nav {
    background: var(--surface);
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    border: 1px solid var(--border-color);
}
nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    padding: 12px 14px;
    border-radius: 6px;
    text-align: center;
    transition: all 0.2s;
    white-space: nowrap;
}
nav a:hover, nav a.active {
    color: var(--on-strong);
    background: var(--accent);
}

/* =================================================================
   5. Cards & Grids
   ================================================================== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    width: fit-content;
    min-width: 100%;
    overflow: visible !important;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid var(--accent);
}
.kpi-card.green { border-left-color: var(--success); }
.kpi-card.orange { border-left-color: var(--warning); }
.kpi-title { font-size: 13px; color: var(--text-muted); text-transform: uppercase; font-weight: 600; margin-bottom: 8px; }
.kpi-value { font-size: 24px; font-weight: 700; color: var(--text-strong); }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* =================================================================
   6. Forms & Inputs
   (Eingabefelder brauchen KEINE eigenen style-Angaben mehr)
   ================================================================== */
.form-group {
    margin-bottom: 20px;
}
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 14px;
}
input[type="text"],
input[type="date"],
input[type="number"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text-main);
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
}
input[type="file"] {
    width: 100%;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text-main);
    border-radius: 6px;
}
input[type="checkbox"] {
    width: auto;
}
input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    outline: none;
}
.account-select {
    padding: 6px 10px;
    background: var(--surface);
    color: var(--text-main);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    font-size: 13px;
    width: 100%;
    margin-bottom: 5px;
}

/* =================================================================
   7. Buttons & Actions
   ================================================================== */
button {
    background: var(--accent);
    color: var(--on-strong);
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    font-family: inherit;
}
button:hover {
    background: var(--accent-hover);
}
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-secondary { background: var(--neutral-strong); margin-right: 10px; }
.btn-success { background: var(--success-strong); }
.btn-success:hover { background: #276749; }
.btn-danger { background: var(--danger-strong); }
.btn-action {
    display: inline-block;
    background: var(--accent);
    color: var(--on-strong);
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: background 0.2s;
}
.btn-action:hover { background: var(--accent-hover); }

/* =================================================================
   8. Tables, Badges & Alerts
   ================================================================== */
table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin-top: 15px;
}
th, td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    font-size: 14px;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
th {
    background: var(--surface-2);
    color: var(--text-strong);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}
th:hover {
    background: var(--surface-2);
    color: var(--accent);
}
tr:hover {
    background: var(--surface-2);
}
tfoot tr { background: var(--surface-2); }
tfoot td { border-top: 2px solid var(--border-strong); font-weight: bold; }

.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}
.badge-manual { background: #44337a; color: #e9d8fd; border: 1px solid #6b46c1; }
.badge-zwischengespeichert { background: #744210; color: #feebc8; border: 1px solid #b7791f; }
.badge-exportiert { background: #2b6cb0; color: #ebf8ff; border: 1px solid #3182ce; }
.badge-bezahlt { background: #22543d; color: #c6f6d5; border: 1px solid #38a169; }

/* Meldungen – Farben passen sich dem Design an */
.alert-success,
.alert-error,
.alert-warning,
.alert-info {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid;
}
.alert-success { background: var(--alert-success-bg) !important; color: var(--success) !important; border-color: var(--success) !important; }
.alert-error   { background: var(--alert-error-bg) !important;   color: var(--danger) !important;  border-color: var(--danger) !important; }
.alert-warning { background: var(--alert-warning-bg) !important; color: var(--warning) !important; border-color: var(--warning) !important; }
.alert-info    { background: var(--alert-info-bg) !important;    color: var(--link) !important;    border-color: var(--accent) !important; }

/* Hilfsklassen für Text */
.text-muted   { color: var(--text-muted); }
.text-faint   { color: var(--text-faint); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-link    { color: var(--link); }
.text-right   { text-align: right; }
.text-small   { font-size: 12px; }

/* =================================================================
   9. Special Components (Scanner, Rows, Sticky Bar, Dropdown)
   ================================================================== */
.scanner-box { background: var(--surface-2); padding: 15px; border-radius: 8px; margin-bottom: 20px; border: 1px solid var(--border-strong); }
#reader { width: 100%; max-width: 400px; margin: 15px auto; border-radius: 6px; overflow: hidden; }

.pendenz-row.selectable-row {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease;
}
.pendenz-row.selectable-row:hover {
    background-color: rgba(236, 201, 75, 0.12) !important;
}
.pendenz-row.selectable-row.selected-row {
    background-color: rgba(214, 158, 46, 0.35) !important;
}
.select-icon {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-muted);
}
.selected-row .select-icon {
    color: #ecc94b;
}

.sticky-action-bar {
    position: sticky;
    top: 10px;
    z-index: 100;
    background: var(--surface) !important;
    border: 1px solid var(--warning-strong) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.2s ease;
}
.sticky-action-bar.is-fixed {
    position: fixed;
    top: 10px;
    width: var(--bar-width, 100%);
    z-index: 9999;
}

.dropdown {
    position: relative;
    display: inline-block;
}
.dropbtn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
}
.dropbtn:hover {
    background: var(--surface-3);
    color: var(--text-strong);
}
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--surface-3);
    min-width: 140px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.3);
    z-index: 10;
    border-radius: 4px;
    border: 1px solid var(--border-strong);
    overflow: hidden;
}
.dropdown-content a {
    color: var(--text-main);
    padding: 10px 14px;
    text-decoration: none;
    display: block;
    font-size: 13px;
}
.dropdown-content a:hover {
    background-color: var(--border-strong);
    color: var(--text-strong);
}
.dropdown:hover .dropdown-content {
    display: block;
}
/* Alle Einträge im Aktions-Menü einheitlich links (Zelle ist rechtsbündig) */
.dropdown-content,
.dropdown-content a {
    text-align: left;
}

/* Löschen-Button im Dropdown (Formular statt Link, wegen CSRF-Schutz) */
.dropdown-content .dropdown-delete-btn {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: var(--danger);
    padding: 10px 14px;
    font-size: 13px;
    font-weight: normal;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}
.dropdown-content .dropdown-delete-btn:hover {
    background-color: var(--border-strong);
}
/* gleiche Schaltfläche ohne Rot, z. B. «Übermittlung zurücknehmen» (Punkt 73) */
.dropdown-content .dropdown-delete-btn.neutral { color: var(--text-main); white-space: nowrap; }

/* =================================================================
   10. Mobile Menu & Responsive Media Queries
   ================================================================== */
.hamburger-btn {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    padding: 10px;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.hamburger-btn .bar {
    width: 22px;
    height: 2px;
    background-color: var(--text-main);
    transition: all 0.3s ease;
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 999;
}

.nav-overlay.active {
    display: block;
}

@media (max-width: 1024px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    nav { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: flex !important;
    }

    .app-sidebar-left {
        position: fixed !important;
        top: 0 !important;
        left: -280px !important;
        width: 260px !important;
        height: 100vh !important;
        z-index: 1000 !important;
        background: var(--bg-sidebar) !important;
        transition: left 0.3s ease-in-out !important;
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.5);
        overflow-y: auto;
    }

    .app-sidebar-left.mobile-open {
        left: 0 !important;
    }

    .hamburger-btn.active .bar:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    .hamburger-btn.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger-btn.active .bar:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}

@media (max-width: 600px) {
    .kpi-grid { grid-template-columns: 1fr; }
}

/* Hilfsklassen */
.text-nowrap { white-space: nowrap; }
@media (min-width: 769px) {
    .nav-overlay {
        display: none !important;
        backdrop-filter: none !important;
    }
}
/* --- Responsive Tabellen-Optimierung für Mobilgeräte --- */
@media (max-width: 768px) {
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .journal-table, .journal-table tbody, .journal-table tr, .journal-table td {
        display: block;
        width: 100%;
    }

    .journal-table thead {
        display: none;
    }

    .journal-table tr {
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 12px;
        background: var(--card-bg) !important;
        position: relative;
    }

    .journal-table td {
        text-align: right !important;
        padding: 6px 0;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .journal-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--text-muted);
        text-align: left;
    }

    .journal-table td:last-child {
        border-bottom: none;
    }
}

/* =================================================================
   11. Hilfsklassen (Punkt 14, Stufe 2) – ersetzen frühere style="…"-Angaben.
   Jede Klasse enthält genau eine Angabe, z. B. .p-10 = 10px Innenabstand,
   .mb-15 = 15px Abstand unten, .fs-12 = Schriftgrösse 12px.
   Bewusst am Ende der Datei, damit sie allgemeine Regeln übersteuern.
   ================================================================== */
.bg-accent { background: var(--accent); }
.bg-danger { background: var(--danger-strong); }
.bg-neutral { background: var(--neutral-strong); }
.bg-success { background: var(--success-strong); }
.bg-surface { background: var(--surface); }
.bg-surface-2 { background: var(--surface-2); }
.bg-surface-3 { background: var(--surface-3); }
.bg-transparent { background: transparent; }
.border { border: 1px solid var(--border-color); }
.border-0 { border: none; }
.border-b { border-bottom: 1px solid var(--border-color); }
.border-b-strong { border-bottom: 1px solid var(--border-strong); }
.border-collapse { border-collapse: collapse; }
.border-strong { border: 1px solid var(--border-strong); }
.border-t2-strong { border-top: 2px solid var(--border-strong); }
.border-t-strong { border-top: 1px solid var(--border-strong); }
.c-main { color: var(--text-main); }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-auto-180 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.cols-auto-200 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.cols-auto-220 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.c-on-strong { color: var(--on-strong); }
.d-block { display: block; }
.d-inline { display: inline; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-inline-block { display: inline-block; }
.flex-wrap { flex-wrap: wrap; }
.fs-11 { font-size: 11px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
.fs-15 { font-size: 15px; }
.fs-16 { font-size: 16px; }
.fs-18 { font-size: 18px; }
.fs-20 { font-size: 20px; }
.fs-22 { font-size: 22px; }
.fs-24 { font-size: 24px; }
.fs-28 { font-size: 28px; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-bold { font-weight: bold; }
.fw-normal { font-weight: normal; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-15 { gap: 15px; }
.gap-2 { gap: 2px; }
.gap-20 { gap: 20px; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.grow { flex-grow: 1; }
.italic { font-style: italic; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.m-0 { margin: 0; }
.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.mb-25 { margin-bottom: 25px; }
.mb-30 { margin-bottom: 30px; }
.mb-5 { margin-bottom: 5px; }
.mb-6 { margin-bottom: 6px; }
.mb-8 { margin-bottom: 8px; }
.ml-10 { margin-left: 10px; }
.mt-12 { margin-top: 12px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mt-4 { margin-top: 4px; }
.mt-5 { margin-top: 5px; }
.mt-8 { margin-top: 8px; }
.mt-auto { margin-top: auto; }
.mx-auto { margin: 0 auto; }
.no-underline { text-decoration: none; }
.overflow-x-auto { overflow-x: auto; }
/* seitlich scrollen nur auf schmalen Bildschirmen – breit bleiben Menüs (⋮) in der Tabelle sichtbar (Punkt 71) */
@media (max-width: 768px) { .overflow-x-mobil { overflow-x: auto; } }
.p-0 { padding: 0; }
.w-auto { width: auto !important; }
.p-10 { padding: 10px; }
.p-12 { padding: 12px; }
.p-15 { padding: 15px; }
.p-20 { padding: 20px; }
.p-25 { padding: 25px; }
.p-30 { padding: 30px; }
.p-6 { padding: 6px; }
.p-8 { padding: 8px; }
.pb-8 { padding-bottom: 8px; }
.pointer { cursor: pointer; }
.pt-15 { padding-top: 15px; }
.pt-20 { padding-top: 20px; }
.rounded-10 { border-radius: 10px; }
.rounded-4 { border-radius: 4px; }
.rounded-6 { border-radius: 6px; }
.rounded-8 { border-radius: 8px; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.uppercase { text-transform: uppercase; }
.w-100 { width: 100%; }

/* Ergänzung (Aufräumen Inline-Stile): Innenabstände oben/unten + links/rechts, z. B. .p-10-20 = padding: 10px 20px */
.p-2-8   { padding: 2px 8px; }
.p-5-10  { padding: 5px 10px; }
.p-8-14  { padding: 8px 14px; }
.p-10-14 { padding: 10px 14px; }
.p-10-15 { padding: 10px 15px; }
.p-10-16 { padding: 10px 16px; }
.p-6-12 { padding: 6px 12px; }
.p-10-20 { padding: 10px 20px; }
.p-15-20 { padding: 15px 20px; }
.px-15   { padding: 0 15px; }
.mb-4  { margin-bottom: 4px; }
.mt-10 { margin-top: 10px; }
.mt-30 { margin-top: 30px; }
.bg-warning { background: var(--warning-strong); }
.mono { font-family: monospace; }
.pos-relative { position: relative; }
.no-marker { list-style: none; }
.no-marker::-webkit-details-marker { display: none; }
.cols-2-1     { grid-template-columns: 2fr 1fr; }
.cols-1-2-2   { grid-template-columns: 1fr 2fr 2fr; }
.cols-2-1-2   { grid-template-columns: 2fr 1fr 2fr; }
.cols-2-1-2-1 { grid-template-columns: 2fr 1fr 2fr 1fr; }
.cols-2-1-1   { grid-template-columns: 2fr 1fr 1fr; }
/* Formularzeile: auf dem Handy Felder untereinander */
@media (max-width: 768px) { .form-row { grid-template-columns: 1fr; } }

/* Karten: farbiger Rand links (Kennzahlen) bzw. ringsum, und Karten als Link */
.accent-success { border-left: 4px solid var(--success); }
.accent-danger  { border-left: 4px solid var(--danger); }
.accent-link    { border-left: 4px solid var(--link); }
.accent-warning { border-left: 4px solid var(--warning); }
.outline-link    { border: 1px solid var(--link); }
.outline-warning { border: 1px solid var(--warning-strong); }
.card-link { text-decoration: none; color: inherit; }
.page-subtitle { color: var(--text-muted); margin-bottom: 20px; }


/* =================================================================
   12. Passwort anzeigen / verbergen (script/passwort.js)
   ================================================================= */
.pw-wrap { position: relative; display: block; }
.pw-wrap.pw-wrap-inline { display: inline-block; vertical-align: middle; }
.pw-wrap input { padding-right: 40px !important; }
.pw-wrap .pw-toggle {
    position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
    width: 32px; height: 32px; margin: 0; padding: 0;
    display: flex; align-items: center; justify-content: center;
    background: transparent; color: var(--text-muted);
    border: none; border-radius: 4px; cursor: pointer;
}
.pw-wrap .pw-toggle:hover { background: transparent; color: var(--text-main); }
.pw-wrap .pw-toggle[aria-pressed="true"] { color: var(--accent); }


/* =================================================================
   13. Bankabstimmung (seiten/abstimmung.php)
   ================================================================= */
.abst-table { width: 100%; table-layout: auto; border-collapse: collapse; font-size: 13px; margin-top: 0; }
.abst-table th { text-align: left; color: var(--text-muted); background: transparent; font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border-strong); cursor: default; }
.abst-table td { padding: 6px 8px; border-bottom: 1px solid var(--border-color); vertical-align: top; font-size: 13px; }
.abst-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.abst-table.mw-720 { max-width: 720px; }
.abst-scroll { overflow-x: auto; }
.abst-check { border: 1px solid var(--border-color); border-radius: 6px; margin-bottom: 10px; }
.abst-check > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; list-style: none; display: flex; gap: 10px; align-items: center; }
.abst-check > summary::-webkit-details-marker { display: none; }
.abst-check[open] > summary { border-bottom: 1px solid var(--border-color); }
.abst-check .body { padding: 10px 14px; }
.abst-hit  { border-left: 4px solid var(--danger); }
.abst-warn { border-left: 4px solid var(--warning); }
.abst-badge { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: var(--surface-3); }
.abst-unmatched td { color: var(--danger); font-weight: 600; }
.abst-shifted td { color: var(--warning); }
.abst-day { border: 1px solid var(--border-color); border-radius: 6px; padding: 12px 14px; margin-bottom: 12px; }
.abst-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }

/* Saldo-Tabelle auf der Seite «Bank» */
.saldo-table { max-width: 520px; width: 100%; table-layout: auto; margin-top: 0; }


/* =================================================================
   14. QR-Scanner (seiten/zahlungen.php) – Sichtbarkeit steuert buchhaltung.js
   ================================================================= */
.qr-frame { width: 320px; max-width: 100%; height: 200px; position: relative; overflow: hidden; background: #000; box-shadow: 0 4px 12px rgba(0,0,0,0.6); }
.qr-video { height: 100%; object-fit: cover; }
.qr-target { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 160px; height: 160px; pointer-events: none; border: 1px dashed rgba(255,255,255,0.4); }
.qr-corner { position: absolute; width: 16px; height: 16px; }
.qr-corner.tl { top: 0;    left: 0;  border-top: 3px solid #fff;    border-left: 3px solid #fff; }
.qr-corner.tr { top: 0;    right: 0; border-top: 3px solid #fff;    border-right: 3px solid #fff; }
.qr-corner.bl { bottom: 0; left: 0;  border-bottom: 3px solid #fff; border-left: 3px solid #fff; }
.qr-corner.br { bottom: 0; right: 0; border-bottom: 3px solid #fff; border-right: 3px solid #fff; }

/* Adress-Vorschläge unter dem Suchfeld (seiten/zahlungen.php) */
.autocomplete-list { position: absolute; top: 100%; left: 15px; right: 15px; border: 1px solid var(--accent); max-height: 220px; overflow-y: auto; z-index: 1000; box-shadow: 0 8px 16px rgba(0,0,0,0.3); }
/* =================================================================
   Monatsgrafik Ertrag / Aufwand (Dashboard) – SVG aus src/MonatsGrafik.php
   Nur Farben/Schrift hier, die Geometrie steht im SVG. Farben aus dem Farbschema.
   ================================================================= */
.chart-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 20px; margin-bottom: 30px; }
.chart-cards > .card { margin-bottom: 0; }
.chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 10px; }
.chart-head h3 { margin: 0; }
.chart-sum { font-size: 13px; color: var(--text-muted); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; }
.chart-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.chart-legend .lg-ertrag::before  { background: var(--success); }
.chart-legend .lg-aufwand::before { background: var(--danger); }
.chart-legend .lg-result::before  { background: var(--link); width: 14px; height: 3px; border-radius: 2px; vertical-align: 3px; }
.chart-svg { display: block; width: 100%; height: auto; }
.chart-grid { stroke: var(--border-color); stroke-width: 1; }
.chart-zero { stroke: var(--border-strong); stroke-width: 1; }
.chart-axis { fill: var(--text-muted); font-size: 12px; }
.chart-axis-year { fill: var(--text-faint); font-size: 10.5px; }
.chart-empty { fill: var(--text-muted); font-size: 13px; }
.chart-ertrag  { fill: var(--success); }
.chart-aufwand { fill: var(--danger); }
.chart-result-line { fill: none; stroke: var(--link); stroke-width: 2; stroke-linejoin: round; pointer-events: none; }
.chart-result-dot { fill: var(--card-bg); stroke: var(--link); stroke-width: 2; pointer-events: none; }
.chart-hit { fill: transparent; transition: fill 0.15s ease; }
.chart-slot { cursor: pointer; }
.chart-slot:hover .chart-hit,
.chart-slot:focus-visible .chart-hit { fill: var(--surface-2); }
.chart-slot:focus { outline: none; }
.chart-future .chart-axis { opacity: 0.45; }

/* =================================================================
   Schnellsuche (Strg+K) – public/script/schnellsuche.js
   ================================================================= */
.cmdk-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 12vh 16px 16px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
}
.cmdk-backdrop[hidden] { display: none; }
.cmdk {
    width: min(640px, 100%);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.cmdk-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border-color); }
.cmdk-glass { font-size: 16px; opacity: 0.7; }
.cmdk .cmdk-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-strong);
    font-size: 17px;
    padding: 6px 0;
    box-shadow: none;
}
.cmdk-kbd, .cmdk-foot span {
    font-size: 11px;
    color: var(--text-muted);
}
.cmdk-kbd { border: 1px solid var(--border-strong); border-radius: 4px; padding: 1px 6px; }
.cmdk-list { overflow-y: auto; padding: 6px 8px 10px; overscroll-behavior: contain; }
.cmdk-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); padding: 10px 8px 4px; }
.cmdk-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--text-main);
    text-decoration: none;
}
.cmdk-item.is-active { background: var(--nav-active); color: var(--text-strong); }
.cmdk-icon { flex: 0 0 auto; }
.cmdk-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.cmdk-sub { flex: 0 1 auto; font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.cmdk-empty { padding: 14px 10px; color: var(--text-muted); font-size: 13px; }
.cmdk-foot { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 8px 16px; border-top: 1px solid var(--border-color); background: var(--surface-2); }
body.cmdk-open { overflow: hidden; }
@media (max-width: 768px) {
    .cmdk-backdrop { padding-top: 64px; }
    .cmdk-sub, .cmdk-foot { display: none; }
}

/* =================================================================
   Belege (seiten/belege.php, 📎 im Journal)
   ================================================================= */
.beleg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.beleg-card { display: flex; flex-direction: column; border: 1px solid var(--border-color); border-radius: 8px; overflow: visible; background: var(--surface); }   /* visible: ⋮-Menü darf über den Rand */
.beleg-thumb { display: flex; align-items: center; justify-content: center; height: 150px; background: var(--surface-2); text-decoration: none; overflow: hidden; border-radius: 8px 8px 0 0; }
.beleg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.beleg-pdf { font-size: 54px; }
.beleg-info { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; min-width: 0; }
.beleg-name { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.beleg-actions { display: flex; justify-content: flex-end; align-items: center; margin-top: 4px; }
.beleg-badge { display: inline-block; margin-left: 6px; font-size: 12px; text-decoration: none; white-space: nowrap; }

/* =================================================================
   Dashboard: Kennzahlen-Kacheln (seiten/dashboard.php)
   Spalten nach der Breite des Inhaltsbereichs (Container-Abfrage) – passt so in
   «Klassisch» (breite Navigation), «Fokus» (schmale Leiste) und fixierter Leiste gleich:
   5 nebeneinander, sonst 3 + 2, schmal 2 + 2 + 1, Handy untereinander.
   ================================================================= */
.dash-kpis-wrap { container-type: inline-size; }
.dash-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.dash-kpis > .card { min-width: 0; width: auto; margin-bottom: 0 !important; } /* .card ist sonst fit-content; Abstand regelt gap */
/* sechs Kacheln (Modul Rechnungen eingeschaltet): alle in einer Zeile, sonst 3 + 3 (Wunsch Benutzer) */
.dash-kpis:has(> :nth-child(6)) { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
@container (max-width: 1240px) { .dash-kpis:has(> :nth-child(6)) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 1040px) { .dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 640px)  { .dash-kpis, .dash-kpis:has(> :nth-child(6)) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
@container (max-width: 400px)  { .dash-kpis, .dash-kpis:has(> :nth-child(6)) { grid-template-columns: 1fr; } }

/* =================================================================
   Rechnungs-Editor (seiten/rechnung.php, public/script/rechnung.js)
   ================================================================= */
.rg-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.cols-rg { grid-template-columns: 1fr 1fr; }
@media (max-width: 1000px) { .cols-rg { grid-template-columns: 1fr; } }
/* Aufbau wie im CMS des Benutzers (Punkt 38): Reiter, Kopf mit drei Boxen, Positionszeilen, Symbolleiste rechts */
.rg-editor { display: block; }   /* früher mit Symbolleiste rechts (Punkt 48) – seit Punkt 99 ⋮-Menü bei den Reitern, Editor volle Breite */
.rg-haupt { min-width: 0; }
.rg-tabs { display: flex; flex-wrap: wrap; gap: 4px; position: relative; z-index: 2; margin-bottom: -1px; align-items: flex-end; }
/* Speichern + ⋮-Menü rechts neben den Reitern (Punkt 99) */
/* Sticky-Halter ohne Höhe vor den Reitern: das ⋮ steht rechts in der Reiterzeile und läuft beim Scrollen am rechten
   Rand der Box mit (über dem Innenabstand der Box, deckt keine Eingabefelder ab) */
.rg-aktionen { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); height: 0; z-index: 5; display: flex; justify-content: flex-end; }
.rg-aktionen .dropbtn { font-size: 24px; line-height: 1; padding: 5px 4px 5px 12px; margin-right: -4px; }   /* bündig am rechten Rand der Box */
.rg-aktionen .dropdown-content { min-width: 230px; white-space: nowrap; }
.rg-aktionen .dropdown:focus-within .dropdown-content { display: block; }
.rg-tab, .rg-tab:hover {
    background: var(--surface-2) !important;
    color: var(--link) !important;
    border: 1px solid var(--border-color) !important;
    border-bottom-color: transparent !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 7px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
}
.rg-tab.active, .rg-tab.active:hover { background: var(--accent) !important; color: var(--on-strong) !important; border-color: var(--accent) !important; }
.rg-panel { border-top-left-radius: 0 !important; }
/* Reiter auf einer Seite (Einstellungen, Punkt 46) – ausgeblendete Bereiche sicher verbergen (auch wenn .card display setzt) */
[data-reiter-bereich][hidden] { display: none !important; }
/* Reiter sitzen bündig auf der ersten sichtbaren Karte (wie im Rechnungs-Editor); die Karte bekommt per JS .reiter-erste */
.seiten-reiter { margin-bottom: -1px; }
.reiter-erste { border-top-left-radius: 0 !important; }

/* Adresskartei (Punkt 51): kleine Symbol-Knöpfe in der Zeile, versteckte Zeilen der Suche */
.adr-aktion, .adr-aktion:hover {
    display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-left: 4px; vertical-align: middle;
    border: 1px solid var(--border-color); border-radius: 8px; background: var(--surface-2); text-decoration: none; font-size: 15px;
}
.adr-aktion:hover { border-color: var(--accent); background: var(--card-bg); }
tr[hidden] { display: none !important; }
.adr-suche { flex: 1 1 260px; width: auto !important; min-width: 0; }

/* Fenster «Per E-Mail senden» (Punkt 44, Knopf ✉️ in der Symbolleiste der Rechnung) */
.rg-dialog {
    width: min(520px, calc(100vw - 32px));
    padding: 22px 24px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--card-bg);
    color: var(--text-main);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.rg-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.rg-dialog h2 { margin-top: 0; padding-right: 30px; }
.rg-dialog-zu { position: absolute; top: 12px; right: 14px; margin: 0; }
.rg-dialog-zu button { color: var(--text-muted); }

.rg-kopf { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }   /* Adresse | Rechnung (inkl. Konto, Wiederkehrend) */
.rg-box { border: 1px solid var(--border-color); border-radius: 8px; padding: 10px 12px; background: var(--surface); min-width: 0; }
.rg-adressblock { cursor: pointer; padding: 6px 4px 2px; line-height: 1.5; font-size: 15px; color: var(--text-strong); min-height: 62px; }
fieldset:disabled .rg-adressblock { cursor: default; }
.rg-adressfelder { margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--border-color); }
.rg-icon-btn, .rg-icon-btn:hover {
    background: transparent !important; border: 0 !important; padding: 2px 4px !important; font-size: 14px !important;
    box-shadow: none !important; filter: none !important; transform: none !important; cursor: pointer;
}
.rg-suche { margin: 6px 0; }
.rg-suche input[type="search"] {
    width: 100%; padding: 8px 10px; border: 1px solid var(--accent); border-radius: 6px;
    background: var(--surface); color: var(--text-main); font: inherit; font-size: 14px;
}
.rg-treffer { list-style: none; margin: 4px 0 0; padding: 0; max-height: 280px; overflow-y: auto; border: 1px solid var(--border-color); border-radius: 6px; background: var(--card-bg); }
.rg-treffer button, .rg-treffer button:hover {
    display: block; width: 100%; text-align: left;
    background: transparent !important; color: var(--text-main) !important;
    border: 0 !important; border-bottom: 1px solid var(--border-color) !important; border-radius: 0 !important;
    padding: 7px 10px !important; font-size: 14px !important; font-weight: 400 !important;
    box-shadow: none !important; filter: none !important; transform: none !important;
}
.rg-treffer button:hover, .rg-treffer button:focus-visible { background: var(--surface-2) !important; }
.rg-zeile { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.rg-zeile label { margin: 0 !important; white-space: nowrap; font-size: 14px !important; }
.rg-zeile input, .rg-zeile select { width: auto !important; max-width: 62%; padding: 6px 8px !important; font-size: 14px !important; }

/* Positionen: Pos | Menge | Produkt | Rabatt | Einzelpreis | Summe | ⋮ (verborgene Felder sind keine Gitterelemente) */
.rg-pos-kopf, .rg-row { display: grid; grid-template-columns: 30px 76px minmax(0, 1fr) 76px 104px 104px 34px; gap: 8px; align-items: start; }
.rg-pos-kopf { font-size: 13px; color: var(--text-muted); font-weight: 600; padding: 6px 0; border-bottom: 1px solid var(--border-strong); }
.rg-row { padding: 12px 0; border-bottom: 1px solid var(--border-color); }
.rg-row input, .rg-row textarea, .rg-row select { margin: 0; font-size: 14px !important; padding: 7px 9px !important; }
.rg-row textarea { margin-top: 6px; resize: vertical; min-height: 52px; }
/* Beschreibung eigene Zeile von «Produkt» bis «Summe» (Punkt 99) */
.rg-row > .rg-beschr { grid-column: 3 / 7; grid-row: 2; margin-top: 0; }
.rg-nr { padding-top: 8px; color: var(--text-muted); }
.rg-num { text-align: right; }
.rg-betrag { display: block; padding: 8px 9px; font-weight: 600; white-space: nowrap; }
.rg-breit, .rg-seite { grid-column: 2 / 7; }
.rg-seite { text-align: center; color: var(--text-muted); font-size: 13px; padding: 6px; background: var(--surface-2); border-radius: 6px; }
.rg-row[data-art="text"] { background: var(--surface-2); border-radius: 6px; }
.rg-titel { font-weight: 600; }
.rg-menu { position: relative; }
.rg-menu > summary { list-style: none; cursor: pointer; font-size: 20px; line-height: 1; padding: 6px 4px; color: var(--text-muted); border-radius: 6px; text-align: center; }
.rg-menu > summary::-webkit-details-marker { display: none; }
.rg-menu > summary:hover, .rg-menu[open] > summary { background: var(--surface-2); color: var(--text-strong); }
.rg-menu-inhalt {
    position: absolute; right: 0; top: 100%; z-index: 20; width: 300px;
    background: var(--card-bg); border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow);
    padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.rg-menu-inhalt label { display: flex; flex-direction: column; gap: 4px; font-size: 13px !important; margin: 0 !important; }
fieldset:disabled .rg-menu { visibility: hidden; }


@media (max-width: 1100px) {
    .rg-kopf { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .rg-kopf { grid-template-columns: 1fr; }
    .rg-pos-kopf { display: none; }
    .rg-row { grid-template-columns: 26px 1fr 1fr 1fr 34px; }
    .rg-row > .rg-nr { grid-column: 1; grid-row: 1; }
    .rg-row > .rg-produkt { grid-column: 2 / 5; grid-row: 1; }
    .rg-row > .rg-menu { grid-column: 5; grid-row: 1; }
    .rg-row > .rg-beschr { grid-column: 2 / 5; grid-row: 2; }
    .rg-row > [data-f="menge"] { grid-column: 2; grid-row: 3; }
    .rg-row > [data-f="rabatt"] { grid-column: 3; grid-row: 3; }
    .rg-row > [data-f="einzelpreis"] { grid-column: 4; grid-row: 3; }
    .rg-row > .rg-betrag { grid-column: 2 / 5; grid-row: 4; }
    .rg-breit, .rg-seite { grid-column: 2 / 5; }
}

/* Übersicht (seiten/rechnungen.php) */
table.rg-uebersicht { table-layout: auto !important; }
.rg-uebersicht th { white-space: nowrap; }
.rg-uebersicht th:first-child, .rg-uebersicht td:first-child { width: 1%; }
.rg-uebersicht td:nth-child(3) { width: 40%; }
.rg-in-arbeit td { color: var(--text-muted); }
.fs-17 { font-size: 17px; }
.c-inherit { color: inherit; }
.rg-btn {
    background: transparent !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-muted) !important;
    border-radius: 6px !important;
    padding: 2px 7px !important;
    margin-left: 2px;
    font-size: 13px;
    box-shadow: none !important;
    filter: none !important;
}
.rg-btn:hover { color: var(--text-strong) !important; border-color: var(--border-strong) !important; }
.rg-del:hover { color: var(--danger) !important; border-color: var(--danger) !important; }
.rg-totals { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-top: 16px; font-size: 14px; }
.rg-totals > div { display: flex; gap: 24px; min-width: 300px; justify-content: space-between; color: var(--text-muted); }
.rg-totals > .rg-total { color: var(--text-strong); font-weight: 600; font-size: 24px; border-top: 1px solid var(--border-strong); padding-top: 6px; }

/* Auswertung Rechnungen (Punkt 59): Monatssäulen mit Vorjahr, Anteilsbalken */
.aw-zwei { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 20px; }
@media (max-width: 520px) { .aw-zwei { grid-template-columns: 1fr; } }
.aw-zwei th { white-space: nowrap; }
.aw-monate { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: end; }
.aw-monat { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.aw-saeulen { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 160px; width: 100%; }
.aw-saeule { display: block; width: 42%; max-width: 22px; min-height: 2px; background: var(--accent); border-radius: 4px 4px 0 0; }
.aw-saeule.aw-vj { background: color-mix(in srgb, var(--text-muted) 40%, transparent); }
.aw-label { font-size: 12px; color: var(--text-muted); }
.aw-wert { font-size: 11px; color: var(--text-main); white-space: nowrap; }
.aw-legende { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--accent); vertical-align: middle; }
.aw-legende.aw-vj { background: color-mix(in srgb, var(--text-muted) 40%, transparent); }
.aw-balken { display: inline-block; width: 70px; height: 8px; border-radius: 4px; background: var(--surface-2); vertical-align: middle; overflow: hidden; }
.aw-balken > span { display: block; height: 100%; background: var(--accent); }
@media (max-width: 600px) { .aw-monate { gap: 3px; } .aw-wert { display: none; } .aw-saeulen { height: 110px; } }

/* MWST-Code im Journal (Punkt 64) */
.mwst-code {
    display: inline-block;
    padding: 0 6px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    vertical-align: 1px;
}

/* Sortierbare Tabellenspalten (buchhaltung.js Abschnitt 12, Punkt 66) */
th.sortierbar { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortierbar:hover { color: var(--text-strong); }
th.sortierbar:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
th.sortierbar::after { content: "↕"; margin-left: 5px; opacity: 0.35; font-size: 0.9em; }
th.sortierbar[aria-sort="ascending"]::after { content: "▲"; opacity: 0.9; font-size: 0.75em; }
th.sortierbar[aria-sort="descending"]::after { content: "▼"; opacity: 0.9; font-size: 0.75em; }

/* Adresskartei: Verwendung als Lieferant / Kunde (Punkt 66) */
.adr-rolle {
    display: inline-block;
    margin: 1px 4px 1px 0;
    padding: 1px 8px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
}

/* Zahlungen & QR: PDF/Bild in den QR-Bereich ziehen (Punkt 67) */
.qr-drop { transition: outline-color 0.15s ease, background 0.15s ease; outline: 2px dashed transparent; outline-offset: -2px; }
.qr-drop.qr-drop-aktiv { outline-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }

/* =================================================================
   Abschluss-Checkliste (seiten/jahresabschluss.php, src/AbschlussCheckliste.php – Punkt 74)
   ================================================================= */
.abschluss-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.abschluss-punkt { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; background: var(--surface-2); border-left: 3px solid var(--warning); }
.abschluss-punkt.is-ok { border-left-color: var(--success); }
.abschluss-status { font-size: 18px; width: 22px; text-align: center; flex-shrink: 0; }
.abschluss-text { flex: 1 1 auto; line-height: 1.4; min-width: 0; }
.abschluss-haken { margin: 0; width: 22px; flex-shrink: 0; display: flex; justify-content: center; }
.abschluss-haken input[type="checkbox"] { width: 18px; height: 18px; margin: 0; cursor: pointer; accent-color: var(--success); }

/* Mehrfachauswahl (buchhaltung.js Abschnitt 14): Knopf aus, solange nichts markiert ist */
button.is-aus { opacity: 0.5; cursor: not-allowed; }
.spalte-auswahl { width: 44px; }

/* =================================================================
   Hilfe-Fenster (Punkt 79, public/index.php, script/buchhaltung.js Abschnitt 15) – in allen Designs
   ================================================================= */
.hilfe-fenster {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 300;
    width: min(460px, 100vw); box-sizing: border-box;
    display: flex; flex-direction: column;
    background: var(--card-bg); color: var(--text-main);
    border-left: 1px solid var(--border-strong); box-shadow: -12px 0 40px rgba(0, 0, 0, 0.25);
}
/* «hidden» muss gegen display: flex gewinnen – sonst bleibt das Fenster immer offen und ✕ wirkt nicht */
.hilfe-fenster[hidden], .hilfe-inhalt[hidden] { display: none !important; }
.hilfe-kopf {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px; border-bottom: 1px solid var(--border-color);
}
.hilfe-kopf strong { font-size: 16px; color: var(--text-strong); }
.hilfe-reiter { display: flex; gap: 4px; flex: 1 1 auto; }
.hilfe-reiter button, .hilfe-reiter button:hover, .hilfe-zu, .hilfe-zu:hover {
    background: transparent !important; color: var(--text-muted) !important; border: 1px solid var(--border-color) !important;
    border-radius: 999px !important; padding: 4px 12px !important; font-size: 13px !important; font-weight: 500 !important;
    box-shadow: none !important; filter: none !important; transform: none !important; cursor: pointer;
}
.hilfe-reiter button.active { background: var(--accent) !important; color: var(--on-strong) !important; border-color: var(--accent) !important; }
.hilfe-zu { padding: 4px 10px !important; }
.hilfe-inhalt { overflow-y: auto; padding: 8px 20px 28px; font-size: 14px; line-height: 1.55; flex: 1 1 auto; }
.hilfe-inhalt h2 { font-size: 18px; margin: 14px 0 8px; }
.hilfe-inhalt h3 { font-size: 15px; margin: 18px 0 6px; color: var(--text-strong); }
.hilfe-inhalt h4 { font-size: 14px; margin: 14px 0 4px; color: var(--text-strong); }
.hilfe-inhalt p { margin: 0 0 10px; }
.hilfe-inhalt ul, .hilfe-inhalt ol { margin: 0 0 10px; padding-left: 20px; }
.hilfe-inhalt li { margin-bottom: 4px; }
.hilfe-inhalt code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.hilfe-hinweis { background: var(--alert-info-bg); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 6px; margin: 0 0 12px; }
.hilfe-suche { width: 100%; box-sizing: border-box; margin: 8px 0 4px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text-main); font: inherit; }

/* Zeiterfassung (Punkt 80): laufende Stoppuhr, Kennzeichen in der Tabelle, Anzeige oben in der Leiste */
.zeit-laeuft { border-left: 4px solid var(--success); }
.zeit-uhr { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--success); letter-spacing: 0.02em; }
.zeit-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--alert-success-bg); color: var(--success); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.global-bar a.global-zeit {
    display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
    border: 1px solid var(--success); border-radius: 999px; color: var(--success); text-decoration: none;
    font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.global-bar a.global-zeit:hover { background: var(--alert-success-bg); }
[data-zeit-neu][hidden] { display: none !important; }   /* .d-grid würde hidden sonst überstimmen */

/* Adress-Live-Suche (buchhaltung.js Abschnitt 15, Punkt 81) */
.adr-vorschlaege { left: 0; right: 0; background: var(--surface); border-radius: 6px; }
.adr-vorschlag { padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--border-color); }
.adr-vorschlag:last-child { border-bottom: 0; }
.adr-vorschlag strong { display: block; color: var(--link); }
.adr-vorschlag span { display: block; font-size: 12px; color: var(--text-muted); }
.adr-vorschlag:hover, .adr-vorschlag.aktiv { background: var(--surface-3); }
.adr-vorschlag-leer { padding: 10px 12px; color: var(--text-muted); font-size: 13px; }

/* Projekte: Budget-Balken (Punkt 82) – Breite kommt als Inline-Wert aus PHP */
.projekt-budget { min-width: 150px; }
.budget-balken { height: 6px; margin-top: 4px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.budget-balken > span { display: block; height: 100%; border-radius: 3px; background: var(--success); }
.budget-balken.budget-warnung > span { background: var(--warning); }
.budget-balken.budget-ueber > span { background: var(--danger); }
.d-grid[hidden], .d-flex[hidden] { display: none !important; }   /* hidden soll gegen display:grid/flex gewinnen (Punkt 82) */
.aw-balken-spalte { width: 28%; min-width: 120px; }

/* Benutzersymbol oben rechts als Zeichnung statt Emoji (Wunsch Benutzer 17.11.2026: das violette 👤 war im dunklen
   Farbschema schlecht zu sehen) – übernimmt die Schriftfarbe: hell im dunklen, dunkel im hellen Farbschema */
.global-icon { color: var(--text-strong); }
.global-icon svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Zwei-Faktor-Anmeldung unter «Mein Profil» (Punkt 86) */
.zf-qr { background: #fff; padding: 10px; border-radius: 8px; width: max-content; margin: 10px 0; }
.zf-qr svg { display: block; width: 200px; height: 200px; }
.zf-notfall { columns: 2; list-style: none; padding: 0; margin: 10px 0 0; font-size: 15px; }
.zf-notfall li { margin-bottom: 4px; }

/* Rechnungs-Editor: Kunde per Live-Suche + ＋ neue Adresse (Punkt 87) */
.rg-kunde-zeile { display: flex; gap: 8px; align-items: center; margin: 4px 0 6px; }
.rg-kunde-suche { flex: 1 1 auto; min-width: 0; }
.rg-kunde-suche input { width: 100%; }
.rg-neu-btn, .rg-neu-btn:hover {
    flex: 0 0 auto; width: 38px; height: 38px; padding: 0 !important; border-radius: 10px !important;
    background: var(--surface-2) !important; color: var(--text-strong) !important; border: 1px solid var(--border-strong) !important;
    font-size: 20px !important; line-height: 1; box-shadow: none !important; filter: none !important; transform: none !important; cursor: pointer;
}
.rg-neu-btn:hover, .rg-neu-btn[aria-pressed="true"] { border-color: var(--accent) !important; color: var(--accent) !important; }

/* billding-Wortmarke (Anmeldeseite, Punkt 91) – Blau über --marke-text, Orange fest */
/* Block so breit wie die Wortmarke, mittig; Slogan darin linksbündig = beginnt unter dem «b» (Wunsch Benutzer 18.11.2026) */
.marke-wortmarke { width: 190px; max-width: 70%; margin: 4px auto 22px; text-align: left; }
.marke-wortmarke svg { display: block; width: 100%; height: auto; }
.marke-wortmarke .marke-blau { fill: var(--marke-text); }
.marke-slogan { margin-top: 6px; font-size: 13px; font-style: italic; color: var(--text-muted); letter-spacing: 0.01em; }

/* Einklappbare Boxen (Punkt 95, buchhaltung.js Abschnitt 19): eingeklappt nur die Titelzeile */
.klapp-titel { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.klapp-knopf { flex: none; background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); border-radius: 6px;
    width: 30px; height: 30px; padding: 0; font-size: 15px; line-height: 1; cursor: pointer; }
.klapp-knopf:hover, .klapp-knopf:focus-visible { color: var(--text-main, inherit); border-color: var(--link); }
.card.klapp-zu > :not(h2) { display: none !important; }
.card.klapp-zu > h2 { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.card.klapp-zu { padding-top: 12px; padding-bottom: 12px; }

/* Einrichtungs-Assistent (Punkt 96, public/einrichtung.php) */
.setup-seite { display: flex; justify-content: center; align-items: flex-start; min-height: 100vh; padding: 30px 16px; box-sizing: border-box; }
/* body ist sonst 100vh hoch mit overflow hidden (nur .app-main scrollt) → Seite liess sich nicht scrollen, Knopf unerreichbar (18.11.2026) */
body.setup-seite { height: auto; overflow: visible; }
.setup-box { min-width: 0; }   /* .card hat min-width: 100% – sonst ganze Fensterbreite statt 640px */
.setup-box { width: 100%; max-width: 640px; }
.setup-schritte { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 10px 0 20px; counter-reset: schritt; }
.setup-schritte li { counter-increment: schritt; font-size: 13px; padding: 5px 10px; border-radius: 14px; border: 1px solid var(--border-color); color: var(--text-muted); }
.setup-schritte li::before { content: counter(schritt) ". "; }
.setup-schritte li.aktiv { border-color: var(--accent); color: var(--link); font-weight: bold; }
.setup-schritte li.erledigt { color: var(--success); }
.setup-schritte li.erledigt::before { content: "✓ "; }
.setup-code { background: var(--bg-input, rgba(0,0,0,.05)); padding: 10px 12px; border-radius: 6px; font-size: 12.5px; overflow-x: auto; white-space: pre; }
.setup-codefeld { font-size: 20px; letter-spacing: 0.15em; text-transform: uppercase; }
.setup-pruefung { list-style: none; padding: 0; margin: 0 0 10px; }
.setup-pruefung li { padding: 4px 0 4px 26px; position: relative; font-size: 14px; }
.setup-pruefung li::before { position: absolute; left: 0; }
.setup-pruefung li.ok::before { content: "✅"; }
.setup-pruefung li.fehlt::before { content: "❌"; }
.setup-pruefung li.warnung::before { content: "⚠️"; }
.setup-plz { max-width: 90px; }
