/* Adminbereich — Dashboard-Layout mit Seitenleiste.
   Funktional identisch zur Admin-Seite der iOS-App, aber fuer Maus und
   groessere Bildschirme gebaut: der Wirt sitzt am Tresen-Tablet oder Laptop. */

:root {
  --rot: #C71C22; --rot-d: color-mix(in srgb, var(--rot) 79%, #000);
  --rot-hauch: color-mix(in srgb, var(--rot) 10%, transparent);
  --bg: #F6F5F3; --karte: #FFFFFF; --tinte: #16130F; --grau: #6B6B72;
  --linie: #E6E4E0; --creme: #F7F2E9;
  --neu: #0A84FF; --arbeit: #E08A2E; --bereit: #1E7A46; --fertig: #8A8A8E;
  --schatten: 0 1px 2px rgba(20,18,15,.05), 0 6px 18px rgba(20,18,15,.06);
  --seite: 236px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--tinte);
       font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
       font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1,h2,h3,h4 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--rot); outline-offset: 2px; border-radius: 4px; }

/* --- Rahmen --- */
.rahmen { display: flex; min-height: 100vh; }

.seitenleiste {
  width: var(--seite); flex-shrink: 0; background: var(--karte);
  border-right: 1px solid var(--linie); padding: 22px 14px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.seitenleiste .marke { display: flex; align-items: center; gap: 9px; font-weight: 800;
                       font-size: 17px; padding: 0 10px 20px; letter-spacing: -0.03em; }
.seitenleiste .marke .punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--rot); }
.snav { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 10px;
        font-size: 15px; font-weight: 500; color: var(--grau); transition: background .16s, color .16s; }
.snav:hover { background: var(--bg); color: var(--tinte); }
.snav.an { background: var(--rot-hauch); color: var(--rot); font-weight: 600; }
.snav .ic { font-size: 17px; width: 22px; text-align: center; }
.snav .zahl { margin-left: auto; background: var(--rot); color: #fff; font-size: 12px;
              font-weight: 700; min-width: 21px; height: 21px; border-radius: 99px;
              display: grid; place-items: center; padding: 0 6px; }
.seitenleiste .unten { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--linie); }
.seitenleiste .konto { padding: 10px 12px; font-size: 13px; color: var(--grau); }
.seitenleiste .konto b { display: block; color: var(--tinte); font-size: 14px; font-weight: 600;
                         overflow: hidden; text-overflow: ellipsis; }

.inhalt { flex: 1; min-width: 0; padding: 26px 30px 60px; }
.inhalt-kopf { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.inhalt-kopf h1 { font-size: 27px; font-weight: 700; }
.inhalt-kopf .rechts { margin-left: auto; display: flex; gap: 9px; align-items: center; }

/* --- Bausteine --- */
.knopf { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 9px;
         font-size: 14.5px; font-weight: 600; transition: all .16s; white-space: nowrap; }
.knopf.voll { background: var(--rot); color: #fff; }
.knopf.voll:hover { background: var(--rot-d); }
.knopf.rand { border: 1.5px solid var(--linie); background: var(--karte); }
.knopf.rand:hover { border-color: var(--rot); color: var(--rot); }
.knopf.klein { padding: 7px 12px; font-size: 13.5px; }
.knopf[disabled] { opacity: .5; cursor: not-allowed; }

.tafel { background: var(--karte); border: 1px solid var(--linie); border-radius: 14px;
         box-shadow: var(--schatten); overflow: hidden; }
.tafel-kopf { padding: 16px 20px; border-bottom: 1px solid var(--linie); display: flex;
              align-items: center; gap: 12px; }
.tafel-kopf h2 { font-size: 16.5px; font-weight: 700; }
.tafel-kopf .rechts { margin-left: auto; display: flex; gap: 8px; }

.reiter { display: flex; gap: 6px; background: var(--karte); border: 1px solid var(--linie);
          border-radius: 11px; padding: 4px; margin-bottom: 20px; width: fit-content; max-width: 100%;
          overflow-x: auto; }
.reiter button { padding: 8px 16px; border-radius: 8px; font-size: 14.5px; font-weight: 500;
                 white-space: nowrap; transition: all .16s; }
.reiter button.an { background: var(--tinte); color: #fff; font-weight: 600; }

/* --- Bestellungen als Spalten --- */
.spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; align-items: start; }
.spalte-kopf { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; padding: 0 3px; }
.spalte-kopf .punkt { width: 9px; height: 9px; border-radius: 50%; }
.spalte-kopf h3 { font-size: 14.5px; font-weight: 700; }
.spalte-kopf .n { margin-left: auto; background: var(--karte); border: 1px solid var(--linie);
                  font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; }

.bestellung { background: var(--karte); border: 1px solid var(--linie); border-radius: 12px;
              padding: 15px 16px; margin-bottom: 11px; cursor: pointer;
              transition: box-shadow .2s, transform .15s, border-color .2s; position: relative; }
.bestellung:hover { box-shadow: var(--schatten); transform: translateY(-1px); border-color: transparent; }
.bestellung .oben { display: flex; align-items: baseline; gap: 9px; }
.bestellung .nr { font-weight: 700; font-size: 15.5px; }
.bestellung .uhr { margin-left: auto; font-size: 13px; color: var(--grau); }
.bestellung .art { font-size: 13.5px; color: var(--grau); margin-top: 5px; }
.bestellung .unten { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.bestellung .betrag { font-weight: 700; font-size: 16px; }
.marker { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.neu-punkt { position: absolute; top: 14px; right: 14px; width: 8px; height: 8px;
             border-radius: 50%; background: var(--neu); }

/* --- Tabelle (Speisekarte) --- */
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--grau);
              text-transform: uppercase; letter-spacing: .05em; padding: 12px 16px;
              border-bottom: 1px solid var(--linie); }
.tabelle td { padding: 13px 16px; border-bottom: 1px solid var(--linie); font-size: 14.5px; vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle tr:hover td { background: #FAFAF8; }
.tabelle .emoji { font-size: 22px; }
.tabelle .name { font-weight: 600; }
.tabelle .beschr { font-size: 13px; color: var(--grau); margin-top: 2px; }
.tabelle .rechts { text-align: right; }
.tabelle .aus td { opacity: .45; }

.schalter { width: 44px; height: 26px; border-radius: 99px; background: #DCDAD6; position: relative;
            transition: background .22s; cursor: pointer; flex-shrink: 0; display: inline-block; }
.schalter::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px;
                   border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2);
                   transition: transform .22s cubic-bezier(.3,1.3,.5,1); }
.schalter.an { background: var(--rot); }
.schalter.an::after { transform: translateX(18px); }

/* --- Kennzahlen --- */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 22px; }
.kachel { background: var(--karte); border: 1px solid var(--linie); border-radius: 14px;
          padding: 20px; box-shadow: var(--schatten); }
.kachel .lbl { font-size: 13.5px; color: var(--grau); font-weight: 500; }
.kachel .wert { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin-top: 6px; }
.kachel .zusatz { font-size: 13px; color: var(--grau); margin-top: 4px; }

.diagramm { display: flex; align-items: flex-end; gap: 7px; height: 190px; padding: 20px 20px 0; }
.diagramm .saeule { flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
                    height: 100%; position: relative; }
.diagramm .balken { border-radius: 5px 5px 0 0; background: linear-gradient(180deg, var(--rot), var(--rot-d));
                    min-height: 3px; transition: height .5s cubic-bezier(.16,1,.3,1); }
.diagramm-achse { display: flex; gap: 7px; padding: 8px 20px 18px; }
.diagramm-achse span { flex: 1; text-align: center; font-size: 11.5px; color: var(--grau); }

/* --- Formular --- */
.feld-gruppe { margin-bottom: 16px; }
.feld-gruppe label { display: block; font-size: 13px; font-weight: 600; color: var(--grau); margin-bottom: 6px; }
.eingabe { width: 100%; padding: 11px 13px; border: 1.5px solid var(--linie); border-radius: 9px;
           background: var(--karte); font-size: 14.5px; transition: border-color .16s; }
.eingabe:focus { outline: none; border-color: var(--rot); }
textarea.eingabe { resize: vertical; min-height: 76px; }
.reihe { display: flex; gap: 11px; }
.reihe > * { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { padding: 8px 13px; border: 1.5px solid var(--linie); border-radius: 8px;
                background: var(--karte); font-size: 13.5px; transition: all .16s; }
.chips button.an { background: var(--rot); color: #fff; border-color: var(--rot); font-weight: 600; }

/* --- Modal --- */
.schleier { position: fixed; inset: 0; background: rgba(20,18,15,.4); z-index: 90; opacity: 0;
            pointer-events: none; transition: opacity .25s; }
.schleier.an { opacity: 1; pointer-events: auto; }
.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%,-46%) scale(.98);
         width: min(560px, calc(100vw - 32px)); max-height: 88vh; z-index: 95; background: var(--bg);
         border-radius: 16px; box-shadow: 0 20px 60px rgba(20,18,15,.22); display: flex;
         flex-direction: column; opacity: 0; pointer-events: none; overflow: hidden;
         transition: opacity .22s, transform .22s; }
.modal.an { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }
.modal-kopf { display: flex; align-items: center; gap: 12px; padding: 18px 22px;
              border-bottom: 1px solid var(--linie); background: var(--karte); }
.modal-kopf h2 { font-size: 18px; font-weight: 700; flex: 1; }
.modal-kopf .zu { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
                  color: var(--grau); font-size: 18px; }
.modal-kopf .zu:hover { background: var(--bg); }
.modal-koerper { overflow-y: auto; padding: 22px; }
.modal-fuss { border-top: 1px solid var(--linie); padding: 15px 22px; background: var(--karte);
              display: flex; gap: 10px; }

.status-band { display: flex; align-items: center; gap: 11px; padding: 15px 18px; border-radius: 12px;
               margin-bottom: 20px; font-weight: 600; }
.status-band.offen { background: #E8F5EC; color: #145C34; }
.status-band.zu { background: #FDF0EF; color: #8E2018; }

.zeit-zeile { display: flex; align-items: center; gap: 12px; padding: 12px 16px;
              border-bottom: 1px solid var(--linie); flex-wrap: wrap; }
.zeit-zeile:last-child { border-bottom: 0; }
.zeit-zeile .tag { font-weight: 600; min-width: 106px; }
.zeit-zeile input[type=time] { padding: 7px 10px; border: 1.5px solid var(--linie);
                               border-radius: 8px; background: var(--karte); font-size: 14px; }

.meldung { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
           background: var(--tinte); color: #fff; padding: 13px 22px; border-radius: 99px;
           font-size: 14.5px; font-weight: 600; z-index: 120; opacity: 0; pointer-events: none;
           transition: opacity .25s, transform .25s; box-shadow: 0 8px 26px rgba(0,0,0,.2); }
.meldung.an { opacity: 1; transform: translate(-50%, 0); }

.leer-box { text-align: center; padding: 46px 24px; color: var(--grau); line-height: 1.6; }
.laden-box { text-align: center; padding: 70px 20px; color: var(--grau); }

/* --- Anmeldung --- */
.login-seite { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-box { width: 100%; max-width: 390px; background: var(--karte); border: 1px solid var(--linie);
             border-radius: 16px; padding: 32px; box-shadow: var(--schatten); }
.login-box h1 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.login-box .sub { color: var(--grau); font-size: 14.5px; margin-bottom: 24px; }
.warnung { background: #FDF0EF; border: 1px solid #F6D5D2; color: #8E2018; border-radius: 9px;
           padding: 12px 14px; font-size: 13.5px; margin-bottom: 16px; line-height: 1.45; }

/* --- Mobil --- */
.mob-kopf { display: none; }
@media (max-width: 900px) {
  .rahmen { flex-direction: column; }
  .seitenleiste { position: fixed; top: 0; left: 0; bottom: 0; z-index: 80; height: 100vh;
                  transform: translateX(-102%); transition: transform .3s cubic-bezier(.32,.72,0,1);
                  box-shadow: 6px 0 30px rgba(0,0,0,.14); }
  .seitenleiste.offen { transform: translateX(0); }
  .mob-kopf { display: flex; align-items: center; gap: 12px; padding: 12px 16px;
              background: var(--karte); border-bottom: 1px solid var(--linie);
              position: sticky; top: 0; z-index: 70; }
  .mob-kopf .marke { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; }
  .mob-kopf .marke .punkt { width: 7px; height: 7px; border-radius: 50%; background: var(--rot); }
  .mob-burger { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; font-size: 19px; }
  .inhalt { padding: 20px 16px 50px; }
  .inhalt-kopf h1 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
