/* Verwaltungsoberflaeche - Hausfarbe Tuerkis, Aufbau wie die uebrigen
   BS-Werkzeuge (gleiche Leiste, gleiche Karten). */

:root {
    --haus: #007b85;
    --haus-hell: #00919d;
    --haus-dunkel: #00626a;
    --grund: #f4f6f7;
    --karte: #ffffff;
    --linie: #dde3e5;
    --schrift: #1d2528;
    --gedaempft: #61717a;
    --gut: #2f7d32;
    --warnung: #a8560c;
    --schlecht: #b3261e;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--grund);
    color: var(--schrift);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

/* ------------------------------------------------------------- Kopfleiste - */

.leiste {
    background: linear-gradient(135deg, var(--haus-hell), var(--haus-dunkel));
    color: #fff;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px 20px;
    flex-wrap: wrap;
}

.marke {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    text-decoration: none;
    font-size: 1.02rem;
}

.marke strong { font-weight: 700; }

.wege { display: flex; gap: 16px; flex: 1; }

.wege a {
    color: #fff;
    text-decoration: none;
    opacity: .88;
    padding: 3px 2px;
    border-bottom: 2px solid transparent;
}

.wege a:hover { opacity: 1; border-bottom-color: rgba(255, 255, 255, .6); }

.abmelden { display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.abmelden span { opacity: .85; }

.abmelden button {
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .35);
    color: #fff;
    border-radius: 6px;
    padding: 5px 11px;
    cursor: pointer;
    font: inherit;
}

/* ------------------------------------------------------------------ Inhalt - */

main { max-width: 1080px; margin: 0 auto; padding: 22px 20px 40px; }

h1 { font-size: 1.3rem; margin: 0 0 18px; }
h2 { font-size: 1.02rem; margin: 0 0 12px; }

.karte {
    background: var(--karte);
    border: 1px solid var(--linie);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

table { width: 100%; border-collapse: collapse; }

th, td {
    text-align: left;
    padding: 8px 12px 8px 0;
    border-bottom: 1px solid var(--linie);
    vertical-align: top;
}

th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gedaempft); }

td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; padding-right: 0; }

tr:last-child td { border-bottom: none; }

/* --------------------------------------------------------------- Bedienung - */

label { display: block; font-size: .82rem; color: var(--gedaempft); margin: 12px 0 4px; }

input[type=text], input[type=password], input[type=number], input[type=time], textarea, select {
    font: inherit;
    width: 100%;
    max-width: 460px;
    padding: 9px 11px;
    border: 1px solid var(--linie);
    border-radius: 7px;
    background: #fff;
    color: var(--schrift);
}

input:focus, textarea:focus, select:focus { outline: 2px solid var(--haus-hell); outline-offset: 1px; }

.reihe { display: flex; gap: 18px; flex-wrap: wrap; }
.reihe > div { flex: 1 1 220px; }

.schalter { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.schalter input { width: auto; }
.schalter label { margin: 0; color: var(--schrift); font-size: .92rem; }

button, .knopf {
    font: inherit;
    border: 1px solid var(--linie);
    background: #fff;
    color: var(--schrift);
    border-radius: 7px;
    padding: 8px 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

button.haupt, .knopf.haupt { background: var(--haus); border-color: var(--haus); color: #fff; }
button.gefahr { border-color: #e3b4b0; color: var(--schlecht); }

.knopfreihe { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ------------------------------------------------------------- Meldungen -- */

.meldung { border-radius: 8px; padding: 10px 13px; font-size: .88rem; margin-bottom: 16px; }
.meldung.gut { background: #e7f3e8; border: 1px solid #b9dcbb; color: #1e5720; }
.meldung.schlecht { background: #fdecea; border: 1px solid #f5c6c2; color: #8c1d18; }
.meldung.hinweis { background: #e8f2f3; border: 1px solid #bcd9dc; color: var(--haus-dunkel); }

.abzeichen {
    display: inline-block;
    border-radius: 5px;
    padding: 1px 8px;
    font-size: .76rem;
    font-weight: 600;
    white-space: nowrap;
}

.abzeichen.gut { background: #e7f3e8; color: var(--gut); }
.abzeichen.warnung { background: #fbeee0; color: var(--warnung); }
.abzeichen.schlecht { background: #fdecea; color: var(--schlecht); }
.abzeichen.ruhig { background: #eceff0; color: var(--gedaempft); }

.gedaempft { color: var(--gedaempft); font-size: .85rem; }

.zugang {
    font-family: ui-monospace, Consolas, "Courier New", monospace;
    background: #eef2f3;
    border: 1px solid var(--linie);
    border-radius: 6px;
    padding: 9px 11px;
    word-break: break-all;
    font-size: .85rem;
    margin: 6px 0;
}

.pin {
    font-family: ui-monospace, Consolas, "Courier New", monospace;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .18em;
    color: var(--haus-dunkel);
}

footer {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px 30px;
    color: var(--gedaempft);
    font-size: .78rem;
}

/* --------------------------------------------------------------- Handy --- */
/* Die Verwaltung wird am Schreibtisch bedient, aber unterwegs auch mal am
   Telefon nachgesehen. Unter 760 px werden aus den Tabellenzeilen Karten. */

@media (max-width: 760px) {
    .leiste { gap: 12px; padding: 10px 14px; }
    .wege { order: 3; width: 100%; gap: 18px; }
    .abmelden { margin-left: auto; }

    main { padding: 16px 14px 32px; }
    h1 { font-size: 1.15rem; }

    .karte { padding: 14px; border-radius: 12px; }

    .reihe { flex-direction: column; gap: 4px; }
    .reihe > div { flex: none; }

    input[type=text], input[type=password], input[type=number], input[type=time],
    textarea, select {
        max-width: none;
        /* 16 px verhindert, dass iOS beim Antippen hineinzoomt. */
        font-size: 16px;
        min-height: 46px;
    }

    button, .knopf { min-height: 46px; }
    .knopfreihe button, .knopfreihe .knopf { flex: 1 1 auto; text-align: center; }

    table, thead, tbody, tr, th, td { display: block; }

    thead { display: none; }

    tr {
        border: 1px solid var(--linie);
        border-radius: 10px;
        padding: 10px 12px;
        margin-bottom: 10px;
    }

    tr:last-child td { border-bottom: none; }

    td {
        border-bottom: 1px solid var(--linie);
        padding: 7px 0;
        text-align: left;
    }

    td:last-child { border-bottom: none; }
    td.zahl, th.zahl { text-align: left; }

    /* Leere Zellen (etwa die Spalte der Schaltflaechen) nicht als Luecke zeigen. */
    td:empty { display: none; }
}

/* --------------------------------------------------------------- Anmelden - */

.anmeldekarte { max-width: 380px; margin: 8vh auto 0; }
.anmeldekarte input { max-width: none; }
.anmeldekarte button { width: 100%; margin-top: 18px; }

/* ------------------------------------------------------------- QR-Code --- */
/* Der Weg um die Messenger herum: die Kamera des Telefons gibt den Code an
   den richtigen Browser weiter, statt ihn im eingebauten zu oeffnen. */

.qr {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 12px 0 4px;
  padding: 14px;
  border: 1px solid var(--linie);
  border-radius: 12px;
  background: #fff;
}

.qr img {
  flex: 0 0 auto;
  width: 180px;
  height: 180px;
  image-rendering: pixelated;   /* scharfe Kanten statt weichgezeichneter */
}

.qr p { margin: 0; }

@media (max-width: 620px) {
  .qr { flex-direction: column; align-items: center; text-align: center; }
}
