/*
  Die Seiten hinter der Anmeldung: start.html und betrieb.html.

  Dieselbe Sprache wie die öffentliche Seite (seite.css): Beton, Gips, Silikon. Grau in
  Grau, Graphit für Schrift und Hauptknopf, der eine warme Ton nur für Marken und den Fokus.
  Anders als die Startseite gibt es hier nur das helle Bild - wer im Büro Mitarbeiter
  einträgt und Ordner freigibt, arbeitet auf festem, hellem Grund, egal was das
  Betriebssystem gerade vorgibt.

  Kein Framework, kein Build: eine CSS-Datei, eine JS-Datei.
*/

:root {
    color-scheme: light;

    /* Gips und Beton: die Flächen. */
    --grund:         #f3f2ef;
    --grund-tief:    #e9e7e2;
    --flaeche:       #ffffff;
    --flaeche-leise: #eceae5;
    --flaeche-tief:  #dedbd4;

    /* Graphit: die Schrift und der Hauptknopf. */
    --graphit:       #17191a;
    --auf-graphit:   #f7f6f4;
    --beton:         #5f6366;
    --beton-leise:   #83878a;

    --rand:          #dcd9d2;
    --rand-stark:    #b4b0a8;

    /* Der eine warme Ton. Sparsam. */
    --mass:           #a2551f;
    --mass-leise:     #f0e3d8;
    --auf-mass-leise: #43200a;

    /* Gut und schlecht - gedämpft, damit sie zum Beton passen. */
    --fehler:           #a3291c;
    --fehler-leise:     #f5e1dd;
    --auf-fehler-leise: #5a140c;
    --gut:              #2e6b3f;
    --gut-leise:        #e0ebe1;
    --auf-gut-leise:    #163a20;

    --rundung:   16px;
    --rundung-s: 10px;
    --schatten:      0 1px 2px rgba(23, 25, 26, .06), 0 10px 30px rgba(23, 25, 26, .07);
    --schatten-hoch: 0 2px 6px rgba(23, 25, 26, .10), 0 24px 60px rgba(23, 25, 26, .12);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--grund);
    color: var(--graphit);
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Die Körnung - wie auf der Startseite: verputzte Wand statt Kunststoff. */
.koernung {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    opacity: .40;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23k)' opacity='0.32'/%3E%3C/svg%3E");
}

a { color: inherit; }

h1, h2, h3 { letter-spacing: -.02em; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -.025em; }
h2 { font-size: 1.22rem; font-weight: 650; }

/* Zwischenüberschrift in der Karte: eine Zeile wie in einer Zeichnungslegende. */
h3 {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--beton);
    margin: 0 0 .8rem;
}

h3::before {
    content: "";
    width: 22px;
    height: 1px;
    background: var(--rand-stark);
    flex: none;
}

p { margin: .5rem 0 .9rem; text-wrap: pretty; }

.leise { color: var(--beton); font-size: .92rem; }
.mini  { font-size: .82rem; }
/* Ein Stand, der hängt - etwa Fotos, die nicht ins Drive kommen. */
.warnt-text { color: var(--auf-fehler-leise); }
.rechts { margin-left: auto; }
.reihe { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.spalte { display: flex; flex-direction: column; gap: .35rem; }
.trenner { height: 1px; background: var(--rand); border: 0; margin: 1.4rem 0; }

.marke-abschnitt {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--beton);
    margin-bottom: .9rem;
}

.marke-abschnitt::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--rand-stark);
}

.marke-abschnitt a { text-decoration: none; }
.marke-abschnitt a:hover { color: var(--graphit); text-decoration: underline; text-decoration-color: var(--mass); }

/* -- Gerüst ------------------------------------------------------------- */

.bahn { max-width: 980px; margin: 0 auto; padding: 0 1.4rem; }

.kopf {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--grund) 85%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease;
}

.kopf.gescrollt { border-bottom-color: var(--rand); }

.kopf .bahn {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 68px;
}

.marke {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -.03em;
    text-decoration: none;
    flex: none;
}

.marke .zeichen { color: var(--mass); display: block; }

.kopf .konto {
    margin-left: auto;
    min-width: 0;
    font-size: .9rem;
    color: var(--beton);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Die Bühne: oben das Millimeterpapier der Startseite, das nach unten ausläuft. */
.buehne { position: relative; padding-bottom: 5rem; }

.buehne::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 440px;
    background-image:
        linear-gradient(to right, var(--rand) 1px, transparent 1px),
        linear-gradient(to bottom, var(--rand) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(100% 100% at 70% 0%, #000 0%, transparent 72%);
            mask-image: radial-gradient(100% 100% at 70% 0%, #000 0%, transparent 72%);
    opacity: .55;
    pointer-events: none;
}

.buehne > .bahn { position: relative; }

.seitenkopf { padding: clamp(2.2rem, 5vw, 3.6rem) 0 clamp(1.4rem, 3vw, 2rem); }
.seitenkopf p { color: var(--beton); font-size: 1.02rem; margin: .7rem 0 0; max-width: 40em; }

.karte {
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: var(--rundung);
    padding: 1.5rem 1.6rem;
    margin-bottom: 1.1rem;
    box-shadow: var(--schatten);
}

.karte.eng { padding: 1.15rem 1.35rem; }
.karte > :last-child { margin-bottom: 0; }
.karte h2 + .leise { margin-top: .2rem; }

/* -- Knöpfe ------------------------------------------------------------- */

button, .knopf {
    font: inherit;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: .62rem 1.25rem;
    cursor: pointer;
    background: var(--graphit);
    color: var(--auf-graphit);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    line-height: 1.2;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}

button:hover:not(:disabled), .knopf:hover { transform: translateY(-1px); box-shadow: var(--schatten); }
button:active, .knopf:active { transform: translateY(0); }
button:disabled { opacity: .45; cursor: default; }

button.leer, .knopf.leer {
    background: transparent;
    color: var(--graphit);
    border-color: var(--rand-stark);
}

button.leer:hover:not(:disabled), .knopf.leer:hover { background: var(--flaeche); border-color: var(--graphit); }

button.klein, .knopf.klein { padding: .42rem .95rem; font-size: .88rem; }

button.gefahr {
    background: transparent;
    color: var(--fehler);
    border-color: color-mix(in srgb, var(--fehler) 45%, transparent);
}

button.gefahr:hover:not(:disabled) { background: var(--fehler-leise); border-color: var(--fehler); }

button.nur-text {
    background: none;
    border: 0;
    color: var(--beton);
    font-weight: 500;
    padding: .3rem .45rem;
}

button.nur-text:hover:not(:disabled) {
    transform: none;
    box-shadow: none;
    color: var(--graphit);
    text-decoration: underline;
    text-decoration-color: var(--mass);
    text-underline-offset: 3px;
}

button:focus-visible, .knopf:focus-visible, a:focus-visible {
    outline: 2px solid var(--mass);
    outline-offset: 3px;
}

/* -- Formulare ---------------------------------------------------------- */

input[type=text], input[type=email], select {
    font: inherit;
    padding: .62rem .85rem;
    border: 1px solid var(--rand-stark);
    border-radius: var(--rundung-s);
    background: var(--flaeche);
    color: var(--graphit);
    min-width: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}

input::placeholder { color: var(--beton-leise); }
input:hover, select:hover { border-color: var(--beton-leise); }

input:focus, select:focus {
    outline: none;
    border-color: var(--graphit);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mass) 22%, transparent);
}

input[readonly] { background: var(--flaeche-leise); }

select.klein { padding: .42rem .8rem; font-size: .88rem; border-radius: 999px; cursor: pointer; }

label.haken {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .38rem .85rem;
    border: 1px solid var(--rand);
    border-radius: 999px;
    font-size: .88rem;
    cursor: pointer;
    background: var(--flaeche);
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

label.haken:hover { border-color: var(--rand-stark); }
label.haken input { margin: 0; accent-color: var(--graphit); }

label.haken:has(input:checked) {
    background: var(--graphit);
    color: var(--auf-graphit);
    border-color: var(--graphit);
}

label.haken:has(input:checked) input { accent-color: var(--mass); }

/* -- Marken ------------------------------------------------------------- */

.marke-klein {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .16rem .6rem;
    border: 1px solid var(--rand);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    background: var(--flaeche-leise);
    color: var(--beton);
}

.marke-klein.gut    { background: var(--gut-leise);    color: var(--auf-gut-leise);    border-color: transparent; }
.marke-klein.warnt  { background: var(--fehler-leise); color: var(--auf-fehler-leise); border-color: transparent; }
.marke-klein.akzent { background: var(--mass-leise);   color: var(--auf-mass-leise);   border-color: transparent; }

.marke-klein button.nur-text { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* -- Listen ------------------------------------------------------------- */

.liste { list-style: none; margin: 0; padding: 0; }

.liste > li {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .85rem 0;
    border-bottom: 1px solid var(--rand);
}

.liste > li:last-child { border-bottom: 0; }

.person { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.person b { font-weight: 600; }
.person .mail { font-size: .85rem; color: var(--beton); word-break: break-all; }

.ordner-marken { display: flex; flex-wrap: wrap; gap: .35rem; }

/* -- Meldungen ---------------------------------------------------------- */

.meldung {
    border-radius: var(--rundung-s);
    padding: .8rem 1rem;
    margin-bottom: 1.1rem;
    font-size: .92rem;
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-left: 3px solid var(--rand-stark);
    box-shadow: var(--schatten);
}

.meldung.fehler { background: var(--fehler-leise); color: var(--auf-fehler-leise); border-color: transparent; border-left-color: var(--fehler); }
.meldung.gut    { background: var(--gut-leise);    color: var(--auf-gut-leise);    border-color: transparent; border-left-color: var(--gut); }

/* -- Dialog ------------------------------------------------------------- */

dialog {
    border: 1px solid var(--rand);
    border-radius: var(--rundung);
    background: var(--flaeche);
    color: var(--graphit);
    padding: 1.5rem 1.6rem;
    width: min(580px, calc(100vw - 2rem));
    box-shadow: var(--schatten-hoch);
}

dialog::backdrop {
    background: rgba(23, 25, 26, .35);
    backdrop-filter: blur(3px);
}

dialog .liste button.nur-text { color: var(--graphit); }

.pfadleiste {
    font: 500 .82rem/1.45 ui-monospace, Consolas, monospace;
    color: var(--beton);
    background: var(--flaeche-leise);
    border: 1px solid var(--rand);
    border-radius: var(--rundung-s);
    padding: .45rem .7rem;
    word-break: break-word;
}

.lade { color: var(--beton); padding: 2rem 0; text-align: center; }

@media (max-width: 620px) {
    .liste > li { flex-wrap: wrap; }
    .rechts { margin-left: 0; }
    .karte { padding: 1.2rem 1.15rem; }

    /* Am Handy steht die Person oben, ihre Knöpfe darunter - sonst quetscht sich beides. */
    .liste > li:has(> select) > .person { min-width: 100%; }
    .liste > li > .rechts:empty { display: none; }
    .reihe > input { min-width: 100%; }
    .marke-klein { white-space: nowrap; }
    .ordner-marken .marke-klein { white-space: normal; }
}
