/* Design-Tokens aus README.md (Design-Übergabe). Radius 0 außer Buttons, keine Schatten. */
@font-face {
    font-family: "Geist";
    src: url("fonts/geist-latin-wght.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --akzent: #1f3a68;
    --akzent-hover: #132748;
    --nav: #17191d;
    --nav-aktiv: #262a31;
    --nav-hover: #1f2228;
    --nav-text: #c9ccd2;
    --nav-linie: #2a2e35;
    --nav-markierung: #8aa6d8;

    --text-1: #18191b;
    --text-2: #2d2f33;
    --text-3: #4a4c50;
    --text-4: #76787d;
    --text-5: #8a8c90;
    --text-6: #a1a3a7;

    --flaeche-app: #f7f7f6;
    --flaeche-paneel: #ffffff;
    --flaeche-wochenende: #f0f0ee;

    --linie-stark: #cfcfcb;
    --linie-paneel: #dcdcd9;
    --linie: #e4e4e1;
    --linie-fein: #efefec;

    --negativ: #9a3b2e;
    --positiv: #1d6b45;
    --status-entwurf: #a1a3a7;
    --status-eingereicht: #1f3a68;
    --status-freigegeben: #2f8a5b;

    --radius-knopf: 3px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--flaeche-app);
    color: var(--text-1);
    font-family: "Geist", "Helvetica Neue", Helvetica, sans-serif;
    font-size: 13.5px;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

a {
    color: var(--akzent);
    text-decoration: none;
}

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

button, input, select {
    font: inherit;
}

h1 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}

h1:focus {
    outline: none;
}

h2 {
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-4);
    margin: 0 0 10px;
}

.untertitel {
    color: var(--text-3);
    font-size: 14px;
    margin: 0 0 24px;
}

.hinweis {
    color: var(--text-4);
    font-size: 12.5px;
}

/* Formulare */
.formular {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feld {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.feld label {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-2);
}

.feld input, .feld select {
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--linie-stark);
    border-radius: 0;
    background: var(--flaeche-paneel);
    color: var(--text-1);
}

.feld input:focus, .feld select:focus {
    outline: 2px solid var(--akzent);
    outline-offset: -1px;
    border-color: var(--akzent);
}

.feld-reihe {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-3);
}

.validation-message, .fehler {
    color: var(--negativ);
    font-size: 12.5px;
}

.fehlerliste {
    margin: 0;
    padding: 10px 12px;
    list-style: none;
    border-left: 2px solid var(--negativ);
    background: var(--flaeche-paneel);
    color: var(--negativ);
    font-size: 13px;
}

.meldung {
    margin: 0;
    padding: 10px 12px;
    border-left: 2px solid var(--akzent);
    background: var(--flaeche-paneel);
    color: var(--text-2);
    font-size: 13px;
}

/* Buttons: minimal gerundet (3 px) */
.knopf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 30px;
    padding: 0 12px;
    border: 1px solid var(--linie-stark);
    border-radius: var(--radius-knopf);
    background: var(--flaeche-paneel);
    color: var(--text-1);
    font-size: 12.5px;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}

.knopf:hover {
    border-color: var(--akzent);
    color: var(--text-1);
    text-decoration: none;
}

.knopf-primaer {
    height: 40px;
    border: none;
    background: var(--akzent);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.knopf-primaer:hover {
    filter: brightness(1.15);
    color: #ffffff;
}

.knopf-link {
    border: none;
    background: none;
    padding: 0;
    height: auto;
    color: var(--akzent);
    font-size: 12.5px;
    cursor: pointer;
}

.knopf-link:hover {
    text-decoration: underline;
}

/* Status: Punkt plus Text, keine Badges */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--text-3);
}

.status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--punkt, var(--status-entwurf));
}

/* Tabellen: Linien statt Boxen */
.tabelle {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.tabelle th {
    text-align: left;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-5);
    padding: 0 12px 8px 0;
    border-bottom: 1px solid var(--linie-stark);
}

.tabelle td {
    padding: 8px 12px 8px 0;
    border-bottom: 1px solid var(--linie-fein);
    vertical-align: middle;
}

.tabelle .rechts {
    text-align: right;
}

.leer {
    color: var(--text-6);
    padding: 12px 0;
}

/* Blazor */
.blazor-error-boundary {
    padding: 12px 16px;
    background: var(--negativ);
    color: #ffffff;
}

.blazor-error-boundary::after {
    content: "Ein Fehler ist aufgetreten.";
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 10px 20px;
    background: var(--text-1);
    color: #ffffff;
    font-size: 13px;
}

#blazor-error-ui a {
    color: #ffffff;
    text-decoration: underline;
    margin-left: 12px;
}

#blazor-error-ui .dismiss {
    float: right;
    cursor: pointer;
}

/* Seitenaufbau */
.abschnitt {
    max-width: 968px;
    margin-bottom: 36px;
}

.schmal {
    max-width: 480px;
}

.abschnitt-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.abschnitt-kopf h2 {
    margin: 0;
}

/* Verbundenes Button-Paar: nur die Außenecken gerundet */
.knopf-paar {
    display: inline-flex;
}

.knopf-paar .knopf {
    width: 28px;
    height: 28px;
    padding: 0;
}

.knopf-paar .knopf:first-child {
    border-radius: var(--radius-knopf) 0 0 var(--radius-knopf);
}

.knopf-paar .knopf:last-child {
    border-left: none;
    border-radius: 0 var(--radius-knopf) var(--radius-knopf) 0;
}

.inline-formular {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.inline-formular .feld {
    flex: 1;
}

.inline-formular .knopf {
    height: 34px;
}

fieldset {
    margin: 0;
    padding: 0;
    border: none;
    min-width: 0;
}

fieldset:disabled input, fieldset:disabled select {
    background: var(--flaeche-app);
    color: var(--text-3);
}

.feld-titel {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-2);
}

/* Projektfarben: 9-px-Quadrat bzw. Farbwahl im Stil „Getönt“ */
.farbquadrat {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 8px;
    vertical-align: 0;
}

.farbwahl {
    display: grid;
    grid-template-columns: repeat(auto-fill, 36px);
    gap: 6px;
}

.farbe {
    position: relative;
    cursor: pointer;
}

.farbe input {
    position: absolute;
    opacity: 0;
}

.farbe span {
    display: block;
    width: 36px;
    height: 28px;
    border-top: 2px solid;
}

.farbe input:checked + span {
    outline: 2px solid var(--text-1);
    outline-offset: 2px;
}

.farbe input:focus-visible + span {
    outline: 2px solid var(--akzent);
    outline-offset: 2px;
}

.tabelle .datum {
    width: 150px;
    color: var(--text-3);
}

.feld-reihe.drei {
    grid-template-columns: 1.4fr 1fr 1fr;
}

.timer-zeile {
    margin: 0 0 12px;
    font-size: 13.5px;
    color: var(--text-3);
}

.timer-zeile strong {
    color: var(--text-1);
    font-weight: 500;
}
.loeschen { margin-top: 24px; }

/* Verbindungsanzeige (Blazor Server): schmale Leiste oben statt Vollbild-Overlay */
.verbindung {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    background: var(--text-1);
    color: #ffffff;
    font-size: 13px;
    text-align: center;
}

.verbindung p {
    display: none;
    margin: 0;
    padding: 8px 16px;
}

.verbindung a {
    color: #ffffff;
    text-decoration: underline;
    margin-left: 8px;
}

.verbindung.components-reconnect-show,
.verbindung.components-reconnect-failed,
.verbindung.components-reconnect-rejected {
    display: block;
}

.verbindung.components-reconnect-show .verbindung-suche,
.verbindung.components-reconnect-failed .verbindung-fehlgeschlagen,
.verbindung.components-reconnect-rejected .verbindung-abgelehnt {
    display: block;
}

.verbindung.components-reconnect-failed,
.verbindung.components-reconnect-rejected {
    background: var(--negativ);
}

/* Dialoge: kein Schatten-Kasten, sondern Fläche mit Linie über abgedunkeltem Hintergrund */
.dialog-hintergrund {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    background: rgba(23, 25, 29, 0.35);
}

.dialog {
    width: 100%;
    max-width: 480px;
    background: var(--flaeche-paneel);
    border-top: 2px solid var(--akzent);
    padding: 22px 24px 20px;
}

.dialog-kopf {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dialog-kopf h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: -0.01em;
    color: var(--text-1);
}

.dialog-schliessen {
    border: none;
    background: none;
    color: var(--text-4);
    font-size: 12.5px;
    cursor: pointer;
}

.dialog-aktionen {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.dialog-aktionen .rechts-aussen {
    margin-left: auto;
}

.knopf-gefahr {
    color: var(--negativ);
}
