/* ==========================================================================
   STAPES Cockpit – HEUTE
   Farbwelt der STAPES-Website: Petrol #386178, Beige #d7d5cb, Montserrat
   ========================================================================== */

:root {
    --petrol: #386178;
    --petrol-600: #294859;
    --petrol-400: #5b8299;
    --petrol-50: #eaf0f3;
    --beige: #d7d5cb;
    --beige-50: #f3f2ed;

    --bg: #f7f6f2;
    --surface: #ffffff;
    --surface-2: #fbfaf7;
    --text: #1d2a31;
    --text-2: #3c4a52;
    --muted: #6e7a81;
    --line: rgba(29, 42, 49, 0.08);
    --line-2: rgba(29, 42, 49, 0.14);

    --crit: #b3261e;
    --crit-bg: #fbeceb;
    --high: #c9721c;
    --high-bg: #fdf1e4;
    --normal: var(--petrol);
    --normal-bg: var(--petrol-50);
    --info: #8a99a1;
    --info-bg: #eef1f2;
    --ok: #2f8a64;
    --ok-bg: #e7f4ee;
    --warn: #c38b1c;
    --warn-bg: #fbf3e0;

    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgba(20, 40, 50, 0.04), 0 10px 30px -18px rgba(20, 40, 50, 0.22);
    --shadow-lg: 0 2px 4px rgba(20, 40, 50, 0.04), 0 22px 48px -24px rgba(20, 40, 50, 0.32);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --petrol: #6fa3bf;
        --petrol-600: #8bb7cf;
        --petrol-400: #5b8299;
        --petrol-50: rgba(111, 163, 191, 0.12);
        --beige: #5a574d;
        --beige-50: #1b252b;
        --bg: #0f171c;
        --surface: #152128;
        --surface-2: #1a2830;
        --text: #e7edf0;
        --text-2: #c3cfd5;
        --muted: #8fa0a8;
        --line: rgba(255, 255, 255, 0.07);
        --line-2: rgba(255, 255, 255, 0.12);
        --crit: #f2867f;
        --crit-bg: rgba(242, 134, 127, 0.12);
        --high: #f0a75b;
        --high-bg: rgba(240, 167, 91, 0.12);
        --info: #8394a0;
        --info-bg: rgba(131, 148, 160, 0.14);
        --ok: #5cc196;
        --ok-bg: rgba(92, 193, 150, 0.12);
        --warn: #e2b44f;
        --warn-bg: rgba(226, 180, 79, 0.12);
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -18px rgba(0, 0, 0, 0.6);
        --shadow-lg: 0 22px 48px -24px rgba(0, 0, 0, 0.7);
    }
    .brand-logo, .login-logo, .login-logo-mobile { filter: brightness(0) invert(1) opacity(0.92); }
    .btn-primary, .btn-primary:hover, .item-go:hover { color: #0f171c; }
}

/* Wellen (Farben per CSS, damit der Dunkelmodus passt) */
.w-blue { stop-color: #386178; }
.w-beige { stop-color: #d7d5cb; }
.w-line-blue { stroke: #386178; }
.w-line-beige { stroke: #d7d5cb; }
@media (prefers-color-scheme: dark) {
    .w-blue { stop-color: #6fa3bf; }
    .w-beige { stop-color: #2c4656; }
    .w-line-blue { stroke: #6fa3bf; }
    .w-line-beige { stroke: #3d5a6b; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--petrol); text-decoration: none; }
a:hover { color: var(--petrol-600); }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }

.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.t-crit { color: var(--crit) !important; }
.wrap { max-width: 1600px; margin: 0 auto; padding: 0 32px; }

:focus-visible { outline: 2px solid var(--petrol); outline-offset: 2px; border-radius: 6px; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: 600 14px/1 var(--font); padding: 12px 18px; border-radius: 999px;
    border: 1px solid transparent; cursor: pointer; transition: all 0.25s var(--ease);
    white-space: nowrap;
}
.btn .icon { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn-primary { background: var(--petrol); color: #fff; }
.btn-primary:hover { background: var(--petrol-600); color: #fff; box-shadow: 0 8px 20px -10px var(--petrol); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--petrol); color: var(--petrol); }
.btn-sm { padding: 9px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ── Demo-Banner ─────────────────────────────────────────────────────── */
.demo-banner {
    display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
    padding: 9px 16px; font-size: 13px; color: #fff;
    background: repeating-linear-gradient(135deg, var(--petrol-600) 0 14px, #2f5468 14px 28px);
}
.demo-banner a { color: #fff; text-decoration: underline; font-weight: 600; }
.demo-banner .icon { width: 14px; height: 14px; }

/* ── Topbar ──────────────────────────────────────────────────────────── */
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 24px;
    padding: 12px 32px;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--text); }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-sep { width: 1px; height: 24px; background: var(--line-2); }
.brand-name { font-weight: 600; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.apps { display: flex; gap: 4px; margin-left: auto; }
.app-link {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px;
    color: var(--text-2); font-weight: 500; font-size: 13px; transition: all 0.2s var(--ease);
}
.app-link .icon { width: 16px; height: 16px; color: var(--muted); }
.app-link:hover { background: var(--petrol-50); color: var(--petrol); }
.app-link:hover .icon { color: var(--petrol); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.chip-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
    border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; color: var(--text-2);
}
.chip-btn .icon { width: 13px; height: 13px; }
.chip-btn:hover { border-color: var(--petrol); color: var(--petrol); }
.logout { display: flex; align-items: center; gap: 6px; margin: 0; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--petrol), var(--petrol-600)); color: #fff; font-weight: 700; font-size: 14px;
}
.icon-btn {
    background: none; border: 0; padding: 8px; border-radius: 10px; color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.icon-btn:hover { background: var(--petrol-50); color: var(--petrol); }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
    position: relative; overflow: hidden;
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--line);
}
.waves { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wave-a { animation: drift 22s ease-in-out infinite alternate; transform-origin: center; }
.wave-b { animation: drift 28s ease-in-out infinite alternate-reverse; transform-origin: center; }
@keyframes drift { from { transform: translateX(-1.5%) scaleY(1); } to { transform: translateX(1.5%) scaleY(1.04); } }

.hero-inner {
    position: relative; max-width: 1600px; margin: 0 auto; padding: 22px 32px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 16px 18px;
}
/* Lieber umbrechen als quetschen: Text und «Als Nächstes» oben, Kacheln immer in eigener Zeile */
.hero-text { flex: 1 1 640px; min-width: 0; }
.next-up { flex: 0 1 440px; }
.hero-kpis { flex: 1 1 100%; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--petrol); margin-bottom: 6px; }
.hero h1 { font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.summary { font-size: 15px; color: var(--text-2); text-wrap: pretty; }
.summary strong { color: var(--text); font-weight: 700; }
.sev-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* Als Nächstes */
.next-up {
    display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 16px;
    border-radius: 14px; border: 1px solid var(--line); border-left: 3px solid var(--petrol);
    background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(8px); box-shadow: var(--shadow);
}
.next-up.is-task { border-left-color: var(--ok); }
.next-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--petrol); }
.next-up.is-task .next-label { color: var(--ok); }
.next-title { font-weight: 700; font-size: 15px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.next-title:hover { color: var(--petrol); }
.next-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Kennzahlen-Kacheln */
.hero-kpis { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); gap: 8px; }
.hero-kpi {
    display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; color: var(--text);
    background: color-mix(in srgb, var(--surface) 85%, transparent); border: 1px solid var(--line);
    backdrop-filter: blur(8px); transition: transform 0.25s var(--ease), border-color 0.25s;
}
.hero-kpi:hover { transform: translateY(-2px); border-color: var(--petrol); color: var(--text); }
.hero-kpi small { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.hero-kpi strong { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.25; }
.hero-kpi span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.sev-chip {
    display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.sev-chip i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sev-chip.sev-critical { color: var(--crit); }
.sev-chip.sev-high { color: var(--high); }
.sev-chip.sev-normal { color: var(--petrol); }
.sev-chip.sev-info { color: var(--info); }

.hero-vital {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 10px;
    border-radius: 16px; color: var(--text); transition: transform 0.3s var(--ease);
}
.hero-vital:hover { transform: translateY(-2px); color: var(--text); }
.hero-vital .ring { width: 64px; height: 64px; }
.hero-vital .ring-value { position: absolute; top: 8px; left: 0; right: 0; height: 64px; display: grid; place-items: center; font-size: 19px; font-weight: 800; }
.hero-vital-label { display: flex; flex-direction: column; font-weight: 700; font-size: 15px; }
.hero-vital-label small { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

/* Ring */
.ring { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: var(--line-2); }
.ring-fg { stroke: var(--petrol); stroke-linecap: round; transition: stroke-dashoffset 1.4s var(--ease); }
.tone-ok .ring-fg { stroke: var(--ok); }
.tone-warn .ring-fg { stroke: var(--warn); }
.tone-crit .ring-fg { stroke: var(--crit); }

/* ── Abschnittstitel ─────────────────────────────────────────────────── */
.section-title {
    display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px;
}
.section-title .icon { width: 16px; height: 16px; color: var(--petrol); }

/* ── Fokus ───────────────────────────────────────────────────────────── */
.focus { margin-top: 32px; }
.focus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.focus-card {
    position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 18px;
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line);
    overflow: hidden; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
    animation: rise 0.7s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms);
}
.focus-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--normal); }
.focus-card.sev-critical::before { background: var(--crit); }
.focus-card.sev-high::before { background: var(--high); }
.focus-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.focus-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.area-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.area-tag .icon { width: 15px; height: 15px; color: var(--petrol); }
.sev-pill { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.06em; }
.sev-pill.sev-critical { color: var(--crit); background: var(--crit-bg); }
.sev-pill.sev-high { color: var(--high); background: var(--high-bg); }
.sev-pill.sev-normal { color: var(--petrol); background: var(--normal-bg); }
.sev-pill.sev-info { color: var(--info); background: var(--info-bg); }
.focus-card h3 { font-size: 18px; }
.focus-subject { font-weight: 600; color: var(--text-2); }
.focus-meta { color: var(--muted); font-size: 13px; }
.focus-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; }
.amount { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }

/* ── Board ───────────────────────────────────────────────────────────── */
.board {
    display: grid; gap: 24px; margin-top: 32px; align-items: start;
    grid-template-columns: 340px minmax(0, 1fr) 390px;
    grid-template-areas: "agenda tasks vital";
}
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.col-agenda { grid-area: agenda; }
.col-tasks { grid-area: tasks; gap: 14px; }
.col-vital { grid-area: vital; }

.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 20px; animation: rise 0.6s var(--ease) both;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2 { display: flex; align-items: center; gap: 9px; font-size: 15px; }
.card-head h2 .icon { color: var(--petrol); }
.card-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.card-link .icon { width: 13px; height: 13px; }
.badge { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--petrol-50); color: var(--petrol); }
.empty { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 6px 0 4px; }
.empty .icon { color: var(--ok); }
.hint { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; padding: 12px; border-radius: var(--radius-sm); background: var(--beige-50); color: var(--muted); font-size: 12px; }
.hint .icon { width: 15px; height: 15px; margin-top: 1px; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Agenda ──────────────────────────────────────────────────────────── */
.day-title { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 6px 0 10px; }
.day-title.is-today { color: var(--petrol); }
.day-title:not(:first-of-type) { margin-top: 22px; }

.timeline { position: relative; }
.tl-item { display: grid; grid-template-columns: 44px 14px 1fr; gap: 10px; position: relative; padding-bottom: 14px; }
.tl-item:not(:last-child)::after {
    content: ''; position: absolute; left: 60px; top: 16px; bottom: 0; width: 2px; background: var(--line);
}
.tl-time { font-size: 12px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; padding-top: 1px; text-align: right; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--kind, var(--petrol)); background: var(--kind, var(--petrol)); z-index: 1; }
.tl-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tl-title { font-weight: 600; color: var(--text); line-height: 1.35; }
a.tl-title:hover { color: var(--petrol); }
.tl-meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.kind-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 6px; border-radius: 5px; color: var(--kind, var(--petrol)); background: color-mix(in srgb, var(--kind, var(--petrol)) 12%, transparent); }
.join { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; margin-top: 2px; }
.join .icon { width: 12px; height: 12px; }

.kind-termin { --kind: var(--petrol); }
.kind-frist { --kind: var(--high); }
.kind-freigabe { --kind: #7a5ea8; }
.kind-post { --kind: #b0587a; }
.kind-medien { --kind: #3f8f8a; }
@media (prefers-color-scheme: dark) {
    .kind-freigabe { --kind: #b49ae0; }
    .kind-post { --kind: #e38db0; }
    .kind-medien { --kind: #6cc5bf; }
}

.days { display: flex; flex-direction: column; gap: 12px; }
.day { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: start; }
.day-badge {
    display: flex; flex-direction: column; align-items: center; padding: 5px 0; border-radius: 10px;
    background: var(--beige-50); border: 1px solid var(--line); line-height: 1.1;
}
.day-badge span { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.day-badge strong { font-size: 16px; }
.day ul { display: flex; flex-direction: column; gap: 5px; padding-top: 3px; }
.day li { display: flex; align-items: baseline; gap: 7px; font-size: 13px; min-width: 0; }
.day li i { width: 7px; height: 7px; border-radius: 50%; background: var(--kind); flex: none; transform: translateY(-1px); }
.day li time { font-size: 12px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.day li a, .day li span { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day li a:hover { color: var(--petrol); }

/* ── Postfach ────────────────────────────────────────────────────────── */
.connect { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; font-size: 13px; }
.mails { display: flex; flex-direction: column; }
.mail { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.mail:first-child { border-top: 0; padding-top: 0; }
.mail-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--petrol); background: var(--petrol-50); }
.mail.is-important .mail-avatar { color: var(--crit); background: var(--crit-bg); }
.mail-body { min-width: 0; }
.mail-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.mail-from { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-top time { color: var(--muted); flex: none; }
.mail-subject { display: block; color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.mail-subject:hover { color: var(--petrol); }
.mail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--beige-50); color: var(--muted); border: 1px solid var(--line); }
.tag .icon { width: 12px; height: 12px; }
.tag-kunde { background: var(--petrol-50); color: var(--petrol); border-color: transparent; }
.tag-crit { background: var(--crit-bg); color: var(--crit); border-color: transparent; }

/* ── Pendenzen ───────────────────────────────────────────────────────── */
.group { padding: 0; overflow: hidden; }
.group-head {
    display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; user-select: none;
}
.group-head::-webkit-details-marker { display: none; }
.group-head h3 { font-size: 15px; }
.group-icon {
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    background: var(--petrol-50); color: var(--petrol);
}
.worst-critical .group-icon { background: var(--crit-bg); color: var(--crit); }
.worst-high .group-icon { background: var(--high-bg); color: var(--high); }
.count { min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--beige-50); border: 1px solid var(--line); }
.group-sum { margin-left: auto; font-weight: 600; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chev { color: var(--muted); transition: transform 0.3s var(--ease); }
.group-head .count + .chev { margin-left: auto; }
details[open] > .group-head .chev { transform: rotate(180deg); }
.group-error { padding: 16px 20px; }
.group-error .group-head { padding: 0 0 8px; cursor: default; }

.items { border-top: 1px solid var(--line); }
.item {
    display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 16px;
    padding: 13px 20px; border-top: 1px solid var(--line); transition: background 0.2s;
}
.item:first-child { border-top: 0; }
.item:hover { background: var(--surface-2); }
.item-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--normal); }
.item.sev-critical .item-dot { background: var(--crit); box-shadow: 0 0 0 4px var(--crit-bg); animation: pulse 2.4s infinite; }
.item.sev-high .item-dot { background: var(--high); box-shadow: 0 0 0 4px var(--high-bg); }
.item.sev-info .item-dot { background: var(--info); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px var(--crit-bg); } 50% { box-shadow: 0 0 0 7px var(--crit-bg); } }
.item-main { display: flex; flex-direction: column; min-width: 0; }
.item-title { font-weight: 700; font-size: 14px; }
.item-subject { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-meta { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item-go {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
    border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; transition: all 0.2s var(--ease);
}
.item-go .icon { width: 14px; height: 14px; transition: transform 0.2s var(--ease); }
.item-go:hover { background: var(--petrol); border-color: var(--petrol); color: #fff; }
.item-go:hover .icon { transform: translateX(2px); }

.all-clear {
    display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: var(--radius);
    background: var(--ok-bg); color: var(--ok); font-weight: 600; font-size: 13px;
}

.more { border-top: 1px solid var(--line); }
.more > summary {
    display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 20px;
    font-size: 12px; font-weight: 600; color: var(--petrol); cursor: pointer; list-style: none;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary:hover { background: var(--surface-2); }
.more > summary .icon { width: 15px; height: 15px; color: var(--petrol); }
.more .more-close, .more[open] .more-open { display: none; }
.more[open] .more-close { display: inline; }
.more[open] > summary .chev { transform: rotate(180deg); }

/* ── Aufgaben ────────────────────────────────────────────────────────── */
.flash { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 13px; animation: rise 0.5s var(--ease) both; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-warn { background: var(--warn-bg); color: var(--warn); }
.flash-crit { background: var(--crit-bg); color: var(--crit); }

.tasks-card { padding-bottom: 8px; }
.tasks-card .card-head h2 .count { margin-left: 4px; }
.kind-aufgabe { --kind: #2f8a64; }
@media (prefers-color-scheme: dark) { .kind-aufgabe { --kind: #5cc196; } }

.capacity { margin-bottom: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.capacity-text { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; margin-bottom: 8px; color: var(--muted); }
.capacity-text strong { color: var(--text); font-size: 13px; }
.capacity-text b { color: var(--ok); }
.capacity-bar { height: 8px; border-radius: 99px; background: var(--ok-bg); overflow: hidden; }
.capacity-bar span { display: block; height: 100%; width: var(--p); border-radius: 99px; background: linear-gradient(90deg, var(--petrol-400), var(--petrol)); animation: grow-x 1.1s var(--ease) both; transform-origin: left; }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.tasks { display: flex; flex-direction: column; }
.task {
    display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
    padding: 11px 0; border-top: 1px solid var(--line);
}
.tasks > .task:first-child { border-top: 0; }
.task-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--petrol-50); color: var(--petrol); }
.task-icon .icon { width: 16px; height: 16px; }
.task-icon.app-mediaplanner { background: rgba(176, 88, 122, 0.1); color: #b0587a; }
.task-icon.app-outlook { background: var(--ok-bg); color: var(--ok); }
.task-main { display: flex; flex-direction: column; min-width: 0; }
.task-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-title a { color: var(--text); }
.task-title a:hover { color: var(--petrol); }
.task-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-facts { display: flex; gap: 6px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--beige-50); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.pill .icon { width: 12px; height: 12px; }
.pill-soft { background: transparent; }
.pill-crit { background: var(--crit-bg); color: var(--crit); border-color: transparent; }

.plan { position: relative; }
.plan > summary { list-style: none; gap: 6px; }
.plan > summary::-webkit-details-marker { display: none; }
.plan > summary .icon { width: 14px; height: 14px; }
.plan[open] > summary { background: var(--petrol); border-color: var(--petrol); color: #fff; }
.plan-form {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 5; width: 300px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px;
    background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
    animation: rise 0.25s var(--ease) both;
}
.plan-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); }
.plan-form label:first-of-type, .plan-form button, .plan-hint { grid-column: 1 / -1; }
.plan-form input, .plan-form select {
    font: 500 13px var(--font); color: var(--text); padding: 9px 10px; border-radius: 10px;
    border: 1px solid var(--line-2); background: var(--surface-2);
}
.plan-form input:focus, .plan-form select:focus { outline: none; border-color: var(--petrol); box-shadow: 0 0 0 3px var(--petrol-50); }
.plan-hint { font-size: 11px; }
.tasks-card .more.sub > summary { justify-content: space-between; color: var(--text-2); padding: 11px 0; }
.tasks-card .more.sub > summary span { display: inline-flex; align-items: center; gap: 6px; }
.tasks-card .more { margin: 0 -20px; padding: 0 20px; }
.mini-list { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 12px; }
.mini-list li { display: flex; gap: 8px; align-items: baseline; font-size: 13px; min-width: 0; }
.mini-list time { font-size: 12px; font-weight: 700; color: var(--ok); white-space: nowrap; }
.mini-list a, .mini-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.mini-list small { white-space: nowrap; }
.todo-note { display: flex; gap: 6px; align-items: center; padding: 6px 0 8px; }
.todo-note .icon { width: 14px; height: 14px; }

/* ── Vitalität ───────────────────────────────────────────────────────── */
.vital-top { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.vital-ring { position: relative; width: 96px; height: 96px; flex: none; }
.vital-ring .ring { width: 96px; height: 96px; }
.vital-ring .ring-value { position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.vital-label { font-size: 18px; font-weight: 700; }
.tone-ok .vital-label { color: var(--ok); }
.tone-warn .vital-label { color: var(--warn); }
.tone-crit .vital-label { color: var(--crit); }

.checks { display: flex; flex-direction: column; gap: 2px; }
.check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: help; }
.check:hover { background: var(--surface-2); }
.check .icon { width: 18px; height: 18px; margin-top: 1px; }
.check.st-ok .icon { color: var(--ok); }
.check.st-warn .icon { color: var(--warn); }
.check.st-crit .icon { color: var(--crit); }
.check.st-neutral .icon { color: var(--info); }
.check-label { display: block; font-weight: 600; font-size: 13px; }
.check-value { display: block; font-size: 12px; color: var(--muted); }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.kpi { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.kpi-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.kpi-value { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin: 2px 0; }
.kpi-sub { font-size: 11px; color: var(--muted); line-height: 1.35; }

.chart { margin: 18px 0 0; }
.chart figcaption { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 96px; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; cursor: help; }
.bar span {
    display: block; width: 100%; height: var(--h); min-height: 3px; border-radius: 6px 6px 3px 3px;
    background: linear-gradient(180deg, var(--petrol-400), var(--petrol)); opacity: 0.55;
    transform-origin: bottom; animation: grow 1s var(--ease) both; transition: opacity 0.2s;
}
.bar:hover span, .bar.is-current span { opacity: 1; }
.bar small { font-size: 10px; color: var(--muted); font-weight: 600; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ── Backups ─────────────────────────────────────────────────────────── */
.backups { display: flex; flex-direction: column; gap: 8px; }
.backup {
    display: grid; grid-template-columns: 34px 1fr auto 20px; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line);
}
.backup-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.backup.st-ok .backup-icon { background: var(--ok-bg); color: var(--ok); }
.backup.st-warn .backup-icon { background: var(--warn-bg); color: var(--warn); }
.backup.st-crit .backup-icon { background: var(--crit-bg); color: var(--crit); }
.backup.st-unknown .backup-icon { background: var(--info-bg); color: var(--info); }
.backup-main { min-width: 0; display: flex; flex-direction: column; }
.backup-app { font-weight: 700; }
.backup-hint { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.backup-age { text-align: right; display: flex; flex-direction: column; line-height: 1.2; }
.backup-age strong { font-size: 13px; }
.backup.st-crit .backup-age strong { color: var(--crit); }
.backup.st-warn .backup-age strong { color: var(--warn); }
.backup-age small { font-size: 11px; color: var(--muted); }
.backup-go { color: var(--muted); display: grid; place-items: center; }
.backup-go:hover { color: var(--petrol); }
.backup-go .icon { width: 16px; height: 16px; }

/* ── Files ───────────────────────────────────────────────────────────── */
.good-news { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--ok-bg); margin-bottom: 10px; font-size: 13px; }
.good-news > .icon { color: var(--ok); margin-top: 2px; }
.files { display: flex; flex-direction: column; gap: 10px; }
.files li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; min-width: 0; }
.files li > div { display: flex; flex-direction: column; min-width: 0; }
.files a, .files span { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.files a:hover { color: var(--petrol); }
.files small { font-size: 11px; }
.ext {
    width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
    font-size: 10px; font-weight: 800; letter-spacing: 0.02em; color: var(--petrol); background: var(--petrol-50);
}
.ext-pdf { color: #c0392b; background: rgba(192, 57, 43, 0.1); }
.ext-zip { color: #8a6d1d; background: rgba(195, 139, 28, 0.13); }
.ext-docx, .ext-doc { color: #2b5797; background: rgba(43, 87, 151, 0.1); }
.ext-xlsx, .ext-xls, .ext-csv { color: #217346; background: rgba(33, 115, 70, 0.1); }
.ext-jpg, .ext-jpeg, .ext-png, .ext-webp { color: #7a5ea8; background: rgba(122, 94, 168, 0.1); }

/* ── Footer ──────────────────────────────────────────────────────────── */
.foot { margin-top: 40px; padding-top: 22px; padding-bottom: 40px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.sources { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.src { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); cursor: default; }
.src i { width: 7px; height: 7px; border-radius: 50%; background: var(--info); }
.src-ok i { background: var(--ok); }
.src-error { color: var(--crit); }
.src-error i { background: var(--crit); }
.src-off { color: var(--muted); }
.src-warn { color: var(--warn); }
.src-warn i { background: var(--warn); }
.src-demo i { background: var(--petrol); }

/* ── Login ───────────────────────────────────────────────────────────── */
.page-login { min-height: 100vh; }
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-brand { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--surface) 0%, var(--beige-50) 100%); display: flex; align-items: center; }
.login-brand .waves { opacity: 1; }
.login-brand-inner { position: relative; padding: 64px; max-width: 560px; }
.login-logo { width: 260px; height: auto; display: block; margin-bottom: 40px; }
.login-claim { font-size: clamp(30px, 3.4vw, 46px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.login-sub { margin-top: 14px; font-size: 16px; color: var(--text-2); max-width: 420px; }
.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--surface); }
.login-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; animation: rise 0.7s var(--ease) both; }
.login-form h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.login-logo-mobile { display: none; width: 160px; margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field input {
    font: 500 15px var(--font); color: var(--text); padding: 13px 14px; border-radius: 12px;
    border: 1px solid var(--line-2); background: var(--surface-2); transition: all 0.2s var(--ease);
}
.field input:focus { outline: none; border-color: var(--petrol); box-shadow: 0 0 0 4px var(--petrol-50); background: var(--surface); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13px; font-weight: 500; }
.alert-crit { background: var(--crit-bg); color: var(--crit); }
.login-foot { font-size: 12px; text-align: center; }
.notfound { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1360px) {
    .board { grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "tasks agenda" "tasks vital"; }
    .col-agenda { position: static; }
}
@media (max-width: 1100px) {
    .app-link span { display: none; }
    .focus-grid { grid-template-columns: 1fr 1fr; }
    .focus-card:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
    .wrap { padding: 0 18px; }
    .topbar { padding: 10px 18px; gap: 12px; }
    .brand-sep, .brand-name { display: none; }
    .apps { gap: 0; }
    .chip-btn span { display: none; }
    .hero-inner { padding: 18px; }
    .hero-text, .next-up, .hero-kpis { flex-basis: 100%; }
    .hero-kpis { grid-template-columns: repeat(2, 1fr); }
    .board { grid-template-columns: 1fr; grid-template-areas: "agenda" "tasks" "vital"; }
    .focus-grid { grid-template-columns: 1fr; }
    .item { grid-template-columns: 10px minmax(0, 1fr) auto; }
    .item-go span { display: none; }
    .item-amount { grid-column: 2; font-size: 13px; }
    .task { grid-template-columns: 34px minmax(0, 1fr); }
    .task-facts, .plan { grid-column: 2; }
    .plan-form { left: 0; right: auto; width: min(300px, 80vw); }
    .login { grid-template-columns: 1fr; }
    .login-brand { display: none; }
    .login-logo-mobile { display: block; }
}
@media (max-width: 560px) {
    .app-link { padding: 8px; }
    .apps a:nth-child(n+4) { display: none; }
    .kpis { grid-template-columns: 1fr 1fr; }
    .kpi-value { font-size: 18px; }
}

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

@media print {
    .topbar, .demo-banner, .waves, .item-go, .chip-btn, .foot .sources { display: none !important; }
    body { background: #fff; }
    .card, .focus-card { box-shadow: none; break-inside: avoid; }
    .board { grid-template-columns: 1fr; grid-template-areas: "tasks" "agenda" "vital"; }
}
