/* COSI Web — dunkles Glas wie die Mac-App und die Monitorwand. Bewusst EIN
   fester Modus (Projektentscheidung), Handy zuerst. */
* { box-sizing: border-box; margin: 0; }
:root {
    --grund: #0c0f14;
    --karte: rgba(255, 255, 255, 0.055);
    --rand: rgba(255, 255, 255, 0.09);
    --text: #e8eaf0;
    --neben: #9aa3b2;
    --gut: #55c97a;
    --handeln: #ff9f7f;
    --akzent: #7fb2ff;
    --bernstein: #e8b34c;
}
html { -webkit-text-size-adjust: 100%; }
body {
    background: var(--grund);
    color: var(--text);
    font-family: -apple-system, system-ui, "Helvetica Neue", sans-serif;
    min-height: 100vh;
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
.laden { padding: 60px 20px; text-align: center; color: var(--neben); }

/* Kopf */
.kopf {
    padding: calc(14px + env(safe-area-inset-top)) 16px 10px;
    display: flex; align-items: baseline; gap: 10px;
    position: sticky; top: 0; background: rgba(12, 15, 20, 0.9);
    backdrop-filter: blur(14px); z-index: 5;
}
.kopf h1 { font-size: 19px; font-weight: 700; }
.kopf .stand { font-size: 12px; color: var(--neben); margin-left: auto; }

/* Inhalt */
main { padding: 12px 14px 24px; display: grid; gap: 12px; }
.karte {
    background: var(--karte); border: 1px solid var(--rand);
    border-radius: 14px; padding: 14px;
}
.karte h2 { font-size: 13px; font-weight: 600; color: var(--neben);
    text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 8px; }
.gross { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gross.gut { color: var(--gut); }
.gross.warten { color: var(--bernstein); }
.zeile { display: flex; justify-content: space-between; padding: 5px 0;
    font-size: 15px; font-variant-numeric: tabular-nums; }
.zeile .n { color: var(--neben); }
.hinweis { font-size: 12.5px; color: var(--neben); margin-top: 6px; line-height: 1.45; }
.warnung { font-size: 13px; color: var(--handeln); margin-top: 6px; line-height: 1.45; }
.doppel { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .doppel { grid-template-columns: 1fr; } }

/* Login */
.login { max-width: 380px; margin: 12vh auto; padding: 0 20px; display: grid; gap: 12px; }
.login h1 { font-size: 24px; }
input, select {
    width: 100%; padding: 13px; border-radius: 10px;
    border: 1px solid var(--rand); background: var(--karte); color: var(--text);
    font-size: 16px;
}
button, .knopf {
    padding: 13px 18px; border-radius: 10px; border: 0;
    background: var(--akzent); color: #0c0f14; font-size: 16px; font-weight: 650;
    width: 100%; cursor: pointer;
}
button.neben { background: var(--karte); color: var(--text);
    border: 1px solid var(--rand); }
button.warn { background: var(--handeln); }
.fehler { color: var(--handeln); font-size: 14px; }
.ok { color: var(--gut); font-size: 14px; }

/* Reiterleiste unten */
nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    display: flex; background: rgba(12, 15, 20, 0.94);
    backdrop-filter: blur(14px); border-top: 1px solid var(--rand);
    padding-bottom: env(safe-area-inset-bottom); z-index: 10;
}
nav button {
    flex: 1; background: none; color: var(--neben); border: 0;
    padding: 12px 4px 10px; font-size: 11.5px; border-radius: 0;
    display: grid; gap: 3px; justify-items: center; font-weight: 500;
}
nav button.aktiv { color: var(--akzent); }
nav button .sym { font-size: 21px; line-height: 1; }

/* Board-Einbettung */
.board-rahmen { border: 1px solid var(--rand); border-radius: 14px;
    overflow: hidden; height: 72vh; background: #000; }
.board-rahmen iframe { width: 100%; height: 100%; border: 0; }
.seitenwahl { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.seitenwahl button { width: auto; white-space: nowrap; padding: 9px 14px;
    font-size: 14px; background: var(--karte); color: var(--text);
    border: 1px solid var(--rand); }
.seitenwahl button.aktiv { background: var(--akzent); color: #0c0f14; }

/* Min/Max-Liste */
.artikelzeile { display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--rand); font-size: 14.5px; }
.artikelzeile .name { flex: 1; min-width: 0; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; }
.artikelzeile .mm { color: var(--neben); font-variant-numeric: tabular-nums; }
.status { font-size: 12px; padding: 3px 9px; border-radius: 999px;
    background: var(--karte); border: 1px solid var(--rand); }
.status.fertig { color: var(--gut); }
.status.fehler { color: var(--handeln); }
.status.offen, .status.laeuft { color: var(--bernstein); }

dialog {
    background: #161b23; color: var(--text); border: 1px solid var(--rand);
    border-radius: 16px; padding: 18px; max-width: 420px; width: 92vw;
    margin: auto;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
