/* FF-Getränkeliste – © ff144 */
:root {
  --rot: #b3121f; --rot-2: #d42a35; --rot-weich: #fde8e9;
  --bg: #f4f2ef; --flaeche: #ffffff; --flaeche-2: #f8f6f3; --rand: #e3ded8;
  --text: #1d1b19; --text-2: #6a645e;
  --gruen: #19794a; --gruen-weich: #e3f4ea; --gelb: #9a6700; --gelb-weich: #fff4d6;
  --schatten: 0 1px 2px rgba(0,0,0,.05), 0 4px 14px rgba(0,0,0,.05);
  --radius: 14px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --rot: #e0434d; --rot-2: #f0646c; --rot-weich: #3a1c1f;
  --bg: #141312; --flaeche: #1e1c1b; --flaeche-2: #262321; --rand: #36322f;
  --text: #f1ede9; --text-2: #a59d95;
  --gruen: #4cc386; --gruen-weich: #183224; --gelb: #e7b84a; --gelb-weich: #33290f;
  --schatten: 0 1px 2px rgba(0,0,0,.4);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --rot: #e0434d; --rot-2: #f0646c; --rot-weich: #3a1c1f;
    --bg: #141312; --flaeche: #1e1c1b; --flaeche-2: #262321; --rand: #36322f;
    --text: #f1ede9; --text-2: #a59d95;
    --gruen: #4cc386; --gruen-weich: #183224; --gelb: #e7b84a; --gelb-weich: #33290f;
    --schatten: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--rot); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
small, .muted { color: var(--text-2); }

/* Kopfzeile */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--rot); color: #fff;
  border-bottom: 3px solid #7d0b14;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand img { background: #fff; border-radius: 9px; padding: 3px; flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand strong { font-size: 1.02rem; letter-spacing: .01em; }
.brand small { color: rgba(255,255,255,.82); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,.14); color: #fff; border: 0; font-size: 1.15rem; cursor: pointer; list-style: none;
}
.icon-btn::-webkit-details-marker { display: none; }
.menu { position: relative; }
.menu nav {
  position: absolute; right: 0; top: 48px; width: 230px; max-height: 80vh; overflow: auto;
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.2);
  padding: 6px;
}
.menu nav a, .menu .linklike { display: block; padding: 10px 12px; border-radius: 9px; color: var(--text); text-decoration: none; width: 100%; text-align: left; font: inherit; }
.menu nav a.active, .menu nav a:hover, .menu .linklike:hover { background: var(--rot-weich); color: var(--rot); }
.menu-user { padding: 8px 12px 10px; border-bottom: 1px solid var(--rand); margin-bottom: 4px; font-weight: 600; display: flex; flex-direction: column; }
.menu-user small { font-weight: 400; }
.linklike { background: none; border: 0; cursor: pointer; }

/* Seitennavigation (breite Bildschirme) */
.sidenav { display: none; }
@media (min-width: 1000px) {
  .menu { display: none; }
  .sidenav {
    display: flex; flex-direction: column; gap: 2px; position: fixed; top: 67px; left: 0; bottom: 0; width: 210px;
    padding: 14px 10px; background: var(--flaeche); border-right: 1px solid var(--rand); overflow: auto;
  }
  .sidenav a { padding: 9px 12px; border-radius: 9px; color: var(--text); text-decoration: none; }
  .sidenav a:hover { background: var(--flaeche-2); }
  .sidenav a.active { background: var(--rot-weich); color: var(--rot); font-weight: 600; }
  main.with-nav { margin-left: 210px; }
}

main { padding: 16px; max-width: 1180px; }
main.with-nav { margin-right: auto; }
@media (min-width: 1000px) { main { padding: 24px 28px; } }
.footer { margin: 32px 0 8px; text-align: center; font-size: .82rem; color: var(--text-2); }

/* Karten & Raster */
.card {
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px; box-shadow: var(--schatten);
}
.card > :last-child { margin-bottom: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: 14px; }
.kpi small { display: block; font-size: .8rem; }
.kpi strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }

/* Kontostand groß */
.konto-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.konto-hero .saldo { font-size: 2.1rem; font-weight: 700; }
.saldo { font-variant-numeric: tabular-nums; white-space: nowrap; }
.saldo.neg { color: var(--rot); } .saldo.pos { color: var(--gruen); } .saldo.zero { color: var(--text-2); }

/* Formulare */
label { display: block; font-size: .88rem; font-weight: 600; margin: 0 0 4px; }
.feld { margin-bottom: 12px; }
.feld small { font-weight: 400; display: block; margin-top: 3px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=search], input[type=month], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--rand); border-radius: 10px;
  background: var(--flaeche-2); color: var(--text); font: inherit; min-height: 44px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--rot); outline-offset: 1px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.check input { width: 20px; height: 20px; accent-color: var(--rot); }
.form-row { display: grid; gap: 12px; }
@media (min-width: 600px) { .form-row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.form-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.form-inline .feld { margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; min-height: 44px; border-radius: 10px; border: 1px solid transparent;
  background: var(--rot); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--rot-2); }
.btn-2 { background: var(--flaeche-2); color: var(--text); border-color: var(--rand); }
.btn-2:hover { background: var(--rand); }
.btn-gruen { background: var(--gruen); }
.btn-klein { padding: 5px 10px; min-height: 34px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-gefahr { background: transparent; color: var(--rot); border-color: var(--rot); }
.btn-gefahr:hover { background: var(--rot-weich); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Tabellen */
.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { padding: 9px 8px; border-bottom: 1px solid var(--rand); text-align: left; vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.storno td { text-decoration: line-through; color: var(--text-2); }
tr.storno td.keep { text-decoration: none; }
tr.inaktiv td { color: var(--text-2); }
tfoot td { font-weight: 700; border-bottom: 0; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .75rem; font-weight: 600; background: var(--flaeche-2); border: 1px solid var(--rand); color: var(--text-2); white-space: nowrap; }
.tag-rot { background: var(--rot-weich); color: var(--rot); border-color: transparent; }
.tag-gruen { background: var(--gruen-weich); color: var(--gruen); border-color: transparent; }
.tag-gelb { background: var(--gelb-weich); color: var(--gelb); border-color: transparent; }

.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; border: 1px solid transparent; }
.flash-ok { background: var(--gruen-weich); color: var(--gruen); }
.flash-fehler { background: var(--rot-weich); color: var(--rot); }
.flash-info { background: var(--gelb-weich); color: var(--gelb); }
.banner { background: var(--gelb-weich); color: var(--gelb); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-weight: 600; }

/* Getränke-Kacheln */
.drinks { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.drink {
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 92px; text-align: left;
  padding: 12px; border-radius: 12px; border: 1px solid var(--rand); background: var(--flaeche-2);
  color: var(--text); font: inherit; cursor: pointer; transition: transform .06s;
}
.drink:hover { border-color: var(--rot); }
.drink:active { transform: scale(.97); }
.drink b { font-size: 1.02rem; line-height: 1.2; }
.drink span { color: var(--rot); font-weight: 700; font-variant-numeric: tabular-nums; }
.drink small { font-size: .74rem; }
.drink[disabled] { opacity: .45; cursor: not-allowed; }

.kat-titel { margin: 18px 0 8px; font-size: .9rem; font-weight: 700; color: var(--text-2); display: flex; align-items: center; gap: 10px; }
.kat-titel::after { content: ""; flex: 1; border-top: 1px solid var(--rand); }
.menge + .kat-titel { margin-top: 4px; }
body.kiosk .kat-titel { font-size: .95rem; }
.kat-liste { display: grid; gap: 6px; }
.kat-zeile { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--rand); border-radius: 10px; background: var(--flaeche-2); }
.kat-zeile .nr { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--rot-weich); color: var(--rot); font-weight: 700; font-size: .85rem; flex: none; }
.kat-zeile strong { flex: 1; }
.kat-zeile button { width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--rand); background: var(--flaeche); color: var(--text); font-size: 1.1rem; cursor: pointer; }
.kat-zeile button:disabled { opacity: .3; cursor: default; }
.menge { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.menge button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text); font-size: 1.4rem; cursor: pointer; }
.menge output { font-size: 1.4rem; font-weight: 700; min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }

/* Tresen */
body.kiosk main { max-width: none; }
.personen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.person > span:last-child { min-width: 0; overflow: hidden; }
.person > span:last-child, .person > span:last-child small { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.person > span:last-child br { display: none; }
@media (min-width: 700px) {
  .personen .person { min-height: 76px; padding: 14px 18px; font-size: 1.15rem; gap: 14px; }
  .personen .avatar { width: 48px; height: 48px; font-size: 1rem; }
}
.person {
  display: flex; align-items: center; gap: 10px; padding: 12px; min-height: 64px; border-radius: 12px;
  background: var(--flaeche); border: 1px solid var(--rand); color: var(--text); text-decoration: none; font-weight: 600;
}
.person:hover { border-color: var(--rot); }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--rot-weich); color: var(--rot); font-weight: 700; font-size: .9rem; }
.person.bar { background: var(--gelb-weich); border-color: transparent; }
.person.bar .avatar { background: var(--gelb); color: #fff; }
.person.sammel { border-color: var(--gelb); }
.person.sammel .avatar { background: var(--gelb-weich); color: var(--gelb); }
.person.gast .avatar { background: var(--flaeche-2); color: var(--text-2); }
.tresen-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tresen-kopf h1 { margin: 0; }
.ok-gross { text-align: center; padding: 30px 16px; }
.ok-gross .haken { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--gruen-weich); color: var(--gruen); font-size: 2.4rem; font-weight: 700; }
.ok-gross .kassieren { font-size: 1.6rem; font-weight: 700; color: var(--gelb); }
.pin-feld { font-size: 2rem !important; letter-spacing: .5em; text-align: center; max-width: 260px; margin: 0 auto; display: block; }
.ziffern { display: grid; grid-template-columns: repeat(3, 76px); gap: 10px; justify-content: center; margin: 16px 0; }
.ziffern button { height: 64px; border-radius: 12px; border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text); font-size: 1.5rem; font-weight: 600; cursor: pointer; }

.link-zeile { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--rand); }
.link-zeile:last-child { border-bottom: 0; }
.link-zeile input { font-size: .82rem; min-height: 38px; }
.kopplung { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kopplung > div { background: var(--flaeche-2); border: 1px dashed var(--rand); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.kopplung strong { white-space: nowrap; font-size: clamp(1.15rem, 5vw, 1.6rem); letter-spacing: .06em; font-variant-numeric: tabular-nums; line-height: 1.3; }
.kopplung small { font-size: .78rem; }
body.kiosk { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.kiosk input { -webkit-user-select: text; user-select: text; }
.tablet-zeile { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--rand); }
.tablet-zeile:last-of-type { border-bottom: 0; }
.tablet-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.testbanner {
  margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; font-weight: 500; color: #3d2c00;
  background: repeating-linear-gradient(-45deg, #ffd23f, #ffd23f 14px, #ffe27a 14px, #ffe27a 28px);
}
.testbanner a { color: #3d2c00; font-weight: 700; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--rot); color: #fff; font-size: .72rem; font-weight: 700; vertical-align: middle; }
.icon-btn { position: relative; }
.punkt { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: #ffd23f; box-shadow: 0 0 0 2px var(--rot); }
.banner-link { display: block; text-decoration: none; background: var(--rot-weich); color: var(--rot); }
.anfragen { border-color: var(--rot); }
.anfrage-zeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--rand); }
.konto-fehlt { display: block; margin: 4px auto 0; max-width: 520px; text-align: center; padding: 16px; border-radius: 12px; border: 2px dashed var(--rand); color: var(--text-2); text-decoration: none; font-size: 1.05rem; }
.konto-fehlt strong { color: var(--rot); }
.konto-fehlt:hover { border-color: var(--rot); }
.rechtstext h2 { margin-top: 22px; font-size: 1.05rem; }
.rechtstext p, .rechtstext li { color: var(--text); }
.leer { color: var(--text-2); text-align: center; padding: 18px 8px; }
.trenner { border: 0; border-top: 1px solid var(--rand); margin: 16px 0; }
pre.auszug { white-space: pre-wrap; background: var(--flaeche-2); border: 1px solid var(--rand); border-radius: 10px; padding: 14px; font-size: .85rem; overflow-x: auto; }
.login-box { max-width: 400px; margin: 6vh auto 0; }
.changelog li { margin-bottom: 4px; }
@media print {
  .topbar, .sidenav, .footer, .no-print, button, .btn { display: none !important; }
  main.with-nav { margin: 0; } .card { box-shadow: none; border: 0; }
}
/* Schmale Handys: Kürzel ausblenden, damit der Name Platz hat */
@media (max-width: 520px) {
  .personen { gap: 8px; }
  .personen .person { padding: 10px 12px; min-height: 56px; }
  .personen .avatar { display: none; }
  .person > span:last-child { white-space: normal; font-size: .95rem; line-height: 1.25; }
}
