:root {
    --hintergrund: #f7f8fb;
    --fläche: #ffffff;
    --fläche-gedämpft: #f0f5f4;
    --text: #172026;
    --text-leise: #5b6872;
    --linie: #d9e1e4;
    --akzent: #0f766e;
    --akzent-dunkel: #0b5f59;
    --akzent-weich: #d9f2ee;
    --warnung: #a16207;
    --fehler: #b42318;
    --schatten: 0 18px 50px rgba(23, 32, 38, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--hintergrund);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: var(--akzent-dunkel);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
}

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

button,
a {
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.28);
    outline-offset: 3px;
}

.seitenrahmen {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 32px 0 28px;
}

.app-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.marke {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.marken-symbol {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid var(--linie);
    border-radius: 8px;
    background: var(--fläche);
    box-shadow: 0 10px 30px rgba(23, 32, 38, 0.08);
    font-size: 24px;
}

.marken-text {
    min-width: 0;
}

.eyebrow {
    margin: 0 0 2px;
    color: var(--akzent-dunkel);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    color: var(--text);
    font-size: 1.8rem;
    line-height: 1.15;
}

.einleitung {
    width: min(920px, 100%);
    margin: 0 0 22px 66px;
    padding: 0 0 0 18px;
    border-left: 4px solid var(--akzent);
    color: var(--text-leise);
}

.einleitung p {
    margin: 0;
    font-size: 1rem;
}

.einleitung p + p {
    margin-top: 8px;
}

.einleitung strong {
    color: var(--text);
}

.kopfnavigation {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.kopf-link,
.auth-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--linie);
    border-radius: 8px;
    background: var(--fläche);
    color: var(--text);
    font-size: 0.94rem;
    font-weight: 700;
    text-decoration: none;
}

.kopf-link:hover,
.auth-link:hover {
    border-color: rgba(15, 118, 110, 0.35);
    background: var(--akzent-weich);
    color: var(--akzent-dunkel);
}

.arbeitsbereich {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.bedienfeld,
.protokollfeld,
.textfläche {
    border: 1px solid var(--linie);
    border-radius: 8px;
    background: var(--fläche);
    box-shadow: var(--schatten);
}

.bedienfeld {
    align-self: start;
    padding: 22px;
}

.bedienfeld h2,
.protokollkopf h2,
.textfläche h1 {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.25;
}

.bedienfeld p {
    margin: 10px 0 0;
    color: var(--text-leise);
}

.statusleiste {
    display: grid;
    gap: 4px;
    margin: 18px 0;
}

.statuszeile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--linie);
}

.statuszeile:last-child {
    border-bottom: 0;
}

.status-label {
    color: var(--text-leise);
    font-size: 0.94rem;
}

.status-wert {
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--fläche-gedämpft);
    color: var(--akzent-dunkel);
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
}

.primärknopf {
    width: 100%;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 8px;
    background: var(--akzent);
    color: #ffffff;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
}

.primärknopf:hover {
    background: var(--akzent-dunkel);
    box-shadow: 0 12px 28px rgba(15, 118, 110, 0.24);
    transform: translateY(-1px);
}

.primärknopf:disabled {
    background: #8ba8a4;
    cursor: wait;
    box-shadow: none;
    transform: none;
}

.knopf-symbol {
    font-size: 1.15rem;
    line-height: 1;
}

.auth-hinweis {
    margin-top: 16px;
    min-height: 0;
}

.auth-hinweis:empty {
    display: none;
}

.auth-box {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #f0d58d;
    border-radius: 8px;
    background: #fff8e6;
    color: #5f4308;
}

.auth-box p {
    margin: 0;
    color: inherit;
}

.auth-link {
    width: fit-content;
    border-color: #deb85d;
    background: #ffffff;
    color: #66480a;
}

.protokollfeld {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.protokollkopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--linie);
}

.live-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-leise);
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
}

.live-punkt {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--akzent);
    box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.14);
}

.log {
    min-height: 390px;
    max-height: 58vh;
    margin: 0;
    padding: 18px 22px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #111827;
    color: #e8eef2;
    font-family: "DejaVu Sans Mono", Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: normal;
}

.log:empty::before {
    content: "Bereit.";
    color: #aab6c2;
}

.textfläche {
    width: min(900px, 100%);
    margin: 0 auto;
    padding: 30px;
}

.textfläche h1 {
    font-size: 1.9rem;
    margin-bottom: 16px;
}

.textfläche h2 {
    margin: 28px 0 8px;
    font-size: 1.12rem;
}

.textfläche p,
.textfläche li {
    color: var(--text-leise);
}

.textfläche ul {
    padding-left: 22px;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 22px;
    padding: 18px 0 0;
    color: var(--text-leise);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-leise);
    font-weight: 700;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--akzent-dunkel);
}

@media (max-width: 780px) {
    .seitenrahmen {
        width: min(100% - 20px, 1280px);
        padding-top: 20px;
    }

    .app-kopf,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .kopfnavigation {
        justify-content: flex-start;
    }

    .einleitung {
        margin-left: 0;
    }

    .arbeitsbereich {
        grid-template-columns: 1fr;
    }

    .bedienfeld,
    .textfläche {
        padding: 20px;
    }

    .protokollkopf {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .log {
        min-height: 320px;
        max-height: 55vh;
        padding: 16px;
    }
}
