/* =====================================================================
   Simotive Akquise – Oberflaeche
   Farben und Schrift aus dem Design-System von simotive.ai
   (siehe Website/CLAUDE.md und Website/css/style.css).
   Die Schriften liegen lokal: die Seite laedt nichts von Drittservern,
   gleiche Linie wie die oeffentliche Website.
   ===================================================================== */

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300 500;
    font-display: swap;
    src: url('fonts/dm-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300 500;
    font-display: swap;
    src: url('fonts/dm-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg-primary:   #0e1e2a;
    --bg-secondary: #152535;
    --bg-card:      #1a3040;
    --bg-hover:     #1a3a4a;
    --teal:         #5DC9E0;
    --blau:         #378ADD;
    --gruen:        #1D9E75;
    --amber:        #EF9F27;
    --rot:          #E24B4A;
    --text:         #ffffff;
    --body:         #8aafbf;
    --muted:        #5a8a9a;
    --border:       #2a4a5a;
    --font: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg-primary);
    color: var(--body);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--text); font-weight: 500; line-height: 1.25; }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 .75rem; }
h3 { font-size: .95rem; margin: 1.25rem 0 .5rem; }

/* --- Kopf ------------------------------------------------------------ */
.kopf {
    display: flex; align-items: center; gap: 1.5rem;
    padding: .75rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 10;
    flex-wrap: wrap;
}
.marke {
    display: flex; align-items: center; gap: .55rem;
    color: var(--muted); font-size: 1.05rem; font-weight: 300; letter-spacing: .01em;
}
.marke:hover { text-decoration: none; }
.marke img { display: block; height: 26px; width: auto; }
.marke b { color: var(--text); font-weight: 500; }
.kopf nav { display: flex; gap: 1.25rem; flex: 1; flex-wrap: wrap; }
.kopf nav a { color: var(--body); padding: .2rem 0; border-bottom: 2px solid transparent; }
.kopf nav a.an { color: var(--teal); border-bottom-color: var(--teal); }
.kopf nav a:hover { color: var(--text); text-decoration: none; }
.abmelden { color: var(--muted); font-size: .85rem; }

main { max-width: 1180px; margin: 0 auto; padding: 1.5rem; }

.fuss {
    max-width: 1180px; margin: 3rem auto 1.5rem; padding: 1rem 1.5rem 0;
    border-top: 1px solid var(--border);
    color: var(--muted); font-size: .8rem;
}

/* --- Meldungen -------------------------------------------------------- */
.flash {
    padding: .7rem 1rem; margin-bottom: 1rem; border-radius: 4px;
    border-left: 3px solid var(--gruen); background: var(--bg-card); color: var(--text);
}
.flash.warn   { border-left-color: var(--amber); }
.flash.fehler { border-left-color: var(--rot); }

/* --- Karten ----------------------------------------------------------- */
.karte {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
}
.raster { display: grid; gap: 1rem; }
.raster.zwei  { grid-template-columns: 2fr 1fr; }
.raster.vier  { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
    .raster.zwei, .raster.vier { grid-template-columns: 1fr; }
}

/* --- Kennzahlen ------------------------------------------------------- */
.kennzahl { text-align: left; }
.kennzahl .wert { font-size: 1.9rem; color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.kennzahl .label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.kennzahl.warnung .wert { color: var(--amber); }
.kennzahl.gefahr  .wert { color: var(--rot); }

/* --- Tabellen --------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; }
th {
    text-align: left; color: var(--muted); font-weight: 500;
    font-size: .75rem; text-transform: uppercase; letter-spacing: .06em;
    padding: .4rem .6rem; border-bottom: 1px solid var(--border);
}
td { padding: .55rem .6rem; border-bottom: 1px solid rgba(42,74,90,.5); vertical-align: top; }
tr:hover td { background: var(--bg-hover); }
tr.ueberfaellig td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.nowrap { white-space: nowrap; }
.klein { font-size: .82rem; }
.grau  { color: var(--muted); }

/* --- Chips und Tags --------------------------------------------------- */
.chip {
    display: inline-block; padding: .12rem .5rem; border-radius: 3px;
    font-size: .78rem; white-space: nowrap;
    background: rgba(138,175,191,.14); color: var(--body);
}
.chip.teal  { background: rgba( 93,201,224,.16); color: var(--teal); }
.chip.blau  { background: rgba( 55,138,221,.16); color: var(--blau); }
.chip.gruen { background: rgba( 29,158,117,.18); color: var(--gruen); }
.chip.amber { background: rgba(239,159, 39,.16); color: var(--amber); }
.chip.rot   { background: rgba(226, 75, 74,.16); color: var(--rot); }
.chip.klein { font-family: var(--mono); font-size: .75rem; padding: .12rem .4rem; }

.tag {
    display: inline-block; padding: .1rem .4rem; border-radius: 3px;
    font-size: .72rem; letter-spacing: .03em;
    border: 1px solid var(--border); color: var(--muted);
}
.tag.prio-anker, .tag.prio-p1 { border-color: var(--teal); color: var(--teal); }

/* --- Formulare -------------------------------------------------------- */
label { display: block; color: var(--muted); font-size: .78rem;
        text-transform: uppercase; letter-spacing: .05em; margin: .75rem 0 .2rem; }
input[type=text], input[type=email], input[type=date], input[type=password],
select, textarea {
    width: 100%; padding: .5rem .6rem;
    background: var(--bg-primary); color: var(--text);
    border: 1px solid var(--border); border-radius: 4px;
    font-family: inherit; font-size: .92rem;
}
textarea { min-height: 6rem; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--teal);
}
.feldreihe { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 700px) { .feldreihe { grid-template-columns: 1fr; } }

button, .knopf {
    display: inline-block; cursor: pointer;
    padding: .5rem .95rem; margin-top: .8rem;
    background: var(--teal); color: #06131c;
    border: none; border-radius: 4px;
    font-family: inherit; font-size: .88rem; font-weight: 500;
}
button:hover, .knopf:hover { background: #7ad6e8; text-decoration: none; }
button.leise, .knopf.leise {
    background: transparent; color: var(--body); border: 1px solid var(--border);
}
button.leise:hover, .knopf.leise:hover { background: var(--bg-hover); color: var(--text); }
button.gefahr { background: var(--rot); color: #fff; }

/* --- Statuswechsel-Leiste --------------------------------------------- */
.statusleiste { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.statusleiste button { margin-top: 0; font-size: .8rem; padding: .35rem .7rem; }

/* --- Funnel ----------------------------------------------------------- */
.funnel { display: flex; flex-direction: column; gap: .35rem; }
.funnel-stufe {
    display: flex; align-items: center; gap: .8rem;
    padding: .5rem .75rem; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 4px;
}
.funnel-stufe .name { min-width: 9.5rem; color: var(--text); font-size: .9rem; }
.funnel-stufe .balken { flex: 1; height: 8px; background: rgba(42,74,90,.5); border-radius: 4px; overflow: hidden; }
.funnel-stufe .balken i { display: block; height: 100%; background: var(--teal); }
.funnel-stufe .zahl { min-width: 2.5rem; text-align: right; color: var(--text);
                      font-variant-numeric: tabular-nums; }

/* --- Verlauf ---------------------------------------------------------- */
.verlauf { list-style: none; padding: 0; margin: 0; }
.verlauf li {
    padding: .6rem 0 .6rem 1rem; border-left: 2px solid var(--border);
    margin-left: .3rem;
}
.verlauf li .zeit { color: var(--muted); font-size: .78rem; }
.verlauf li .betreff { color: var(--text); }
.verlauf li pre {
    white-space: pre-wrap; word-wrap: break-word; margin: .4rem 0 0;
    font-family: var(--font); font-size: .87rem; color: var(--body);
}

/* --- Hinweisbox ------------------------------------------------------- */
.hinweis {
    padding: .7rem .9rem; border-radius: 4px; font-size: .87rem;
    background: rgba(239,159,39,.10); border-left: 3px solid var(--amber);
    color: var(--body); margin: .75rem 0;
}
.hinweis.stop { background: rgba(226,75,74,.10); border-left-color: var(--rot); }
.hinweis.frei { background: rgba(29,158,117,.10); border-left-color: var(--gruen); }

/* --- Login ------------------------------------------------------------ */
.login-huelle { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 1rem; }
.login-huelle .karte { width: 100%; max-width: 340px; }

/* --- Filterleiste ----------------------------------------------------- */
.filter { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.filter label { margin: 0 0 .15rem; }
.filter > div { min-width: 9rem; }
.filter button { margin-top: 0; }
