/* ===============================================================
   Kanban – Stylesheet
   Modernes, cleanes Design mit System-Font & klaren Kontrasten.
   =============================================================== */

/* -------- Design-Tokens -------- */
:root {
    color-scheme: dark;

    /* =========================================================
       KanbanSuite Corporate Design – Dark (Standard)
       Grundsatz: neutrale Flaechen, EINE Marken-Akzentfarbe.
       Farbe wird bewusst nur an Interaktions- und Statusstellen
       eingesetzt, nicht flaechig.
       ========================================================= */

    /* Neutrale Grundflaechen (echtes Grau, minimal warm) */
    --c-bg:          #0d0e11;
    --c-surface:     #16171b;
    --c-surface-2:   #1e2026;
    --c-border:      #282a31;
    --c-border-2:    #363943;
    --c-text:        #eceef2;
    --c-text-soft:   #b3b7c2;
    --c-text-muted:  #868b97;

    /* Marken-Akzent = "KanbanSuite Cobalt" (einzige Akzentfarbe) */
    --c-primary:     #7d97ff;
    --c-primary-h:   #98acff;
    --c-primary-tint:#191d2b;

    /* Semantik – ausschliesslich fuer Status, bewusst gedaempft */
    --c-success:     #45c08a;
    --c-success-tint:#122019;
    --c-warn:        #e0a83c;
    --c-warn-tint:   #241d10;
    --c-danger:      #ef7a74;
    --c-danger-h:    #f2837d;
    --c-danger-tint: #26191a;

    /* Kein zweiter Farbton: Zweitakzent entspricht der Markenfarbe */
    --c-accent:      #7d97ff;

    /* Elevation – weich und zurueckhaltend */
    --shadow-sm:  0 1px 2px rgba(0,0,0,.35);
    --shadow-md:  0 6px 20px -6px rgba(0,0,0,.5);
    --shadow-lg:  0 20px 48px -16px rgba(0,0,0,.62);

    --radius-sm:  6px;
    --radius:     10px;
    --radius-lg:  14px;

    --topbar-h:   56px;

    /* Typografie – Inter bevorzugt, hochwertiger System-Fallback.
       (CSP erlaubt keine externen Fonts; Inter wird genutzt, wenn
       lokal vorhanden, sonst die native UI-Schrift.) */
    --font: "Inter", "Inter var", system-ui, -apple-system, BlinkMacSystemFont,
            "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    --font-features: "kern" 1, "liga" 1, "calt" 1;
}

/* -------- Light Mode (per Umschalter) -------- */
:root[data-theme="light"] {
    color-scheme: light;
    /* KanbanSuite Corporate Design – Light */
    --c-bg:          #f6f7f9;
    --c-surface:     #ffffff;
    --c-surface-2:   #f2f4f7;
    --c-border:      #e6e8ec;
    --c-border-2:    #d3d7de;
    --c-text:        #14161a;
    --c-text-soft:   #4a4f59;
    --c-text-muted:  #6b7280;
    --c-primary:     #3a56d4;
    --c-primary-h:   #2f47b3;
    --c-primary-tint:#eef1fc;
    --c-success:     #2f9e6b;
    --c-success-tint:#eaf7f1;
    --c-warn:        #b9791a;
    --c-warn-tint:   #fbf2e2;
    --c-danger:      #d0453f;
    --c-danger-h:    #b21f1a;
    --c-danger-tint: #fceceb;
    --c-accent:      #3a56d4;
    --shadow-sm:  0 1px 2px rgba(16,18,24,.06);
    --shadow-md:  0 4px 16px -4px rgba(16,18,24,.10);
    --shadow-lg:  0 16px 40px -12px rgba(16,18,24,.16);
}

/* -------- Reset & Basics -------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    letter-spacing: -0.006em;
    color: var(--c-text);
    background: var(--c-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: var(--font-features);
    text-rendering: optimizeLegibility;
}

.home-body {
    background:
        var(--c-bg);
}

h1, h2, h3, h4 { margin: 0 0 8px; font-weight: 600; line-height: 1.2; letter-spacing: -0.014em; }
h1 { font-size: 1.55rem; letter-spacing: -0.021em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }

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

code {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: .85em;
    font-family: var(--font-mono);
}

.muted { color: var(--c-text-muted); }
.right { text-align: right; }

/* ============================================================
   Topbar / Navigation
   ============================================================ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    height: var(--topbar-h);
}
.topbar-inner {
    max-width: none;
    margin: 0;
    padding: 0 clamp(16px, 3vw, 40px);
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}
.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--c-text);
}
.topbar-brand:hover { text-decoration: none; }
.topbar-logo {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 16px;
    overflow: hidden;
}
.topbar-logo.has-image {
    background: linear-gradient(135deg, #111827, var(--c-primary));
    border-radius: var(--radius-sm);
}
.topbar-logo img,
.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.topbar-nav {
    display: flex;
    gap: 6px;
}
.topbar-nav a {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--c-text-soft);
    font-weight: 500;
}
.topbar-nav a:hover {
    background: var(--c-surface-2);
    color: var(--c-text);
    text-decoration: none;
}
.topbar-user {
    margin-left: auto;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-button {
    position: relative;
    width: 34px;
    height: 34px;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    border-radius: 50%;
    cursor: pointer;
    color: var(--c-text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.notification-button:hover { background: var(--c-surface-2); color: var(--c-text); }
.notification-icon {
    width: 18px;
    height: 18px;
    display: block;
}
.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--c-danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
}

.user-menu summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    border: 1px solid transparent;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--c-surface-2); border-color: var(--c-border); }
.user-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--avatar-color, var(--c-primary));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600;
    font-size: 13px;
}
.user-name { font-weight: 500; }
.user-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 240px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 110;
}
.user-menu-info {
    padding: 10px 12px;
    border-bottom: 1px solid var(--c-border);
    margin-bottom: 4px;
}
.user-menu-name { font-weight: 600; }
.user-menu-email { font-size: 12px; color: var(--c-text-muted); }
.user-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--c-text);
    font: inherit;
    cursor: pointer;
}
.user-menu-item:hover { background: var(--c-surface-2); }
.user-menu-logout { color: var(--c-danger); }
.user-menu-form { margin: 0; }

/* ============================================================
   Auth-Seite (Login / Passwort ändern)
   ============================================================ */
.auth-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 0 20px 28px;
    background:
        radial-gradient(ellipse at top left, rgba(99,102,241,.1), transparent 60%),
        radial-gradient(ellipse at bottom right, rgba(37,99,235,.08), transparent 60%),
        var(--c-bg);
}
.auth-card {
    width: 100%;
    max-width: 1180px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 34px;
    box-shadow: var(--shadow-lg);
}
.auth-card > form,
.auth-card > .auth-brand,
.auth-card > .alert,
.auth-card > .auth-footnote {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}
.login-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 460px;
    gap: 0;
    padding: 0;
    overflow: hidden;
}
.login-card > form,
.login-card > .auth-brand,
.login-card > .alert,
.login-card > .auth-footnote {
    max-width: none;
}
.login-intro {
    min-height: 520px;
    padding: 46px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(99,102,241,.28), transparent 34%),
        linear-gradient(145deg, #111827 0%, #1e3a8a 58%, #2563eb 100%);
    color: #fff;
}
.login-intro .auth-logo {
    margin: 0 0 24px;
    width: 58px;
    height: 58px;
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(0,0,0,.24);
}
.login-intro h1 {
    margin: 0 0 12px;
    font-size: 34px;
    font-weight: 780;
}
.login-intro p {
    max-width: 420px;
    margin: 0;
    color: rgba(255,255,255,.78);
    font-size: 15px;
    line-height: 1.7;
}
.login-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}
.login-trust li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 4px;
    background: color-mix(in srgb, var(--c-surface) 14%, transparent);
    color: rgba(255,255,255,.9);
    font-size: 12px;
    font-weight: 700;
}
.login-trust li svg {
    color: #6ee7b7;
    flex: 0 0 auto;
}
.login-form-panel {
    padding: 46px 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.login-form-panel > form,
.login-form-panel > .auth-brand,
.login-form-panel > .alert,
.login-form-panel > .auth-footnote {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}
.login-form-panel .auth-brand {
    text-align: left;
}
.login-form-panel .auth-brand h2 {
    margin-bottom: 6px;
    font-size: 24px;
}
.auth-brand {
    text-align: center;
    margin-bottom: 24px;
}
.auth-logo {
    width: 48px; height: 48px;
    border-radius: var(--radius);
    margin: 0 auto 12px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    overflow: hidden;
}
.auth-logo.has-image {
    background: linear-gradient(135deg, #111827, var(--c-primary));
}
.auth-subtitle { color: var(--c-text-muted); margin: 4px 0 0; }
.auth-version {
    color: var(--c-text-muted);
    margin: 4px 0 0;
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
}
.auth-footnote {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--c-border);
    font-size: 12px;
    color: var(--c-text-muted);
    text-align: center;
    line-height: 1.6;
}
.turnstile-wrap {
    margin-top: 16px;
    min-height: 65px;
}

/* Passwortfeld mit Sichtbarkeits-Umschalter */
.password-field { position: relative; }
.password-field .form-input { padding-right: 44px; }
.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--c-text-muted);
    cursor: pointer;
    transition: color .12s ease, background .12s ease;
}
.password-toggle:hover { color: var(--c-text); background: var(--c-surface-2); }
.password-toggle:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.password-toggle .icon-eye-off { display: none; }
.password-toggle.is-visible .icon-eye { display: none; }
.password-toggle.is-visible .icon-eye-off { display: block; }

/* Oeffentliche Kopfzeile auf der Login-Seite:
   exakt so breit wie die zentrierte Login-Karte (siehe Breakpoints),
   nicht randlos. Der obere Abstand kommt aus dem auth-body-Padding. */
.auth-body .public-topbar {
    position: static;
    align-self: center;
    width: 100%;
    max-width: 1060px;
    height: auto;
    margin: 0 auto clamp(16px, 3vh, 26px);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    background: var(--c-surface);
    box-shadow: var(--shadow-sm);
    backdrop-filter: none;
}
.auth-body .public-topbar .topbar-inner {
    height: 56px;
}
.public-topbar .topbar-inner {
    max-width: none;
    gap: 16px;
}
.public-topbar .topbar-brand span { font-weight: 700; }

/* Navigation als schlichte Textlinks, rechtsbuendig neben den Aktionen */
.public-topbar .topbar-nav {
    margin-left: auto;
    gap: 2px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.public-topbar .topbar-nav a {
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--c-text-soft);
    font-size: 14px;
    font-weight: 600;
    box-shadow: none;
}
.public-topbar .topbar-nav a:hover {
    background: var(--c-surface-2);
    color: var(--c-text);
    box-shadow: none;
}
.public-topbar .topbar-nav a[aria-current="page"] {
    color: var(--c-primary);
    background: var(--c-primary-tint);
}
.public-topbar .topbar-user {
    margin-left: 0;
    gap: 10px;
    padding-left: 6px;
}
.public-topbar .topbar-user::before {
    content: "";
    width: 1px;
    height: 22px;
    background: var(--c-border);
    margin-right: 4px;
}

/* ============================================================
   Forms & Buttons
   ============================================================ */
.form-label {
    display: block;
    font-weight: 500;
    font-size: 13px;
    color: var(--c-text-soft);
    margin: 14px 0 6px;
}
.form-input {
    width: 100%;
    font: inherit;
    color: var(--c-text);
    background: var(--c-surface);
    border: 1px solid var(--c-border-2);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    transition: border-color .12s, box-shadow .12s;
}
.form-input:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
textarea.form-input { resize: vertical; min-height: 90px; font-family: inherit; }
.form-color { padding: 2px; height: 40px; cursor: pointer; }
.form-hint { font-size: 12px; color: var(--c-text-muted); margin: 6px 0 0; }

/* Native Formular-Elemente an das (dunkle) Theme binden, damit
   nie schwarzer System-Text auf dunklem Grund erscheint. */
input, select, textarea, button {
    color-scheme: inherit;
}
select.form-input {
    color: var(--c-text);
    background: var(--c-surface);
}
select option,
select optgroup {
    color: var(--c-text);
    background: var(--c-surface);
}

.board-bg-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
    margin-top: 8px;
}
.board-bg-option {
    display: grid;
    gap: 6px;
    cursor: pointer;
    color: var(--c-text-soft);
    font-size: 12px;
}
.board-bg-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.board-bg-thumb {
    display: block;
    height: 74px;
    border: 2px solid var(--c-border);
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-sm);
}
.board-bg-color {
    background: var(--board-color, var(--c-primary));
}
.board-bg-option input:checked + .board-bg-thumb {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}
.board-bg-option span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.input-group { display: flex; gap: 8px; }
.input-group > .form-input { flex: 1; }

.checkbox-row {
    display: flex; align-items: center; gap: 8px;
    margin: 14px 0 6px; cursor: pointer;
}

.btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font: inherit;
    font-weight: 500;
    line-height: 1;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color .12s, border-color .12s, color .12s, transform .05s;
    white-space: nowrap;
    user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; margin-top: 18px; padding: 11px; }
.btn-sm    { padding: 6px 10px; font-size: 12.5px; }

.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-h); }

.btn-ghost { background: transparent; color: var(--c-text); border-color: var(--c-border-2); }
.btn-ghost:hover { background: var(--c-surface-2); }

.btn-danger { background: var(--c-danger); color: #fff; }
.btn-danger:hover { background: var(--c-danger-h); }

.btn-icon {
    width: 28px; height: 28px;
    border: 0;
    background: transparent;
    color: var(--c-text-muted);
    border-radius: var(--radius-sm);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-icon:hover { background: var(--c-surface-2); color: var(--c-text); }

/* ============================================================
   Alerts & Pills
   ============================================================ */
.alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 13.5px;
}
.alert-error   { background: var(--c-danger-tint);  color: var(--c-danger);  border-color: color-mix(in srgb, var(--c-danger) 35%, transparent); }
.alert-success { background: var(--c-success-tint); color: var(--c-success); border-color: color-mix(in srgb, var(--c-success) 35%, transparent); }
.alert-info    { background: var(--c-primary-tint); color: var(--c-primary-h); border-color: color-mix(in srgb, var(--c-primary) 35%, transparent); }

.pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--c-surface-2);
    color: var(--c-text-soft);
    border: 1px solid var(--c-border);
}
.pill-admin  { background: var(--c-warn-tint); color: var(--c-warn); border-color: color-mix(in srgb, var(--c-warn) 35%, transparent); }
.pill-user   { background: var(--c-primary-tint); color: var(--c-primary-h); border-color: color-mix(in srgb, var(--c-primary) 35%, transparent); }
.pill-editor { background: color-mix(in srgb, var(--c-accent) 16%, var(--c-surface)); color: var(--c-accent); border-color: color-mix(in srgb, var(--c-accent) 35%, transparent); }
.pill-viewer { background: var(--c-surface-2); color: var(--c-text-muted); border-color: var(--c-border); }
.pill-ok     { background: var(--c-success-tint); color: var(--c-success); border-color: color-mix(in srgb, var(--c-success) 35%, transparent); }
.pill-warn   { background: var(--c-warn-tint);    color: var(--c-warn);    border-color: color-mix(in srgb, var(--c-warn) 35%, transparent); }
.pill-muted  { background: var(--c-surface-2); color: var(--c-text-muted); }

/* ============================================================
   Dashboard
   ============================================================ */
.dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.empty-state {
    background: var(--c-surface);
    border: 1px dashed var(--c-border-2);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    color: var(--c-text-muted);
}
.empty-state h3 { color: var(--c-text); margin-bottom: 6px; }

.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.dashboard-summary article {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
}
.dashboard-summary strong {
    display: block;
    font-size: 24px;
    line-height: 1.1;
}
.dashboard-summary span {
    color: var(--c-text-muted);
    font-size: 12.5px;
}
.board-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.board-toolbar .form-input {
    max-width: 320px;
}
.board-section {
    margin-top: 18px;
}
.board-card-wrap {
    display: grid;
    gap: 8px;
}
.board-card {
    display: block;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .1s, box-shadow .1s, border-color .1s;
    color: inherit;
}
.board-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.board-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-border-2);
    text-decoration: none;
}
.board-card-cover {
    height: 68px;
    background-color: var(--board-color, var(--c-primary));
    background-image: var(--board-bg);
    background-size: cover;
    background-position: center;
}
.board-card-body { padding: 14px 16px 16px; }
.board-card-body h3 { margin: 0 0 4px; }
.board-card-meta { margin-top: 10px; }

/* ============================================================
   Board-Ansicht
   ============================================================ */
.board-body {
    background-color: var(--c-primary);
    min-height: 100vh;
}
.board-body .topbar { background: color-mix(in srgb, var(--c-surface) 94%, transparent); backdrop-filter: blur(8px); }
.board-header {
    padding: 14px 24px;
    color: #fff;
}
.board-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}
.board-header h1 { margin: 0; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.15); }
.board-header .pill { background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.25); }
.board-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.16);
}
.board-view-button {
    border: 0;
    border-radius: 5px;
    padding: 6px 10px;
    background: transparent;
    color: rgba(255,255,255,.88);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.board-view-button:hover {
    background: rgba(255,255,255,.18);
    color: #fff;
}
.board-view-button.is-active {
    background: rgba(255,255,255,.95);
    color: var(--c-primary);
    box-shadow: var(--shadow-sm);
}
.board-members-button {
    margin-left: auto;
    background: rgba(255,255,255,.2);
    color: #fff;
    border-color: rgba(255,255,255,.35);
}
.board-members-button:hover { background: rgba(255,255,255,.3); }
.board-export-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,.2);
    color: #fff;
    border-color: rgba(255,255,255,.35);
    text-decoration: none;
}
.board-export-button:hover { background: rgba(255,255,255,.3); }
.board-export-button .icon { flex: 0 0 auto; }
.dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}
.admin-nav-card {
    display: block;
    min-height: 142px;
    padding: 20px;
    color: var(--c-text);
    text-decoration: none;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.admin-nav-card:hover {
    border-color: var(--c-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.admin-nav-card h2 { margin-bottom: 8px; font-size: 17px; }
.admin-nav-card p { margin: 0; color: var(--c-text-muted); line-height: 1.5; }

.board {
    padding: 0 16px 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.lists {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-height: calc(100vh - var(--topbar-h) - 120px);
    padding-bottom: 16px;
}

/* Eine einzelne Liste (Spalte) */
.list {
    flex: 0 0 288px;
    background: var(--c-surface-2);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--topbar-h) - 100px);
    box-shadow: var(--shadow-sm);
}
.list-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 6px 6px 12px;
}
.list-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--c-text);
    flex: 1;
    min-width: 0;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    outline: none;
    word-break: break-word;
}
.list-title[contenteditable="plaintext-only"]:hover {
    background: color-mix(in srgb, var(--c-surface) 60%, transparent);
}
.list-title[contenteditable="plaintext-only"]:focus {
    background: var(--c-surface);
    box-shadow: 0 0 0 2px var(--c-primary);
}

.cards {
    padding: 4px 8px;
    overflow-y: auto;
    flex: 1;
    min-height: 12px;
}
.card {
    background: var(--c-surface);
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: box-shadow .1s, transform .05s;
    border: 1px solid transparent;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--c-border); }
.card:active { transform: scale(.99); }
.card-title { font-size: 14px; line-height: 1.4; word-break: break-word; }
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 7px;
}
.card-tag {
    font-size: 11.5px;
    line-height: 1.2;
    color: #0f766e;
    background: #ccfbf1;
    border: 1px solid #99f6e4;
    border-radius: 999px;
    padding: 2px 7px;
}
.card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.priority {
    font-size: 11.5px;
    line-height: 1.2;
    border-radius: 999px;
    padding: 2px 7px;
    border: 1px solid var(--c-border);
    background: var(--c-surface-2);
    color: var(--c-text-muted);
}
.priority-low { background: var(--c-success-tint); color: var(--c-success); border-color: color-mix(in srgb, var(--c-success) 35%, transparent); }
.priority-medium { background: var(--c-warn-tint); color: var(--c-warn); border-color: color-mix(in srgb, var(--c-warn) 35%, transparent); }
.priority-high { background: var(--c-danger-tint); color: var(--c-danger); border-color: color-mix(in srgb, var(--c-danger) 35%, transparent); }
.card-due {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--c-text-muted);
}
.card-comment-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--c-text-muted);
}
.comment-icon {
    position: relative;
    width: 13px;
    height: 10px;
    display: inline-block;
    border: 1.5px solid currentColor;
    border-radius: 4px;
}
.comment-icon::after {
    content: "";
    position: absolute;
    left: 2px;
    bottom: -4px;
    width: 5px;
    height: 5px;
    border-left: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    background: var(--c-surface);
    transform: skew(-18deg);
}
.due-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
}
.due-green { background: var(--c-success); }
.due-yellow { background: var(--c-warn); }
.due-red { background: var(--c-danger); }

.card-add {
    padding: 6px 8px 10px;
}
.card-add input {
    width: 100%;
    padding: 8px 10px;
    border: 1px dashed transparent;
    background: transparent;
    border-radius: var(--radius-sm);
    font: inherit;
    color: var(--c-text-soft);
}
.card-add input:hover { background: color-mix(in srgb, var(--c-surface) 60%, transparent); }
.card-add input:focus {
    outline: none;
    background: var(--c-surface);
    border-color: var(--c-primary);
    color: var(--c-text);
}

.list-add {
    background: rgba(255,255,255,.22);
    border: 1px dashed rgba(255,255,255,.5);
    padding: 8px;
    min-height: auto;
}
.list-add form { margin: 0; }
.list-add input {
    width: 100%;
    padding: 8px 10px;
    background: transparent;
    border: 0;
    color: #fff;
    font: inherit;
    border-radius: var(--radius-sm);
}
.list-add input::placeholder { color: rgba(255,255,255,.8); }
.list-add input:focus {
    outline: none;
    background: var(--c-surface);
    color: var(--c-text);
}

.board-calendar {
    min-width: 980px;
    background: color-mix(in srgb, var(--c-surface) 94%, transparent);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    box-shadow: 0 18px 44px rgba(15,23,42,.16);
    overflow: hidden;
}
.calendar-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--c-border);
    background: var(--c-surface);
}
.calendar-toolbar h2 {
    margin: 0;
    min-width: 220px;
    font-size: 18px;
    text-transform: capitalize;
}
.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-weekdays {
    border-bottom: 1px solid var(--c-border);
    background: var(--c-surface-2);
}
.calendar-weekdays span {
    padding: 9px 12px;
    color: var(--c-text-muted);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}
.calendar-day {
    min-height: 132px;
    padding: 9px;
    border-right: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
    background: var(--c-surface);
}
.calendar-day:nth-child(7n) {
    border-right: 0;
}
.calendar-day.is-muted {
    background: var(--c-surface-2);
}
.calendar-day.is-muted .calendar-day-number {
    color: var(--c-text-muted);
}
.calendar-day.is-today {
    background: var(--c-primary-tint);
    box-shadow: inset 0 0 0 2px var(--c-primary);
}
.calendar-day-number {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 7px;
    color: var(--c-text-soft);
    font-size: 12px;
    font-weight: 700;
}
.calendar-day.is-today .calendar-day-number {
    color: var(--c-primary);
}
.calendar-day-cards {
    display: grid;
    gap: 5px;
}
.calendar-card {
    width: 100%;
    display: grid;
    gap: 2px;
    border: 1px solid var(--c-border);
    border-left-width: 4px;
    border-radius: 6px;
    padding: 6px 7px;
    background: var(--c-surface);
    color: var(--c-text);
    text-align: left;
    font: inherit;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
.calendar-card:hover {
    border-color: var(--c-primary);
}
.calendar-card span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 650;
}
.calendar-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--c-text-muted);
    font-size: 11px;
}
.priority-left-low { border-left-color: var(--c-success); }
.priority-left-medium { border-left-color: var(--c-warn); }
.priority-left-high { border-left-color: var(--c-danger); }
.list-add input:focus::placeholder { color: var(--c-text-muted); }

/* Drag-Ghost */
.drag-ghost {
    opacity: .4;
    background: var(--c-primary-tint) !important;
}

/* ============================================================
   Modals
   ============================================================ */
.modal {
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--c-text);
    max-width: 540px;
    width: calc(100% - 32px);
}
.modal::backdrop { background: rgba(15,23,42,.55); backdrop-filter: blur(2px); }
.modal:not([open]) { display: none; }
.modal-fallback-open {
    display: block;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}
.modal-fallback-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(2px);
}
body.modal-open { overflow: hidden; }
.modal-content {
    background: var(--c-surface);
    color: var(--c-text);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--c-border);
}
.modal-header h2 { margin: 0; font-size: 16px; }
.modal-body { padding: 8px 20px 20px; }
.modal-body .form-label:first-child { margin-top: 6px; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--c-border);
    background: var(--c-surface-2);
}

.card-modal {
    max-width: 1080px;
}
.card-modal .modal-content {
    max-height: min(86vh, 920px);
    display: flex;
    flex-direction: column;
}
.card-modal .modal-header {
    padding: 16px 20px;
}
.card-modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
    gap: 0;
    padding: 0;
    overflow: hidden;
}
.card-detail-pane,
.card-edit-pane {
    min-height: 0;
    overflow: auto;
}
.card-detail-pane {
    padding: 22px;
    background: var(--c-surface);
}
.card-edit-pane {
    padding: 22px;
    border-left: 1px solid var(--c-border);
    background: var(--c-surface-2);
}
.card-edit-pane h3,
.card-detail-section h3 {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--c-text-soft);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.card-detail-hero {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--c-border);
    margin-bottom: 18px;
}
.card-detail-hero h3 {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.25;
    color: var(--c-text);
    text-transform: none;
    letter-spacing: 0;
}
.card-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.card-detail-description {
    white-space: pre-wrap;
    color: var(--c-text-soft);
    line-height: 1.65;
}
.card-detail-description.is-empty {
    color: var(--c-text-muted);
}
.card-edit-pane .form-label {
    margin-top: 14px;
}
.card-edit-pane .form-label:first-of-type {
    margin-top: 0;
}
.card-edit-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--c-border);
}
.card-edit-actions .btn {
    flex: 1;
}

.notification-dialog { max-width: 640px; }
.notification-list {
    max-height: 60vh;
    overflow: auto;
    padding: 8px;
    background: var(--c-surface);
}
.notification-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    background: var(--c-surface);
}
.notification-item.is-unread {
    border-color: #bfdbfe;
    background: var(--c-primary-tint);
}
.notification-text { min-width: 0; }
.notification-text strong { display: block; margin-bottom: 4px; }
.notification-text p { margin: 0 0 6px; color: var(--c-text-soft); }
.notification-text span { color: var(--c-text-muted); font-size: 12px; }
.notification-actions {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex-shrink: 0;
}
.notification-empty {
    padding: 16px;
    color: var(--c-text-muted);
    text-align: center;
}

.members-modal { max-width: 720px; }
.member-list {
    display: grid;
    gap: 8px;
    margin: 8px 0 16px;
}
.member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
}
.member-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.member-main span {
    color: var(--c-text-muted);
    font-size: 12px;
    word-break: break-word;
}
.member-main code { width: fit-content; }
.member-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.member-row-role,
.member-role-select {
    width: auto;
    min-width: 110px;
}
.member-add-form { margin-top: 14px; }
.member-search-results {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}
.member-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
    padding: 9px 10px;
    text-align: left;
    cursor: pointer;
}
.member-result:hover { background: var(--c-surface-2); }
.member-result span { display: grid; gap: 2px; }
.member-result small { color: var(--c-text-muted); }

.mention-panel {
    margin-top: 8px;
    padding: 8px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface-2);
}
.mention-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.mention-chip {
    border: 1px solid var(--c-border-2);
    border-radius: 999px;
    background: var(--c-surface);
    color: var(--c-primary-h);
    padding: 4px 9px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
}
.mention-chip:hover {
    background: var(--c-primary-tint);
    border-color: #bfdbfe;
}

.card-detail-section {
    margin-top: 18px;
    border-top: 1px solid var(--c-border);
    padding-top: 12px;
}
.card-detail-section h3 {
    margin-bottom: 8px;
}
.card-comments,
.card-attachments {
    display: grid;
    gap: 8px;
}
.card-comment,
.attachment-row {
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface-2);
    padding: 9px 10px;
}
.card-comment span,
.attachment-row span {
    color: var(--c-text-muted);
    font-size: 12px;
    margin-left: 6px;
}
.card-comment p {
    margin: 6px 0 0;
    white-space: pre-wrap;
}
.comment-form,
.attachment-form {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}
.attachment-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.security-section {
    margin-top: 24px;
}
.inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}
.inline-form .form-input {
    max-width: 320px;
}

.legal-editor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}
.legal-editor {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}
.legal-editor header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.legal-editor footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}
.legal-textarea { min-height: 360px; }
.legal-page {
    max-width: 900px;
}
.legal-content {
    margin-top: 18px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 24px;
    white-space: normal;
    line-height: 1.7;
}

.profile-page {
    max-width: 900px;
}
.profile-form {
    display: grid;
    gap: 16px;
}
.profile-panel {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}
.profile-panel h2 {
    margin-bottom: 14px;
}
.profile-avatar-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--avatar-color, var(--c-primary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
}
.profile-actions {
    display: flex;
    justify-content: flex-end;
}
.settings-logo-preview {
    margin: 8px 0 16px;
}
.settings-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}
.settings-form .btn {
    width: fit-content;
}
.settings-favicon-preview {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface-2);
    color: var(--c-primary);
    font-size: 20px;
    overflow: hidden;
}
.settings-favicon-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.logo-cropper {
    display: grid;
    gap: 10px;
}
.logo-cropper canvas {
    width: 256px;
    height: 256px;
    max-width: 100%;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    background-color: var(--c-surface);
    background-image:
        linear-gradient(45deg, var(--c-border) 25%, transparent 25%),
        linear-gradient(-45deg, var(--c-border) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--c-border) 75%),
        linear-gradient(-45deg, transparent 75%, var(--c-border) 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
    cursor: move;
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 18px 20px 24px;
    color: var(--c-text-muted);
    font-size: 12.5px;
}
.app-footer > * + *::before {
    content: "-";
    margin-right: 12px;
    color: var(--c-text-muted);
}
.board-body .app-footer {
    color: rgba(255,255,255,.9);
}
.board-body .app-footer a {
    color: #fff;
}

/* ============================================================
   Polished dashboard and board layout overrides
   ============================================================ */
.dashboard {
    max-width: 1320px;
    padding: 36px 28px 72px;
}
.dashboard-header {
    align-items: center;
    margin-bottom: 22px;
}
.dashboard-header h1 {
    font-size: 26px;
    margin-bottom: 10px;
}
.dashboard-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0;
}
.dashboard-summary article {
    min-height: 86px;
    display: grid;
    align-content: center;
    gap: 6px;
    border-radius: 8px;
}
.dashboard-summary strong {
    font-size: 30px;
    letter-spacing: 0;
}
.board-toolbar {
    align-items: center;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 8px;
    padding: 10px;
    box-shadow: var(--shadow-sm);
}
.board-toolbar .form-input {
    flex: 1 1 360px;
    max-width: none;
}
.board-toolbar .btn {
    min-height: 38px;
}
.board-section h2 {
    font-size: 18px;
    margin: 20px 0 12px;
}
.board-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.board-card-wrap {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.board-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.board-card:hover {
    transform: none;
    box-shadow: none;
}
.board-card-cover {
    height: 78px;
}
.board-card-body {
    min-height: 88px;
}
.board-card-actions {
    padding: 0 14px 14px;
}

.board-body {
    display: flex;
    flex-direction: column;
}
.board-body .topbar {
    flex: 0 0 auto;
}
.board-header {
    padding: 16px 24px 12px;
}
.board-header-inner {
    max-width: none;
    padding: 0 8px;
}
.board {
    flex: 1 1 auto;
    padding: 0 24px 24px;
    min-height: 0;
}
.lists {
    min-height: calc(100vh - var(--topbar-h) - 110px);
    gap: 14px;
    padding-top: 8px;
}
.list {
    flex-basis: 290px;
    border-radius: 8px;
    background: var(--c-surface-2);
    border: 1px solid rgba(15,23,42,.08);
    box-shadow: 0 10px 30px rgba(15,23,42,.08);
}
.list-header {
    padding: 12px 10px 8px 14px;
}
.cards {
    padding: 6px 10px;
}
.card {
    border-color: var(--c-border);
    border-radius: 8px;
}
.card-add {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 8px 10px 12px;
}
.card-add input {
    background: var(--c-surface);
    border-color: var(--c-border);
    color: var(--c-text);
}
.card-add .btn {
    min-height: 36px;
}
.list-add {
    flex: 0 0 290px;
    background: rgba(255,255,255,.18);
    border: 1px dashed rgba(255,255,255,.55);
    border-radius: 8px;
    box-shadow: none;
}
.list-add form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}
.list-add input {
    background: var(--c-surface);
    color: var(--c-text);
    border: 1px solid transparent;
}
.list-add input::placeholder {
    color: var(--c-text-muted);
}
.board-body .app-footer {
    margin-top: auto;
}

.board-calendar {
    width: 100%;
    min-width: min(980px, 100%);
    margin-top: 0;
}
.calendar-toolbar {
    min-height: 52px;
    padding: 10px 14px;
}
.calendar-day {
    min-height: 112px;
}

/* ============================================================
   Tabelle (Admin)
   ============================================================ */
.table-wrap {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: auto;
    box-shadow: var(--shadow-sm);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.data-table thead th {
    text-align: left;
    padding: 10px 14px;
    background: var(--c-surface-2);
    color: var(--c-text-soft);
    font-weight: 600;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--c-border);
    white-space: nowrap;
}
.data-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--c-border);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--c-surface-2); }
.data-table td.right { text-align: right; white-space: nowrap; }
.data-table td.right .btn { margin-left: 4px; }

/* ============================================================
   Toast-Notifications
   ============================================================ */
.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    background: #111827;
    color: #fff;
    font-size: 13.5px;
    max-width: 360px;
    box-shadow: var(--shadow-lg);
    transform: translateY(12px);
    opacity: 0;
    transition: transform .2s, opacity .2s;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-error   { background: var(--c-danger); }
.toast-success { background: var(--c-success); }

/* ============================================================
   Board polish: modern, calm, mobile-ready
   ============================================================ */
.topbar {
    height: 58px;
    background: color-mix(in srgb, var(--c-surface) 88%, transparent);
    border-bottom: 1px solid rgba(148,163,184,.28);
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    backdrop-filter: blur(16px);
}
.topbar-inner {
    max-width: 1360px;
    padding: 0 clamp(14px, 2vw, 24px);
    gap: 18px;
}
.topbar-brand {
    min-width: 0;
    gap: 11px;
    padding: 6px 8px 6px 0;
    font-weight: 760;
    text-decoration: none;
}
.topbar-brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.topbar-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    box-shadow: 0 8px 18px rgba(37,99,235,.18);
}
.topbar-logo.has-image {
    background: linear-gradient(135deg, #111827, #2563eb);
    box-shadow: 0 8px 18px rgba(37,99,235,.18);
}
.topbar-nav {
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    background: color-mix(in srgb, var(--c-surface-2) 78%, transparent);
}
.topbar-nav a {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 7px;
    color: var(--c-text-soft);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}
.topbar-nav a:hover {
    background: var(--c-surface-2);
    color: var(--c-primary);
    box-shadow: 0 1px 2px rgba(15,23,42,.08);
}
.topbar-user {
    gap: 10px;
}
.notification-button {
    width: 36px;
    height: 36px;
    background: color-mix(in srgb, var(--c-surface) 82%, transparent);
    border-color: var(--c-border);
    box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.notification-button:hover {
    background: var(--c-surface-2);
    color: var(--c-primary);
}
.user-menu summary {
    min-height: 38px;
    padding: 4px 11px 4px 5px;
    border-color: var(--c-border);
    background: color-mix(in srgb, var(--c-surface) 66%, transparent);
}
.user-menu summary:hover {
    background: var(--c-surface-2);
    border-color: var(--c-border);
}
.user-avatar {
    width: 30px;
    height: 30px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.42);
}
.user-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--c-text);
    font-weight: 650;
}
.user-menu-panel {
    border-radius: 12px;
    border-color: var(--c-border);
    box-shadow: 0 18px 44px rgba(15,23,42,.16);
}
.app-footer {
    max-width: 1360px;
    margin: 48px auto 0;
    padding: 18px clamp(14px, 2vw, 24px) 24px;
    display: flex;
    justify-content: center;
    gap: 8px 10px;
    color: var(--c-text-muted);
    font-size: 12px;
    line-height: 1.6;
}
.app-footer > * {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
}
.app-footer > * + *::before {
    content: "";
    width: 4px;
    height: 4px;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--c-border-2);
}
.app-footer a {
    color: var(--c-primary);
    font-weight: 600;
}
.app-footer a:hover {
    color: var(--c-primary-h);
}
.board-body .topbar {
    background: color-mix(in srgb, var(--c-surface-2) 88%, transparent);
}
.board-body .app-footer {
    max-width: none;
    margin-top: 18px;
    padding-top: 14px;
    color: rgba(255,255,255,.86);
    text-shadow: 0 1px 2px rgba(15,23,42,.2);
}
.board-body .app-footer > * + *::before {
    background: rgba(255,255,255,.46);
}
.board-body .app-footer a {
    color: #fff;
}

.app-footer {
    max-width: none;
    width: min(1180px, calc(100% - 40px));
    margin: 56px auto 32px;
    padding: 0;
    display: block;
    background: linear-gradient(180deg, #171717 0%, #111 100%);
    color: rgba(255,255,255,.72);
    font-size: 12px;
    line-height: 1.5;
    border: 1px solid var(--c-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 46px rgba(15,23,42,.16);
}
.app-footer-inner {
    max-width: none;
    margin: 0 auto;
    padding: 44px 28px 30px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 2fr;
    align-items: start;
    gap: 34px;
}
.footer-brand {
    display: grid;
    align-content: start;
    gap: 2px;
}
.footer-brand strong {
    color: #fff;
    font-size: 22px;
    line-height: 1;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.footer-brand span {
    color: rgba(255,255,255,.68);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.footer-column {
    display: grid;
    align-content: start;
    gap: 5px;
}
.footer-column strong {
    margin-bottom: 4px;
    color: #fff;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.footer-column a,
.footer-column span {
    color: rgba(255,255,255,.72);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.footer-column a {
    text-decoration: none;
}
.footer-column a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.footer-notice span {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    line-height: 1.55;
}
.footer-bottom {
    grid-column: 1 / -1;
    margin-top: 28px;
    padding-top: 26px;
    border-top: 1px solid rgba(255,255,255,.34);
    text-align: center;
    color: rgba(255,255,255,.78);
    font-size: 11px;
    font-weight: 700;
}
.app-footer > * + *::before,
.app-footer-inner > * + *::before {
    content: none;
}
.board-body .app-footer {
    width: min(1180px, calc(100% - 48px));
    margin: 24px auto 28px;
    padding: 0;
    color: rgba(255,255,255,.72);
    text-shadow: none;
    background: rgba(17,17,17,.92);
    backdrop-filter: blur(14px);
}
.board-body .app-footer a {
    color: rgba(255,255,255,.72);
}
.board-body .app-footer a:hover {
    color: #fff;
}

/* ============================================================
   Desktop page rhythm for non-board screens
   ============================================================ */
@media (min-width: 901px) {
    .home-body,
    body:not(.auth-body):not(.board-body) {
        background:
            radial-gradient(circle at 18% 0%, rgba(37,99,235,.08), transparent 34%),
            var(--c-surface);
    }
    .dashboard {
        width: min(1180px, calc(100% - 40px));
        max-width: none;
        padding: 38px 0 0;
    }
    .dashboard-header {
        margin-bottom: 26px;
    }
    .dashboard-header h1 {
        font-size: 28px;
        font-weight: 760;
    }
    .dashboard-summary {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
        margin: 28px 0 22px;
    }
    .dashboard-summary article,
    .board-toolbar,
    .profile-panel,
    .legal-editor,
    .legal-content,
    .table-wrap,
    .empty-state {
        border-color: var(--c-border);
        border-radius: 12px;
        box-shadow: 0 12px 28px rgba(15,23,42,.07);
    }
    .dashboard-summary article {
        min-height: 92px;
        padding: 18px;
    }
    .dashboard-summary strong {
        font-size: 31px;
        line-height: 1;
    }
    .board-toolbar {
        padding: 12px;
        gap: 8px;
    }
    .board-section {
        margin-top: 22px;
        min-height: 96px;
    }
    .board-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
    .board-card-wrap {
        border-radius: 12px;
        box-shadow: 0 12px 28px rgba(15,23,42,.07);
    }
    .board-card-cover {
        height: 92px;
    }
    .board-card-actions {
        padding: 0 16px 16px;
    }
    .empty-state {
        margin-top: 22px;
        min-height: 180px;
        display: grid;
        place-content: center;
        text-align: center;
    }
    .profile-page,
    .legal-page {
        width: min(980px, calc(100% - 40px));
        max-width: none;
    }
    .profile-panel,
    .legal-editor,
    .legal-content {
        padding: 24px;
    }
    .legal-editor-grid {
        gap: 18px;
    }
    .security-section {
        margin-top: 28px;
    }
}
.board-body {
    color-scheme: light;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow-x: hidden;
}
.board-body .topbar {
    background: color-mix(in srgb, var(--c-surface-2) 90%, transparent);
    border-bottom-color: rgba(148,163,184,.28);
    box-shadow: 0 1px 0 rgba(255,255,255,.6);
}
.board-header {
    padding: 18px clamp(16px, 2vw, 28px) 12px;
}
.board-header-inner {
    min-height: 44px;
    gap: 10px;
}
.board-header h1 {
    max-width: min(46vw, 620px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 24px;
    font-weight: 750;
}
.board-header .pill {
    backdrop-filter: blur(12px);
    font-weight: 700;
}
.board-view-toggle {
    min-height: 38px;
    margin-left: 2px;
    border-color: rgba(255,255,255,.38);
    border-radius: 8px;
    background: rgba(15,23,42,.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
    backdrop-filter: blur(12px);
}
.board-view-button {
    min-width: 78px;
    min-height: 30px;
    border-radius: 6px;
    font-size: 13px;
}
.board-view-button.is-active {
    color: #1d4ed8;
}
.board-members-button {
    min-height: 36px;
    border-radius: 8px;
    backdrop-filter: blur(12px);
}
.board {
    width: 100%;
    padding: 0 clamp(12px, 2vw, 28px) 24px;
    scrollbar-color: rgba(255,255,255,.55) transparent;
}
.lists {
    min-height: calc(100svh - var(--topbar-h) - 104px);
    gap: 16px;
    padding: 8px 2px 18px;
}
.list {
    flex: 0 0 clamp(280px, 24vw, 330px);
    max-height: calc(100svh - var(--topbar-h) - 118px);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    background: color-mix(in srgb, var(--c-surface-2) 92%, transparent);
    box-shadow: 0 16px 36px rgba(15,23,42,.18);
    backdrop-filter: blur(16px);
}
.list-header {
    min-height: 44px;
    padding: 10px 10px 8px 14px;
    border-bottom: 1px solid rgba(148,163,184,.16);
}
.list-title {
    font-size: 14px;
    font-weight: 750;
}
.cards {
    padding: 10px;
}
.card {
    margin-bottom: 10px;
    border: 1px solid var(--c-border);
    border-radius: 9px;
    box-shadow: 0 1px 2px rgba(15,23,42,.06);
}
.card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15,23,42,.12);
}
.card-title {
    font-weight: 620;
}
.card-add,
.list-add {
    border-top: 1px solid rgba(148,163,184,.16);
}
.card-add input,
.list-add input {
    min-height: 38px;
    border-radius: 8px;
}
.list-add {
    align-self: flex-start;
    padding: 8px;
    border-top: 1px dashed rgba(255,255,255,.55);
}
.board-calendar {
    width: 100%;
    min-width: 0;
    margin: 8px 0 0;
    border-color: var(--c-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--c-surface) 96%, transparent);
    box-shadow: 0 18px 42px rgba(15,23,42,.18);
    backdrop-filter: blur(16px);
}
.calendar-toolbar {
    min-height: 50px;
    padding: 10px 12px;
}
.calendar-toolbar h2 {
    min-width: 0;
    flex: 1;
    font-size: 17px;
}
.calendar-weekdays span {
    padding: 8px 10px;
}
.calendar-day {
    min-height: clamp(94px, 14vh, 126px);
    padding: 8px;
}
.calendar-day.is-today {
    box-shadow: inset 0 0 0 2px #2563eb;
}
.calendar-card {
    border-radius: 7px;
    box-shadow: none;
}
.calendar-card:hover {
    background: var(--c-surface-2);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .topbar-inner {
        gap: 10px;
    }
    .topbar-nav {
        max-width: 44vw;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .topbar-nav::-webkit-scrollbar {
        display: none;
    }
    .topbar-nav a {
        white-space: nowrap;
    }
    .user-name {
        max-width: 120px;
    }
    .app-footer {
        margin-top: 34px;
        justify-content: flex-start;
    }
    .app-footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 26px 28px;
        padding: 38px 24px 28px;
    }
    .app-footer,
    .board-body .app-footer {
        width: min(100% - 28px, 1180px);
        margin-bottom: 24px;
    }
    .footer-brand,
    .footer-notice,
    .footer-bottom {
        grid-column: 1 / -1;
    }
    .board-header-inner {
        flex-wrap: wrap;
    }
    .board-header h1 {
        max-width: calc(100vw - 180px);
        font-size: 21px;
    }
    .board-view-toggle {
        order: 3;
        width: 100%;
        max-width: 260px;
    }
    .board-view-button {
        flex: 1;
    }
    .board-members-button {
        margin-left: auto;
    }
    .calendar-weekdays,
    .calendar-grid {
        min-width: 760px;
    }
    .board-calendar {
        overflow-x: auto;
    }
    .card-modal {
        width: calc(100% - 20px);
        max-width: 720px;
    }
    .card-modal .modal-content {
        max-height: 90vh;
    }
    .card-modal-body {
        grid-template-columns: 1fr;
        overflow: auto;
    }
    .card-detail-pane,
    .card-edit-pane {
        overflow: visible;
    }
    .card-edit-pane {
        border-left: 0;
        border-top: 1px solid var(--c-border);
    }
    .auth-card {
        max-width: 560px;
    }
    .login-card {
        max-width: 560px;
        grid-template-columns: 1fr;
    }
    .auth-body .public-topbar {
        max-width: 560px;
    }
    .login-intro {
        min-height: auto;
        padding: 30px;
    }
    .login-intro h1 {
        font-size: 28px;
    }
    .login-form-panel {
        padding: 32px 30px;
    }
    .login-form-panel .auth-brand {
        text-align: center;
    }
}

@media (max-width: 640px) {
    :root { --topbar-h: 54px; }
    .topbar {
        height: var(--topbar-h);
    }
    .topbar-inner { padding: 0 10px; gap: 8px; }
    .topbar-brand {
        flex: 0 1 auto;
        gap: 8px;
    }
    .topbar-brand span { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-logo {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }
    .topbar-nav   { display: none; }
    .notification-button {
        width: 34px;
        height: 34px;
    }
    .user-menu summary {
        padding: 3px;
        border-color: transparent;
        background: transparent;
    }
    .user-name    { display: none; }
    .auth-body {
        padding: 24px 10px 18px;
    }
    .auth-card {
        max-width: 100%;
        padding: 24px 18px;
        border-radius: 12px;
    }
    .auth-body .public-topbar {
        max-width: 100%;
        border-radius: 12px;
    }
    .login-card {
        padding: 0;
        overflow: hidden;
    }
    .login-intro {
        padding: 24px 18px;
    }
    .login-intro .auth-logo {
        width: 48px;
        height: 48px;
        margin-bottom: 16px;
    }
    .login-intro h1 {
        font-size: 24px;
    }
    .login-intro p {
        font-size: 13.5px;
    }
    .login-trust {
        margin-top: 18px;
    }
    .login-form-panel {
        padding: 24px 18px;
    }
    .app-footer {
        margin-top: 28px;
        padding: 16px 14px 22px;
        justify-content: flex-start;
        gap: 7px 9px;
        font-size: 11.5px;
    }
    .app-footer {
        width: calc(100% - 20px);
        margin-bottom: 18px;
        padding: 0;
        border-radius: 12px;
    }
    .board-body .app-footer {
        width: calc(100% - 20px);
        margin-bottom: 18px;
    }
    .app-footer-inner {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 34px 18px 24px;
    }
    .footer-brand strong {
        font-size: 20px;
    }
    .footer-bottom {
        margin-top: 8px;
        padding-top: 22px;
        text-align: left;
    }
    .app-footer > * {
        min-height: 20px;
    }
    .app-footer > * + *::before {
        width: 3px;
        height: 3px;
        margin-right: 9px;
    }

    .dashboard { padding: 20px 14px; }
    .dashboard-header { flex-direction: column; align-items: stretch; }
    .board-grid { grid-template-columns: 1fr; }
    .board-header { padding: 12px 12px 8px; }
    .board-header-inner { padding: 0; gap: 8px; }
    .board-header h1 {
        max-width: calc(100vw - 118px);
        font-size: 20px;
    }
    .board-header .pill {
        font-size: 11px;
        padding: 3px 7px;
    }
    .board-view-toggle {
        order: 4;
        max-width: none;
    }
    .board-members-button {
        margin-left: auto;
        padding-inline: 10px;
    }
    .board {
        padding: 0 10px 18px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
    }
    .board-body {
        background-attachment: scroll !important;
    }
    .lists {
        min-height: calc(100svh - var(--topbar-h) - 116px);
        gap: 10px;
        padding-top: 6px;
        scroll-snap-type: x proximity;
    }
    .list {
        flex: 0 0 min(86vw, 340px);
        max-width: none;
        max-height: calc(100svh - var(--topbar-h) - 126px);
        scroll-snap-align: start;
    }
    .card-add {
        grid-template-columns: 1fr;
    }
    .card-add .btn {
        width: 100%;
    }
    .list-add {
        flex: 0 0 min(86vw, 340px);
    }
    .list-add form {
        grid-template-columns: 1fr;
    }
    .list-add .btn {
        width: 100%;
    }
    .calendar-toolbar {
        flex-wrap: wrap;
    }
    .calendar-toolbar h2 {
        order: -1;
        flex: 1 0 100%;
    }
    .calendar-weekdays,
    .calendar-grid {
        min-width: 720px;
    }
    .calendar-day {
        min-height: 104px;
    }
    .card-modal {
        width: calc(100% - 12px);
    }
    .card-modal .modal-header {
        padding: 13px 14px;
    }
    .card-detail-pane,
    .card-edit-pane {
        padding: 16px;
    }
    .card-detail-hero h3 {
        font-size: 19px;
    }
    .card-edit-actions {
        flex-direction: column-reverse;
    }

    .notification-item,
    .member-row {
        flex-direction: column;
        align-items: stretch;
    }
    .notification-actions,
    .member-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .data-table thead { display: none; }
    .data-table tbody td { display: block; padding: 8px 12px; border: 0; }
    .data-table tbody tr {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid var(--c-border);
    }
    .data-table td.right { text-align: left; }
}

/* Reduziere Animationen für entsprechende Einstellungen */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ============================================================
   Login polish: kompakter, ruhiger, markanter auf Desktop
   ============================================================ */
@media (min-width: 901px) {
    .auth-body {
        padding-top: clamp(42px, 7vh, 72px);
    }

    .auth-body .login-card {
        max-width: 1060px;
        grid-template-columns: minmax(0, 1fr) 420px;
        border-color: var(--c-border);
        box-shadow:
            0 30px 70px rgba(15,23,42,.14),
            0 1px 0 rgba(255,255,255,.86) inset;
    }

    .login-intro {
        position: relative;
        min-height: 500px;
        padding: 48px;
        isolation: isolate;
    }

    .login-intro > * {
        position: relative;
        z-index: 1;
    }

    .login-intro::before {
        content: "";
        position: absolute;
        right: 44px;
        bottom: 52px;
        width: 82px;
        height: 300px;
        border: 1px solid var(--c-border);
        border-radius: 18px;
        background:
            linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.05));
        box-shadow:
            -108px 36px 0 -1px rgba(255,255,255,.08),
            -108px 36px 0 0 rgba(255,255,255,.14),
            -216px 92px 0 -1px rgba(255,255,255,.06),
            -216px 92px 0 0 rgba(255,255,255,.12);
        opacity: .58;
        z-index: 0;
    }

    .login-intro::after {
        content: "";
        position: absolute;
        inset: 0;
        background:
            linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent) 72% 28% / 260px 1px no-repeat,
            linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent) 76% 52% / 220px 1px no-repeat,
            linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent) 68% 73% / 300px 1px no-repeat;
        opacity: .72;
        z-index: 0;
    }

    .login-form-panel {
        padding: 44px 34px;
    }

    .login-form-panel > form,
    .login-form-panel > .auth-brand,
    .login-form-panel > .alert,
    .login-form-panel > .auth-footnote {
        max-width: 392px;
    }

    .auth-body .app-footer {
        width: min(1060px, calc(100% - 40px));
        margin-top: 34px;
        margin-bottom: 26px;
        background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
        box-shadow: 0 24px 56px rgba(15,23,42,.13);
    }

    .auth-body .app-footer-inner {
        padding: 34px 26px 24px;
        gap: 30px;
        grid-template-columns: 1.5fr 1fr 1fr 2fr;
        align-items: start;
    }

    .auth-body .footer-brand strong {
        font-size: 20px;
        letter-spacing: .06em;
    }

    .auth-body .footer-column strong {
        letter-spacing: .065em;
    }

    .auth-body .footer-column a,
    .auth-body .footer-column span {
        font-size: 11.5px;
        font-weight: 650;
        letter-spacing: .015em;
        line-height: 1.55;
        text-transform: none;
    }

    .auth-body .footer-bottom {
        margin-top: 20px;
        padding-top: 20px;
        border-top-color: rgba(255,255,255,.2);
    }
}

/* ============================================================
   GANTT-AddOn
   ============================================================ */
.gantt-body { background: var(--c-bg); }
.icon { vertical-align: -3px; flex-shrink: 0; }

.gantt-header {
    background: var(--board-color, var(--c-primary));
    background-image: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.10));
}
.gantt-header .board-header-inner { gap: 12px; }
.gantt-header h1 { display: inline-flex; align-items: center; gap: 8px; font-size: 1.3rem; }
.gantt-back {
    background: color-mix(in srgb, var(--c-surface) 18%, transparent);
    color: #fff;
    border-color: var(--c-border);
    display: inline-flex; align-items: center; gap: 6px;
}
.gantt-back:hover { background: color-mix(in srgb, var(--c-surface) 30%, transparent); text-decoration: none; }
.gantt-board-pill { margin-left: auto; }

.gantt {
    max-width: 1400px;
    margin: 0 auto;
    padding: 18px 20px 64px;
}

/* -------- Toolbar -------- */
.gantt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
}
.gantt-project-picker { min-width: 240px; }
.gantt-project-picker .form-label { margin-top: 0; }
.gantt-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.gantt-toolbar-actions .btn { display: inline-flex; align-items: center; gap: 6px; }

.gantt-zoom {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
}
.gantt-zoom-btn {
    border: 0;
    background: transparent;
    color: var(--c-text-soft);
    padding: 6px 12px;
    border-radius: 5px;
    font: inherit;
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
}
.gantt-zoom-btn:hover { background: var(--c-surface); }
.gantt-zoom-btn.is-active { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-sm); }

.gantt-menu { position: relative; }
.gantt-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.gantt-menu > summary::-webkit-details-marker { display: none; }
.gantt-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 210px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 60;
}
.gantt-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    font: inherit;
    color: var(--c-text);
    cursor: pointer;
}
.gantt-menu-item:hover { background: var(--c-surface-2); }

.gantt-actionbar {
    display: flex;
    gap: 8px;
    margin: 14px 0 0;
}
.gantt-actionbar .btn { display: inline-flex; align-items: center; gap: 6px; }

/* -------- Metriken -------- */
.gantt-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin: 16px 0 4px;
}
.gantt-metric {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 12px 14px;
}
.gantt-metric strong { display: block; font-size: 22px; line-height: 1.1; font-weight: 700; color: var(--c-text); }
.gantt-metric span { color: var(--c-text-muted); font-size: 12px; }
.gantt-metric.is-danger strong { color: var(--c-danger); }

.gantt-metric-progress { grid-column: span 2; display: flex; flex-direction: column; justify-content: center; }
.gantt-metric-progress-top { display: flex; align-items: baseline; gap: 8px; }
.gantt-metric-progress-top strong { font-size: 22px; }
.gantt-metric-progress-top span { color: var(--c-text-muted); }
.gantt-progress-track { height: 8px; background: var(--c-surface-2); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.gantt-progress-track i { display: block; height: 100%; background: var(--c-primary); }

.gantt-workload { grid-column: 1 / -1; }
.gantt-metric-cap { display: block; color: var(--c-text-muted); font-size: 12px; margin-bottom: 8px; }
.gantt-workload-list { display: flex; flex-wrap: wrap; gap: 8px; }
.gantt-workchip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    padding: 3px 10px 3px 3px;
    font-size: 12px;
}
.gantt-workchip b { color: var(--c-primary-h); }

/* -------- Avatare -------- */
.gantt-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--c, var(--c-primary));
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}
.gantt-avatar.sm { width: 20px; height: 20px; font-size: 9px; }
.gantt-avatar.inactive { opacity: .4; }

/* -------- Chart -------- */
.gantt-board {
    margin-top: 16px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.gantt-empty { padding: 48px 24px; text-align: center; }
.gantt-empty h3 { color: var(--c-text); margin-bottom: 6px; }

.gantt-scroller { overflow-x: auto; overflow-y: visible; -webkit-overflow-scrolling: touch; }
.gantt-inner { display: flex; align-items: stretch; }

.gantt-labels {
    position: sticky;
    left: 0;
    z-index: 6;
    flex: 0 0 260px;
    background: var(--c-surface);
    border-right: 1px solid var(--c-border-2);
}
.gantt-labels-head {
    display: flex;
    align-items: center;
    padding: 0 14px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--c-text-muted);
    background: var(--c-surface-2);
    border-bottom: 1px solid var(--c-border);
}
.gantt-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-bottom: 1px solid var(--c-border);
    cursor: pointer;
}
.gantt-label-row:hover { background: var(--c-surface-2); }
.gantt-label-row.is-child { padding-left: 26px; }
.gantt-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--c-primary)); flex-shrink: 0; }
.gantt-label-name {
    flex: 1;
    min-width: 0;
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gantt-label-people { display: inline-flex; gap: 2px; flex-shrink: 0; }

.gantt-timeline { position: relative; }
.gantt-axis {
    position: relative;
    background: var(--c-surface-2);
    border-bottom: 1px solid var(--c-border);
    overflow: hidden;
}
.gantt-axis-months { position: absolute; inset: 0; }
.gantt-axis-month {
    position: absolute;
    top: 4px;
    padding-left: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--c-text-soft);
    white-space: nowrap;
    border-left: 1px solid var(--c-border-2);
    height: 14px;
}
.gantt-axis-days { position: absolute; left: 0; right: 0; bottom: 3px; height: 16px; }
.gantt-axis-day {
    position: absolute;
    font-size: 10px;
    color: var(--c-text-muted);
    text-align: center;
    white-space: nowrap;
}

.gantt-canvas {
    position: relative;
    background-image: repeating-linear-gradient(to bottom, transparent 0 39px, var(--c-border) 39px 40px);
}
.gantt-gridline { position: absolute; top: 0; width: 1px; background: var(--c-border); opacity: .6; }
.gantt-gridline-strong { background: var(--c-border-2); opacity: 1; }
.gantt-today-line { position: absolute; top: 0; width: 2px; background: var(--c-danger); opacity: .7; z-index: 3; }

.gantt-deps { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 2; overflow: visible; }
.gantt-dep-path { fill: none; stroke: var(--c-text-muted); stroke-width: 1.4; stroke-dasharray: 4 3; }
.gantt-dep-arrow { fill: var(--c-text-muted); }

.gantt-bar {
    position: absolute;
    border-radius: 5px;
    background: color-mix(in srgb, var(--c) 30%, var(--c-surface));
    border: 1px solid var(--c);
    overflow: hidden;
    cursor: grab;
    z-index: 4;
    box-shadow: var(--shadow-sm);
    touch-action: none;
}
.gantt-bar:hover { filter: brightness(.98); }
.gantt-bar.is-dragging { cursor: grabbing; opacity: .85; z-index: 8; }
.gantt-bar-fill { position: absolute; inset: 0; width: 0; background: var(--c); border-radius: 4px 0 0 4px; }
.gantt-bar-resize {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 8px;
    cursor: ew-resize;
    z-index: 5;
}
.gantt-bar-mile {
    position: absolute;
    width: 15px; height: 15px;
    background: var(--c-text);
    transform: rotate(45deg);
    border-radius: 2px;
    z-index: 4;
    box-shadow: 0 1px 2px rgba(0,0,0,.28);
    cursor: pointer;
}
.gantt-bar-mile:hover { background: var(--c-text-soft); }
/* Beschriftung rechts vom Balken/Meilenstein (Referenzdesign) */
.gantt-caption {
    position: absolute;
    transform: translateY(-50%);
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12.5px;
    color: var(--c-text);
    pointer-events: none;
    z-index: 4;
}
.gantt-caption b { font-weight: 500; }
.gantt-caption-date { color: var(--c-text-muted); margin-left: 7px; font-size: 11px; }

/* -------- Formulare in Modals -------- */
.gantt-form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.gantt-form-row .form-label:first-child { margin-top: 6px; }
.gantt-range { width: 100%; margin: 4px 0 4px; accent-color: var(--c-primary); }
.gantt-hint { margin: 2px 0 10px; font-size: 11.5px; color: var(--c-text-muted); }
.gantt-assignees {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface-2);
}
.gantt-assignee-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    cursor: pointer;
    font-size: 13px;
}
.gantt-assignee-opt:hover { border-color: var(--c-primary); }
.gantt-assignee-opt input { flex-shrink: 0; }

@media (max-width: 720px) {
    .gantt-form-row { grid-template-columns: 1fr; }
    .gantt-toolbar { flex-direction: column; align-items: stretch; }
    .gantt-metric-progress { grid-column: 1 / -1; }
    .gantt-labels { flex-basis: 180px; }
}

/* Gantt-Button in der Board-Kopfzeile */
.board-gantt-button {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.2);
    color: #fff;
    border-color: rgba(255,255,255,.35);
}
.board-gantt-button:hover { background: rgba(255,255,255,.3); text-decoration: none; color: #fff; }
.board-gantt-button + .board-members-button { margin-left: 0; }

/* Abhaengigkeitsliste im Modal */
.gantt-dep-list { display: grid; gap: 6px; margin-top: 4px; max-height: 180px; overflow-y: auto; }
.gantt-dep-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface-2);
    font-size: 13px;
}
.gantt-dep-item b { color: var(--c-primary); }

/* ============================================================
   Theme-Umschalter (Hell/Dunkel)
   ============================================================ */
.theme-toggle {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--c-border);
    background: var(--c-surface-2);
    color: var(--c-text-soft);
    cursor: pointer;
    flex-shrink: 0;
    transition: color .15s, border-color .15s, background .15s;
}
.theme-toggle:hover { color: var(--c-primary); border-color: var(--c-border-2); }
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }
:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ============================================================
   Footer: volle Breite auf eingeloggten Seiten (Login bleibt zentriert)
   Spezifitaet (0,2,1) schlaegt Basis- und .board-body-Regeln inkl.
   der Breakpoint-Overrides.
   ============================================================ */
body:not(.auth-body) .app-footer {
    width: 100%;
    max-width: none;
    margin: 48px 0 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-top: 1px solid var(--c-border);
    box-shadow: none;
}
body:not(.auth-body) .app-footer-inner {
    max-width: none;
    margin: 0;
    padding: 40px clamp(16px, 3vw, 40px) 30px;
}

/* ============================================================
   Professionelleres Board: minimale Rundungen, klare Kanten,
   dezente Animationen. (Bewusst als letzter Block, damit die
   Werte die frueheren Overrides sicher schlagen.)
   ============================================================ */

/* Globale Rundungen deutlich reduzieren */
:root {
    --radius-sm: 3px;
    --radius:    4px;
    --radius-lg: 6px;
}

/* --- Spalten (Listen) --- */
.board-body .list {
    border-radius: 4px;
    border: 1px solid var(--c-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .22);
}
.board-body .list-add {
    border-radius: 4px;
    border: 1px dashed rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .12);
}
.board-body .list-title { border-radius: 3px; }

/* --- Karten --- */
.board-body .card {
    border-radius: 3px;
    border: 1px solid var(--c-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .16);
    transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.board-body .card:hover {
    border-color: var(--c-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
    transform: translateY(-1px);
}
.board-body .card:active { transform: translateY(0); }

/* --- Chips: Tags & Prioritaet kantig statt vollrund --- */
.card-tag {
    border-radius: 3px;
    color: var(--c-text-soft);
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    font-weight: 600;
    letter-spacing: .01em;
}
.priority {
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
    font-size: 10.5px;
}

/* --- Ansicht-Umschalter & Board-Buttons --- */
.board-view-toggle { border-radius: 4px; }
.board-view-button { border-radius: 3px; transition: background .12s ease, color .12s ease; }
.board-view-button.is-active { box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }

/* --- Kalender --- */
.board-calendar { border-radius: 4px; }
.calendar-card {
    border-radius: 3px;
    transition: border-color .12s ease, background .12s ease;
}

/* --- Dashboard-Boardkacheln passend angleichen --- */
.board-card-wrap { border-radius: 4px; }
.board-card { border-radius: 4px; }
.dashboard-summary article { border-radius: 4px; }
.board-toolbar { border-radius: 4px; }

/* --- Karten-Modal & Buttons kantiger --- */
.modal-content { border-radius: 5px; }
.btn { border-radius: 4px; }

/* Feinere Trennlinie unter der Topbar im Board */
.board-body .topbar { border-bottom: 1px solid rgba(0, 0, 0, .28); }

/* ============================================================
   KanbanSuite Corporate Design – finale, verbindliche Ebene.
   Ziel: edler, ruhiger Gesamteindruck. Farbe erscheint bewusst
   NUR an definierten Stellen (Primaeraktionen, Fokus, aktive
   Zustaende, Marke, Status). Alles andere bleibt neutral.
   Dieser Block steht bewusst am Ende und gewinnt gegen frueheres.
   ============================================================ */

/* --- Marke: flaechiger Akzent statt Zweifarb-Verlauf --- */
.topbar-logo,
.auth-logo {
    background: var(--c-primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
}
.topbar-logo.has-image,
.auth-logo.has-image {
    background: var(--c-surface-2);
    box-shadow: none;
}

/* --- Rollen-Chips: Akzent nur fuer Admin, sonst neutral --- */
.pill-admin {
    background: var(--c-primary-tint);
    color: var(--c-primary-h);
    border-color: color-mix(in srgb, var(--c-primary) 30%, transparent);
}
.pill-editor,
.pill-user,
.pill-viewer,
.pill-muted {
    background: var(--c-surface-2);
    color: var(--c-text-muted);
    border-color: var(--c-border);
}

/* --- Globaler Fokus-Ring (Akzent) fuer Tastaturbedienung --- */
:where(a, button, input, select, textarea, [tabindex], summary, [role="button"]):focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}

/* --- Textauswahl in Markenfarbe --- */
::selection {
    background: color-mix(in srgb, var(--c-primary) 26%, transparent);
}

/* --- Primaerbutton: klare, ruhige Akzentflaeche --- */
.btn-primary {
    background: var(--c-primary);
    color: #fff;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
    transition: background .14s ease, box-shadow .14s ease;
}
.btn-primary:hover { background: var(--c-primary-h); }

/* --- Sekundaerflaechen ruhiger: Hairline-Kanten, weiche Schatten --- */
.dashboard-summary article,
.board-toolbar,
.board-card,
.board-card-wrap {
    box-shadow: var(--shadow-sm);
}

/* --- Zahlen tabellarisch ausrichten (Kennzahlen, Kalender) --- */
.dashboard-summary strong,
.calendar-day-number,
.notification-count {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* --- Topbar-Marke: praezises Tracking --- */
.topbar-brand,
.auth-brand h1,
.login-intro h1 {
    letter-spacing: -0.017em;
}

/* ============================================================
   Post-Login-Animation ("Splash") – erscheint einmalig direkt
   nach der Anmeldung und blendet sich selbst aus (CSS-only).
   Marke ueber einer ruhigen Kanban-Kulisse aus 3 Kacheln.
   ============================================================ */
.splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-bg);
    overflow: hidden;
    animation: splash-out .55s ease 2.75s forwards;
}

/* Kulisse: 3 Kanban-Kacheln, zentriert hinter der Marke */
.splash-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 12vw, 150px);
    opacity: .55;
    pointer-events: none;
}
.splash-col {
    width: 84px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    padding: 11px 9px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    opacity: 0;
    transform: translateY(20px);
    animation: splash-rise .62s cubic-bezier(.2,.7,.2,1) forwards;
}
.splash-col-1 { margin-top: 30px;  animation-delay: .05s; }
.splash-col-2 { margin-top: -14px; animation-delay: .17s; }
.splash-col-3 { margin-top: 48px;  animation-delay: .29s; }
.splash-col-bar {
    height: 5px;
    width: 58%;
    border-radius: 3px;
    background: var(--c-primary);
}
.splash-slat {
    height: 12px;
    border-radius: 3px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
}
.splash-slat.short { width: 64%; }

/* Handschrift-Wortmarke */
@font-face {
    font-family: "Sacramento";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/sacramento-latin.woff2") format("woff2");
}

/* Marke im Vordergrund */
.splash-brand {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}
.splash-hand {
    position: relative;
    display: inline-block;
    line-height: 1;
    padding: 0 .06em;
}
.splash-script {
    display: inline-block;
    font-family: "Sacramento", "Segoe Script", "Brush Script MT", cursive;
    font-weight: 400;
    font-size: clamp(58px, 13vw, 118px);
    line-height: 1;
    color: var(--c-text);
    /* Von links nach rechts freilegen, als wuerde geschrieben */
    clip-path: inset(-0.3em 100% -0.4em -0.12em);
    animation: hand-write 1.5s linear .35s forwards;
}
/* Stiftspitze wandert auf der Freilegungs-Kante mit */
.splash-pen {
    position: absolute;
    top: 58%;
    left: 0;
    width: 11px;
    height: 11px;
    margin-left: -5px;
    border-radius: 50%;
    background: var(--c-primary);
    box-shadow:
        0 0 0 4px color-mix(in srgb, var(--c-primary) 20%, transparent),
        0 2px 10px color-mix(in srgb, var(--c-primary) 45%, transparent);
    opacity: 0;
    animation: pen-travel 1.5s linear .35s forwards;
}
@keyframes hand-write {
    to { clip-path: inset(-0.3em -0.12em -0.4em -0.12em); }
}
@keyframes pen-travel {
    0%   { left: 0;    opacity: 0; }
    7%   { opacity: 1; }
    90%  { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}
.splash-version {
    font-size: 13px;
    color: var(--c-text-muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
    opacity: 0;
    animation: splash-fade .6s ease 1.7s forwards;
}

@keyframes splash-rise {
    to { opacity: 1; transform: none; }
}
@keyframes splash-fade {
    to { opacity: 1; }
}
@keyframes splash-out {
    to { opacity: 0; visibility: hidden; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
    .splash { animation: splash-out .3s ease 1.2s forwards; }
    .splash-col,
    .splash-version {
        transform: none;
        animation: splash-fade .3s ease forwards;
    }
    .splash-col-2 { animation-delay: .08s; }
    .splash-col-3 { animation-delay: .16s; }
    /* Kein "Schreiben" bei reduzierter Bewegung: Wortmarke einfach einblenden */
    .splash-script {
        clip-path: none;
        animation: splash-fade .3s ease forwards;
    }
    .splash-pen { display: none; }
}

/* ============================================================
   Security-Report: oeffentliche Meldeseite + Admin-Verwaltung
   ============================================================ */
.security-report-page { max-width: 780px; }
.security-report-head { margin-bottom: 18px; }
.security-report-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--c-primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.security-report-eyebrow svg { flex: 0 0 auto; }
.security-report-head h1 { margin-bottom: 8px; }
.security-report-head .muted { max-width: 68ch; }

.security-report-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: clamp(20px, 4vw, 32px);
    margin-top: 8px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 560px) { .form-grid-2 { grid-template-columns: 1fr; } }

.security-success { text-align: center; padding: 12px 8px 8px; }
.security-success svg { color: var(--c-success); margin-bottom: 8px; }
.security-success h2 { margin-bottom: 6px; }
.security-success .muted { max-width: 52ch; margin: 0 auto 12px; }
.security-ref {
    font-family: var(--font-mono);
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    display: inline-block;
    padding: 8px 14px;
    margin: 0 0 18px;
}

/* Severity-Pills (Admin) */
.sev-low      { background: var(--c-success-tint); color: var(--c-success); border-color: color-mix(in srgb, var(--c-success) 35%, transparent); }
.sev-medium   { background: var(--c-surface-2);    color: var(--c-text-soft); border-color: var(--c-border); }
.sev-high     { background: var(--c-warn-tint);    color: var(--c-warn);    border-color: color-mix(in srgb, var(--c-warn) 35%, transparent); }
.sev-critical { background: var(--c-danger-tint);  color: var(--c-danger);  border-color: color-mix(in srgb, var(--c-danger) 40%, transparent); }

/* Meldungs-Detailzelle */
.report-cell { max-width: 380px; }
.report-cell summary { cursor: pointer; font-weight: 600; color: var(--c-text); }
.report-cell summary:hover { color: var(--c-primary); }
.report-detail {
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    word-break: break-word;
}
.report-detail p { margin: 0 0 6px; }
.report-detail p:last-child { margin-bottom: 0; }

.security-section td.right .inline-form { display: inline-flex; gap: 6px; margin: 2px 0; }
.security-section td.right select.form-input { width: auto; min-width: 128px; }

/* ============================================================
   Aktualisierung (update.php)
   ============================================================ */
.update-page { max-width: 760px; }
.update-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: clamp(20px, 4vw, 30px);
}
.update-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}
.update-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--c-text-muted);
    margin-bottom: 4px;
}
.update-version {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.update-current .btn { display: inline-flex; align-items: center; gap: 8px; }
.update-current .btn .icon { flex: 0 0 auto; }

.update-result { margin-top: 22px; border-top: 1px solid var(--c-border); padding-top: 22px; }
.update-notes { margin: 6px 0 4px; }
.update-notes h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--c-text-muted); margin-bottom: 8px; }
.update-notes-body { color: var(--c-text-soft); }
.update-code {
    margin: 0;
    padding: 14px 16px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--c-text-soft);
    overflow-x: auto;
    white-space: pre;
}
.update-actions { margin: 14px 0 4px; }
.update-hint { margin: 12px 0 0; font-size: 12.5px; color: var(--c-text-muted); }
.update-checked { margin: 16px 0 0; font-size: 12px; color: var(--c-text-muted); }

/* ============================================================
   Sanity-Check (admin/security.php)
   ============================================================ */
.sanity-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 4px 0 16px;
}
.sanity-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--c-text-soft);
}
.sanity-chip .pill {
    min-width: 26px;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}
.sanity-row.sanity-critical td:first-child {
    box-shadow: inset 3px 0 0 var(--c-danger);
    font-weight: 600;
}
.sanity-row.sanity-warn td:first-child {
    box-shadow: inset 3px 0 0 var(--c-warn);
}
.sanity-row td code {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
}

/* ============================================================
   Layout-Fixes: rechtsbündiges Profil im Header + Sticky-Footer
   ============================================================ */

/* Topbar-Inhalt zentrieren, damit das Profil (margin-left:auto)
   bündig am rechten Rand des Inhaltsbereichs sitzt statt frei im Raum. */
.topbar-inner {
    margin-left: auto;
    margin-right: auto;
}

/* Footer immer am Seitenende: Body als Flex-Spalte über volle Höhe,
   der Footer schiebt sich per margin-top:auto nach unten, egal wie
   viel Inhalt vorhanden ist. */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
}
body > main {
    flex: 1 0 auto;
}
.app-footer {
    margin-top: auto;
    flex-shrink: 0;
}

/* ============================================================
   Anhänge: Drag-and-Drop Drop-Zone
   ============================================================ */
.attachment-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.attachment-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.attachment-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    padding: 20px 16px;
    border: 1.5px dashed var(--c-border);
    border-radius: var(--radius-md, 10px);
    background: var(--c-surface-2);
    color: var(--c-text-muted);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.attachment-dropzone:hover {
    border-color: var(--c-primary);
    color: var(--c-text);
}
.attachment-dropzone:focus-within {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}
.attachment-dropzone.is-dragover {
    border-color: var(--c-primary);
    border-style: solid;
    background: color-mix(in srgb, var(--c-primary) 10%, var(--c-surface-2));
    color: var(--c-text);
}
.attachment-dropzone.has-file {
    border-style: solid;
    border-color: var(--c-primary);
}
.attachment-dropzone-icon {
    color: var(--c-primary);
    opacity: .85;
}
.attachment-dropzone-text { font-size: 13px; }
.attachment-dropzone-text strong { color: var(--c-text); font-weight: 650; }
.attachment-dropzone-hint { font-size: 11.5px; opacity: .8; }
.attachment-dropzone-file {
    margin-top: 6px;
    max-width: 100%;
    padding: 3px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--c-primary) 12%, transparent);
    color: var(--c-primary);
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   Anhänge: Miniatur-Vorschauen (Bilder + PDF klickbar)
   ============================================================ */
#card-attachments {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.attachment-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md, 10px);
    background: var(--c-surface);
}
.attachment-thumb {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    color: var(--c-text-muted);
    text-decoration: none;
}
.attachment-thumb:hover { border-color: var(--c-primary); }
.attachment-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.attachment-thumb-icon { display: flex; align-items: center; justify-content: center; }
.attachment-thumb-icon.is-pdf { color: #c0392b; }
.attachment-info {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.attachment-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.attachment-name:hover { color: var(--c-primary); text-decoration: underline; }
.attachment-meta { font-size: 11.5px; color: var(--c-text-muted); }
.attachment-download {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--c-text-muted);
    border: 1px solid transparent;
    text-decoration: none;
}
.attachment-download:hover {
    background: var(--c-surface-2);
    color: var(--c-primary);
    border-color: var(--c-border);
}

/* Anhänge: Aktionen (Download + Löschen) */
.attachment-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 2px;
}
.attachment-delete {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 8px;
    color: var(--c-text-muted);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
}
.attachment-delete:hover {
    background: color-mix(in srgb, var(--c-danger, #c0392b) 12%, transparent);
    color: var(--c-danger, #c0392b);
    border-color: color-mix(in srgb, var(--c-danger, #c0392b) 30%, transparent);
}
