/* Dateiablage — schlicht, hell/dunkel je nach Systemeinstellung */

:root {
    --bg:        #f6f7f8;
    --flaeche:   #ffffff;
    --rand:      #dfe3e6;
    --text:      #1c2024;
    --leise:     #6b7480;
    --akzent:    #2f6f4f;
    --akzent-hl: #3d8a63;
    --fehler:    #b3261e;
    --radius:    10px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:      #16181a;
        --flaeche: #1f2225;
        --rand:    #32373c;
        --text:    #e6e8ea;
        --leise:   #9aa3ad;
        --akzent:  #4c9b72;
        --fehler:  #e5786f;
    }
}

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

body {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Kopf ──────────────────────────────────────────────────────────── */
.kopf {
    background: var(--flaeche);
    border-bottom: 1px solid var(--rand);
    position: sticky; top: 0; z-index: 10;
}
.kopf__inner {
    max-width: 960px; margin: 0 auto; padding: .9rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.kopf h1 { font-size: 1.05rem; font-weight: 600; }
.kopf__rechts { display: flex; align-items: center; gap: .9rem; }
.kopf__user { color: var(--leise); font-size: .88rem; }

.inhalt { max-width: 960px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

/* ── Knöpfe ────────────────────────────────────────────────────────── */
.knopf {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--akzent); color: #fff;
    padding: .55rem 1.1rem; border-radius: var(--radius);
    font-size: .88rem; font-weight: 500;
    border: 1px solid transparent; cursor: pointer;
    text-decoration: none; min-height: 40px;
    transition: background .15s ease;
}
.knopf:hover { background: var(--akzent-hl); }
.knopf--leise {
    background: transparent; color: var(--text); border-color: var(--rand);
}
.knopf--leise:hover { background: var(--bg); }

/* ── Ablagefläche ──────────────────────────────────────────────────── */
.ablage {
    background: var(--flaeche);
    border: 2px dashed var(--rand);
    border-radius: 14px;
    padding: 2.25rem 1.5rem;
    text-align: center;
    transition: border-color .15s ease, background .15s ease;
}
.ablage--aktiv { border-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 7%, var(--flaeche)); }
.ablage__text { margin-bottom: 1rem; }
.ablage__text strong { display: block; font-size: 1.02rem; }
.ablage__text span { color: var(--leise); font-size: .85rem; }
.ablage__knoepfe { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.ablage__fuss { margin-top: 1rem; color: var(--leise); font-size: .8rem; }

/* ── Warteschlange ─────────────────────────────────────────────────── */
.warteschlange { list-style: none; margin-top: 1rem; display: grid; gap: .6rem; }
.auftrag {
    background: var(--flaeche); border: 1px solid var(--rand);
    border-radius: var(--radius); padding: .7rem .9rem;
}
.auftrag__kopf {
    display: flex; justify-content: space-between; gap: 1rem;
    font-size: .85rem; margin-bottom: .5rem;
}
.auftrag__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auftrag__stand { color: var(--leise); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.auftrag--fertig { border-color: var(--akzent); }
.auftrag--fehler .auftrag__stand { color: var(--fehler); }

.balken { height: 5px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.balken__fuellung {
    height: 100%; width: 0; background: var(--akzent);
    border-radius: 3px; transition: width .2s ease;
}
.auftrag--fehler .balken__fuellung { background: var(--fehler); }

/* ── Dateiliste ────────────────────────────────────────────────────── */
.liste { margin-top: 2.25rem; }
.liste__kopf {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1rem; margin-bottom: .75rem;
}
.liste__kopf h2 { font-size: .95rem; font-weight: 600; }
.liste__zahl { color: var(--leise); font-size: .82rem; }
.leer {
    color: var(--leise); text-align: center; padding: 2.5rem 1rem;
    background: var(--flaeche); border: 1px solid var(--rand);
    border-radius: var(--radius); font-size: .9rem;
}

.tabelle {
    width: 100%; border-collapse: collapse;
    background: var(--flaeche);
    border: 1px solid var(--rand); border-radius: var(--radius);
    overflow: hidden; font-size: .88rem;
}
.tabelle th {
    text-align: left; font-weight: 500; font-size: .78rem;
    color: var(--leise); padding: .6rem .8rem;
    border-bottom: 1px solid var(--rand);
}
.tabelle td { padding: .65rem .8rem; border-bottom: 1px solid var(--rand); }
.tabelle tr:last-child td { border-bottom: none; }
.tabelle a { color: var(--text); text-decoration: none; }
.tabelle a:hover { text-decoration: underline; }

.td-name { display: flex; align-items: center; gap: .5rem; max-width: 380px; }
.td-name > a {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ansehen {
    font-size: .74rem; color: var(--leise) !important;
    border: 1px solid var(--rand); border-radius: 5px;
    padding: .05rem .4rem; flex-shrink: 0;
}
.td-aktion { text-align: right; width: 1%; }
.loeschen {
    background: none; border: none; cursor: pointer;
    color: var(--leise); font-size: 1.15rem; line-height: 1;
    padding: 0 .3rem; border-radius: 5px;
}
.loeschen:hover { color: var(--fehler); }

/* Dateityp als farbiger Punkt */
.typ {
    width: 8px; height: 8px; border-radius: 2px;
    flex-shrink: 0; background: var(--leise);
}
.typ--bild   { background: #3b82f6; }
.typ--video  { background: #a855f7; }
.typ--audio  { background: #f59e0b; }
.typ--pdf    { background: #ef4444; }
.typ--archiv { background: #14b8a6; }

/* ── Meldungen ─────────────────────────────────────────────────────── */
.meldung {
    background: var(--flaeche); border: 1px solid var(--rand);
    border-left: 3px solid var(--akzent);
    padding: .7rem .9rem; border-radius: var(--radius);
    margin-bottom: 1.25rem; font-size: .88rem;
}
.meldung--fehler { border-left-color: var(--fehler); color: var(--fehler); }

/* ── Anmeldeseite ──────────────────────────────────────────────────── */
.seite-login {
    display: flex; align-items: center; justify-content: center;
    min-height: 100dvh; padding: 1.5rem;
}
.login-karte {
    background: var(--flaeche); border: 1px solid var(--rand);
    border-radius: 14px; padding: 2rem; width: 100%; max-width: 360px;
}
.login-karte h1 { font-size: 1.2rem; margin-bottom: .3rem; }
.login-hinweis { color: var(--leise); font-size: .86rem; margin-bottom: 1.5rem; }
.login-karte label {
    display: block; font-size: .82rem; color: var(--leise); margin-bottom: .9rem;
}
.login-karte input {
    display: block; width: 100%; margin-top: .3rem;
    padding: .6rem .75rem; font-size: .95rem;
    background: var(--bg); color: var(--text);
    border: 1px solid var(--rand); border-radius: var(--radius);
}
.login-karte input:focus { outline: 2px solid var(--akzent); outline-offset: -1px; }
.login-karte button { width: 100%; margin-top: .5rem; }
.login-karte button {
    background: var(--akzent); color: #fff; border: none;
    padding: .65rem; border-radius: var(--radius);
    font-size: .92rem; font-weight: 500; cursor: pointer; min-height: 42px;
}
.login-karte button:hover { background: var(--akzent-hl); }

@media (max-width: 620px) {
    .tabelle thead { display: none; }
    .tabelle, .tabelle tbody, .tabelle tr, .tabelle td { display: block; width: 100%; }
    .tabelle tr { border-bottom: 1px solid var(--rand); padding: .5rem 0; }
    .tabelle td { border: none; padding: .15rem .8rem; }
    .td-name { max-width: none; }
    .td-aktion { text-align: left; }
}
