:root {
    --hintergrund: #eef1f5;
    --flaeche: #ffffff;
    --text: #1f2933;
    --leise: #616e7c;
    --rand: #cbd2d9;
    --akzent: #2f5d8a;
    --akzent-text: #ffffff;
    --fehler: #b42318;
    --fehler-flaeche: #fdecea;
    --erfolg: #1e6b3a;
    --erfolg-flaeche: #e6f4ea;
}

@media (prefers-color-scheme: dark) {
    :root {
        --hintergrund: #14181d;
        --flaeche: #1e242b;
        --text: #e4e7eb;
        --leise: #9aa5b1;
        --rand: #3e4c59;
        --akzent: #5b8fc7;
        --akzent-text: #0b1520;
        --fehler: #f28b82;
        --fehler-flaeche: #3b1d1b;
        --erfolg: #81c995;
        --erfolg-flaeche: #1b3324;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--hintergrund);
    color: var(--text);
}

.portal {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.portal-box {
    width: 100%;
    max-width: 380px;
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: 8px;
    padding: 28px 24px;
}

h1 { font-size: 1.4rem; margin: 0 0 20px; }

p { color: var(--leise); line-height: 1.4; }

label {
    display: block;
    margin-bottom: 14px;
    font-size: 0.9rem;
    color: var(--leise);
}

input {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 9px 10px;
    font-size: 1rem;
    color: var(--text);
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: 4px;
}

input:focus { outline: 2px solid var(--akzent); outline-offset: 0; border-color: var(--akzent); }

button {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 0;
    border-radius: 4px;
    background: var(--akzent);
    color: var(--akzent-text);
    cursor: pointer;
}

.fehler, .erfolg {
    padding: 8px 10px;
    border-radius: 4px;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.fehler { color: var(--fehler); background: var(--fehler-flaeche); }
.erfolg { color: var(--erfolg); background: var(--erfolg-flaeche); }

.unten { margin: 16px 0 0; text-align: center; font-size: 0.9rem; }

a { color: var(--akzent); }

.portal-box:has(.breit) { max-width: 980px; }

.liste { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.liste th, .liste td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rand); }
.liste th { color: var(--leise); font-weight: 600; }
.leise { color: var(--leise); }

button.klein, .knopf.klein { width: auto; padding: 4px 12px; font-size: 0.85rem; }

.kopfzeile { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.kopfzeile h1 { margin: 0; }

.knopf {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 4px;
    background: var(--akzent);
    color: var(--akzent-text);
    text-decoration: none;
    font-size: 0.95rem;
}

.zweit { background: transparent; color: var(--akzent); border: 1px solid var(--akzent); }
.gefahr { background: var(--fehler); color: #fff; border: 0; }
@media (prefers-color-scheme: dark) { .gefahr { color: #1a0a09; } }

.aktionen { white-space: nowrap; text-align: right; }
.aktionen > * { margin-left: 4px; }

.markierung { font-size: 0.8rem; padding: 2px 8px; border-radius: 10px; background: var(--rand); color: var(--text); }
.markierung.gesperrt { background: var(--fehler-flaeche); color: var(--fehler); }

code { font-size: 0.85rem; word-break: break-all; }

.liste .zahl { text-align: right; white-space: nowrap; }
.bestaetigen { display: flex; gap: 8px; margin-top: 10px; }

select {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 9px 10px;
    font-size: 1rem;
    color: var(--text);
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: 4px;
}
button.link { width: auto; background: none; color: var(--akzent); padding: 0; text-decoration: underline; }

.laden {
    width: 32px;
    height: 32px;
    margin: 8px auto 16px;
    border: 3px solid var(--rand);
    border-top-color: var(--akzent);
    border-radius: 50%;
    animation: drehen 0.9s linear infinite;
}

@keyframes drehen { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) { .laden { animation: none; } }
