/* =========================================================================
 * Arbeitszeiterfassung — UI im CONTENTMONSTER®-V2-Designsystem.
 *
 * Quelle der Werte: C:\FREIGABE\CM\.claude\CM-DESIGN-SYSTEM.md und die
 * Komponenten aus CM\assets\css\module-layout.css (Stand 20.07.2026).
 * Uebernommen: Farbtokens, Sora/DM Sans, Radien, Schatten, Karten-, Button-,
 * Badge- und Alert-Anatomie.
 *
 * Bewusst ANDERS als im CM — jeweils mit Grund:
 *  1. Ampel- und Stempelfarben bleiben semantisch (gruen/gelb/rot). Pink ist
 *     hier Marke und Primaeraktion, aber „Kommen" muss gruen und „Gehen" rot
 *     sein; ein pinker Knopf neben einer roten Limit-Ampel liest sich falsch.
 *  2. Dark Mode bleibt erhalten (Spec-Entscheidung M1, prefers-color-scheme).
 *     Das CM-Designsystem kennt keinen, die Tokens sind aus den Hell-Werten
 *     abgeleitet: gleiche Hues, angehobene Helligkeit fuer den Kontrast.
 *  3. Klassennamen bleiben deutsch (.karte, .knopf, …) wie im ganzen Projekt.
 *     module-layout.css ist nicht eingebunden — es setzt die CM-Sidebar-Huelle,
 *     t() und hasNewUI() voraus, die es hier alle nicht gibt.
 *  4. Fonts liegen lokal unter /assets/fonts. Google Fonts per CDN scheitert an
 *     der CSP (default-src 'self') — und waere fuer eine Datenschutz-Beratung
 *     die falsche Aussenwirkung.
 * ========================================================================= */

/* --- Schriften (selbst gehostet, Variable Fonts) ------------------------- */
@font-face {
    font-family: 'Sora';
    src: url('/assets/fonts/Sora-Variable.ttf') format('truetype');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DM Sans';
    src: url('/assets/fonts/DMSans-Variable.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* CM-Primaerpalette */
    --pink: #e91e63;
    --pink-light: #fdf0f5;
    --pink-mid: #fce4ec;
    --pink-dark: #c2185b;

    /* CM-Neutrale */
    --bg: #f7f8fc;
    --surface: #ffffff;
    --border: #efefef;
    --border-soft: #f5f5f5;
    --text-1: #111318;
    --text-2: #555b69;
    --text-3: #9aa0ae;

    /* CM-Statusfarben */
    --gruen: #22c55e;
    --gruen-light: #f0fdf4;
    --gruen-rand: #bbf7d0;
    --blau: #0ea5e9;
    --blau-light: #f0f9ff;
    --blau-rand: #bae6fd;
    --orange: #f59e0b;
    --orange-light: #fffbeb;
    --orange-rand: #fde68a;
    --rot: #ef4444;
    --rot-light: #fef2f2;
    --rot-rand: #fecaca;

    /* Aktionsfarben der Stempeluhr — dunkler als die Status-Toene, weil hier
     * weisse Schrift drauf steht (#22c55e traegt weissen Text nicht). */
    --gruen-aktion: #16a34a;
    --gruen-aktion-hover: #15803d;
    --orange-aktion: #d97706;
    --orange-aktion-hover: #b45309;
    --rot-aktion: #dc2626;
    --rot-aktion-hover: #b91c1c;
    --blau-aktion: #0284c7;
    --blau-aktion-hover: #0369a1;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 100px;

    --shadow-sm: 0 1px 4px rgba(0, 0, 0, .06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, .08);

    --font-kopf: 'Sora', system-ui, sans-serif;
    --font-text: 'DM Sans', system-ui, sans-serif;

    --inhalt-max: 68rem;
    --feld-max: 26rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --pink: #ff4d85;
        --pink-light: #2a1620;
        --pink-mid: #3d1c2a;
        --pink-dark: #ff6d99;

        --bg: #0f1116;
        --surface: #171a21;
        --border: #262b34;
        --border-soft: #1f242c;
        --text-1: #eef1f6;
        --text-2: #a7b0be;
        --text-3: #737d8d;

        --gruen: #4ade80;
        --gruen-light: #122318;
        --gruen-rand: #1d4a2c;
        --blau: #38bdf8;
        --blau-light: #0f2029;
        --blau-rand: #17435c;
        --orange: #fbbf24;
        --orange-light: #251d0c;
        --orange-rand: #4d3a12;
        --rot: #f87171;
        --rot-light: #2a1416;
        --rot-rand: #562223;

        --gruen-aktion: #16a34a;
        --gruen-aktion-hover: #15803d;
        --orange-aktion: #b45309;
        --orange-aktion-hover: #92400e;
        --rot-aktion: #dc2626;
        --rot-aktion-hover: #b91c1c;
        --blau-aktion: #0369a1;
        --blau-aktion-hover: #075985;

        --shadow-sm: 0 1px 4px rgba(0, 0, 0, .4);
        --shadow-md: 0 4px 20px rgba(0, 0, 0, .45);
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-2);
    font-family: var(--font-text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- Icons --------------------------------------------------------------- */
.ikon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.knopf .ikon { width: 15px; height: 15px; }
.knopf--klein .ikon { width: 13px; height: 13px; }
.badge .ikon { width: 12px; height: 12px; }

/* In Fliesstext (kein Flex-Container) sitzt das SVG sonst auf der Grundlinie. */
.leise .ikon {
    vertical-align: -2px;
    margin-right: 4px;
    color: var(--gruen);
}

/* =========================================================================
 * Rahmen: feste Seitenleiste links (CM-V2: 256px), schmale Topbar, Inhalt.
 * Unter 900px faehrt die Leiste als Overlay ein — Breakpoint wie im CM.
 * ========================================================================= */
.seitenleiste {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 256px;
    z-index: 30;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform .3s ease;
}

.marke {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 16px 18px;
    text-decoration: none;
    font-family: var(--font-kopf);
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -.01em;
    color: var(--text-1);
    border-bottom: 1px solid var(--border);
}

/* Das Markenzeichen bringt seine Farbe selbst mit (Icon::marke), es braucht keine
 * Kachel drumherum — die getoente Box um ein Strichsymbol war der Grund, warum das
 * Logo nach Platzhalter aussah. */
.marke__logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 10px;
}

/* Der Schriftzug steht komplett in der Textfarbe. Das Pink traegt die Icon-Kachel
 * daneben — zweimal Pink nebeneinander war eine Betonung zu viel. */
.marke__akzent { color: inherit; }

/* --- Navigation in der Seitenleiste --------------------------------------- */
.navi {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.navi__titel {
    font-family: var(--font-kopf);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .13em;
    color: var(--text-3);
    padding: 0 10px;
    margin-bottom: 7px;
}

.navi__titel--zweite { margin-top: 20px; }

.navi a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
    transition: all .15s;
}

.navi a .ikon { width: 16px; height: 16px; }
.navi a:hover { background: var(--bg); color: var(--text-1); }

.navi a.ist-aktiv {
    background: var(--pink-light);
    color: var(--pink);
    font-weight: 600;
}

/* --- Fusszeile der Seitenleiste: wer bin ich, und raus hier --------------- */
.seitenleiste__fuss {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px;
    border-top: 1px solid var(--border);
}

.seitenleiste__fuss form { margin: 0; margin-left: auto; }

.kopf__avatar {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-pill);
    background: var(--pink);
    color: #fff;
    font-family: var(--font-kopf);
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.seitenleiste__wer { display: flex; flex-direction: column; min-width: 0; }

.kopf__name {
    font-family: var(--font-kopf);
    font-weight: 700;
    font-size: 13px;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.seitenleiste__rolle { font-size: 11px; color: var(--text-3); }

/* --- Inhaltsspalte -------------------------------------------------------- */
.rahmen { margin-left: 256px; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 1.25rem;
}

.topbar__datum {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--text-3);
}

/* Hamburger und die kleine Marke gehoeren dem Handy — auf dem Desktop traegt
 * die Seitenleiste beides. */
.hamburger,
.marke--klein { display: none; }

.hamburger {
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
}

.hamburger:hover { border-color: var(--pink); color: var(--pink); }
.hamburger .ikon { width: 18px; height: 18px; }

.verdunklung {
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(17, 19, 24, .45);
}

.verdunklung[hidden] { display: none; }

/*
 * Linksbuendig, nicht zentriert: Zentriert liess die Spalte neben der Seitenleiste
 * einen breiten toten Streifen stehen — der Blick springt dann bei jedem Seitenwechsel.
 * Die Obergrenze verhindert nur, dass Tabellen auf einem 27-Zoll-Schirm auseinanderlaufen.
 */
.huelle {
    max-width: 76rem;
    margin: 0;
    padding: 1.5rem 2rem 3rem;
}

/* Die Anmeldung fuellt den Bildschirm selbst aus. */
.huelle--voll { max-width: none; padding: 0; }

@media (max-width: 56.25rem) {
    .seitenleiste { transform: translateX(-100%); box-shadow: var(--shadow-md); }
    .seitenleiste.ist-offen { transform: none; }
    .rahmen { margin-left: 0; }
    .hamburger, .marke--klein { display: inline-flex; }
    .marke--klein { border: 0; padding: 0; font-size: 15px; }
    .marke--klein .marke__zeichen { width: 28px; height: 28px; }
}

/* =========================================================================
 * Seitenkopf (CM: .module-header) — Icon-Kachel, Titel, Beschreibung.
 * ========================================================================= */
.seiten-kopf {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.seiten-kopf__ikon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--pink-light);
    border: 1.5px solid var(--pink-mid);
    color: var(--pink);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.seiten-kopf__ikon .ikon { width: 20px; height: 20px; }
.seiten-kopf__text { min-width: 0; }
.seiten-kopf__aktionen { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }

h1, .seiten-kopf__titel {
    font-family: var(--font-kopf);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-1);
    margin: 0 0 3px;
    line-height: 1.3;
}

.seiten-kopf__beschreibung {
    font-size: 13px;
    color: var(--text-2);
    margin: 0;
    line-height: 1.6;
}

/* --- Karten (CM: .section-card) ------------------------------------------ */
.karte {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    margin-bottom: 16px;
}

h2 {
    font-family: var(--font-kopf);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-1);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

h2 .ikon { width: 16px; height: 16px; color: var(--pink); }

/*
 * karte--eng gab es kurz und ist wieder raus: Schmale Formularkarten neben breiten
 * Tabellenkarten liessen die Seiten ungleich wirken. Jetzt haben alle Karten dieselbe
 * Breite; schmal bleiben nur die Eingabefelder darin (--feld-max).
 */

.karte p { margin: 0 0 .6rem; }
.karte p:last-child { margin-bottom: 0; }
.karte strong { color: var(--text-1); font-weight: 600; }

.leise { color: var(--text-3); font-size: 12.5px; margin: 0 0 .5rem; }
.karte--warnung { border-color: var(--orange-rand); background: var(--orange-light); }

a { color: var(--pink); }
a:hover { color: var(--pink-dark); }

/* --- Formulare ----------------------------------------------------------- */
.formular {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: var(--feld-max);
}

.formular label {
    font-family: var(--font-kopf);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-1);
    margin: 14px 0 7px;
}

.formular .leise { margin: 6px 0 0; font-size: 11.5px; }

input, select, textarea {
    width: 100%;
    max-width: var(--feld-max);
    padding: 10px 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-text);
    font-size: 13px;
    color: var(--text-1);
    background: var(--surface);
    outline: none;
    transition: border-color .15s;
}

input:focus, select:focus, textarea:focus { border-color: var(--pink); }
input::placeholder { color: var(--text-3); }

input:focus-visible, select:focus-visible, textarea:focus-visible,
.knopf:focus-visible, .navi a:focus-visible, a:focus-visible {
    outline: 2px solid var(--pink);
    outline-offset: 2px;
}

/* Inline-Formular (Export-Auswahl): Felder nebeneinander. */
.formular--inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    max-width: none;
}

.formular--inline label { margin: 0; }
.formular--inline input, .formular--inline select { width: auto; }
.formular--inline .knopf { margin-top: 0; }

/* --- Buttons (CM: .btn-cm) ----------------------------------------------- */
.knopf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--pink);
    background: var(--pink);
    color: #fff;
    font-family: var(--font-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
}

.knopf:hover {
    background: var(--pink-dark);
    border-color: var(--pink-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(233, 30, 99, .3);
}

.knopf--leise {
    background: var(--surface);
    color: var(--text-2);
    border-color: var(--border);
}

.knopf--leise:hover {
    background: var(--pink-light);
    border-color: var(--pink);
    color: var(--pink);
    box-shadow: none;
    transform: none;
}

.knopf--gross {
    margin-top: 20px;
    padding: 12px 24px;
    font-size: 14px;
    min-height: 44px;
}

.knopf--klein { padding: 6px 11px; font-size: 12px; border-radius: var(--radius-sm); }

/* Semantische Stempel-Aktionen (siehe Kopfkommentar, Punkt 1). */
.knopf--kommen { background: var(--gruen-aktion); border-color: var(--gruen-aktion); }
.knopf--kommen:hover {
    background: var(--gruen-aktion-hover);
    border-color: var(--gruen-aktion-hover);
    box-shadow: 0 4px 14px rgba(22, 163, 74, .3);
}

.knopf--pause { background: var(--orange-aktion); border-color: var(--orange-aktion); }
.knopf--pause:hover {
    background: var(--orange-aktion-hover);
    border-color: var(--orange-aktion-hover);
    box-shadow: 0 4px 14px rgba(217, 119, 6, .3);
}

.knopf--weiter { background: var(--blau-aktion); border-color: var(--blau-aktion); }
.knopf--weiter:hover {
    background: var(--blau-aktion-hover);
    border-color: var(--blau-aktion-hover);
    box-shadow: 0 4px 14px rgba(2, 132, 199, .3);
}

.knopf--gehen { background: var(--rot-aktion); border-color: var(--rot-aktion); }
.knopf--gehen:hover {
    background: var(--rot-aktion-hover);
    border-color: var(--rot-aktion-hover);
    box-shadow: 0 4px 14px rgba(220, 38, 38, .3);
}

.knopf[disabled] {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Alerts (CM: .cm-alert) ---------------------------------------------- */
.hinweis {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--blau-rand);
    background: var(--blau-light);
    font-size: 13px;
    color: var(--text-2);
    margin: 0 0 16px;
}

.hinweis .ikon { margin-top: 2px; color: var(--blau); }
.hinweis--fehler { background: var(--rot-light); border-color: var(--rot-rand); }
.hinweis--fehler .ikon { color: var(--rot); }
.hinweis--ok { background: var(--gruen-light); border-color: var(--gruen-rand); flex-wrap: wrap; }
.hinweis--ok .ikon { color: var(--gruen); }
.hinweis--ok .knopf { margin-left: auto; }

.liste { margin: 0; padding-left: 1.1rem; }
.liste li { margin-bottom: .25rem; }

/* Befundlisten (ArbZG, JuArbSchG): je Zeile ein Badge, links buendig. */
.badge-liste { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

/* =========================================================================
 * Stempeluhr — die einzige Seite mit eigener Anatomie. Sie ist der taegliche
 * Griff aufs Handy: grosse Zahl, fingergrosse Knoepfe.
 * ========================================================================= */
/* Schmaler als die uebrigen Karten: Der Stempelknopf ueber die volle Inhaltsbreite
 * waere ein 840px langer gruener Balken — die Uhr ist eine Handy-Ansicht. */
/* Schmaler als die uebrigen Karten (der Stempelknopf ueber die volle Breite waere ein
 * langer gruener Balken), aber an derselben linken Kante wie alles andere. */
.uhr {
    text-align: center;
    padding: 28px 22px 26px;
    max-width: 30rem;
}

.uhr__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 13px;
    border-radius: var(--radius-pill);
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 12.5px;
    margin: 0 0 18px;
}

.uhr__status .ikon { width: 14px; height: 14px; }
.uhr__status--ein { background: var(--gruen-light); border-color: var(--gruen-rand); color: var(--gruen); }
.uhr__status--ein strong { color: var(--gruen); }
.uhr__status--pause { background: var(--orange-light); border-color: var(--orange-rand); color: var(--orange); }
.uhr__status--pause strong { color: var(--orange); }

.uhr__netto {
    font-family: var(--font-kopf);
    font-size: 3.4rem;
    font-weight: 800;
    color: var(--text-1);
    font-variant-numeric: tabular-nums;   /* sonst zappelt die Sekundenanzeige */
    letter-spacing: -.02em;
    margin: 0;
    line-height: 1.05;
}

.uhr__einheit {
    font-family: var(--font-text);
    font-size: .95rem;
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: 0;
}

.uhr__soll { font-size: 12.5px; color: var(--text-3); margin: 6px 0 0; }

.uhr__tasten {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

.uhr__tasten form { margin: 0; flex: 1; }

.uhr__tasten .knopf {
    width: 100%;
    min-height: 54px;   /* fingergross — hier wird taeglich getippt */
    font-size: 15px;
    border-radius: var(--radius-lg);
}

.uhr__tasten .knopf .ikon { width: 18px; height: 18px; }

@media (min-width: 30rem) {
    .uhr__tasten { flex-direction: row; }
}

/* --- Tabellen ------------------------------------------------------------ */
.tabelle-huelle { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }

.tabelle {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.tabelle th {
    font-family: var(--font-kopf);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-3);
    text-align: left;
    padding: 0 12px 9px 0;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.tabelle td {
    text-align: left;
    padding: 11px 12px 11px 0;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-2);
    white-space: nowrap;
}

.tabelle tr:last-child td { border-bottom: none; }
.tabelle td:first-child { color: var(--text-1); font-weight: 500; }
.tabelle form { margin: 0; }

/* --- Badges (CM: .cm-badge) ---------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    white-space: normal;          /* lange Hinweise umbrechen statt ueberlaufen */
    overflow-wrap: anywhere;
    background: var(--bg);
    color: var(--text-2);
    border: 1px solid var(--border);
}

.badge--feiertag  { background: var(--blau-light);   color: var(--blau);   border-color: var(--blau-rand); }
.badge--urlaub    { background: var(--gruen-light);  color: var(--gruen);  border-color: var(--gruen-rand); }
.badge--krank     { background: var(--rot-light);    color: var(--rot);    border-color: var(--rot-rand); }
.badge--sonstiges { background: var(--bg);           color: var(--text-3); }
.badge--warnung   { background: var(--orange-light); color: var(--orange); border-color: var(--orange-rand); }
.badge--gruen     { background: var(--gruen-light);  color: var(--gruen);  border-color: var(--gruen-rand); }
.badge--gelb      { background: var(--orange-light); color: var(--orange); border-color: var(--orange-rand); }
.badge--rot       { background: var(--rot-light);    color: var(--rot);    border-color: var(--rot-rand); }

/* =========================================================================
 * Limit-Kachel (Dashboard) — CM-KPI-Karte plus Fortschrittsbalken.
 * ========================================================================= */
.kachel { padding: 18px 20px; }

.kachel__wert {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 12.5px;
    color: var(--text-3);
}

.kachel__zahl {
    font-family: var(--font-kopf);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.1;
}

.kachel__wert .badge { align-self: center; }

/*
 * Fortschrittsbalken ohne Inline-Style (CSP verbietet style="width:…").
 * Die Breite kommt ueber eine von 11 diskreten Klassen, Schritt 10.
 */
.balken-huelle {
    background: var(--border);
    border-radius: var(--radius-pill);
    height: 7px;
    overflow: hidden;
}

.balken {
    height: 100%;
    min-width: 4px;               /* auch sehr kleine Werte bleiben sichtbar */
    border-radius: var(--radius-pill);
    transition: width .3s ease;
}

.balken--0   { width: 0%; }
.balken--10  { width: 10%; }
.balken--20  { width: 20%; }
.balken--30  { width: 30%; }
.balken--40  { width: 40%; }
.balken--50  { width: 50%; }
.balken--60  { width: 60%; }
.balken--70  { width: 70%; }
.balken--80  { width: 80%; }
.balken--90  { width: 90%; }
.balken--100 { width: 100%; }

.balken--ampel-gruen { background: var(--gruen); }
.balken--ampel-gelb  { background: var(--orange); }
.balken--ampel-rot   { background: var(--rot); }
.balken--ampel-keine { background: var(--text-3); }

.kachel__hinweise { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.kachel__hinweise .badge { align-self: flex-start; }

/* --- Kachel-Raster (CM: .kpi-row) ---------------------------------------- */
.kachel-raster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 14px;
    align-items: stretch;
}

.kachel-raster__zelle { display: flex; flex-direction: column; }

.kachel-raster__zelle .kachel {
    flex: 1;
    margin-bottom: 0;
    transition: box-shadow .2s, border-color .2s;
}

.kachel-raster__zelle .kachel:hover { box-shadow: var(--shadow-md); }

.kachel-name {
    font-family: var(--font-kopf);
    font-weight: 700;
    font-size: 13px;
    margin: 0 0 8px;
    padding-left: 2px;
}

.kachel-name a { color: var(--text-1); text-decoration: none; }
.kachel-name a:hover { color: var(--pink); }

/* --- Wochennavigation ---------------------------------------------------- */
.wochen-navi {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    margin-bottom: 14px;
}

.wochen-navi strong {
    font-family: var(--font-kopf);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-1);
}

.wochen-navi a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-2);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}

.wochen-navi a:hover { border-color: var(--pink); color: var(--pink); background: var(--pink-light); }

.woche-summe {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin: 0 0 16px;
}

.woche-summe strong { font-family: var(--font-kopf); font-size: 15px; font-weight: 700; color: var(--text-1); }

/* --- Auswahl-Bausteine (Tage, Zeilen-Aktionen) --------------------------- */
.tage-wahl {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-top: 14px;
    max-width: var(--feld-max);
}

.tage-wahl legend {
    font-family: var(--font-kopf);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-1);
    padding: 0 6px;
}

.tage-wahl__tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0 12px 4px 0;
    font-size: 13px;
}

.tage-wahl input { width: auto; accent-color: var(--pink); }

.zeile-aktionen { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.zeile-aktionen form { margin: 0; }

/* --- Jahresverlauf-Chart ------------------------------------------------- */
.svg-chart { overflow-x: auto; }
.svg-chart svg { display: block; width: 100%; height: auto; max-width: 40rem; }

/* =========================================================================
 * Anmeldung: zweigeteilt. Links wer und wofuer, rechts das Formular.
 * Unter 60rem faellt die linke Haelfte weg — auf dem Handy will niemand eine
 * Produktbeschreibung lesen, sondern sich anmelden.
 * ========================================================================= */
.anmeldung {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
}

.anmeldung__marke {
    display: none;
    position: relative;
    overflow: hidden;
    padding: 3rem;
    align-items: center;
    /* Dunkle Flaeche statt Pink: Das Pink traegt das Logo, und eine ganze pinke
     * Haelfte neben einem pinken Knopf waere zu viel des Guten. */
    background:
        radial-gradient(70rem 40rem at 15% 20%, rgba(233, 30, 99, .28), transparent 60%),
        linear-gradient(160deg, #171a21 0%, #0f1116 100%);
    color: #fff;
}

.anmeldung__marke-inhalt { max-width: 26rem; }

.anmeldung__claim {
    font-family: var(--font-kopf);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.01em;
    margin: 2rem 0 0;
    color: #fff;
}

.anmeldung__punkte {
    list-style: none;
    margin: 2.2rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.anmeldung__punkte li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, .78);
}

.anmeldung__punkte .ikon {
    width: 18px;
    height: 18px;
    color: var(--pink);
    flex-shrink: 0;
}

.anmeldung__fuss {
    margin: 3rem 0 0;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .45);
}

.anmeldung__formular {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background: var(--bg);
}

.anmeldung__karte {
    width: 100%;
    max-width: 26rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 32px;
}

.anmeldung__karte h1 { margin-bottom: 4px; }
.anmeldung__karte .leise { margin-bottom: 4px; }
.anmeldung__karte .formular { max-width: none; }
.anmeldung__karte input { max-width: none; }
.anmeldung__karte .knopf { width: 100%; }
.anmeldung__karte .hinweis { margin-top: 16px; margin-bottom: 0; }

/* Die Marke ueber dem Formular ist der Ersatz fuer die ausgeblendete linke Haelfte. */
.anmeldung__marke-klein {
    display: flex;
    padding: 0;
    border: 0;
    margin-bottom: 26px;
}

.marke--gross {
    padding: 0;
    border: 0;
    font-size: 26px;
    color: #fff;
    gap: 14px;
}

.marke--gross .marke__logo { width: 52px; height: 52px; border-radius: 16px; }
/* Einfarbig wie im Kopf der Anwendung: Die Farbe traegt das Zeichen, nicht die Schrift. */
.marke--gross .marke__akzent { color: inherit; }

@media (min-width: 60rem) {
    .anmeldung { grid-template-columns: 1.05fr 1fr; }
    .anmeldung__marke { display: flex; }
    .anmeldung__marke-klein { display: none; }
    .anmeldung__formular { padding: 2rem 3rem; }
}
@media (max-width: 40rem) {
    .huelle { padding: 1.25rem .85rem 2.5rem; }
    .karte { padding: 16px 16px; }
    .tabelle-huelle { margin: 0 -16px; padding: 0 16px; }
    .uhr__netto { font-size: 2.9rem; }
    .topbar { padding: 0 .85rem; }
    .topbar__datum { display: none; }
}
