/* GastroComply – Basis-Styles */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  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;
}
:root {
  --bg: #F6F6F6;
  --card: #FFFFFF;
  --ink: #000000;
  --ink-2: #333333;
  --muted: #5E5E5E;
  --line: #E2E2E2;
  --line-2: #EEEEEE;
  --soft: #F3F3F3;
  --green: #0F6E61;
  --green-dark: #0B5A4F;
  --green-bg: #E3F1EE;
  --amber: #92400E;
  --amber-line: #E6A23C;
  --amber-bg: #FEF3C7;
  --red: #A61B1B;
  --red-dark: #7F1414;
  --red-line: #C0392B;
  --red-bg: #FDE8E6;
  --radius: 16px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11", "ss01";
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { min-height: 100vh; line-height: 1.4; }
a { color: var(--green-dark); }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; line-height: 1.15; }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .02em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopfzeile ---------- */
.top {
  background: #000; color: #fff;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 24px; min-height: 64px; position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.logo, .brand .logo {
  width: 34px; height: 34px; border-radius: 9px; background: #fff; color: #000;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.brand b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.brand span { display: block; font-size: 12px; color: #A6A6A6; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; flex-grow: 1; justify-content: center; }
.nav a {
  min-height: 40px; padding: 0 14px; border-radius: 999px; display: flex; align-items: center;
  text-decoration: none; color: #CFCFCF; font-weight: 500; font-size: 15px;
}
.nav a:hover { color: #fff; background: #1F1F1F; }
.nav a[aria-current="page"] { background: #fff; color: #000; }
.nav a:focus-visible { outline: 3px solid #7FB5AC; outline-offset: 2px; }
.who { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 17px; background: #2A2A2A; color: #fff;
  font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.who-name { font-weight: 600; font-size: 15px; color: #fff; }
.top .btn { background: transparent; color: #fff; border-color: #3A3A3A; }
.top .btn:hover { background: #1F1F1F; }
.top .btn-dark { background: #fff; color: #000; }

/* ---------- Seite ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 24px 20px 48px; display: flex; flex-direction: column; gap: 20px; }
.page-narrow { max-width: 620px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.card { background: var(--card); border-radius: var(--radius); padding: 22px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Buttons ---------- */
.btn {
  min-height: 52px; padding: 0 20px; border-radius: 10px; border: 1px solid #C9CFCC;
  background: var(--card); font-weight: 600; font-size: 16px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; color: var(--ink);
}
.btn:hover { background: var(--soft); }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.btn-primary:hover { background: var(--green-dark); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.btn-danger:hover { background: var(--red-dark); }
.btn-dark { background: #000; border-color: #000; color: #fff; }
.btn-dark:hover { background: #333; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-big { min-height: 64px; font-size: 19px; border-radius: 12px; width: 100%; }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 15px; border-radius: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: none; padding: 0; color: var(--green-dark); text-decoration: underline; cursor: pointer; font-size: 15px; min-height: 44px; }

/* ---------- Badges & Hinweise ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px; border-radius: 999px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.b-ok { background: var(--green-bg); color: var(--green-dark); }
.b-warn { background: var(--amber-bg); color: var(--amber); }
.b-err { background: var(--red); color: #fff; }
.b-neutral { background: #EEF0EE; color: var(--ink-2); }
.note { padding: 14px 16px; border-radius: 12px; font-size: 15px; font-weight: 600; }
.n-ok { background: var(--green-bg); color: var(--green-dark); }
.n-warn { background: var(--amber-bg); color: var(--amber); }
.n-err { background: var(--red-bg); color: var(--red-dark); }
.n-info { background: var(--soft); color: var(--ink-2); font-weight: 500; }

/* ---------- Formulare ---------- */
label.lbl { font-weight: 700; font-size: 16px; display: block; margin-bottom: 8px; }
.field { display: flex; flex-direction: column; }
.input {
  width: 100%; min-height: 54px; padding: 0 16px; border-radius: 12px;
  border: 1px solid #C9CFCC; background-color: var(--soft); font-size: 17px;
}
textarea.input { padding: 12px 16px; min-height: 90px; resize: vertical; }
.input:focus, .btn:focus-visible, .choice:focus-within, .key:focus-visible, .tile:focus-visible { outline: 3px solid #7FB5AC; outline-offset: 2px; }
.hint { font-size: 14px; color: var(--muted); margin-top: 6px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--green); margin-top: 1px; flex-shrink: 0; }

/* Auswahl-Kacheln (Radio) */
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .choices { grid-template-columns: minmax(0, 1fr); } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span.c {
  min-height: 76px; padding: 14px 16px; border-radius: 14px; border: 3px solid #E3E7E5; background: var(--soft);
  display: flex; flex-direction: column; justify-content: center; gap: 2px; cursor: pointer;
}
.choice span.c b { font-size: 17px; }
.choice span.c small { font-size: 14px; color: var(--muted); }
.choice input:checked + span.c { border-color: var(--green); background: var(--green-bg); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span {
  min-height: 48px; padding: 0 16px; border-radius: 14px; border: 2px solid #E3E7E5; background: var(--soft);
  display: flex; align-items: center; font-weight: 700; font-size: 15px; cursor: pointer;
}
.pill input:checked + span { border-color: var(--green); background: var(--green-bg); color: var(--green-dark); }
.pill input:focus-visible + span { outline: 3px solid #7FB5AC; outline-offset: 2px; }

/* ---------- Heute ---------- */
.progress { height: 12px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress > div { height: 100%; background: var(--green); }
.today { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.today-links { grid-template-columns: 420px minmax(0, 1fr); }
.today-breit { grid-template-columns: minmax(0, 1fr) 380px; }
@media (max-width: 960px) { .today, .today-links, .today-breit { grid-template-columns: minmax(0, 1fr); } }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tile {
  background: var(--card); border: 2px solid var(--card); border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); min-height: 150px;
}
.tile:hover { border-color: var(--line); }
.tile.t-warn { border-color: var(--amber-line); }
.tile.t-err { border-color: var(--red-line); }
.tile .t-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tile .t-name { font-size: 19px; font-weight: 700; margin-top: auto; }
.tile .t-sub { font-size: 14px; color: var(--muted); }
.icon-box { width: 48px; height: 48px; border-radius: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ib-ok { background: var(--green-bg); color: var(--green); }
.ib-warn { background: var(--amber-bg); color: var(--amber); }
.ib-err { background: var(--red-bg); color: var(--red); }
.ib-neutral { background: #EEF0EE; color: var(--ink); }
.slots { display: flex; gap: 6px; flex-wrap: wrap; }
.slot { font-size: 13px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: #EEF0EE; color: var(--ink-2); }
.slot.s-erledigt { background: var(--green-bg); color: var(--green-dark); }
.slot.s-faellig { background: var(--amber-bg); color: var(--amber); }
.slot.s-ueberfaellig { background: var(--red-bg); color: var(--red-dark); }
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.feed-item:last-child { border-bottom: none; }
.feed-time { width: 48px; flex-shrink: 0; font-size: 14px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.feed b { display: block; font-size: 15px; }
.alert-row {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 16px;
  background: var(--red-bg); border: 2px solid var(--red-line); color: var(--red-dark); text-decoration: none; flex-wrap: wrap;
}
.alert-row.amber { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber); }
.alert-row b { font-size: 17px; }
.alert-row .grow { flex-grow: 1; }

/* ---------- Messen (Handy zuerst) ---------- */
.measure { display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "top pad" "bottom pad"; gap: 20px 24px; align-items: start; }
.m-top { grid-area: top; } .m-pad { grid-area: pad; } .m-bottom { grid-area: bottom; }
@media (max-width: 760px) { .measure { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "pad" "bottom"; } }
.display {
  height: 116px; border-radius: 16px; background: var(--soft); border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
}
.display input {
  border: none; background: transparent; width: 100%; font-size: 64px; font-weight: 800;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums; padding: 0; min-width: 0;
}
.display input:focus { outline: none; }
.display:focus-within { border-color: var(--green); }
.display .unit { font-size: 30px; font-weight: 700; color: var(--muted); }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.key {
  min-height: 66px; border-radius: 14px; border: 1px solid var(--line); background: var(--soft);
  font-size: 28px; font-weight: 700; cursor: pointer; touch-action: manipulation;
}
.key:active { background: var(--line); }
.key-wide { grid-column: span 3; font-size: 17px; min-height: 52px; background: var(--card); }
.status-live { display: none; }
.status-live.on { display: block; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
table.t th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 12px 14px; background: var(--soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr.inaktiv td { color: var(--muted); }
.qr-mini { width: 56px; height: 56px; padding: 5px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.qr-mini svg, .qr-mini img { width: 100%; height: 100%; }

/* ---------- Außen (Login etc.) ---------- */
.outer { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 24px; }
.outer .card { width: 100%; max-width: 460px; padding: 28px; }
.outer .brand { justify-content: center; }
.foot { font-size: 13px; color: var(--muted); text-align: center; }
.foot a { color: var(--muted); }

/* PIN */
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 6px 0 4px; }
.pin-dots i { width: 18px; height: 18px; border-radius: 9px; border: 2px solid var(--ink); }
.pin-dots i.on { background: var(--ink); }

.flash { max-width: 1240px; margin: 16px auto 0; padding: 0 20px; }
select.input {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 48px; cursor: pointer; line-height: 1.2; color: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center; background-size: 16px 16px;
}
select.input::-ms-expand { display: none; }
select.input:invalid, select.input option[value=""] { color: #757575; }
select.input option { color: #000; }
details.mini > summary { list-style: none; display: inline-flex; }
details.mini > summary::-webkit-details-marker { display: none; }
details > summary { cursor: pointer; }

/* ---------- Anmeldung, Registrierung, PIN (geteilt) ---------- */
body.aussen { background: #fff; }
.split { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.split-side { background: #000; color: #fff; padding: 36px 48px; display: flex; flex-direction: column; justify-content: space-between; }
.split-logo, .split-logo-m { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; text-decoration: none; }
.split-logo { color: #fff; }
.split-logo .logo { width: 30px; height: 30px; border-radius: 8px; background: #fff; color: #000; }
.split-h { font-size: clamp(34px, 3.6vw, 52px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.04; }
.split-claim ul { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 14px; color: #CFCFCF; font-size: 17px; }
.split-claim li { padding-left: 30px; position: relative; }
.split-claim li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 9px; background: #0F6E61; }
.split-claim li::after { content: ""; position: absolute; left: 6px; top: 7px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.split-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; gap: 28px; }
.split-logo-m { display: none; color: #000; }
.split-logo-m .logo { width: 30px; height: 30px; border-radius: 8px; background: #000; color: #fff; }
.split-form { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 16px; }
.aussen .split-form > .card { background: transparent; padding: 0; border-radius: 0; }
.aussen .split-form h1 { font-size: 34px; letter-spacing: -0.03em; }
.aussen .input { background-color: #F3F3F3; border-color: transparent; }
.aussen .input:focus { background-color: #fff; border-color: #000; outline: none; box-shadow: 0 0 0 1px #000; }
.aussen .btn-primary { background: #000; border-color: #000; }
.aussen .btn-primary:hover { background: #333; }
.aussen .key[type="submit"] { background: #000 !important; border-color: #000 !important; }
.aussen .page { padding: 0; }
@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split-side { display: none; }
  .split-logo-m { display: inline-flex; }
  .split-main { justify-content: flex-start; padding-top: 28px; }
}

/* ---------- Kopfzeile am Handy: eine Zeile Marke + Konto, darunter wischbares Menü ---------- */
@media (max-width: 900px) {
  .top { padding: 8px 14px 0; gap: 0 10px; }
  .top .brand { flex-grow: 1; order: 1; min-height: 52px; }
  .top .who { order: 2; }
  .top .who-name { display: none; }
  .top .nav {
    order: 3; width: calc(100% + 28px); margin: 0 -14px; padding: 6px 14px 10px; justify-content: flex-start;
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .top .nav::-webkit-scrollbar { display: none; }
  .top .nav a { white-space: nowrap; min-height: 38px; padding: 0 13px; font-size: 15px; }
  .top .btn-sm { min-height: 40px; padding: 0 12px; font-size: 14px; }
  .page { padding: 18px 14px 40px; }
  h1 { font-size: 26px; }
}
.who-link { color: #CFCFCF; font-size: 14px; text-decoration: none; padding: 8px 6px; }
.who-link:hover, .who-link[aria-current="page"] { color: #fff; text-decoration: underline; }
.standort-wahl select {
  -webkit-appearance: none; appearance: none; min-height: 40px; max-width: 220px; padding: 0 36px 0 14px; border-radius: 999px;
  border: 1px solid #3A3A3A; background-color: #1A1A1A; color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.standort-wahl select:focus-visible { outline: 3px solid #7FB5AC; outline-offset: 2px; }
@media (max-width: 900px) { .standort-wahl { order: 2; } .standort-wahl select { max-width: 160px; } }

/* Ordner-Übersicht */
.ordner-karte { gap: 18px; }
.haken { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.haken li { position: relative; padding-left: 26px; }
.haken li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }
.input.input-err { border-color: var(--red); box-shadow: 0 0 0 3px rgba(225, 25, 0, .12); }
.ordner-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ordner-tabs a { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: inherit; font-weight: 600; background: #fff; }
.ordner-tabs a[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Maßnahmenplan */
.mp-zeile { padding: 18px 22px; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 90px; }
.mp-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted, #5E5E5E); }
.register-nr { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 26px; border-radius: 7px; background: var(--ink, #000); color: #fff; font-size: 13px; font-weight: 700; margin-right: 8px; vertical-align: 2px; }
.gut-zu-wissen { font-size: 14px; background: #F4FAF9; border-left: 3px solid var(--green); padding: 8px 12px; border-radius: 0 8px 8px 0; color: #24433F; }
