/*
 * smopi Core – Verwaltungsoberfläche.
 * Eigene Datei statt Inline-Styles: Die Content-Security-Policy erlaubt nur
 * Stylesheets vom eigenen Server (App\Http\Middleware\SecurityHeaders).
 */

:root {
    --grund: #f5f6f8;
    --flaeche: #ffffff;
    --text: #1d2330;
    --leise: #5d6675;
    --linie: #dfe3e8;
    --akzent: #0b6e4f;
    --akzent-text: #ffffff;
    --warnung-grund: #fff4e0;
    --warnung-text: #7a4a00;
    --erfolg: #0b6e4f;
    --fehler: #b3261e;
    --verweigert: #8a4b00;
}

@media (prefers-color-scheme: dark) {
    :root {
        --grund: #14171c;
        --flaeche: #1d2128;
        --text: #e6e8eb;
        --leise: #9aa3af;
        --linie: #323843;
        --akzent: #3fb68b;
        --akzent-text: #0c1512;
        --warnung-grund: #3a2d12;
        --warnung-text: #f3cf8a;
        --erfolg: #3fb68b;
        --fehler: #f08a80;
        --verweigert: #e5a55a;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--grund);
    color: var(--text);
    font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: var(--grund);
    padding: 0.1em 0.3em;
    border-radius: 4px;
}

h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 0 0 0.75rem; }

.kopf {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--flaeche);
    border-bottom: 1px solid var(--linie);
}

.marke { font-weight: 700; color: var(--text); text-decoration: none; }
.marke span { font-weight: 400; color: var(--leise); }

.navigation { display: flex; flex-wrap: wrap; gap: 0.25rem; flex: 1; }
.navigation a {
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
}
.navigation a:hover { background: var(--grund); }
.navigation a.aktiv { background: var(--akzent); color: var(--akzent-text); }

.abmelden { display: flex; align-items: center; gap: 0.75rem; margin: 0; }
.wer { color: var(--leise); font-size: 0.9rem; }

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

.fuss { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem 2rem; color: var(--leise); font-size: 0.85rem; }

.karte {
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
}
.karte.schmal { max-width: 420px; margin: 3rem auto; }

.leise { color: var(--leise); }
.gedimmt td { color: var(--leise); }

.meldung, .warnung {
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
}
.meldung { background: var(--flaeche); border: 1px solid var(--linie); }
.warnung { background: var(--warnung-grund); color: var(--warnung-text); }

.marke-warnung {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: var(--warnung-grund);
    color: var(--warnung-text);
    font-size: 0.8rem;
}

.fehler { color: var(--fehler); margin: 0.25rem 0; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
thead th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--leise); }
tbody tr:last-child td, table.felder tr:last-child th, table.felder tr:last-child td { border-bottom: 0; }
table.felder th { width: 14rem; color: var(--leise); font-weight: 500; }
.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.kennung { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
.umbruch { word-break: break-word; }
.keinumbruch { white-space: nowrap; }
.freitext { white-space: pre-wrap; word-break: break-word; max-width: 28rem; }

.status { font-size: 0.85rem; font-weight: 600; }
.status-success, .status-succeeded { color: var(--erfolg); }
.status-failed { color: var(--fehler); }
.status-denied { color: var(--verweigert); }
.status-running { color: var(--leise); }

.zahlen { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0 0; }
.zahlen div { min-width: 10rem; padding: 0.75rem 1rem; border: 1px solid var(--linie); border-radius: 8px; }
.zahlen dt { color: var(--leise); font-size: 0.85rem; }
.zahlen dd { margin: 0; font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.formular { display: grid; gap: 0.4rem; }
.formular button { margin-top: 0.75rem; }

.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-bottom: 1rem; }
.haken { display: inline-flex; align-items: center; gap: 0.3rem; }

input, select {
    font: inherit;
    color: var(--text);
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
}
input[type="search"] { min-width: 18rem; }

.knopf {
    font: inherit;
    padding: 0.4rem 0.9rem;
    border: 0;
    border-radius: 6px;
    background: var(--akzent);
    color: var(--akzent-text);
    cursor: pointer;
}
.knopf.leise { background: transparent; color: var(--akzent); border: 1px solid var(--linie); }

.seiten { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1rem; }
.seiten .aus { color: var(--leise); }

@media (max-width: 640px) {
    .inhalt { padding: 1rem; }
    input[type="search"] { min-width: 0; width: 100%; }
    table.felder th { width: auto; }
}
