/* =============================================================================
   PlexOne — Design System
   Funnel Display (Headlines) · Figtree (UI/Text)
   Personalisierbare Accent-Farbe via --color-accent (Default: #00ffff)
   ============================================================================= */

@font-face {
    font-family: 'Funnel Display';
    src: url('../fonts/FunnelDisplay/FunnelDisplay-Light.ttf') format('truetype');
    font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Funnel Display';
    src: url('../fonts/FunnelDisplay/FunnelDisplay-Regular.ttf') format('truetype');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Funnel Display';
    src: url('../fonts/FunnelDisplay/FunnelDisplay-Medium.ttf') format('truetype');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Funnel Display';
    src: url('../fonts/FunnelDisplay/FunnelDisplay-SemiBold.ttf') format('truetype');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Funnel Display';
    src: url('../fonts/FunnelDisplay/FunnelDisplay-Bold.ttf') format('truetype');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Funnel Display';
    src: url('../fonts/FunnelDisplay/FunnelDisplay-ExtraBold.ttf') format('truetype');
    font-weight: 800; font-style: normal; font-display: swap;
}

@font-face {
    font-family: 'Figtree';
    src: url('../fonts/Figtree/Figtree-Regular.ttf') format('truetype');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Figtree';
    src: url('../fonts/Figtree/Figtree-Medium.ttf') format('truetype');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Figtree';
    src: url('../fonts/Figtree/Figtree-SemiBold.ttf') format('truetype');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Figtree';
    src: url('../fonts/Figtree/Figtree-Bold.ttf') format('truetype');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Figtree';
    src: url('../fonts/Figtree/Figtree-Italic.ttf') format('truetype');
    font-weight: 400; font-style: italic; font-display: swap;
}

:root {
    --color-bg-base:     #0a0a0f;
    --color-bg-surface:  #111118;
    --color-bg-elevated: #1a1a24;
    --color-bg-input:    #16161f;
    --color-border:      rgba(255,255,255,0.08);
    --color-border-strong: rgba(255,255,255,0.15);
    --color-text:        #f0f0f8;
    --color-text-dim:    rgba(240,240,248,0.55);
    --color-text-muted:  rgba(240,240,248,0.30);
    --color-accent:      #00ffff;
    /* abgeleitet aus --color-accent — folgt automatisch bei Personalisierung */
    --color-accent-dim:  color-mix(in srgb, var(--color-accent) 15%, transparent);
    --color-accent-glow: color-mix(in srgb, var(--color-accent) 30%, transparent);
    --color-accent-soft: color-mix(in srgb, var(--color-accent) 8%, transparent);
    --color-success:     #22c55e;
    --color-warning:     #f59e0b;
    --color-error:       #ef4444;
    --font-display:      'Funnel Display', system-ui, -apple-system, sans-serif;
    --font-ui:           'Figtree', system-ui, -apple-system, sans-serif;
    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  16px;
    --radius-xl:  24px;
    --shadow-card:     0 1px 3px rgba(0,0,0,0.4), 0 0 0 1px var(--color-border);
    --shadow-elevated: 0 8px 32px rgba(0,0,0,0.6);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--color-bg-base);
    color: var(--color-text);
    font-family: var(--font-ui);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em; margin: 0; }
h4, h5, h6 { font-family: var(--font-ui); font-weight: 600; letter-spacing: -0.01em; margin: 0; }

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

/* ============================================================================
   Form-Elemente
   ============================================================================ */

.input {
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--color-text);
    font-family: var(--font-ui);
    font-size: 15px;
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-dim);
}
.input::placeholder { color: var(--color-text-muted); }

/* Native Selects matching Input-Style */
select.input,
.form-grid select,
.input-with-suffix input[type=number] {
    -webkit-appearance: none;
    appearance: none;
}
select.input,
.form-grid select {
    background-color: var(--color-bg-input);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23f0f0f8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.5'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    cursor: pointer;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: var(--font-ui);
    font-size: 15px;
    padding-top: 12px;
    padding-bottom: 12px;
    padding-left: 14px;
}
select.input:focus,
.form-grid select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-dim);
}
select.input option,
.form-grid select option,
.form-grid select optgroup {
    background: var(--color-bg-elevated);
    color: var(--color-text);
}
select.input option { padding: 8px; }

.btn {
    background: var(--color-accent);
    color: var(--color-accent-fg, #000);
    border: none;
    border-radius: 999px;
    padding: 12px 24px;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-block { width: 100%; }

.btn-ghost {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border-strong);
}
.btn-ghost:hover { background: var(--color-bg-surface); filter: none; }

/* ============================================================================
   Login-Screen
   ============================================================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
    background-color: var(--color-bg-base);
    /* Hintergrund kommt aus einer der .login-bg-N-Klassen (PHP wählt pro
       Seitenaufruf zufällig 1–3). Hier nur Fallback. */
    background-image: url('../img/login-bg-1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* Zufalls-Login-Hintergründe (PHP setzt eine der Klassen am <body>) */
.login-page.login-bg-1 { background-image: url('../img/login-bg-1.jpg'); }
.login-page.login-bg-2 { background-image: url('../img/login-bg-2.jpg'); }
.login-page.login-bg-3 { background-image: url('../img/login-bg-3.jpg?v=7'); }
.login-page.login-bg-4 { background-image: url('../img/login-bg-4.jpg'); }
/* Kein Overlay — Login-Bild zeigt volle Farbstärke. Card bleibt durch
   eigenen Hintergrund (rgba 0.85 + blur) gut lesbar. */
/* Mobile: Hintergrund-Bild ausblenden (Komposition mit P-Element in
   linker oberer Ecke funktioniert nur auf Desktop) */
@media (max-width: 720px) {
    .login-page { background-image: none; }
}

.login-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo {
    color: var(--color-text);
    width: 180px;
    height: auto;
    margin-bottom: 32px;
}

.login-card {
    width: 100%;
    background: rgba(17, 17, 24, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-elevated);
}
.login-card h1 {
    font-size: 22px;
    margin-bottom: 4px;
}
.login-card .subtitle {
    color: var(--color-text-dim);
    margin-bottom: 24px;
    font-size: 14px;
}

/* Logged-Out-Card */
.logged-out-card { text-align: center; }
.logged-out-card h1 { margin-top: 16px; }
.logged-out-card .subtitle { margin-bottom: 0; }
.logged-out-icon {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--color-accent-dim);
    color: var(--color-accent);
    margin: 0 auto;
}
.logged-out-icon svg { width: 26px; height: 26px; }

.login-form .field { margin-bottom: 16px; }
.login-form label {
    display: block;
    font-size: 12px;
    color: var(--color-text-dim);
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-form .actions { margin-top: 8px; }
.login-form .meta {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--color-text-dim);
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-error);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
    display: none;
}
.login-error.show { display: block; }

.login-footer {
    position: relative;
    z-index: 1;
    margin-top: 40px;
    color: var(--color-text-muted);
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.login-footer .snull1-logo {
    width: 90px;
    color: var(--color-text-muted);
    opacity: 0.65;
    transition: opacity 0.2s;
}
.login-footer .snull1-logo:hover { opacity: 1; }

/* ============================================================================
   App-Shell (eingeloggt)
   ============================================================================ */

.app {
    display: grid;
    grid-template-columns: 240px 1fr;
    grid-template-rows: calc(60px + env(safe-area-inset-top)) 1fr;
    grid-template-areas:
        "topbar topbar"
        "sidebar main";
    height: 100vh;
    overflow: hidden;
}

.topbar {
    grid-area: topbar;
    background: var(--color-bg-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    position: relative;
    /* Status-Bar respektieren wenn als PWA installiert (iPhone Notch / Dynamic Island).
       env(safe-area-inset-*) ist im normalen Browser 0 → kein visueller Unterschied. */
    padding: env(safe-area-inset-top) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
    z-index: 10;
    gap: 16px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; flex: 1 1 0; min-width: 0; }
.topbar-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.topbar-center > * { pointer-events: auto; }
.topbar-right { display: flex; align-items: center; gap: 12px; flex: 1 1 0; justify-content: flex-end; }
.app-icon-link { display: inline-flex; align-items: center; line-height: 0; }

.app-icon {
    width: 32px; height: 32px;
    color: var(--color-text);
    opacity: 0.9;
}
.app-logo {
    height: 22px; width: auto;
    color: var(--color-text);
    display: block;
}
.app-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    line-height: 1;
}
.app-tagline {
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--color-text-muted);
    line-height: 1;
}
.app-context {
    color: var(--color-text-dim);
    font-size: 12px;
    margin-left: 6px;
    padding: 4px 10px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 999px;
}

.icon-btn {
    background: transparent; border: 1px solid var(--color-border);
    border-radius: 999px;
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--color-text-dim);
    cursor: pointer;
    transition: all 0.15s;
}
.icon-btn:hover { color: var(--color-accent); border-color: var(--color-border-strong); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.spinning svg { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ═══ Phosphor Icons — Größen-/Animations-Parität zu den alten Inline-SVGs ═══
   Phosphor rendert als Font-Glyph (<i class="ph ph-…">): die Größe kommt aus
   `font-size` (1em = Glyph-Höhe), nicht aus width/height. Diese Regeln spiegeln
   die alten `<kontext> svg { width }`-Regeln, damit nichts springt. Icons erben
   die Textfarbe (currentColor) wie zuvor. Einheitlich mit AgentOne. */
.ph { line-height: 1; vertical-align: middle; display: inline-block; }
.icon-btn .ph { font-size: 19px; }
.icon-btn.spinning .ph { animation: spin 1s linear infinite; }
.notify-btn.has-unread .ph { animation: notify-bell-ring 2.4s ease-in-out infinite; transform-origin: 50% 0%; }
.app-context .ph { font-size: 12px; }
.nav-item .ph { font-size: 19px; }
.nav-group-lock .ph { font-size: 12px; }
.nav-item-lock .ph { font-size: 11px; }
.nav-group-caret { font-size: 12px; }
.dropdown-item .ph { font-size: 17px; flex-shrink: 0; }
.bn-home .bn-icon .ph, .bn-section .bn-icon .ph { font-size: 24px; }
.bn-view-icon .ph { font-size: 20px; }
.bn-section-option-icon .ph { font-size: 16px; }
.bn-section-option-lock .ph { font-size: 14px; }
@media (prefers-reduced-motion: reduce) {
    .notify-btn.has-unread .ph { animation: none; }
}
/* App-Views (app.js) — weitere Kontexte */
.hub-tile-icon .ph { font-size: 30px; }
.hub-tile-arrow .ph { font-size: 18px; }
.month-caret { font-size: 16px; width: auto; height: auto; }
.comment-count .ph { font-size: 14px; }
.btn-comment-row .btn-comment-icon .ph { font-size: 16px; }
.tl-icon .ph { font-size: 13px; }
.report-latest-icon .ph { font-size: 32px; }
.report-history-icon .ph { font-size: 16px; }
.report-history-chevron .ph { font-size: 16px; }
.report-theme-thumb .ph { font-size: 14px; }
.ao-module-status .ph { font-size: 15px; }
.scroll-indicator .ph { font-size: 13px; }
.comment-link .ph { font-size: 13px; }
.task-check-mobile .ph { font-size: 11px; }
.invoice-upload-plus .ph { font-size: 26px; }
.modal-close .ph { font-size: 18px; }
.journey-close .ph { font-size: 18px; }
.cf-list-pill-remove .ph { font-size: 11px; }
.btn .ph { font-size: 16px; }
.month-detail-tasks-label .ph { font-size: 18px; }

.avatar {
    position: relative;
    width: 36px; height: 36px;
    border-radius: 999px;
    background: var(--color-bg-elevated);
    border: 2px solid var(--color-accent);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--color-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    padding: 0;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}
.avatar:hover { transform: scale(1.04); box-shadow: 0 0 0 4px var(--color-accent-dim); }
.avatar-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 999px;
}
.avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%; height: 100%;
}

/* Avatar-Settings-Card im Profil */
.avatar-settings-card {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.avatar-preview {
    width: 96px; height: 96px;
    border-radius: 50%;
    background: var(--color-bg-elevated);
    border: 2px solid var(--color-accent);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.avatar-preview img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.avatar-preview-initials {
    font-size: 32px;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.02em;
}
.avatar-settings-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}
.avatar-settings-actions > .btn { min-width: 160px; }

/* User-Edit-Modal: Avatar-Row über den Form-Feldern */
.user-avatar-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 0 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
}
.user-avatar-row .avatar-preview {
    width: 80px; height: 80px;
}
.user-avatar-row .avatar-preview-initials { font-size: 26px; }

.sidebar {
    grid-area: sidebar;
    background: var(--color-bg-surface);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    gap: 4px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
.nav-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 2px;
}
.nav-scroll::-webkit-scrollbar { width: 6px; }
.nav-scroll::-webkit-scrollbar-track { background: transparent; }
.nav-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 3px; }
.nav-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.12); }

.nav-bottom {
    flex: 0 0 auto;
    border-top: 1px solid var(--color-border);
    padding-top: 8px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-group-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-dim);  /* aktive Gruppen: heller */
    padding: 14px 12px 6px;
}
/* Aktivitäten-Label trägt rechts den Menü-Umschalt-Button */
.nav-group-label-top {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.nav-mode-toggle {
    appearance: none; background: none; border: none; cursor: pointer;
    color: var(--color-text-dim); padding: 3px; border-radius: 6px;
    display: inline-flex; line-height: 0; margin: -3px -4px -3px 0;
    transition: background 0.14s, color 0.14s;
}
.nav-mode-toggle:hover { color: var(--color-accent); background: var(--color-bg-elevated); }
.nav-mode-toggle .ph { font-size: 16px; }

/* ─── Menüvariante: Icon-Rail mit Hover-Flyout (Desktop) ─────────────────── */
.sidebar-rail { display: none; }
@media (min-width: 1025px) {
    .app.nav-mode-rail { grid-template-columns: 64px 1fr; }
    .app.nav-mode-rail > .sidebar { display: none; }
    .app.nav-mode-rail > .sidebar-rail { display: flex; }
}
.sidebar-rail {
    grid-area: sidebar;
    flex-direction: column; align-items: center;
    background: var(--color-bg-surface);
    border-right: 1px solid var(--color-border);
    padding: 10px 0;
    min-height: 0;
}
.sidebar-rail .rail-scroll {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    flex: 1 1 auto; width: 100%; overflow-y: auto; overflow-x: visible;
}
.sidebar-rail .rail-bottom {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    width: 100%; padding-top: 8px; border-top: 1px solid var(--color-border); margin-top: 8px;
}
.rail-toggle, .rail-item {
    appearance: none; border: none; background: none; cursor: pointer;
    width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--color-text-dim); position: relative;
    transition: background 0.14s, color 0.14s;
}
.rail-toggle { margin-bottom: 10px; color: var(--color-text-muted); text-decoration: none; }
.rail-toggle .ph { font-size: 18px; }
.rail-item .ph { font-size: 21px; }
.rail-item:hover, .rail-toggle:hover { background: var(--color-bg-elevated); color: var(--color-text); text-decoration: none; }
.rail-item.is-active {
    background: color-mix(in srgb, var(--color-accent) 16%, transparent);
    color: var(--color-accent);
}
.rail-item.is-locked { color: var(--color-text-muted); opacity: 0.7; }
.rail-item-lock { position: absolute; right: 5px; bottom: 5px; line-height: 0; color: var(--color-text-muted); }
.rail-item-lock .ph { font-size: 10px; }
/* Hubs: geschlossenes Auge (Default) → offenes Auge bei Hover / offenem Flyout /
   aktivem Hub (man befindet sich in einem Hub) */
.rail-item-hubs .rail-eye-open { display: none; }
.rail-item-hubs:hover .rail-eye-closed,
.rail-item-hubs.is-flyout-open .rail-eye-closed,
.rail-item-hubs.is-active .rail-eye-closed { display: none; }
.rail-item-hubs:hover .rail-eye-open,
.rail-item-hubs.is-flyout-open .rail-eye-open,
.rail-item-hubs.is-active .rail-eye-open { display: inline-block; }

/* Flyout: volle Spalte (unter der Topbar bis ganz unten), Overlay über dem Content */
.rail-flyout {
    position: fixed;
    top: calc(60px + env(safe-area-inset-top));
    bottom: 0; left: 64px; width: 244px;
    background: var(--color-bg-surface);
    border-right: 1px solid var(--color-border);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.32);
    padding: 16px 12px;
    z-index: 60;
    overflow-y: auto;
    opacity: 0; transform: translateX(-8px); pointer-events: none;
    transition: opacity 0.14s ease, transform 0.14s ease;
}
.rail-flyout.is-open { opacity: 1; transform: none; pointer-events: auto; }
.rail-flyout-title {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--color-text-dim); padding: 2px 10px 12px;
}
.rail-flyout-items { display: flex; flex-direction: column; gap: 2px; }
.rail-fly-item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 10px; border-radius: 8px;
    color: var(--color-text-dim); text-decoration: none; font-size: 14px;
    transition: background 0.12s, color 0.12s;
}
.rail-fly-ico { display: inline-flex; flex: 0 0 auto; line-height: 0; }
.rail-fly-item .ph { font-size: 18px; }
.rail-fly-item:hover { background: var(--color-bg-elevated); color: var(--color-text); text-decoration: none; }
.rail-fly-item.active { background: color-mix(in srgb, var(--color-accent) 16%, transparent); color: var(--color-accent); }
.rail-fly-item.nav-item-disabled { opacity: 0.5; cursor: default; }
.rail-fly-item.nav-item-disabled:hover { background: none; color: var(--color-text-dim); }
.rail-fly-lock { margin-left: auto; line-height: 0; flex: 0 0 auto; color: var(--color-text-muted); }
.rail-fly-lock .ph { font-size: 12px; }
/* Toggle + Flyout nur auf Desktop */
@media (max-width: 1024px) {
    .nav-mode-toggle { display: none; }
    .rail-flyout { display: none; }
}

/* ─── Hub-Rail auf Mobile: horizontale Menüleiste unter dem Header ──────────
   Nur in den Hubs (nicht in der Haupt-App, die mobil die Bottom-Nav nutzt):
   die Rail wird auf dem Handy als horizontale Icon-Leiste direkt unter dem
   Header gezeigt. Tippen aufs Bereichs-Icon öffnet die Unterpunkte (Tap statt
   Hover — siehe nav.js). */
@media (max-width: 1024px) {
    .reviewhub-page .app.nav-mode-rail > .sidebar-rail,
    .filehub-page   .app.nav-mode-rail > .sidebar-rail,
    .flowhub-page   .app.nav-mode-rail > .sidebar-rail {
        display: flex;
        flex-direction: row;
        align-items: center;
        position: static;            /* Flow-Hub: fixed zurücksetzen */
        width: 100%; height: auto;
        margin: 0;
        padding: 5px 8px;
        gap: 4px;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        overflow-x: auto;
        z-index: auto;
    }
    .reviewhub-page .sidebar-rail .rail-scroll,
    .filehub-page   .sidebar-rail .rail-scroll,
    .flowhub-page   .sidebar-rail .rail-scroll {
        flex-direction: row;
        width: auto; flex: 1 1 auto;
        gap: 4px; overflow-x: auto; overflow-y: hidden;
    }
    .reviewhub-page .sidebar-rail .rail-bottom,
    .filehub-page   .sidebar-rail .rail-bottom,
    .flowhub-page   .sidebar-rail .rail-bottom {
        flex-direction: row;
        width: auto; margin: 0 0 0 2px; padding: 0 0 0 6px;
        border-top: none;
        border-left: 1px solid var(--color-border);
    }
    .reviewhub-page .sidebar-rail .rail-toggle,
    .filehub-page   .sidebar-rail .rail-toggle,
    .flowhub-page   .sidebar-rail .rail-toggle { margin: 0; }
    /* Flow-Hub: Main nicht mehr links einrücken (Rail liegt jetzt oben) */
    .flowhub-page .app.nav-mode-rail > .flowhub-main { margin-left: 0; }

    /* Flyout auf Mobile sichtbar (Desktop-Regel oben blendet es <1024px aus):
       volle Breite unter der Leiste; top wird in nav.js gesetzt. */
    .reviewhub-page .rail-flyout,
    .filehub-page   .rail-flyout,
    .flowhub-page   .rail-flyout {
        display: block;
        left: 8px; right: 8px; width: auto; bottom: auto;
        max-height: 60vh;
        border: 1px solid var(--color-border);
        border-radius: 0 0 12px 12px;
    }

    /* Kundenselektor: in den Hubs ist oben wieder Platz (Schließen-Button weg)
       → voller Name statt nur Anfangsbuchstabe. */
    .reviewhub-page #activeClientLabel,
    .filehub-page   #activeClientLabel,
    .flowhub-page   #activeClientLabel { font-size: 13px; }
    .reviewhub-page #activeClientLabel::before,
    .filehub-page   #activeClientLabel::before,
    .flowhub-page   #activeClientLabel::before { content: none; }
}
.nav-group-label:first-child { padding-top: 4px; }
/* Gesperrte Gruppen sind deutlich dunkler — klare visuelle Unterscheidung */
.nav-group.is-locked .nav-group-label,
.nav-group.is-locked .nav-group-toggle {
    color: var(--color-text-muted);
    opacity: 0.7;
}

.nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); padding: 12px 12px 4px; }
.nav-item {
    position: relative;
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--color-text-dim);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.18s ease, background 0.22s ease, transform 0.12s ease;
    text-decoration: none;
}
.nav-item:hover { color: var(--color-text); background: var(--color-bg-elevated); text-decoration: none; }
.nav-item:active { transform: scale(0.97); }
.nav-item.active {
    color: var(--color-accent);
    background: var(--color-accent-dim);
    animation: navActivePulse 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes navActivePulse {
    0%   { background: transparent; transform: scale(0.96); }
    60%  { background: var(--color-accent-dim); transform: scale(1.02); }
    100% { background: var(--color-accent-dim); transform: scale(1); }
}
.nav-item svg { width: 18px; height: 18px; flex: 0 0 auto; }
.nav-item-disabled {
    opacity: 0.35;
    cursor: pointer;
}
/* Hover auf disabled Items: kein Background, kein Active-Look — App-Feel
   (kein Web-Underline). Feedback nur über die Opacity-Änderung. */
.nav-item-disabled:hover {
    background: transparent;
    color: var(--color-text-dim);
    text-decoration: none;
    opacity: 0.55;
}
.nav-item-disabled:hover .nav-label { text-decoration: none; }

/* Gruppen-Wrapper bleibt für Struktur, aber kein Hover-Effekt mehr */
.nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-group + .nav-group { margin-top: 4px; }

/* Separator zwischen dem festen Aktivitäten-Block oben und den
   einklappbaren Paket-/Hub-Gruppen darunter. Adjacent-Sibling-Selector:
   trifft die collapsible Gruppe die DIREKT nach einer nicht-collapsible
   kommt (= FunnelOne nach Aktivitäten). */
.sidebar .nav-group:not(.nav-group-collapsible) + .nav-group-collapsible {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
}

/* Aufklappbare Gruppe (z.B. Toolbox) */
.nav-group-collapsible .nav-group-toggle {
    display: flex; align-items: center; gap: 6px;
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-dim);  /* aktive Gruppen heller */
    padding: 14px 12px 6px;
    font-family: inherit;
}
.nav-group-collapsible .nav-group-toggle:hover { color: var(--color-text); }
.nav-group-collapsible .nav-group-caret {
    transition: transform 0.18s ease;
    flex: 0 0 auto;
}
.nav-group-collapsible.expanded .nav-group-caret { transform: rotate(90deg); }
.nav-group-collapsible .nav-group-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
/* hidden-Attribut sonst durch display:flex überschrieben */
.nav-group-collapsible .nav-group-content[hidden] { display: none !important; }

/* Schloss-Icon rechts in der Gruppen-Header wenn Paket gesperrt */
.nav-group-lock {
    margin-left: auto;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    flex: 0 0 auto;
    padding-left: 6px;
}
.nav-group-lock svg { width: 12px; height: 12px; display: block; }
.nav-group.is-locked .nav-group-lock { display: inline-flex; }

/* Schloss-Icon rechts in den einzelnen Nav-Items wenn das Paket gesperrt ist */
.nav-item-lock {
    margin-left: auto;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    flex: 0 0 auto;
    padding-left: 6px;
}
.nav-item-lock svg { width: 11px; height: 11px; display: block; }
.nav-item-disabled > .nav-item-lock { display: inline-flex; }

/* "bald" Pille (Coming-Soon-Marker) für Items im Hubs-Bereich */
.nav-soon {
    margin-left: auto;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--color-bg-elevated);
    color: var(--color-text-dim);
    line-height: 1.2;
    flex: 0 0 auto;
}

/* Upgrade-Modal */
.upgrade-section { margin-bottom: 22px; }
.upgrade-section-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}
.upgrade-pkg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}
.upgrade-pkg-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 10px;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.15s;
}
.upgrade-pkg-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.upgrade-pkg-circle {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--color-border);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
}
.upgrade-pkg-circle svg {
    width: 18px; height: 18px;
    opacity: 0;
    transition: opacity 0.15s;
}
.upgrade-pkg-card:hover .upgrade-pkg-circle {
    border-color: var(--color-accent-dim);
    transform: scale(1.04);
}
.upgrade-pkg-card input:checked ~ .upgrade-pkg-circle,
.upgrade-pkg-card input:checked + .upgrade-pkg-circle {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-accent-fg, #000);
}
.upgrade-pkg-card input:checked ~ .upgrade-pkg-circle svg,
.upgrade-pkg-card input:checked + .upgrade-pkg-circle svg {
    opacity: 1;
}
.upgrade-pkg-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-dim);
    text-align: center;
    line-height: 1.3;
    transition: color 0.15s;
}
.upgrade-pkg-card input:checked ~ .upgrade-pkg-name {
    color: var(--color-text);
}

.upgrade-msg-textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 110px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--color-text);
    font-family: var(--font-ui);
    font-size: 13px;
    resize: vertical;
    line-height: 1.5;
}
.upgrade-msg-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-dim);
}

.upgrade-phone {
    margin-top: 24px;
    padding: 18px 20px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md, 12px);
    text-align: center;
}
.upgrade-phone-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}
.upgrade-phone-number {
    display: inline-block;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-accent);
    text-decoration: none;
    letter-spacing: 0.02em;
    margin: 4px 0 6px;
    transition: filter 0.15s;
}
.upgrade-phone-number:hover { filter: brightness(1.15); }
.upgrade-phone-hint {
    font-size: 11px;
    color: var(--color-text-muted);
}

/* Pakete-Toggles im Kunden-Modal */
.package-toggle-list { display: flex; flex-direction: column; gap: 10px; }
.package-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.package-toggle-row:hover { border-color: var(--color-accent-dim); }
.package-toggle-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.package-toggle-text strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.package-toggle-text span {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.4;
}
.package-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-accent);
    background: var(--color-accent-dim);
}

.sidebar-footer {
    margin-top: 12px;
    padding: 14px 12px 4px;
    border-top: 1px solid var(--color-border);
    font-size: 10px;
    color: var(--color-text-muted);
    line-height: 1.6;
    letter-spacing: 0.03em;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}
.sidebar-footer-logo {
    height: 25px;
    width: auto;
    display: block;
    opacity: 0.55;
    transition: opacity 0.2s;
}
.sidebar-footer-logo:hover { opacity: 0.85; }

/* ───── Mobile-Bottom-Nav (default hidden — nur auf Mobile) ───── */
.mobile-bottom { display: none; }

/* Tablet: schmale Sidebar, nur Icons */
@media (max-width: 1024px) {
    .app { grid-template-columns: 64px 1fr; }
    .sidebar { padding: 14px 8px; }
    .nav-scroll { padding-right: 0; gap: 2px; }
    .nav-bottom { padding-top: 6px; }
    .nav-item {
        justify-content: center;
        padding: 12px 0;
        gap: 0;
    }
    .nav-item svg { width: 20px; height: 20px; }
    .nav-item .ph { font-size: 21px; }
    .nav-label { display: none; }
    .nav-group-label {
        padding: 10px 0 4px;
        text-align: center;
    }
    .nav-group-label span {
        display: inline-block;
        width: 24px;
        height: 1px;
        background: var(--color-border);
        text-indent: -9999px;
        overflow: hidden;
    }
    .sidebar-footer { display: none; }
}

/* ───── Mobile (Smartphone): Bottom-Nav, Topbar nicht fixed, Sidebar weg ───── */
@media (max-width: 720px) {
    .app {
        display: block;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }
    .topbar {
        position: static;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas: "center left right";
        align-items: center;
        height: auto;
        padding: calc(10px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
        gap: 10px;
        z-index: auto;
    }
    .topbar-center {
        grid-area: center; justify-content: flex-start; min-width: 0;
        position: static; left: auto; top: auto; transform: none; pointer-events: auto;
    }
    .topbar-left   { grid-area: left; flex: 0 1 auto; }
    .topbar-right  { grid-area: right; flex: 0 1 auto; }
    .topbar-center .app-logo { height: 22px; }
    .topbar-center .app-tagline { font-size: 8px; letter-spacing: 0.18em; }
    .topbar-left {
        margin: 0;
        min-width: 0;
        justify-content: center;
    }
    .topbar-left .app-icon { display: none; }
    .topbar-right .last-sync,
    .topbar-right .icon-btn:not(.notify-btn) { display: none; }
    .topbar-left .app-context,
    .topbar-left .dropdown-wrap {
        max-width: 100%;
    }
    .topbar-left .app-context {
        font-size: 12px;
        padding: 6px 10px;
        max-width: 100%;
        overflow: hidden;
    }
    .topbar-left .app-context #activeClientLabel,
    .topbar-left #activeClientLabel {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
        max-width: 100%;
    }

    /* Sidebar komplett aus */
    .sidebar { display: none; }

    /* Hauptbereich scrollt mit der Seite — mehr Padding-Bottom für Bottom-Nav-Clearance */
    .main {
        overflow: visible;
        padding: 20px 16px calc(110px + env(safe-area-inset-bottom, 0px));
        min-height: 0;
    }
    .main h1 { font-size: 24px; margin-bottom: 16px; }

    /* Bottom-Nav (neu): drei separate Elemente, vom Rand abgesetzt */
    .mobile-bottom {
        display: block;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        padding:
            14px
            max(8px, env(safe-area-inset-right))
            calc(6px + env(safe-area-inset-bottom, 0px))
            max(8px, env(safe-area-inset-left));
        pointer-events: none;
        z-index: 100;
    }
    .mobile-bottom .bottom-nav {
        display: flex;
        align-items: stretch;
        justify-content: stretch;
        gap: 6px;
        pointer-events: auto;
    }
    .bn-home, .bn-section, .bn-views {
        background: rgba(17, 17, 24, 0.92);
        border: 1px solid var(--color-border);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    .bn-home, .bn-section {
        width: 62px; height: 62px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--color-text-dim);
        cursor: pointer;
        transition: color 0.18s, transform 0.12s, border-color 0.18s;
        text-decoration: none;
        flex: 0 0 auto;
        padding: 0;
    }
    .bn-home .bn-icon, .bn-section .bn-icon { display: inline-flex; align-items: center; justify-content: center; }
    .bn-home .bn-icon svg, .bn-section .bn-icon svg { width: 26px; height: 26px; display: block; }
    .bn-home:active, .bn-section:active { transform: scale(0.94); }
    .bn-home.active, .bn-home:hover,
    .bn-section.open { color: var(--color-accent); border-color: var(--color-accent-dim); }
    .bn-section { padding: 0 4px; }
    .bn-section-icon { display: inline-flex; align-items: center; justify-content: center; }
    .bn-label {
        font-size: 9px;
        font-weight: 500;
        letter-spacing: 0.02em;
        line-height: 1;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: center;
    }

    .bn-views {
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        gap: 2px;
        height: 62px;
        padding: 0 3px;
        border-radius: 999px;
        flex: 1 1 auto;
        min-width: 0;
        position: relative;
        transform-origin: center;
        transition: transform 0.18s ease;
    }
    /* Shimmer-Sweep über die Outline beim Bereichs-Wechsel */
    .bn-views.shimmering {
        animation: bnViewsPulse 700ms cubic-bezier(0.4, 0, 0.4, 1) forwards;
    }
    .bn-views.shimmering::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        padding: 1.5px;
        background: linear-gradient(
            260deg,
            transparent 35%,
            var(--color-accent) 50%,
            transparent 65%
        );
        background-size: 250% 100%;
        background-position: 200% 0;
        background-repeat: no-repeat;
        -webkit-mask:
            linear-gradient(#000 0 0) content-box,
            linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask:
            linear-gradient(#000 0 0) content-box,
            linear-gradient(#000 0 0);
        mask-composite: exclude;
        pointer-events: none;
        animation: bnViewsShimmer 700ms cubic-bezier(0.4, 0, 0.4, 1) forwards;
    }
    @keyframes bnViewsShimmer {
        to { background-position: -60% 0; }
    }
    @keyframes bnViewsPulse {
        0%   { transform: scale(1); }
        45%  { transform: scale(1.06); }
        100% { transform: scale(1); }
    }
    .bn-view {
        flex: 1 1 0;
        min-width: 0;
        height: 54px;
        margin: 4px 0;
        padding: 4px 2px;
        border-radius: 999px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: var(--color-text-dim);
        text-decoration: none;
        transition: color 0.15s, background 0.18s, transform 0.12s;
    }
    .bn-view-icon { display: inline-flex; align-items: center; justify-content: center; }
    .bn-view-icon svg { width: 20px; height: 20px; display: block; }
    .bn-view-label {
        font-size: 9px;
        font-weight: 500;
        letter-spacing: 0.02em;
        line-height: 1;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: center;
    }
    .bn-view:active { transform: scale(0.92); }
    .bn-view.active {
        color: var(--color-accent);
        background: var(--color-accent-dim);
    }

    /* Section-Auswahl-Menü: poppt über der Bottom-Nav auf */
    .bn-section-menu {
        pointer-events: auto;
        margin: 0 auto 10px;
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: rgba(17, 17, 24, 0.92);
        border: 1px solid var(--color-border);
        border-radius: 16px;
        padding: 8px;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        animation: bnMenuIn 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
        max-width: 360px;
    }
    /* hidden-Attribut greift sonst nicht durch das display:flex */
    .bn-section-menu[hidden] { display: none !important; }
    @keyframes bnMenuIn {
        from { opacity: 0; transform: translateY(8px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .bn-section-option {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        border-radius: 999px;
        background: transparent;
        border: 1px solid transparent;
        color: var(--color-text);
        font-family: inherit;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        text-align: left;
        transition: background 0.15s, border-color 0.15s, color 0.15s;
    }
    .bn-section-option:hover {
        background: var(--color-bg-elevated);
        border-color: var(--color-border);
    }
    .bn-section-option.active {
        color: var(--color-accent);
        background: var(--color-accent-dim);
    }
    .bn-section-option-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: var(--color-bg-elevated);
        flex: 0 0 auto;
    }
    .bn-section-option.active .bn-section-option-icon {
        background: var(--color-accent);
        color: var(--color-accent-fg, #000);
    }
    .bn-section-option-icon svg { width: 16px; height: 16px; }
    /* Gesperrt: dezent abgeblendet + Schloss-Icon rechts */
    .bn-section-option.locked {
        color: var(--color-text-dim);
        opacity: 0.7;
    }
    .bn-section-option.locked .bn-section-option-icon {
        opacity: 0.55;
    }
    .bn-section-option.locked:hover {
        background: var(--color-bg-elevated);
        border-color: var(--color-border);
        opacity: 1;
    }
    .bn-section-option-lock {
        margin-left: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--color-text-dim);
        flex: 0 0 auto;
    }
    .bn-section-option-lock svg { width: 14px; height: 14px; }

    /* Hubs als Direkt-Links im Section-Menü (unter den Paket-Sektionen) */
    .bn-section-sep { height: 1px; margin: 4px 10px; background: var(--color-border); opacity: 0.6; }
    .bn-hub-link, .bn-hub-link:hover { text-decoration: none; }

    /* Keine Hover-Underlines in den Mobile-Menüs — Container-Regel schlägt das
       globale `a:hover { text-decoration: underline }` (deckt bn-view/bn-home,
       Topbar-Links, Dropdown-Items, Section-Optionen + Hub-Links ab). */
    .topbar a, .topbar a:hover,
    .dropdown a, .dropdown a:hover,
    .mobile-bottom a, .mobile-bottom a:hover { text-decoration: none; }
    .bn-section-option, .bn-section-option:hover,
    .dropdown-item, .dropdown-item:hover { text-decoration: none; }

    /* Kundenselektor zeigt den vollen Namen (mit Ellipsis) — wie in den Hubs.
       Früher nur Anfangsbuchstabe; seit Wegfall der Schließen-Buttons ist Platz. */
    #activeClientLabel { font-size: 13px; }
    #activeClientLabel::before { content: none; }

    /* ── Haupt-App-Navi auf dem Phone: Rail als horizontale Leiste unter dem
       Header statt Bottom-Nav (gleiche Optik/Bedienung wie in den Hubs).
       Die Rail wird auch im „vollen" Modus gezeigt — auf dem Phone gibt es kein
       volles Seitenmenü. ─────────────────────────────────────────────────── */
    .mobile-bottom { display: none; }
    .app > .sidebar-rail {
        display: flex;
        flex-direction: row;
        align-items: center;
        position: static;
        width: 100%; height: auto;
        margin: 0 0 4px;
        padding: 5px 8px;
        gap: 4px;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        overflow-x: auto;
        z-index: auto;
    }
    .sidebar-rail .rail-scroll {
        flex-direction: row;
        width: auto; flex: 1 1 auto;
        gap: 4px; overflow-x: auto; overflow-y: hidden;
    }
    .sidebar-rail .rail-bottom {
        flex-direction: row;
        width: auto; margin: 0 0 0 2px; padding: 0 0 0 6px;
        border-top: none;
        border-left: 1px solid var(--color-border);
    }
    /* Menü-Switcher der Haupt-App-Rail (#railToggle, „volles Menü") ist auf dem
       Phone sinnlos → ausblenden. Trifft nur die Haupt-App, nicht den Hub-Toggle. */
    #railToggle { display: none; }
    .rail-flyout {
        display: block;
        left: 8px; right: 8px; width: auto; bottom: auto;
        max-height: 60vh;
        border: 1px solid var(--color-border);
        border-radius: 0 0 12px 12px;
    }
    /* keine Bottom-Nav mehr → kein extra Padding unten */
    .main { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }

    /* Avatar-Dropdown mobile: weiter rechts ausgerichtet */
    .avatar-wrap .dropdown { right: 0; left: auto; }

    /* Modals fullscreen-ähnlich */
    .modal-overlay { padding: 8px; }
    .modal { max-width: 100%; max-height: calc(100vh - 16px); }
    .modal-large { width: 100%; }

    /* Tabs scrollbar */
    .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .tabs::-webkit-scrollbar { height: 0; }
    .tab { white-space: nowrap; flex: 0 0 auto; }

    /* Task-Liste mobile: Ist/Soll-Spalten weg, Kommentar-Button als Icon */
    .col-hide-mobile { display: none !important; }
    .task-list { table-layout: fixed; width: 100%; }
    .task-list th, .task-list td { padding: 10px 8px; }
    .task-list .col-status { width: 90px; }
    .task-list .col-comments { width: 50px; }
    .task-list .col-actions { width: 40px; }
    .task-list .task-title {
        font-size: 13px;
        white-space: normal;
        word-break: break-word;
    }
    .btn-comment-row {
        width: 36px; height: 36px;
        padding: 0;
        border-radius: 50%;
    }
    .btn-comment-row .btn-comment-text { display: none; }
    .btn-comment-row .btn-comment-icon { display: inline-flex; }

    /* Forms — Labels über Inputs, kompakte Spacing */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        max-width: 100%;
        align-items: stretch;
    }
    .form-grid label {
        font-size: 11px;
        font-weight: 600;
        color: var(--color-text-muted);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: -8px;
    }
    .form-grid .form-help { grid-column: 1; margin-top: 2px; }
    .settings-section h3 { font-size: 16px; }
    .card { padding: 16px 18px; }
    .field-group { margin-bottom: 12px; }
    .input-with-suffix { width: 100%; }
}

.main {
    grid-area: main;
    padding: 32px;
    overflow-y: auto;
    min-height: 0;
}
.main h1 { font-size: 32px; margin-bottom: 24px; }

/* ───── View-Enter Animation: leichtes Einblenden von unten ───── */
@keyframes plexViewEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.view-enter {
    animation: plexViewEnter 280ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@media (prefers-reduced-motion: reduce) {
    .view-enter { animation: none; }
}

.card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}
.card-header h3 { font-family: var(--font-display); font-size: 18px; font-weight: 400; }

/* ============================================================================
   Top-Bar — Last-Sync, Avatar-Dropdown, Active-Client
   ============================================================================ */

.app-context {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 5px 10px 5px 12px;
    color: var(--color-text-dim);
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.app-context:hover { color: var(--color-text); border-color: var(--color-border-strong); }

/* Hub-Schließen-Bubble (Topbar links): ✕ + Hub-Name, zurück zur PlexOne-App.
   Sitzt rechts neben Signet bzw. (Admin) rechts neben dem Kunden-Dropdown. */
.hub-close {
    display: inline-flex; align-items: center; gap: 9px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 8px 18px 8px 14px;
    color: var(--color-text-dim);
    font-family: var(--font-ui);
    font-size: 13px; font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.hub-close:hover { color: var(--color-text); border-color: var(--color-border-strong); background: var(--color-bg-surface); text-decoration: none; }
.hub-close .ph { font-size: 17px; line-height: 1; }
.hub-close:hover .ph { color: var(--color-accent); }
/* Alte hub-interne Back-to-App-Buttons (X) entfernt — Schließen läuft jetzt
   ausschließlich über die .hub-close-Bubble oben links in der Topbar. */
.rh-back-to-app, .fh-back-to-app, .fl-back-to-app { display: none !important; }
/* Mobile: Schließen-Button im Hub-Header mit Akzent-Outline + Akzent-X hervorheben */
@media (max-width: 720px) {
    .hub-close { border-color: var(--color-accent); }
    .hub-close .ph { color: var(--color-accent); }
}

.last-sync {
    color: var(--color-text-muted); font-size: 11px;
    margin-right: 4px;
    white-space: nowrap;
}

/* ─── Admin-Dev-Test-Button (nur Admin, optional sichtbar) ───────────────────
   Sitzt links vom Sync-Icon. Wird von Claude während Feature-Development
   per `core/config/dev_test_button.php` aktiviert. */
.dev-test-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px dashed rgba(245, 158, 11, 0.6);
    color: #f59e0b;
    border-radius: 999px;
    padding: 5px 12px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s, background 0.15s;
    white-space: nowrap;
}
.dev-test-btn:hover { background: rgba(245, 158, 11, 0.22); filter: brightness(1.08); }
.dev-test-btn:active { transform: translateY(1px); }
.dev-test-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.dev-test-prefix {
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.25);
    color: #f59e0b;
}
@media (max-width: 720px) {
    .dev-test-btn { display: none; }  /* Mobile: kein Platz, Admin-Test läuft am Desktop */
}

.avatar-wrap, .dropdown-wrap, .notify-wrap { position: relative; display: inline-block; }

/* ─── Notification-Bell (Glocke oben rechts, links neben Avatar) ──────────── */
.notify-btn {
    position: relative;
    /* Leichter Schrägstand → wirkt „bewegt", animierter Look ohne Animation */
    transform: rotate(-12deg);
    transform-origin: 50% 60%;
    transition: transform 0.18s ease, color 0.15s;
}
.notify-btn:hover { transform: rotate(-4deg) scale(1.05); }
.notify-btn.has-unread { color: var(--color-accent); }
/* Wenn neue Notifications da sind, kurz „wackelt" die Glocke (sanftes Ring-Bell-Idle) */
.notify-btn.has-unread svg {
    animation: notify-bell-ring 2.4s ease-in-out infinite;
    transform-origin: 50% 0%;
}
@keyframes notify-bell-ring {
    0%, 60%, 100% { transform: rotate(0); }
    65%, 75%, 85% { transform: rotate(8deg); }
    70%, 80%, 90% { transform: rotate(-8deg); }
}
@media (prefers-reduced-motion: reduce) {
    .notify-btn.has-unread svg { animation: none; }
}
/* Rotes Zähler-Badge oben rechts auf der Glocke */
.notify-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--color-bg);
    /* Gegen-Rotate damit die Zahl beim Schräg-Bell aufrecht bleibt */
    transform: rotate(12deg);
    pointer-events: none;
}

/* Dropdown-Inhalt — orientiert sich am Avatar-Menü, aber etwas breiter */
.dropdown.notify-menu {
    min-width: 520px;
    max-width: 600px;
    padding: 0;
}
.notify-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px 10px;
    border-bottom: 1px solid var(--color-border);
}
.notify-header-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 0.01em;
}
.notify-header-actions { display: flex; gap: 6px; }
.notify-action {
    background: transparent;
    border: none;
    color: var(--color-text-dim);
    font-size: 11px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color 0.12s, background 0.12s;
}
.notify-action:hover { color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 8%, transparent); }
.notify-action-danger:hover { color: #ef4444; background: color-mix(in srgb, #ef4444 10%, transparent); }

.notify-list { max-height: 420px; overflow-y: auto; }
.notify-empty {
    padding: 28px 18px;
    text-align: center;
    color: var(--color-text-dim);
    font-size: 13px;
}

/* Einzel-Item: Title + Preview + Meta links, Trail (Dot + X) rechts */
.notify-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background 0.12s;
}
.notify-item:last-child { border-bottom: none; }
.notify-item:hover { background: var(--color-bg-surface); }
.notify-item-main { flex: 1 1 auto; min-width: 0; }
.notify-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.notify-item-preview {
    margin-top: 3px;
    font-size: 12px;
    color: var(--color-text-dim);
    line-height: 1.4;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.notify-item-meta {
    margin-top: 4px;
    font-size: 10px;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.notify-item-trail {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 4px;
}
/* Roter Dot links neben dem X = ungelesen */
.notify-item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    flex: 0 0 auto;
    transition: opacity 0.15s;
}
.notify-item-dot.is-read { opacity: 0; }
/* Lösch-X — runder dunkler Button, Hover: rot */
.notify-item-delete {
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 50%;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.notify-item-delete:hover {
    color: #ef4444;
    border-color: #ef4444;
    background: color-mix(in srgb, #ef4444 10%, transparent);
}
.notify-item.is-unread .notify-item-title { color: var(--color-text); }

@media (max-width: 720px) {
    /* Topbar-Dropdowns (Glocke + Avatar) als volle, unter der Topbar
       andockende Sheets — mobil üblicher als der kleine Kasten.
       Topbar-Höhe mobil = 10 + 36 (Avatar/Icon) + 10 = 56px (+ Safe-Area). */
    .notify-wrap > .dropdown,
    .avatar-wrap > .dropdown {
        position: fixed;
        top: calc(56px + env(safe-area-inset-top));
        left: 0; right: 0;
        width: auto;
        min-width: 0;
        max-width: none;
        max-height: 80vh;
        border-radius: 0 0 18px 18px;
        border-top: none; border-left: none; border-right: none;
        box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
        animation: dropdown-sheet-in 0.2s ease-out;
    }
    .dropdown.notify-menu { min-width: 0; max-width: none; }
}
@keyframes dropdown-sheet-in {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dropdown {
    position: absolute;
    top: calc(100% + 8px); right: 0;
    min-width: 240px;
    max-height: 60vh;
    overflow-y: auto;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-elevated);
    padding: 6px;
    z-index: 100;
    animation: dropdown-in 0.15s ease-out;
}
.dropdown.dropdown-left { left: 0; right: auto; }
.dropdown-item.is-active {
    background: var(--color-accent-dim);
    color: var(--color-accent);
}
.dropdown[hidden] { display: none; }
@keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.dropdown-header { padding: 12px; border-bottom: 1px solid var(--color-border); margin-bottom: 4px; }
.dropdown-name { font-weight: 600; font-size: 14px; color: var(--color-text); }
.dropdown-email { font-size: 12px; color: var(--color-text-dim); margin-top: 2px; }
.dropdown-role {
    display: inline-block; margin-top: 8px;
    padding: 2px 8px; border-radius: 999px;
    background: var(--color-accent-dim);
    color: var(--color-accent);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.dropdown-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    background: transparent; border: none;
    padding: 10px 12px;
    color: var(--color-text-dim);
    font-family: var(--font-ui);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.1s;
}
.dropdown-item:hover { background: var(--color-bg-surface); color: var(--color-text); }
.dropdown-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.dropdown-divider { height: 1px; background: var(--color-border); margin: 6px -6px; }

/* ============================================================================
   Tabs / Sub-Navigation
   ============================================================================ */

.tabs {
    display: flex; gap: 4px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 24px;
}
.tab {
    background: transparent; border: none;
    padding: 12px 16px;
    color: var(--color-text-dim);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s;
}
.tab:hover { color: var(--color-text); }
.tab.active { color: var(--color-accent); border-bottom-color: var(--color-accent); }

/* ============================================================================
   Forms
   ============================================================================ */

.form-grid {
    display: grid; grid-template-columns: 200px 1fr; gap: 16px 24px;
    align-items: center;
    max-width: 720px;
}
.form-grid label {
    font-size: 13px; color: var(--color-text-dim); font-weight: 500;
}
.form-grid > * { min-width: 0; }
.form-help { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; grid-column: 2; }

.field-group { margin-bottom: 16px; }
.field-group label {
    display: block; font-size: 12px; color: var(--color-text-dim);
    margin-bottom: 6px; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.05em;
}

.input-with-suffix {
    display: flex; align-items: stretch;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.input-with-suffix:focus-within { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-dim); }
.input-with-suffix input {
    background: transparent; border: none; flex: 1;
    padding: 12px 14px;
    color: var(--color-text); font-size: 15px; font-family: var(--font-ui);
}
.input-with-suffix input:focus { outline: none; }
.input-with-suffix .suffix {
    padding: 12px 14px;
    color: var(--color-text-muted);
    font-size: 13px;
    border-left: 1px solid var(--color-border);
}

.color-picker-row {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 4px 10px 4px 4px;
}
.color-picker-row input[type="color"] {
    -webkit-appearance: none; appearance: none;
    width: 32px; height: 32px; border: none; border-radius: 6px; padding: 0;
    background: transparent; cursor: pointer;
}
.color-picker-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-picker-row input[type="color"]::-webkit-color-swatch { border: none; border-radius: 6px; }
.color-picker-row span { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--color-text-dim); }

.switch {
    position: relative; display: inline-block; width: 40px; height: 22px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute; cursor: pointer; inset: 0;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-strong);
    border-radius: 999px;
    transition: 0.2s;
}
.switch .slider::before {
    position: absolute; content: ""; height: 14px; width: 14px;
    left: 3px; top: 3px;
    background: var(--color-text-dim);
    border-radius: 50%; transition: 0.2s;
}
.switch input:checked + .slider { background: var(--color-accent-dim); border-color: var(--color-accent); }
.switch input:checked + .slider::before { transform: translateX(18px); background: var(--color-accent); }

/* ─── Runde Plattform-Checkbox (z.B. Kunden-Zuordnung im User-Formular) ───── */
.uf-client-row {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 2px; cursor: pointer;
    font-size: 13px; color: var(--color-text);
}
.uf-client-row input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.uf-check {
    flex: 0 0 auto;
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 1.5px solid var(--color-border-strong);
    background: var(--color-bg-surface);
    display: inline-flex; align-items: center; justify-content: center;
    color: transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.uf-check .ph { font-size: 12px; line-height: 1; }
.uf-client-row:hover .uf-check { border-color: var(--color-accent); }
.uf-client-row input:checked + .uf-check {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-accent-fg, #00131a);
}
.uf-client-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; }
.uf-client-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn-danger {
    background: rgba(239,68,68,0.1); color: var(--color-error);
    border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ============================================================================
   Tables
   ============================================================================ */

.table {
    width: 100%; border-collapse: collapse;
}
.table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
}
.table td {
    padding: 12px;
    border-bottom: 1px solid var(--color-border);
    font-size: 13px;
    color: var(--color-text);
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,0.02); }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions button { margin-left: 4px; }
.table .td-dim { color: var(--color-text-dim); font-size: 12px; }
.table-color-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 8px;
}

/* Auf Mobile bestimmte Spalten ausblenden (in Card-Stacked Tabellen) */
@media (max-width: 720px) {
    .table-stacked td.td-hide-mobile { display: none !important; }
}

/* Mobile: .table-stacked wird zur Card-Liste (Spaltenkopf weg, jede Zeile ist
   eine Card mit "Label: Wert"-Paaren via data-label ::before pseudo). */
@media (max-width: 720px) {
    .table-stacked { width: 100%; border-collapse: separate; }
    .table-stacked thead { display: none; }
    .table-stacked, .table-stacked tbody { display: block; width: 100%; }
    .table-stacked tr {
        display: block;
        background: var(--color-bg-surface);
        border: 1px solid var(--color-border);
        border-radius: 12px;
        padding: 14px 16px;
        margin-bottom: 10px;
    }
    .table-stacked tr:hover td { background: transparent; }
    .table-stacked td {
        display: flex;
        align-items: baseline;
        gap: 12px;
        padding: 5px 0;
        border: 0;
        font-size: 13px;
        text-align: left;
        word-break: break-word;
        color: var(--color-text);
    }
    /* Erste Zelle = Name groß, ohne Label-Spalte */
    .table-stacked td:first-child {
        font-size: 15px;
        padding-bottom: 8px;
        margin-bottom: 4px;
        border-bottom: 1px solid var(--color-border);
        gap: 0;
    }
    .table-stacked td:first-child::before { display: none; }
    .table-stacked td:first-child strong { font-weight: 600; }
    /* data-label vor dem Wert als kleines Caption-Label */
    .table-stacked td[data-label]::before {
        content: attr(data-label);
        font-size: 10px;
        color: var(--color-text-dim);
        text-transform: uppercase;
        letter-spacing: 0.06em;
        min-width: 96px;
        flex-shrink: 0;
        padding-top: 2px;
    }
    /* Actions-Zeile: separator + rechts-bündig */
    .table-stacked td.actions {
        justify-content: flex-end;
        padding-top: 12px;
        margin-top: 8px;
        border-top: 1px solid var(--color-border);
    }
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: var(--color-bg-elevated);
    color: var(--color-text-dim);
}
.badge-success { background: rgba(34,197,94,0.15); color: var(--color-success); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--color-warning); }
.badge-error { background: rgba(239,68,68,0.15); color: var(--color-error); }
.badge-accent { background: var(--color-accent-dim); color: var(--color-accent); }

/* ============================================================================
   Modal
   ============================================================================ */

.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 24px;
    animation: fade-in 0.15s ease-out;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    width: 100%; max-width: 560px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    box-shadow: var(--shadow-elevated);
}
.modal-large { max-width: 800px; }

/* ─── Journey-Modal (Onboarding-Slide-Sequenz) ──────────────────────────── */
.journey-modal-overlay {
    z-index: 1010;
    flex-direction: column;
    gap: 24px;
}
.journey-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: journey-slide-in 0.3s ease-out;
}
.journey-logo img {
    height: 36px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 12px rgba(0,0,0,0.4));
}
@media (max-width: 600px) {
    .journey-logo img { height: 28px; }
    .journey-modal-overlay { gap: 16px; }
}
.journey-modal {
    position: relative;
    max-width: 520px;
    padding: 0;
    overflow: hidden;
}
.journey-close {
    position: absolute; top: 14px; right: 14px;
    background: transparent; border: none; padding: 6px;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
}
.journey-close:hover { background: rgba(255,255,255,0.08); color: var(--color-text); }
.journey-slide {
    padding: 56px 40px 24px;
    text-align: center;
    animation: journey-slide-in 0.25s ease-out;
}
@keyframes journey-slide-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.journey-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--color-accent);
    margin-bottom: 18px;
    font-weight: 600;
}
.journey-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 400;
    margin: 0 0 16px;
    color: var(--color-text);
    line-height: 1.2;
}
.journey-body {
    font-size: 15px;
    line-height: 1.55;
    color: var(--color-text-dim);
    margin: 0 auto;
    max-width: 380px;
}
.journey-modal .modal-footer {
    border-top: 1px solid var(--color-border);
    padding: 18px 28px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
}
.journey-progress {
    display: inline-flex; gap: 7px;
    align-items: center;
}
.journey-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.12);
    transition: background 0.2s, transform 0.2s;
}
.journey-dot.active { background: var(--color-accent); transform: scale(1.15); }
.journey-dot.done   { background: var(--color-accent-dim); }
.journey-actions {
    display: inline-flex; gap: 10px;
}
@media (max-width: 600px) {
    .journey-slide { padding: 48px 22px 18px; }
    .journey-title { font-size: 22px; }
    .journey-body { font-size: 14px; }
    .journey-modal .modal-footer { padding: 14px 18px; flex-direction: column-reverse; }
    .journey-actions { width: 100%; }
    .journey-actions .btn { flex: 1; }
}

/* ─── Journey-Celebration: Fullscreen-Overlay (kein Card) ───────────────────
   Dim-Backdrop (wenn `dim: true`) + Soft-Vignette als weicher Schatten hinter
   dem Content für Lesbarkeit. Inhalt (Icon, Headline, Body, Buttons) liegt
   direkt zentriert ohne Card-Rahmen.  Confetti fliegt im Vordergrund. */
.journey-celebration-overlay {
    position: fixed; inset: 0;
    z-index: 1900;
    display: flex; align-items: center; justify-content: center;
    padding: 32px;
    animation: fade-in 0.3s ease-out;
}
.journey-celebration-overlay.is-dimmed {
    /* Sanfter dunkler Schleier — NICHT komplett schwarz, kein Card-Look */
    background: rgba(0,0,0,0.38);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}
.journey-celebration-vignette {
    /* Weicher Radial-Schatten hinter Headline+Body — dunkler im Zentrum,
       fadet vollständig zu transparent an den Kanten. Macht weiße Schrift
       lesbar ohne harten Rahmen oder Block-Hintergrund. */
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        ellipse 720px 460px at 50% 50%,
        rgba(0,0,0,0.65) 0%,
        rgba(0,0,0,0.45) 35%,
        rgba(0,0,0,0.18) 65%,
        rgba(0,0,0,0) 100%
    );
}
.journey-celebration-content {
    position: relative; z-index: 1;
    max-width: 620px;
    text-align: center;
    color: var(--color-text);
    animation: journey-slide-in 0.4s ease-out;
}
.journey-celebration-icon {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 64px; height: 64px;
    margin: 0 auto 18px;
    color: var(--color-accent);
    filter: drop-shadow(0 4px 18px color-mix(in srgb, var(--color-accent) 55%, transparent));
}
.journey-celebration-icon svg { width: 100%; height: 100%; }
.journey-celebration-title {
    font-family: var(--font-display);
    font-size: 44px;
    font-weight: 400;
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 18px;
    text-shadow: 0 2px 28px rgba(0,0,0,0.6);
}
.journey-celebration-body {
    font-size: 15px;
    color: var(--color-text-dim);
    line-height: 1.6;
    margin: 0 auto 28px;
    max-width: 460px;
    text-shadow: 0 1px 12px rgba(0,0,0,0.45);
}
.journey-celebration-actions {
    display: flex; gap: 12px; justify-content: center;
    flex-wrap: wrap;
}
.journey-celebration-actions .btn { min-width: 140px; }
@media (max-width: 720px) {
    .journey-celebration-title { font-size: 30px; }
    .journey-celebration-vignette {
        background: radial-gradient(
            ellipse 90% 60% at 50% 50%,
            rgba(0,0,0,0.65) 0%,
            rgba(0,0,0,0.4)  40%,
            rgba(0,0,0,0)    100%
        );
    }
}
@media (max-width: 480px) {
    .journey-celebration-title { font-size: 26px; }
    .journey-celebration-actions { flex-direction: column-reverse; width: 100%; max-width: 280px; margin: 0 auto; }
    .journey-celebration-actions .btn { width: 100%; }
}

/* ─── Journey-Celebration: Confetti-Layer ───────────────────────────────────
   Liegt ÜBER dem Overlay-Backdrop (z-index 2000), damit die Partikel auch
   vor der Card sichtbar sind und das Festtags-Gefühl tragen. */
.journey-confetti {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 2000;
    overflow: hidden;
}
.journey-confetti-piece {
    position: absolute;
    top: -24px;
    width: 9px; height: 14px;
    border-radius: 2px;
    animation-name: journey-confetti-fall;
    animation-timing-function: cubic-bezier(0.35, 0.04, 0.6, 1);
    animation-fill-mode: forwards;
    will-change: transform, opacity;
}
@keyframes journey-confetti-fall {
    0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
    85%  { opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* Pro-Slide-Illustration (Screenshot / SVG). Bei Slides mit `image` läuft
   das Layout Side-by-Side: Bild links, Text rechts. Bei Slides ohne Image
   bleibt alles zentriert wie bei den Welcome- und Hilfe-Slides. */
.journey-modal:has(.journey-slide-with-image) { max-width: 720px; }
.journey-slide-with-image {
    display: flex;
    gap: 28px;
    align-items: center;
    text-align: left;
    padding: 36px 36px 24px;
}
.journey-slide-with-image .journey-illustration {
    flex: 0 0 280px;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    background: rgba(0,0,0,0.18);
    overflow: hidden;
    line-height: 0;
}
.journey-slide-with-image .journey-illustration img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    object-position: center;
}
.journey-slide-with-image .journey-slide-text {
    flex: 1 1 auto;
    min-width: 0;
}
.journey-slide-with-image .journey-eyebrow,
.journey-slide-with-image .journey-title,
.journey-slide-with-image .journey-body { text-align: left; }
.journey-slide-with-image .journey-eyebrow { margin-bottom: 12px; }
.journey-slide-with-image .journey-title { margin-bottom: 12px; }
.journey-slide-with-image .journey-body { max-width: none; margin: 0; }

@media (max-width: 720px) {
    .journey-modal:has(.journey-slide-with-image) { max-width: 100%; }
    .journey-slide-with-image {
        flex-direction: column;
        gap: 18px;
        padding: 36px 22px 16px;
        text-align: center;
    }
    .journey-slide-with-image .journey-illustration { flex: 0 0 auto; width: 100%; }
    .journey-slide-with-image .journey-illustration img { max-height: 200px; }
    .journey-slide-with-image .journey-eyebrow,
    .journey-slide-with-image .journey-title,
    .journey-slide-with-image .journey-body { text-align: center; }
    .journey-slide-with-image .journey-body { max-width: 380px; margin: 0 auto; }
}
.modal-header {
    padding: 24px 28px 16px;
    border-bottom: 1px solid var(--color-border);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-header h2 { font-family: var(--font-display); font-size: 22px; font-weight: 400; }
.modal-close {
    background: transparent; border: none;
    width: 32px; height: 32px;
    border-radius: 999px;
    color: var(--color-text-dim); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--color-bg-elevated); color: var(--color-text); }
.modal-body { padding: 24px 28px; }
.modal-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--color-border);
    display: flex; justify-content: flex-end; gap: 8px;
}

/* ============================================================================
   Toast
   ============================================================================ */

.toast-container {
    position: fixed; top: 20px; right: 20px;
    z-index: 2000;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none;
}
.toast {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    color: var(--color-text);
    font-size: 13px;
    box-shadow: var(--shadow-elevated);
    pointer-events: auto;
    animation: toast-in 0.2s ease-out;
    max-width: 360px;
    border-left: 3px solid var(--color-accent);
}
.toast.success { border-left-color: var(--color-success); }
.toast.error   { border-left-color: var(--color-error); }
.toast.warning { border-left-color: var(--color-warning); }
@keyframes toast-in {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================================================
   Loading
   ============================================================================ */

.loading-shell {
    display: flex; align-items: center; justify-content: center;
    min-height: 240px;
}
.spinner {
    width: 24px; height: 24px;
    border: 2px solid var(--color-border-strong);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Vollbild-Overlay für längere Async-Operationen */
.loading-overlay {
    position: fixed; inset: 0;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 18px;
    animation: fade-in 0.15s ease-out;
}
.loading-overlay .overlay-spinner {
    width: 44px; height: 44px;
    border: 3px solid var(--color-border-strong);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loading-overlay .overlay-text {
    font-size: 13px;
    color: var(--color-text-dim);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ============================================================================
   Settings View Layout
   ============================================================================ */

.settings-layout { max-width: 920px; }
.settings-section { margin-bottom: 32px; }
.settings-section h3 {
    font-family: var(--font-display);
    font-size: 16px; font-weight: 400;
    margin-bottom: 16px;
    color: var(--color-text-dim);
    text-transform: uppercase; letter-spacing: 0.08em;
}

/* ─── Integrationen-Tab (Settings → Integrationen) ───────────────────────── */
.integration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.integration-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 14px 16px;
    transition: border-color 0.15s;
}
.integration-card:hover { border-color: var(--color-border-strong); }
.integration-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.integration-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
}
.integration-card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.integration-card-value {
    padding: 6px 8px;
    background: var(--color-bg-elevated);
    border-radius: 6px;
    letter-spacing: 0.04em;
}
@media (max-width: 720px) {
    .integration-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
   Dashboard
   ============================================================================ */

h1.dashboard-month {
    margin: 0 0 4px;
}
.dashboard-greeting {
    margin: 0 0 24px;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 400;
    color: var(--color-text-dim);
    line-height: 1.4;
}
@media (max-width: 720px) {
    .dashboard-greeting { margin-bottom: 16px; }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
/* Desktop-Reihenfolge tauschen:
   Row 1: Fortschritt (links) | Agenda (rechts)
   Row 2: Kostenstand (links) | Ziele (rechts)
   DOM-Reihenfolge bleibt (Tasks, Donut, Goals, Cost) — wichtig für mobile/Reader-Order. */
@media (min-width: 1101px) {
    .dashboard-grid #cardDonut { order: 1; }
    .dashboard-grid #cardTasks { order: 2; }
    .dashboard-grid #cardCost  { order: 3; }
    .dashboard-grid #cardGoals { order: 4; }
}
@media (max-width: 1100px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

/* ─── AgentOne: Account & Credits ─────────────────────────────────────────── */
.agentone-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}
.agentone-grid > .card { min-width: 0; }
@media (max-width: 1100px) {
    .agentone-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Modul-Liste (linke Card) */
.ao-modules { display: flex; flex-direction: column; gap: 10px; }
.ao-module {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--color-border);
}
.ao-module.active { border-color: var(--color-accent-dim); background: color-mix(in srgb, var(--color-accent) 6%, transparent); }
.ao-module-status {
    flex: 0 0 auto;
    width: 28px; height: 28px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.06);
    color: var(--color-text-dim);
}
.ao-module.active .ao-module-status { background: var(--color-accent-dim); color: var(--color-accent); }
.ao-module-status svg { width: 14px; height: 14px; }
.ao-module-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ao-module-label { font-size: 14px; font-weight: 500; color: var(--color-text); }
.ao-module-meta  { font-size: 11px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.ao-module-link { flex: 0 0 auto; margin-left: auto; font-size: 16px; color: var(--color-text-dim); opacity: 0.7; transition: color 0.15s, opacity 0.15s; }
.ao-module-linked { cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.ao-module-linked:hover { border-color: var(--color-accent); }
.ao-module-linked:hover .ao-module-link { color: var(--color-accent); opacity: 1; }

/* Credit-Verbrauch (rechte Card) — analog zu Dashboard-Donut-Progress */
.ao-credits-list { display: flex; flex-direction: column; gap: 14px; }
.ao-credit-row { display: flex; flex-direction: column; gap: 6px; }
.ao-credit-head {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 13px;
}
.ao-credit-label { color: var(--color-text); }
.ao-credit-count { color: var(--color-text-dim); font-variant-numeric: tabular-nums; }
.ao-credit-count strong { color: var(--color-text); font-weight: 600; }
.ao-credit-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}
.ao-credit-fill {
    height: 100%;
    background: var(--color-accent);
    border-radius: 999px;
    transition: width 0.4s ease-out;
    min-width: 2px;
}
.ao-credit-meta {
    margin-top: 5px;
    font-size: 11px;
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
}

/* ─── Chatbot: Interaktionen-Card ─────────────────────────────────────────── */
.chatbot-interactions { display: flex; flex-direction: column; gap: 22px; }
.ci-eyebrow {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 12px;
}
.ci-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.ci-tile {
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 18px 14px;
    text-align: center;
    min-width: 0;
    overflow: hidden;
}
.ci-num {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 400;
    line-height: 1.05;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}
.ci-num-soon {
    font-size: 22px;
    color: var(--color-text-muted);
    font-style: italic;
}
.ci-label {
    margin-top: 8px;
    font-size: 12px;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
@media (max-width: 520px) {
    .ci-grid { gap: 8px; }
    .ci-num { font-size: 30px; }
    .ci-tile { padding: 14px 6px; }
    .ci-label { font-size: 11px; letter-spacing: 0.03em; }
}
@media (max-width: 380px) {
    .ci-num { font-size: 23px; }
}

/* ─── Chatbot: Fragen-Statistik-Cards (häufigste / unbeantwortete) ───────── */
.cb-h3-note { font-weight: 400; font-size: 12px; color: var(--color-text-dim); letter-spacing: 0; }
.cb-qlist {
    list-style: none;
    margin: 0; padding: 0;
    display: flex; flex-direction: column;
    counter-reset: none;
}
.cb-qrow {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 2px;
    border-bottom: 1px solid var(--color-border);
    font-size: 13px;
}
.cb-qrow:last-child { border-bottom: none; }
.cb-qrank {
    flex: 0 0 auto;
    width: 20px; height: 20px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--color-accent) 16%, transparent);
    color: var(--color-accent);
    font-size: 11px; font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.cb-qtext {
    flex: 1 1 auto; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--color-text);
}
.cb-qcount {
    flex: 0 0 auto;
    color: var(--color-text-dim);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
}
.cb-qmeta { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; }
.cb-qdate { color: var(--color-text-dim); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cb-qlist-unanswered .cb-qcount {
    background: color-mix(in srgb, #f5b400 22%, transparent);
    color: #f5b400;
    padding: 1px 6px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.cb-qfoot {
    margin-top: 12px; padding-top: 10px;
    border-top: 1px solid var(--color-border);
    font-size: 11px; color: var(--color-text-dim);
    text-align: center;
}

/* Inaktives Modul: ausgegraut, Balken am Anfang (0 %), kein Min-Width-Stummel */
.ao-credit-row.is-inactive { opacity: 0.4; }
.ao-credit-row.is-inactive .ao-credit-label,
.ao-credit-row.is-inactive .ao-credit-count strong,
.ao-credit-row.is-inactive .ao-credit-count { color: var(--color-text-muted); }
.ao-credit-row.is-inactive .ao-credit-fill {
    background: var(--color-text-muted);
    min-width: 0;
}

.ao-source-note {
    margin: 18px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.5;
}

/* Brand-Cards unterhalb des Dashboards: bis zu 3 nebeneinander für die gebuchten Bereiche */
.dashboard-brands {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.dashboard-brand-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 38px 28px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 120px;
}
.dashboard-brand-card:hover {
    border-color: var(--color-accent-dim);
    transform: translateY(-2px);
    background: rgba(255,255,255,0.03);
}
.dashboard-brand-logo {
    height: 26px;
    width: auto;
    max-width: 100%;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}
.dashboard-brand-card:hover .dashboard-brand-logo { opacity: 1; }

@media (max-width: 720px) {
    .dashboard-brands { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
    .dashboard-brand-card { padding: 28px 22px; min-height: 90px; }
    .dashboard-brand-logo { height: 22px; }
}

/* ─── Light-Dashboard: Hub-Tiles für collaborator_light (seit 0.9.6.16) ─── */
.dashboard-hubs-tiles {
    display: grid;
    /* Auto-fit damit beliebig viele Hubs sauber umbrechen (aktuell 3:
       Review + File + Flow). minmax(220px) sorgt für lesbare Tile-Größe. */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 8px;
}
.hub-tile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s, transform 0.12s, background 0.18s;
    position: relative;
}
.hub-tile:hover {
    border-color: var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 6%, var(--color-bg-surface));
}
.hub-tile:active { transform: scale(0.99); }
.hub-tile-icon {
    flex: 0 0 auto;
    width: 56px; height: 56px;
    border-radius: 14px;
    background: var(--color-bg-elevated);
    color: var(--color-accent);
    display: inline-flex; align-items: center; justify-content: center;
}
.hub-tile-body { flex: 1 1 auto; min-width: 0; }
.hub-tile-body h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}
.hub-tile-body p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--color-text-dim);
}
.hub-tile-arrow {
    flex: 0 0 auto;
    color: var(--color-text-muted);
    transition: color 0.18s, transform 0.18s;
}
.hub-tile:hover .hub-tile-arrow {
    color: var(--color-accent);
    transform: translateX(2px);
}

.light-file-row:hover {
    background: var(--color-bg-elevated);
}

@media (max-width: 720px) {
    .dashboard-hubs-tiles { grid-template-columns: 1fr; gap: 12px; }
    .hub-tile { padding: 16px 18px; gap: 14px; }
    .hub-tile-icon { width: 48px; height: 48px; }
    .hub-tile-body h3 { font-size: 15px; }
    .hub-tile-body p { font-size: 12px; }
}
@media (max-width: 720px) {
    /* Stack-Reihenfolge mobile: Fortschritt → Kostenstand → Ziele → Aufgaben */
    .dashboard-grid #cardDonut { order: 1; }
    .dashboard-grid #cardCost  { order: 2; }
    .dashboard-grid #cardGoals { order: 3; }
    .dashboard-grid #cardTasks { order: 4; }
}
.dashboard-grid .card { padding: 0; overflow: hidden; }
.dashboard-grid .card .card-header { padding: 18px 22px; margin-bottom: 0; border-bottom: 1px solid var(--color-border); }
.dashboard-grid .card .card-body { padding: 0; }

/* Agenda-Card: bei vielen Tasks scrollt der Body intern (nur Desktop/Tablet,
   auf Mobile scrollt die Seite ohnehin) */
@media (min-width: 721px) {
    .dashboard-grid #cardTasks {
        display: flex;
        flex-direction: column;
        max-height: 550px;
        position: relative;
    }
    .dashboard-grid #cardTasks .card-header { flex: 0 0 auto; }
    .dashboard-grid #cardTasks .card-body {
        flex: 1 1 auto;
        min-height: 0;
        /* overflow-y: scroll (statt auto) → Track wird IMMER reserviert,
           Mac Safari kann die Rail sonst je nach OS-Pref komplett ausblenden */
        overflow-y: scroll;
        /* Firefox: scrollbar-color = Thumb / Track */
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,0.28) rgba(255,255,255,0.06);
    }
    /* WebKit (Chrome, Safari Mac, iOS): -webkit-appearance: none ist kritisch,
       sonst respektiert Safari das OS-Setting "Bildlaufleisten beim Scrollen" */
    .dashboard-grid #cardTasks .card-body::-webkit-scrollbar {
        -webkit-appearance: none;
        width: 12px;
        height: 12px;
    }
    .dashboard-grid #cardTasks .card-body::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.06);
        box-shadow: inset 1px 0 0 rgba(255,255,255,0.08);
        margin: 6px 0;
    }
    .dashboard-grid #cardTasks .card-body::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.28);
        border-radius: 6px;
        border: 3px solid transparent;
        background-clip: padding-box;
        min-height: 50px;
    }
    .dashboard-grid #cardTasks .card-body::-webkit-scrollbar-thumb:hover {
        background: rgba(255,255,255,0.45);
        background-clip: padding-box;
    }
}

/* Scroll-Indikator-Pfeile: oben mittig + unten mittig auf der Card,
   bezogen auf den Scrollbereich. Nur Outline (kein Glow). */
.scroll-indicators { display: contents; }
.scroll-indicator {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) scale(0.85);
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: rgba(255,255,255,0.85);
    border: 1px solid color-mix(in srgb, var(--color-accent) 50%, transparent);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    z-index: 6;
    transition: opacity 240ms ease, transform 240ms ease;
}
.scroll-indicator svg { width: 13px; height: 13px; }

/* Pfeile sitzen an den oberen/unteren Kanten des Scroll-Bereichs (= card-body).
   72 px = ungefähre Höhe des card-headers + kleiner Innenabstand. */
.scroll-indicator-up   { top: 72px; }
.scroll-indicator-down { bottom: 10px; }

.has-scroll-above .scroll-indicator-up {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    animation: scrollIndPulse 1.4s ease-in-out infinite;
}
.has-scroll-below .scroll-indicator-down {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    animation: scrollIndPulse 1.4s ease-in-out infinite;
}

/* Reine Outline-Animation: Border-Farbe pulsiert, kein Glow */
@keyframes scrollIndPulse {
    0%, 100% { border-color: color-mix(in srgb, var(--color-accent) 30%, transparent); }
    50%      { border-color: color-mix(in srgb, var(--color-accent) 75%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-indicator { animation: none !important; }
}

/* Task-Liste */
.task-list { width: 100%; border-collapse: collapse; }
.task-list th {
    text-align: left;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
    background: rgba(255,255,255,0.02);
    white-space: nowrap;
}
.task-list td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    font-size: 13px;
    color: var(--color-text);
    vertical-align: middle;
}
.task-list tr:last-child td { border-bottom: none; }
.task-list tr.task-row:hover { background: rgba(255,255,255,0.03); cursor: pointer; }
.task-list .col-status { width: 110px; }
.task-list .col-time { width: 70px; text-align: right; font-variant-numeric: tabular-nums; color: var(--color-text-dim); }
.task-list .col-comments { width: 60px; text-align: center; }
.task-list .col-actions { width: 1%; white-space: nowrap; text-align: right; }
.task-list .task-title {
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.3;
}
.task-list .due-date,
.task-list .task-subline {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
}
.status-pill::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
}
.status-pill.open    { color: var(--color-warning); background: rgba(245,158,11,0.10); border-color: rgba(245,158,11,0.25); }
.status-pill.closed  { color: var(--color-success); background: rgba(34,197,94,0.10);  border-color: rgba(34,197,94,0.25);  }

.comment-count {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--color-text-dim);
    font-size: 12px;
    position: relative;
}
.comment-count.has-unread::after {
    content: "";
    position: absolute;
    top: -2px; right: -6px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 0 2px var(--color-bg-surface);
}
.comment-count svg { width: 14px; height: 14px; }

.btn-comment-row {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--color-text-dim);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.btn-comment-row:hover { color: var(--color-accent); border-color: var(--color-accent-dim); }
.btn-comment-row .btn-comment-text { display: none; }
.btn-comment-row .btn-comment-icon { display: inline-flex; }
.btn-comment-row .btn-comment-icon svg { width: 15px; height: 15px; display: block; }

/* Mobile-Check-Icon vor Task-Titeln — auf Desktop ausgeblendet */
.task-check-mobile { display: none; }

/* Card-Header Meta-Bereich (Task-Count + Mode-Switch) */
.card-header-meta {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Agenda-Mode-Switch (Full | Simple) als segmentierte Pille */
.agenda-mode-switch {
    display: inline-flex;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 2px;
    gap: 0;
}
.agenda-mode-btn {
    background: transparent;
    border: 0;
    padding: 4px 12px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text-muted);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.15s, background 0.18s;
    letter-spacing: 0.02em;
}
.agenda-mode-btn:hover { color: var(--color-text); }
.agenda-mode-btn.active {
    background: var(--color-accent-dim);
    color: var(--color-accent);
}

/* Simple-Liste */
.task-list-simple {
    list-style: none;
    margin: 0;
    padding: 0;
}
.task-list-simple .task-row-simple {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background 0.15s;
}
.task-list-simple .task-row-simple:last-child { border-bottom: none; }
.task-list-simple .task-row-simple:hover { background: rgba(255,255,255,0.03); }
.task-list-simple .task-title {
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
}
.task-pauschale-tag {
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 2px 9px;
    font-style: italic;
}

/* Items im User-Dropdown, die nur auf Mobile sichtbar sein sollen */
.dropdown-item-mobile { display: none; }
@media (max-width: 720px) {
    .dropdown-item-mobile { display: flex; }
}

/* ───── Ziele-Timeline (zentrierte Roadmap) ───── */
.goals-timeline { padding: 16px 0 40px; }
.timeline {
    position: relative;
    /* Extra-Platz unter dem letzten Eintrag, damit die Linie sichtbar
       weiterläuft und ausfaden kann. */
    padding-bottom: 90px;
}
.timeline::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 50%;
    width: 2px;
    /* Solide bis kurz unter den letzten Eintrag, dann sanftes Fade-Out. */
    background: linear-gradient(
        to bottom,
        var(--color-border) 0%,
        var(--color-border) calc(100% - 90px),
        transparent 100%
    );
    transform: translateX(-50%);
}
.tl-month {
    display: grid;
    grid-template-columns: 1fr 40px 1fr;
    align-items: start;
    margin-bottom: 32px;
}
.tl-month:last-child { margin-bottom: 0; }

.tl-axis {
    grid-column: 2;
    position: relative;
    display: flex;
    justify-content: center;
    padding-top: 0;
}
.tl-dot {
    position: relative;
    z-index: 1;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
}
.tl-dot-past { border-color: var(--color-success, #22c55e); }
.tl-dot-current {
    border-color: var(--color-warning, #f59e0b);
    box-shadow: 0 0 0 5px rgba(245,158,11,0.18);
}
/* Sonar-Effekt: zwei gestaffelte, expandierende Ringe vom aktuellen Dot aus.
   Suggeriert „hier passiert gerade etwas". */
.tl-dot-current::before,
.tl-dot-current::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--color-warning, #f59e0b);
    opacity: 0;
    pointer-events: none;
    animation: tl-sonar 2.4s ease-out infinite;
}
.tl-dot-current::after { animation-delay: 1.2s; }
@keyframes tl-sonar {
    0%   { transform: scale(0.6); opacity: 0.75; }
    80%  { opacity: 0.05; }
    100% { transform: scale(4);   opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .tl-dot-current::before,
    .tl-dot-current::after { display: none; }
}
.tl-dot-future { border-color: var(--color-accent); }

/* Verbindungslinie Dot → Monatsbezeichnung — exakt auf Höhe des Label-Mittelpunkts (= 7px = halbe Dot-Höhe) */
.tl-axis::after {
    content: "";
    position: absolute;
    top: 7px;
    height: 1px;
    background: var(--color-border);
    pointer-events: none;
    transform: translateY(-0.5px);
}
.tl-side-right .tl-axis::after {
    left: calc(50% + 7px);
    width: 36px;
}
.tl-side-left .tl-axis::after {
    right: calc(50% + 7px);
    width: 36px;
}

.tl-content { min-width: 0; }
.tl-side-right .tl-content { grid-column: 3; padding-left: 20px; text-align: left; }
.tl-side-left  .tl-content { grid-column: 1; padding-right: 20px; text-align: right; }

.tl-month-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
    color: var(--color-text-dim);
    letter-spacing: 0.02em;
    line-height: 14px;
    height: 14px;
    margin-bottom: 10px;
}
.tl-current .tl-month-label { color: var(--color-warning, #f59e0b); }

.tl-items {
    display: flex; flex-direction: column; gap: 8px;
}

.tl-item {
    display: inline-flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 14px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    cursor: default;
    text-align: left;
    max-width: 100%;
}
.tl-side-left .tl-item { flex-direction: row-reverse; text-align: right; }
.tl-side-right .tl-item { align-self: flex-start; }
.tl-side-left  .tl-item { align-self: flex-end; }

.tl-icon {
    width: 22px; height: 22px;
    flex: 0 0 auto;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-top: 1px;
}
.tl-icon svg { width: 12px; height: 12px; }
.tl-item-past .tl-icon { background: var(--color-success, #22c55e); color: #fff; }
.tl-item-current .tl-icon { background: var(--color-warning, #f59e0b); color: #1a1409; }
.tl-item-future .tl-icon {
    background: transparent;
    color: var(--color-accent);
    border: 1.5px solid var(--color-accent-dim);
}

.tl-text { min-width: 0; }
.tl-title {
    font-size: 14px;
    color: var(--color-text);
    font-weight: 500;
    line-height: 1.3;
}
.tl-desc {
    font-size: 12px;
    color: var(--color-text-dim);
    margin-top: 4px;
    line-height: 1.4;
}

@media (max-width: 720px) {
    .timeline::before { left: 20px; }
    .tl-month { grid-template-columns: 40px 1fr; }
    .tl-axis { grid-column: 1; }
    .tl-side-right .tl-content,
    .tl-side-left  .tl-content {
        grid-column: 2;
        padding: 0 0 0 16px;
        text-align: left;
    }
    .tl-side-left .tl-item { flex-direction: row; text-align: left; align-self: flex-start; }
    .tl-side-left .tl-item:hover { transform: translateX(2px); }
}

.task-list .col-unbilled {
    text-align: right;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    font-style: italic;
}
.task-row-unbilled .task-title { color: var(--color-text-dim); }

/* Monatsansicht: nicht-abrechenbare Display-Tasks mit Hinweis-Subline */
.task-row-month-unbilled .task-title-text { color: var(--color-text-dim); }
.task-unbilled-note {
    margin-top: 3px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    font-style: italic;
}

/* ───── Chat ───── */
.chat-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
    height: calc(100vh - 60px - 64px - 56px);
    min-height: 500px;
}
.chat-threads {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    padding: 8px;
    gap: 4px;
    background: rgba(0,0,0,0.15);
}
.chat-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--color-text-dim);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.chat-tab:hover { color: var(--color-text); background: var(--color-bg-elevated); }
.chat-tab.active {
    background: var(--color-accent-dim);
    color: var(--color-accent);
}
.chat-thread-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}
.chat-empty-list {
    padding: 24px 16px;
    color: var(--color-text-muted);
    font-size: 13px;
    text-align: center;
    line-height: 1.5;
}
.chat-thread {
    position: relative;
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--color-text);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 4px;
}
.chat-thread:hover { background: var(--color-bg-elevated); border-color: var(--color-border); }
.chat-thread.is-selected {
    background: var(--color-accent-dim);
    border-color: var(--color-accent-dim);
}
.chat-thread-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}
.chat-thread-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-thread-time {
    font-size: 11px;
    color: var(--color-text-muted);
    white-space: nowrap;
    flex: 0 0 auto;
}
.chat-thread-preview {
    font-size: 12px;
    color: var(--color-text-dim);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.chat-thread-dot {
    position: absolute;
    top: 14px; right: 6px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
}

.chat-panel {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-panel-head {
    padding: 18px 22px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.chat-panel-eyebrow {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}
.chat-panel-head h2 {
    margin: 4px 0 0;
    font-size: 18px;
    font-weight: 600;
}
.chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    color: var(--color-text-muted);
}
.chat-empty h3 { margin: 0 0 8px; color: var(--color-text-dim); font-weight: 500; }
.chat-empty p { margin: 0; max-width: 360px; font-size: 13px; line-height: 1.5; }
.chat-empty-msg {
    padding: 30px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 13px;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.chat-msg {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 12px 14px;
    max-width: 80%;
    align-self: flex-start;
}
.chat-msg-mine  { align-self: flex-end;  }
.chat-msg-other { align-self: flex-start; }
.chat-msg-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}
.chat-msg-meta strong { color: var(--color-text); font-weight: 600; }
.chat-msg-body {
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}
.chat-input-row {
    border-top: 1px solid var(--color-border);
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-input-row textarea {
    width: 100%;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    min-height: 70px;
    max-height: 200px;
    box-sizing: border-box;
}
.chat-input-row .btn,
.chat-input-row button {
    align-self: flex-end;
}
.chat-archived-hint {
    border-top: 1px solid var(--color-border);
    padding: 14px 18px;
    background: rgba(245,158,11,0.08);
    color: var(--color-warning, #f59e0b);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 900px) {
    .chat-layout { grid-template-columns: 1fr; height: auto; min-height: 0; }
    .chat-threads { max-height: 300px; }
}

/* ───── Rechnungen ───── */
.invoice-upload {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 16px 20px;
}
/* File-Input global: dunkel, mit gestyltem „Datei auswählen"-Button */
input[type="file"] {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 6px;
    color: var(--color-text-dim);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}
input[type="file"]:hover { border-color: var(--color-accent-dim); }
input[type="file"]:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-dim);
}
/* "Datei auswählen"-Button (Chrome/Edge/Safari) */
input[type="file"]::file-selector-button {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    margin-right: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
input[type="file"]::file-selector-button:hover {
    background: var(--color-accent-dim);
    border-color: var(--color-accent-dim);
    color: var(--color-accent);
}
/* Webkit-Fallback für ältere Safari-Versionen */
input[type="file"]::-webkit-file-upload-button {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    margin-right: 12px;
    cursor: pointer;
}
.invoice-table { margin-top: 4px; }
.invoice-table .col-actions { width: 1%; white-space: nowrap; }

/* ─── Lexware-Integration ───────────────────────────────────────────────── */
.lex-contact-picker { position: relative; }
.lex-contact-selected {
    display: flex; align-items: center; gap: 8px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 8px 10px 8px 12px;
    font-size: 13px;
}
.lex-contact-selected[hidden] { display: none; }
.lex-contact-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lex-contact-clear {
    flex: 0 0 auto;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-dim);
    font-size: 14px; line-height: 1;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.lex-contact-clear:hover { color: var(--color-text); border-color: var(--color-text); }
.lex-contact-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 6px 24px rgba(0,0,0,0.32);
}
.lex-contact-result {
    display: flex; flex-direction: column; gap: 2px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0; border-bottom: 1px solid var(--color-border);
    padding: 9px 12px;
    cursor: pointer;
    color: var(--color-text);
}
.lex-contact-result:last-child { border-bottom: 0; }
.lex-contact-result:hover { background: var(--color-bg-elevated); }
.lex-contact-result-name { font-size: 13px; font-weight: 500; }
.lex-contact-result-email { font-size: 11px; color: var(--color-text-dim); }
.lex-contact-empty { padding: 10px 12px; font-size: 12px; color: var(--color-text-dim); text-align: center; }

/* Lexware-Export-Button — inline in der Monats-Summary-Zeile */
.month-lex-export-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 5px 10px;
    color: var(--color-text-dim);
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.month-lex-export-inline:hover {
    color: var(--color-text);
    border-color: var(--color-text-dim);
    background: rgba(255, 255, 255, 0.03);
}
.month-lex-export-inline:disabled {
    opacity: 0.6;
    cursor: progress;
}
.month-lex-export-inline .lex-icon { display: inline-flex; align-items: center; justify-content: center; }
.month-lex-export-inline .lex-icon svg { width: 14px; height: 14px; display: block; }
.month-lex-export-inline .lex-label { line-height: 1; }
@media (max-width: 720px) {
    .month-lex-export-inline .lex-label { display: none; }
    .month-lex-export-inline { padding: 6px 8px; }
}

/* ─── Reports (Tasks vom konfigurierten Aufgabentyp) ────────────────────── */

/* Wide top card mit "Neueste Reports" — horizontale Anordnung */
.report-latest-card .card-header h3 { color: var(--color-text); }
.report-latest-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 4px;
}
@media (max-width: 1100px) { .report-latest-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .report-latest-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px)  { .report-latest-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.report-latest-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 10px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    color: var(--color-text);
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
    min-width: 0;
    /* Hochformat (Dokument-Look) — kompakt für 6 nebeneinander */
    aspect-ratio: 3 / 4;
}
.report-latest-item:hover {
    border-color: var(--color-accent-dim);
    background: var(--color-bg-surface);
}
.report-latest-item:active { transform: scale(0.98); }
.report-latest-icon {
    flex: 0 0 auto;
    width: 56px;
    height: 64px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent-dim);
    color: var(--color-accent);
}
.report-latest-icon svg { width: 32px; height: 32px; display: block; }
.report-latest-meta {
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.report-latest-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.report-latest-date {
    font-size: 11px;
    color: var(--color-text-dim);
    line-height: 1.2;
}

/* Liste der älteren Reports darunter */
.report-history-card .card-header h3 { color: var(--color-text); }
.report-history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}
.report-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    color: var(--color-text);
    font-family: inherit;
    transition: background 0.12s, border-color 0.12s;
    min-width: 0;
}
.report-history-item:hover {
    background: var(--color-bg-elevated);
    border-color: var(--color-border);
}
.report-history-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-elevated);
    color: var(--color-text-dim);
}
.report-history-item:hover .report-history-icon {
    background: var(--color-accent-dim);
    color: var(--color-accent);
}
.report-history-icon svg { width: 16px; height: 16px; display: block; }
.report-history-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 14px;
}
.report-history-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 auto;
    min-width: 0;
}
.report-history-date {
    font-size: 12px;
    color: var(--color-text-dim);
    flex: 0 0 auto;
}
.report-history-chevron {
    flex: 0 0 auto;
    color: var(--color-text-dim);
    display: inline-flex;
    align-items: center;
}
.report-history-chevron svg { width: 16px; height: 16px; }
@media (max-width: 600px) {
    .report-history-meta { flex-direction: column; align-items: flex-start; gap: 2px; }
    .report-history-date { font-size: 11px; }
}

.report-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
}
.report-meta-date { font-size: 12px; color: var(--color-text-dim); }
.report-meta-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    color: var(--color-text-dim);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.report-iframe {
    width: 100%;
    height: 60vh;
    min-height: 400px;
    border: 0;
    border-radius: 8px;
    /* Hintergrund kommt aus dem srcdoc selbst (theme-abhängig) */
    background: transparent;
    display: block;
}

/* Theme-Toggle im Report-Detail — Pill mit gleitendem Thumb */
.report-theme-toggle {
    flex: 0 0 auto;
    position: relative;
    width: 56px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-elevated);
    cursor: pointer;
    padding: 0;
    transition: border-color 0.15s, background 0.15s;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.report-theme-toggle:hover { border-color: var(--color-accent-dim); }
.report-theme-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-accent-fg, #000);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: left 0.22s cubic-bezier(0.4, 0, 0.2, 1), background 0.18s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.report-theme-toggle[data-theme="light"] .report-theme-thumb {
    left: calc(100% - 22px - 2px);
}
.report-theme-thumb svg { width: 13px; height: 13px; display: block; }
/* Icon-Wechsel im Thumb je nach Mode */
.report-theme-toggle .report-theme-icon-light { display: none; }
.report-theme-toggle .report-theme-icon-dark  { display: inline-flex; }
.report-theme-toggle[data-theme="light"] .report-theme-icon-dark  { display: none; }
.report-theme-toggle[data-theme="light"] .report-theme-icon-light { display: inline-flex; }

/* Modal-Footer mit Download links + Schließen rechts */
.modal-footer-spread { justify-content: space-between !important; }
.modal-footer-spread > :first-child { margin-right: auto; }

.invoice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.invoice-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.15s;
}
.invoice-card:hover {
    border-color: var(--color-accent-dim);
    transform: translateY(-1px);
}
.invoice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 0 10px;
    color: var(--color-text-dim);
}
.invoice-icon svg {
    width: 56px;
    height: 56px;
    transition: color 0.15s;
}
.invoice-icon-label {
    fill: var(--color-accent);
}
.invoice-card:hover .invoice-icon { color: var(--color-text); }
.invoice-meta {
    padding: 8px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}
.invoice-month {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent);
    font-weight: 600;
}
.invoice-filename {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.invoice-detail {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}
.invoice-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: center;
}
.invoice-actions .btn { font-size: 11px; padding: 6px 10px; }

/* Upload-Tile (Admin) */
.invoice-card-upload {
    background: transparent;
    border: 1.5px dashed var(--color-border);
    color: var(--color-text-dim);
    cursor: pointer;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 220px;
    padding: 20px;
    transition: all 0.15s;
}
.invoice-card-upload:hover {
    border-color: var(--color-accent-dim);
    border-style: solid;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-1px);
}
.invoice-upload-plus {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--color-bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-dim);
    transition: all 0.18s;
}
.invoice-card-upload:hover .invoice-upload-plus {
    background: var(--color-accent-dim);
    color: var(--color-accent);
    transform: scale(1.04);
}
.invoice-upload-plus svg { width: 26px; height: 26px; }
.invoice-upload-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ───── Monatsansichten ───── */
.months-forecast { margin-bottom: 24px; }
.forecast-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    overflow: hidden;
}
.forecast-header {
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--color-border);
}
.forecast-eyebrow {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
}
.forecast-header h2 {
    margin: 4px 0 0;
    font-size: 20px;
    color: var(--color-text);
    text-transform: capitalize;
}
.forecast-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.forecast-col { padding: 18px 22px; }
.forecast-col + .forecast-col { border-left: 1px solid var(--color-border); }
.forecast-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}
.forecast-empty {
    font-size: 13px;
    color: var(--color-text-muted);
    padding: 8px 0;
}
.forecast-list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 8px;
}
.forecast-list li {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    align-items: flex-start;
}
.forecast-list li:hover {
    border-color: var(--color-accent-dim);
    background: rgba(255,255,255,0.04);
}
.forecast-goals li .goal-marker {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    margin-top: 6px;
    flex: 0 0 auto;
}
.forecast-tasks li {
    justify-content: space-between;
    align-items: center;
}
.forecast-item-title {
    font-size: 13px;
    color: var(--color-text);
    line-height: 1.35;
}
.forecast-item-sub {
    font-size: 12px;
    color: var(--color-text-dim);
    margin-top: 2px;
    line-height: 1.35;
}
.forecast-item-due {
    font-size: 12px;
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    margin-left: 12px;
}

@media (max-width: 720px) {
    .forecast-grid { grid-template-columns: 1fr; }
    .forecast-col + .forecast-col {
        border-left: none;
        border-top: 1px solid var(--color-border);
    }
}

.months-list { display: flex; flex-direction: column; gap: 10px; }
.months-current { margin-bottom: 10px; }

.month-row-current { border-color: var(--color-border); }
.month-summary-static {
    cursor: default;
}
.month-summary-static:hover { background: transparent; }
.month-caret-spacer {
    display: inline-block;
    width: 16px;
    height: 16px;
}
.month-current-btn {
    text-decoration: none;
    min-width: 110px;
    text-align: center;
    white-space: nowrap;
    margin-left: auto;
}
.month-row-current .month-summary-static {
    display: flex;
    align-items: center;
    gap: 24px;
}
.month-current-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}
.month-current-progress {
    flex: 0 0 140px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}
.month-row {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.month-row.expanded { border-color: var(--color-accent-dim); }
.month-summary {
    display: grid;
    grid-template-columns: 24px 1fr auto auto auto auto;
    align-items: center;
    gap: 24px;
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    border: none;
    color: var(--color-text);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}
.month-summary:focus-visible { outline: 2px solid var(--color-accent-dim); outline-offset: -2px; }
.month-summary:hover { background: rgba(255,255,255,0.03); }
.month-caret {
    width: 16px; height: 16px;
    color: var(--color-text-dim);
    transition: transform 0.2s;
}
.month-row.expanded .month-caret { transform: rotate(90deg); color: var(--color-accent); }
.month-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    text-transform: capitalize;
}
.month-stat {
    font-size: 13px;
    color: var(--color-text-dim);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.month-budget {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
    min-width: 110px;
    text-align: right;
}
.month-detail {
    border-top: 1px solid var(--color-border);
    background: rgba(0,0,0,0.15);
}
.month-detail-card {
    margin: 16px 16px 0;
}
/* Kostenstellen-Card im Monatsdetail: Ledger ohne eigenen Trennstrich */
.cost-lines-flush {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}
.month-detail-tasks-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px 0 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}
.month-detail-tasks-label svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}
.month-empty {
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--color-text-muted);
}
.task-list-month .col-comments { width: 80px; }

.comment-link {
    display: inline-flex; align-items: center; gap: 6px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 4px 10px;
    color: var(--color-text-dim);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: all 0.15s;
}
.comment-link:hover { color: var(--color-accent); border-color: var(--color-accent-dim); }
.comment-link svg { width: 13px; height: 13px; }
.comment-count-empty { color: var(--color-text-muted); font-size: 13px; }

.comments-readonly { max-height: 60vh; overflow-y: auto; }

@media (max-width: 720px) {
    .month-summary {
        grid-template-columns: 20px 1fr auto;
        gap: 12px;
        row-gap: 6px;
    }
    .month-stat { grid-column: 2 / -1; }
    .month-budget { grid-column: 2 / -1; text-align: left; }
    /* Lex-Button rechts neben Caret/Label in eigener Spalte */
    .month-lex-export-inline { grid-column: 3; grid-row: 1; justify-self: end; align-self: center; }
}

/* Donut-Chart Fortschritt */
.donut-wrap {
    display: flex; flex-direction: column; align-items: center;
    padding: 28px 20px;
}
.donut {
    width: 220px; height: 220px;
    position: relative;
}
.donut svg {
    width: 100%; height: 100%; display: block;
    overflow: visible;
}
.donut-slice {
    cursor: pointer;
    transition: filter 0.15s, opacity 0.15s;
}
.donut-slice:hover {
    filter: brightness(1.15);
}
.donut-center {
    position: absolute;
    inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    pointer-events: none;
}
.donut-number {
    font-family: var(--font-display);
    font-size: 44px;
    font-weight: 400;
    line-height: 1;
    color: var(--color-text);
    letter-spacing: -0.02em;
}
.donut-label {
    font-size: 10px;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 6px;
    /* Innenkreis hat r=72px → max. ~130px Textbreite,
       wir lassen umbrechen damit der Text nicht in den Donut-Ring läuft */
    max-width: 115px;
    line-height: 1.25;
    text-wrap: balance;
}
.donut-legend {
    display: flex; align-items: center; gap: 16px;
    margin-top: 20px;
    font-size: 11px;
    color: var(--color-text-dim);
}
.legend-dot {
    display: inline-block; width: 9px; height: 9px;
    border-radius: 50%; vertical-align: middle;
    margin-right: 5px;
}
.legend-dot.legend-closed  { background: var(--color-accent); }
.legend-dot.legend-started { background: color-mix(in srgb, var(--color-accent) 55%, transparent); border: 1px solid color-mix(in srgb, var(--color-accent) 65%, transparent); }
.legend-dot.legend-open    { background: color-mix(in srgb, var(--color-accent) 18%, transparent); border: 1px solid color-mix(in srgb, var(--color-accent) 35%, transparent); }

/* Gesamtfortschritts-Balken (closed hours / total) */
.donut-progress {
    width: calc(100% - 40px);
    margin: 14px auto 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}
.donut-progress-fill {
    height: 100%;
    background: var(--color-accent);
    border-radius: 999px;
    transition: width 0.4s ease-out;
    min-width: 2px;
}
.donut-remaining {
    margin-top: 14px;
    font-size: 13px;
    color: var(--color-text-dim);
}
.donut-remaining strong {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 400;
    color: var(--color-text);
    margin-right: 4px;
}
.donut-divider {
    width: calc(100% - 40px);
    height: 1px;
    margin: 14px auto 0;
    background: rgba(255, 255, 255, 0.08);
}
.donut-not-billed {
    margin-top: 12px;
    font-size: 13px;
    color: var(--color-text-dim);
}
.donut-not-billed strong {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 400;
    color: var(--color-text);
    margin-right: 4px;
}

/* Ziele des Monats */
.goals-list { padding: 4px 0; }
.goal-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 14px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background 0.15s;
}
.goal-item:last-child { border-bottom: none; }
.goal-item:hover { background: rgba(255,255,255,0.02); }

.goal-marker {
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid var(--color-accent);
    margin-top: 4px;
    background: transparent;
    transition: background 0.15s;
}
.goal-item.goal-done .goal-marker {
    background: #2ecc71;
    border-color: #2ecc71;
    box-shadow: inset 0 0 0 3px var(--color-bg-surface);
}
.goal-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 400;
    color: var(--color-text);
    line-height: 1.3;
    margin-bottom: 4px;
}
.goal-item.goal-done .goal-title {
    /* Farb-Dimmung als visuelles Signal bleibt — kein Strikethrough mehr,
       weil das Layout-bedingt schwer lesbar wirkt. */
    color: var(--color-text-dim);
}
.goal-description {
    font-size: 13px;
    color: var(--color-text-dim);
    line-height: 1.5;
    white-space: pre-wrap;
    margin-bottom: 6px;
    /* Lange Beschreibungen kürzen — Klick öffnet Detail-Popup */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.goal-meta {
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex; gap: 10px; align-items: center;
}
.goal-status {
    color: var(--color-success);
    font-weight: 600;
}
.goal-status::before { content: ""; margin-right: 0; }

/* Kostenstand-Karte */
.cost-card { padding: 24px; }

.cost-flat {
    display: flex; align-items: baseline; justify-content: space-between;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--color-border);
}
.cost-flat-label {
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.cost-flat-note {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 2px;
    font-style: italic;
}
.cost-flat-value {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 400;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

/* Kostenstellen-Ledger (Pauschale, Stunden, andere Module) */
.cost-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--color-border);
}
.cost-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.cost-line-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cost-line-label {
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.cost-line-detail {
    font-size: 11px;
    color: var(--color-text-dim);
    font-variant-numeric: tabular-nums;
}
.cost-line-amount {
    flex: 0 0 auto;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 400;
    color: var(--color-text);
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.cost-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.cost-item {
    padding: 4px 18px;
}
.cost-item:first-child {
    padding-left: 0;
    border-right: 1px solid var(--color-border);
}
.cost-item:last-child {
    padding-right: 0;
}
.cost-item-label {
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.cost-item-amount {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 400;
    color: var(--color-text);
    line-height: 1.05;
    letter-spacing: -0.02em;
}
.cost-item-detail {
    font-size: 11px;
    color: var(--color-text-dim);
    margin-top: 8px;
    line-height: 1.4;
}

/* Tooltip am Donut */
.donut-tooltip {
    position: fixed;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-strong);
    border-radius: 10px;
    padding: 10px 14px;
    pointer-events: none;
    z-index: 2000;
    box-shadow: var(--shadow-elevated);
    max-width: 320px;
    font-family: var(--font-ui);
}
.donut-tooltip[hidden] { display: none; }
.donut-tooltip .tt-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
    line-height: 1.3;
}
.donut-tooltip .tt-meta {
    font-size: 11px;
    color: var(--color-text-dim);
}

/* Task-Row Highlight bei Donut-Hover */
.task-row.row-highlighted {
    background: var(--color-accent-dim) !important;
}
.task-row.row-highlighted td:first-child {
    box-shadow: inset 3px 0 0 var(--color-accent);
}

/* Task-Detail-Popup: zwei Spalten (Description / Kommentare) */
.task-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    min-height: 400px;
}
@media (max-width: 720px) {
    .task-modal-grid { grid-template-columns: 1fr; }
}

.task-meta {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 6px 14px;
    font-size: 12px;
    color: var(--color-text-dim);
    margin-bottom: 16px;
}
.task-meta .lbl { color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-size: 10px; }
.task-meta .val { color: var(--color-text); font-size: 13px; }

.task-description {
    color: var(--color-text);
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-y: auto;
    max-height: 520px;
}

.task-comments-pane {
    display: flex; flex-direction: column;
    border-left: 1px solid var(--color-border);
    padding-left: 24px;
    max-height: 520px;
}
@media (max-width: 720px) {
    .task-comments-pane { border-left: none; padding-left: 0; border-top: 1px solid var(--color-border); padding-top: 16px; }
}
.task-comments-list {
    flex: 1; overflow-y: auto; padding-right: 4px;
    margin-bottom: 16px;
}
.task-comment {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--color-bg-elevated);
    margin-bottom: 8px;
    font-size: 13px;
}
/* role-admin behält das gleiche schlichte Aussehen — kein farbiger Streifen mehr */
.task-comment .author {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 11px; color: var(--color-text-dim);
    margin-bottom: 4px;
}
.task-comment .author strong { color: var(--color-text); font-size: 12px; }
.task-comment .content { white-space: pre-wrap; line-height: 1.5; color: var(--color-text); }

.comment-input-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.comment-input-row textarea {
    width: 100%;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--color-text);
    font-family: var(--font-ui);
    font-size: 13px;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
}
.comment-input-row textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-dim);
}
.comment-input-row .btn,
.comment-input-row button {
    align-self: flex-end;
}

.empty-state {
    padding: 60px 20px; text-align: center; color: var(--color-text-dim);
}
.empty-state h3 { font-family: var(--font-display); font-size: 18px; font-weight: 400; margin-bottom: 4px; color: var(--color-text); }
.empty-state p { margin: 0; font-size: 13px; }
.empty-state .btn { margin-top: 16px; }

/* Type-Toggle Tabelle für Task-Typen-Konfiguration */
.type-toggle-list {
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.type-toggle-row {
    display: grid;
    grid-template-columns: 1fr 90px 110px;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
}
.type-toggle-row:last-child { border-bottom: none; }
.type-toggle-row.head {
    background: rgba(255,255,255,0.02);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}
.type-toggle-row .switch { transform: scale(0.85); transform-origin: left center; }

/* Multi-ClickUp-Lists im Client-Modal (seit 0.9.6.12) */
.cf-lists-pills {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-bottom: 10px;
}
.cf-list-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 4px 4px 4px 12px;
    font-size: 12px;
    color: var(--color-text);
}
.cf-list-pill-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Per-Liste-Stundensatz-Feld in der Pill (nur sichtbar bei „verschiedene Sätze pro Liste") */
.cf-list-pill-rate-wrap { display: inline-flex; align-items: center; gap: 3px; }
.cf-list-pill-rate-wrap[hidden] { display: none; }
.cf-list-pill-rate {
    width: 62px; text-align: right;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font-size: 12px; font-family: inherit;
    padding: 2px 6px;
    -moz-appearance: textfield;
}
.cf-list-pill-rate::-webkit-outer-spin-button,
.cf-list-pill-rate::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cf-list-pill-rate:focus { outline: none; border-color: var(--color-accent); }
.cf-list-pill-rate-suffix { font-size: 11px; color: var(--color-text-muted); }
/* Aufgabentypen pro Liste (mehrere Toggle-Tabellen im Kunden-Modal) */
.cf-list-types { margin-bottom: 18px; }
.cf-list-types-head {
    font-size: 12px; font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase; letter-spacing: 0.04em;
    margin: 4px 0 8px;
}
.cf-list-pill-remove {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.cf-list-pill-remove:hover { background: var(--color-danger, #ff4f4f); color: #fff; }
.cf-list-add-row { display: flex; gap: 8px; align-items: stretch; }
.cf-list-add-row .input { flex: 1 1 auto; min-width: 0; }
.cf-list-add-row .btn { flex: 0 0 auto; white-space: nowrap; }

/* Nutzer-Liste im Client-Modal */
.user-chip-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; }
.user-chip {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 4px 12px 4px 4px;
    font-size: 12px;
}
.user-chip .chip-avatar {
    width: 22px; height: 22px;
    border-radius: 999px;
    background: var(--color-bg-elevated);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 600;
    color: var(--color-text-dim);
}

/* =============================================================================
   FINAL MOBILE OVERRIDES — kommen am Ende, damit sie alle vorigen Desktop-Regeln
   im Cascade überschreiben (höhere Position = höhere Priorität bei gleicher Spezifität)
   ============================================================================= */
@media (max-width: 720px) {
    /* Padding-Bottom auf Main: Bottom-Nav verdeckt sonst den letzten Inhalt */
    .main {
        padding: 20px 16px calc(110px + env(safe-area-inset-bottom, 0px)) !important;
        overflow: visible !important;
    }

    /* Forms (Settings: Profil & Account etc.) — Labels ÜBER den Inputs */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 100%;
        align-items: stretch;
    }
    .form-grid label {
        font-size: 11px;
        font-weight: 600;
        color: var(--color-text-muted);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: -10px;
    }
    .form-grid .form-help { grid-column: 1; margin-top: 2px; }
    .field-group { margin-bottom: 12px; }
    .input-with-suffix { width: 100%; }

    /* Aufgabenliste mobile: Ist/Soll-Spalten weg, Kommentar-Button als Icon-Kreis */
    .col-hide-mobile {
        display: none !important;
        width: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }
    /* Auto-Layout statt fixed — sonst behalten hidden-Spalten ihre Breite als Phantom */
    .task-list { table-layout: auto; width: 100%; }
    .task-list th, .task-list td { padding: 10px 8px; }
    .task-list .col-status { width: 1%; white-space: nowrap; }
    .task-list .col-comments { width: 1%; white-space: nowrap; text-align: center; }
    .task-list .col-actions { width: 1%; white-space: nowrap; text-align: right; }
    .task-list .task-title { font-size: 13px; white-space: normal; word-break: break-word; }

    .btn-comment-row {
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 50%;
    }
    .btn-comment-row .btn-comment-text { display: none; }
    .btn-comment-row .btn-comment-icon { display: inline-flex; }
    .btn-comment-row .btn-comment-icon svg { width: 16px; height: 16px; display: block; }

    /* Status-Pill: auf Mobile nur Dot in Bubble (ohne Text) — spart Platz */
    .task-list .status-pill {
        font-size: 0;
        padding: 0;
        gap: 0;
        width: 22px; height: 22px;
        border-radius: 50%;
        justify-content: center;
    }
    .task-list .status-pill::before {
        width: 8px; height: 8px;
    }

    /* Aufgeklappte Monatsdetails: Status-Spalte weg, kleines Häkchen vor Titel */
    .task-list-month .task-title {
        display: flex;
        align-items: flex-start;
        gap: 8px;
    }
    .task-list-month .task-title .task-title-text {
        flex: 1;
        min-width: 0;
        word-break: break-word;
    }
    .task-check-mobile {
        display: inline-flex;
        align-items: center; justify-content: center;
        width: 16px; height: 16px;
        margin-right: 0;
        margin-top: 2px;
        background: var(--color-success, #22c55e);
        color: #fff;
        border-radius: 50%;
        flex: 0 0 auto;
    }
    .task-check-mobile svg { width: 10px; height: 10px; display: block; }

    /* Laufender-Monat-Karte: gestapelt — Label, Stat, dann Button DARUNTER
       (vorher hing der Button zu eng neben dem „… erledigt"-Stat). */
    .month-row-current .month-summary-static {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 18px;
    }
    .month-row-current .month-caret-spacer { display: none; }
    .month-row-current .month-current-stat {
        flex-wrap: wrap;
    }
    .month-row-current .month-current-btn {
        margin-left: 0;
        align-self: stretch;
        text-align: center;
        min-width: 0;
    }
}


/* =============================================================================
   INTRO-Animation — Page-Load Opening
   Black → Logo (almost black) → diagonal shine → "x" grows to cover screen → fade out
   Deaktivierbar via localStorage: plexone_intro = off
   ============================================================================= */
.intro-overlay {
    position: fixed;
    inset: 0;
    background: #0d0d0d;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    animation: introOverlayIn 200ms ease-out;
}
.intro-overlay.intro-done {
    animation: introOverlayOut 530ms forwards ease-out;
}

/* Soft drifting accent-tinted radial glow im Hintergrund */
.intro-bg-glow {
    position: absolute;
    inset: -10%;
    pointer-events: none;
    background: radial-gradient(
        circle 60vmin at 50% 50%,
        color-mix(in srgb, var(--color-accent) 15%, transparent) 0%,
        transparent 70%
    );
    opacity: 0;
    will-change: transform, opacity;
    animation:
        introGlowFade 500ms 100ms forwards ease-out,
        introGlowDrift 2100ms 100ms ease-in-out forwards;
}
@keyframes introGlowFade {
    to { opacity: 1; }
}
@keyframes introGlowDrift {
    0%   { transform: translateX(-12%); }
    100% { transform: translateX(12%); }
}
@keyframes introOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes introOverlayOut {
    to { opacity: 0; visibility: hidden; }
}

.intro-stage {
    position: relative;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-logo-wrap {
    position: relative;
    height: 100%;
    opacity: 0;
    animation: introLogoIn 350ms 150ms forwards ease-out;
}
@keyframes introLogoIn {
    to { opacity: 1; }
}

.intro-logo-img {
    height: 100%;
    width: auto;
    display: block;
    /* white SVG → komplett schwarz (dunkle Stellen sind 100 % schwarz,
       der Kontrast zum durchziehenden Reflex wird dadurch dramatischer) */
    filter: brightness(0);
}

.intro-shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    -webkit-mask-image: url("../img/plexone-logo.svg");
            mask-image: url("../img/plexone-logo.svg");
    -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    background: linear-gradient(
        108deg,
        transparent 38%,
        rgba(255,255,255,0.55) 50%,
        transparent 62%
    );
    background-size: 240% 100%;
    background-position: -120% 0;
    animation: introShine 1300ms 550ms cubic-bezier(0.4, 0.05, 0.4, 0.95);
}
@keyframes introShine {
    0%   { background-position: -120% 0; }
    100% { background-position: 220% 0; }
}

/* (X-Animation entfernt — Logo + drifting BG-Glow + smoother Fadeout sind die ganze Show) */

@media (prefers-reduced-motion: reduce) {
    .intro-overlay { animation: none; opacity: 0; visibility: hidden; }
}

/* ─── iOS A2HS-Install-Banner (siehe frontend/assets/js/install-prompt.js) ── */
.install-banner {
    position: fixed;
    left: 12px;
    right: 12px;
    /* Über der iPhone-Home-Indicator-Safe-Area — `env(safe-area-inset-bottom)`
       gibt die Höhe der unteren Safe-Area zurück (auf älteren iOS-Versionen 0). */
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: none; /* erst nach is-visible aktivieren */
}
.install-banner.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.install-banner.is-leaving {
    opacity: 0;
    transform: translateY(20px);
}
.install-banner-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 40px 12px 14px;
    background: var(--color-bg-elevated, #1a1a1f);
    color: var(--color-text, #fff);
    border: 1px solid var(--color-border-strong, rgba(255,255,255,0.18));
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.45);
    max-width: 460px;
    margin: 0 auto;
}
.install-banner-icon {
    flex: 0 0 auto;
    width: 44px; height: 44px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--color-bg, #0f0f12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.install-banner-icon img { width: 100%; height: 100%; display: block; object-fit: cover; }
.install-banner-body { flex: 1 1 auto; min-width: 0; }
.install-banner-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin-bottom: 2px;
}
.install-banner-text {
    font-size: 12px;
    color: var(--color-text-dim, rgba(255,255,255,0.7));
    line-height: 1.4;
}
.install-banner-text svg {
    vertical-align: -4px;
    margin: 0 2px;
    color: var(--color-accent, #00ffff);
}
.install-banner-text strong {
    color: var(--color-text, #fff);
    font-weight: 600;
}
.install-banner-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px; height: 24px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--color-text-muted, rgba(255,255,255,0.55));
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.12s, background 0.12s;
}
.install-banner-close:hover {
    color: var(--color-text, #fff);
    background: rgba(255,255,255,0.08);
}
/* Animierter Pfeil rechts unten — deutet auf die Safari-Toolbar mit dem
   Share-Button. Sanftes Hoch-/Runter-Bouncing als visueller Hinweis. */
.install-banner-arrow {
    flex: 0 0 auto;
    color: var(--color-accent, #00ffff);
    animation: install-banner-bounce 1.6s ease-in-out infinite;
}
@keyframes install-banner-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
    .install-banner-arrow { animation: none; }
    .install-banner { transition: none; }
}


/* ── Push-Aktivierungs-Banner (einmalig beim ersten Öffnen) ──────────────── */
.push-prompt {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px; z-index: 1200;
    width: 460px; max-width: calc(100vw - 32px);
    display: flex; align-items: center; gap: 14px;
    background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: 14px;
    padding: 14px 16px; box-shadow: 0 14px 44px rgba(0,0,0,0.40);
    animation: pushPromptIn .25s ease;
}
@keyframes pushPromptIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.push-prompt-icon { flex: 0 0 auto; font-size: 24px; color: var(--color-accent); }
.push-prompt-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.push-prompt-text strong { font-size: 14px; }
.push-prompt-text span { font-size: 12.5px; color: var(--color-text-dim); line-height: 1.35; }
.push-prompt-actions { flex: 0 0 auto; display: flex; gap: 8px; }
@media (max-width: 768px) {
    .push-prompt { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); flex-wrap: wrap; }
    .push-prompt-actions { width: 100%; }
    .push-prompt-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ─── Decision „Entscheidung getroffen" — Mobile-Bestätigung (Blur + Check) ─── */
/* Wird von allen 4 Apps genutzt (app.css ist überall eingebunden). JS: showDecisionDone(). */
.fl-dec-done {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(8, 8, 14, 0.55);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    animation: flDecDoneIn 0.26s ease;
}
.fl-dec-done.is-out { animation: flDecDoneOut 0.32s ease forwards; }
.fl-dec-done-inner { text-align: center; color: var(--color-text); padding: 24px; }
.fl-dec-done-icon { line-height: 1; }
.fl-dec-done-icon .ph { font-size: 68px; color: var(--color-accent); display: inline-block; animation: flDecDonePop 0.42s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.fl-dec-done-text { margin-top: 14px; font-size: 21px; font-weight: 600; line-height: 1.3; }
@keyframes flDecDoneIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes flDecDoneOut { to { opacity: 0; } }
@keyframes flDecDonePop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ─── Mobile: schwarzer Fade-Out hinter der Bottom-Nav ────────────────────── */
/* Ruhiger Hintergrund hinter dem Menü: transparent knapp über dem Menü →
   komplett schwarz am unteren Rand. Liegt im .mobile-bottom-Stacking-Kontext
   (z-index 100, also über dem Seiteninhalt), aber z-index:-1 → hinter den
   Nav-Pillen. pointer-events:none → blockiert keine Taps. */
@media (max-width: 720px) {
    .mobile-bottom::before {
        content: "";
        position: fixed;
        left: 0; right: 0; bottom: 0;
        height: 230px;
        background: linear-gradient(to top,
            #000 0%,
            rgba(0,0,0,0.92) 24%,
            rgba(0,0,0,0.55) 56%,
            transparent 100%);
        pointer-events: none;
        z-index: -1;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   PlexOne Custom-Dropdown — ersetzt nativen <select class="input">-Look.
   Trigger spiegelt select.input; das Panel ist voll gestylt (kein OS-Look mehr).
   ───────────────────────────────────────────────────────────────────────── */
.pl-sel { position: relative; width: 100%; }
.pl-sel-native { display: none !important; }
.pl-sel-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    background-color: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: var(--font-ui);
    font-size: 15px;
    padding: 12px 14px;
    cursor: pointer;
    text-align: left;
}
.pl-sel-trigger[aria-expanded="true"] {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-dim);
}
.pl-sel-trigger:disabled { opacity: 0.5; cursor: not-allowed; }
.pl-sel-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pl-sel-label.is-placeholder { color: var(--color-text-muted); }
.pl-sel-chev {
    flex: 0 0 auto;
    font-size: 14px;
    color: var(--color-text-dim);
    opacity: 0.6;
    transition: transform 0.15s ease;
}
.pl-sel-trigger[aria-expanded="true"] .pl-sel-chev { transform: rotate(180deg); }

.pl-sel-panel {
    position: fixed;
    z-index: 99999;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 32px rgba(0,0,0,0.45);
    overflow-y: auto;
    padding: 4px;
    animation: plSelIn 0.12s ease;
}
@keyframes plSelIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}
.pl-sel-opt {
    padding: 9px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pl-sel-opt:hover,
.pl-sel-opt.is-active { background: var(--color-accent-dim); }
.pl-sel-opt.is-selected { color: var(--color-accent); font-weight: 600; }
.pl-sel-opt.is-disabled { opacity: 0.4; cursor: not-allowed; }
.pl-sel-group {
    padding: 8px 12px 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-dim);
    font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────────────────
   Persönliche Dashboard-Shortcuts (rechts neben der Begrüßung)
   ───────────────────────────────────────────────────────────────────────── */
.dashboard-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 24px;
    flex-wrap: wrap;
}
.dashboard-head-left { flex: 1 1 auto; min-width: 0; }
.dash-shortcuts { flex: 0 0 auto; }
.dash-sc-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-dim);
    margin-bottom: 6px;
    text-align: right;
}
.dash-sc-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.dash-sc {
    height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    position: relative;
    flex: 0 0 auto;
}
.dash-sc-add {
    width: 40px;
    border-radius: 50%;
    font-size: 18px;
    border: 1.5px dashed var(--color-border);
    background: transparent;
    color: var(--color-text-dim);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.dash-sc-add:hover { color: var(--color-accent); border-color: var(--color-accent); }
.dash-sc-item {
    gap: 8px;
    padding: 0 14px 0 13px;
    border-radius: 20px;
    border: 1.5px solid var(--color-border);
    background: var(--color-bg-elevated);
    color: var(--color-text);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.dash-sc-item > i { font-size: 17px; flex: 0 0 auto; }
.dash-sc-text {
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-sc-item:hover { border-color: var(--color-accent); color: var(--color-accent); }
.dash-sc-del {
    position: absolute;
    top: -6px; right: -6px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    display: none;
    align-items: center; justify-content: center;
    font-size: 10px;
    cursor: pointer;
    padding: 0;
}
.dash-sc-item:hover .dash-sc-del { display: inline-flex; }
.dash-sc-del:hover { color: #e5484d; border-color: #e5484d; }

/* Shortcut-Modal: Typ-Auswahl (2 Cards) + Menü-Liste */
.sc-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sc-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-bg-input);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}
.sc-card:hover { border-color: var(--color-accent); }
.sc-card > i { font-size: 22px; color: var(--color-accent); }
.sc-card strong { font-size: 14px; color: var(--color-text); }
.sc-card small { font-size: 11px; color: var(--color-text-dim); line-height: 1.35; }
.sc-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-height: 320px; overflow-y: auto; }
.sc-list-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg-input);
    cursor: pointer;
    color: var(--color-text);
    font-size: 14px;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}
.sc-list-item:hover { border-color: var(--color-accent); }
.sc-list-item > i { font-size: 18px; color: var(--color-accent); flex: 0 0 auto; }
/* Modul-Schritt: vertikaler Abstand zwischen Typ-Select, Auswahl-Select + Button */
.sc-modfields { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.sc-modtarget { display: flex; flex-direction: column; gap: 10px; }
.sc-modtarget:empty { display: none; }
