/* Local Inter (variable) – no Google Fonts CDN */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  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;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  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;
}

/* die.smideks booking – aligned with www.die-smideks.at */
:root {
  --black: #090a0b;
  --ink: #17191c;
  --white: #fff;
  --off: #f5f5f2;
  --cream: #f4f1eb;
  --grey: #73777f;
  --line: #d9dadd;
  --accent: #d6ff37;
  --muted-footer: #9ca0a6;
  --ok: #2f7a52;
  --warn: #b07520;
  --danger: #c44c4c;
  --info: #3a6ea5;
  --radius: 2px;
  --radius-pill: 999px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 960px;
  --max-wide: 1100px;
  /* aliases for older booking JS (calendar quote color) */
  --gold: var(--ink);
  --gold2: var(--ink);
  --bg: var(--cream);
  --bg2: var(--off);
  --card: var(--white);
  --text: var(--ink);
  --muted: var(--grey);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0; padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
button { font: inherit; }

.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; padding: 1.5rem 0 2rem; }
.wrap-wide { width: min(var(--max-wide), calc(100% - 40px)); margin: 0 auto; padding: 1.5rem 0 2rem; }

/* ——— Header (scrolled main-site bar) ——— */
.site-header {
  background: rgba(8, 9, 10, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  color: var(--white);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: .95rem 0;
  width: min(var(--max-wide), calc(100% - 40px));
}
.site-header .brand {
  font-size: 1.14rem;
  font-weight: 760;
  letter-spacing: -.03em;
  color: var(--white);
  text-decoration: none;
  line-height: 1.2;
}
.site-header .brand:hover { text-decoration: none; }
.site-header .brand span { font-weight: 450; }
.site-header .sub {
  color: rgba(255, 255, 255, .55);
  font-size: .78rem;
  margin-top: .15rem;
  letter-spacing: .01em;
}
.site-header .brand-block { display: flex; flex-direction: column; gap: 0; }
.site-header .nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  flex-wrap: wrap;
  margin: 0;
  font-size: .92rem;
}
.site-header .nav a {
  color: rgba(255, 255, 255, .92);
  text-decoration: none;
  font-weight: 500;
}
.site-header .nav a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 5px;
}
.site-header .nav .btn {
  text-decoration: none;
  padding: .55rem 1rem;
  font-size: .88rem;
}
.site-header .nav .btn:hover { text-decoration: none; }

/* Admin secondary nav inside main */
main .nav {
  display: flex;
  gap: .85rem 1.15rem;
  flex-wrap: wrap;
  font-size: .9rem;
  margin-bottom: 1rem;
}
main .nav a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
main .nav a:hover { border-bottom-color: var(--ink); text-decoration: none; }

/* ——— Typography ——— */
h1, h2, h3 {
  margin: 0 0 .65rem;
  line-height: 1.05;
  letter-spacing: -.045em;
  color: var(--ink);
  font-weight: 720;
}
h1 { font-size: clamp(1.85rem, 4vw, 2.75rem); font-weight: 750; }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.85rem); }
h3 { font-size: 1.15rem; }
.muted { color: var(--grey); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  font-weight: 800;
  color: var(--grey);
  margin-bottom: .5rem;
}

/* ——— Cards / layout ——— */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  margin: 1rem 0;
  box-shadow: none;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .wrap, .wrap-wide { width: min(100% - 28px, var(--max-wide)); }
  .site-header .wrap { width: min(100% - 28px, var(--max-wide)); }
}

/* ——— Forms ——— */
label {
  display: block;
  font-size: .88rem;
  color: var(--grey);
  margin: .65rem 0 .25rem;
  font-weight: 600;
}
input, select, textarea {
  width: 100%;
  padding: .7rem .85rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(23, 25, 28, .08);
}
input[type="checkbox"], input[type="radio"] {
  width: auto;
  box-shadow: none;
}

/* ——— Buttons (pill like main site) ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: var(--radius-pill);
  padding: .7rem 1.25rem;
  font-weight: 760;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  transition: transform .22s, background .22s, border-color .22s, color .22s;
  line-height: 1.2;
}
.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
  background: var(--black);
  color: var(--white);
}
.btn.light, .btn-light {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.btn.accent, .btn-accent {
  background: var(--accent);
  color: var(--black);
  border-color: var(--accent);
}
.btn.accent:hover, .btn-accent:hover {
  background: #c8f02a;
  border-color: #c8f02a;
  color: var(--black);
}
.btn.outline, .btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--white);
  color: var(--ink);
}
.site-header .btn-ghost,
.site-header .btn.outline {
  color: var(--white);
  border-color: rgba(255, 255, 255, .35);
}
.site-header .btn-ghost:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, .08);
  color: var(--white);
}
.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}
.btn-danger:hover { background: #a83a3a; border-color: #a83a3a; color: #fff; }
.btn-sm { padding: .4rem .85rem; font-size: .85rem; }

/* ——— Alerts / badges ——— */
.alert {
  padding: .9rem 1.05rem;
  border-radius: 8px;
  margin: 1rem 0;
  border: 1px solid var(--line);
  background: var(--white);
}
.alert-ok { background: #eef7f1; border-color: #b7dcc6; color: #1e5c3a; }
.alert-err { background: #fbf0f0; border-color: #e8b8b8; color: #8a2f2f; }
.alert-warn { background: #fbf5eb; border-color: #e8d0a8; color: #7a5210; }
.alert ul { margin: .25rem 0 0 1.1rem; padding: 0; }

.badge {
  display: inline-block;
  padding: .18rem .6rem;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .01em;
}
.badge-ok { background: #e3f5ea; color: #1e5c3a; }
.badge-warn { background: #f8edd8; color: #7a5210; }
.badge-danger { background: #f8e4e4; color: #8a2f2f; }
.badge-info { background: #e4eef8; color: #2a5478; }
.badge-muted { background: var(--off); color: var(--grey); }

/* ——— Tables ——— */
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td {
  text-align: left;
  padding: .65rem .45rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data th {
  color: var(--grey);
  font-weight: 700;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
table.data tr:hover td { background: rgba(245, 245, 242, .65); }

/* ——— Price / calendar / pay ——— */
.price-box {
  background: var(--off);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
}
.price-box strong { letter-spacing: -.02em; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow {
  text-align: center;
  font-size: .72rem;
  color: var(--grey);
  padding: .25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cal .day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--off);
  border: 1px solid transparent;
  font-size: .85rem;
  cursor: pointer;
  font-weight: 600;
  transition: background .15s, border-color .15s, color .15s;
}
.cal .day.out { opacity: .28; pointer-events: none; }
.cal .day.busy {
  background: #f8e4e4;
  color: #8a2f2f;
  cursor: not-allowed;
}
.cal .day.request {
  background: #fff1d6;
  color: #7a5210;
  border-color: #e8c27a;
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll table.data { min-width: 640px; }
.cal-legend { font-size: .85rem; margin-top: .4rem; }
.cal-legend .swatch { display: inline-block; width: .9rem; height: .9rem; border-radius: 4px; vertical-align: -2px; margin: 0 .3rem 0 .6rem; border: 1px solid transparent; }
.cal-legend .swatch:first-child { margin-left: 0; }
.swatch-busy { background: #f8e4e4; border-color: #e8b8b8 !important; }
.swatch-request { background: #fff1d6; border-color: #e8c27a !important; }
.cal .day.sel,
.cal .day.inrange {
  background: var(--accent);
  border-color: #b8e020;
  color: var(--black);
}
.cal .day:hover:not(.busy):not(.out) {
  border-color: var(--ink);
}

.checkrow {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  margin: .75rem 0;
}
.checkrow input { width: auto; margin-top: .3rem; }
.checkrow label { margin: 0; color: var(--ink); font-weight: 500; }

.pay-choice { display: grid; gap: .75rem; margin: 1rem 0; }
.pay-choice label.choice {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: 1.05rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--white);
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  transition: border-color .15s, background .15s;
}
.pay-choice label.choice:hover { border-color: #b0b3b8; }
.pay-choice label.choice:has(input:checked) {
  border-color: var(--ink);
  background: var(--off);
  box-shadow: inset 3px 0 0 var(--accent);
}
.pay-choice input { width: auto; margin-top: .2rem; }

.stack-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

/* ——— Footer (dark like main) ——— */
.footer {
  background: var(--black);
  color: var(--white);
  margin: 2.5rem 0 0;
  padding: 2.75rem 0 1.75rem;
  border-top: none;
  font-size: .91rem;
}
.footer.wrap,
footer.footer {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.footer .footer-inner {
  width: min(var(--max-wide), calc(100% - 40px));
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem 2.5rem;
}
.footer .brand {
  font-size: 1.1rem;
  font-weight: 760;
  letter-spacing: -.03em;
}
.footer .brand span { font-weight: 450; }
.footer .muted,
.footer p.muted {
  color: var(--muted-footer);
  font-size: .91rem;
  margin-top: .65rem;
  max-width: 420px;
  line-height: 1.55;
}
.footer a {
  color: #c4c7cb;
  text-decoration: none;
}
.footer a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.footer-links { display: grid; gap: .45rem; color: #c4c7cb; }
.footer-links strong {
  color: var(--white);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: .25rem;
  display: block;
}
.footer-bottom {
  margin-top: 2.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid #2e3135;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  color: #8f9399;
  font-size: .82rem;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer .footer-inner { width: min(100% - 28px, var(--max-wide)); }
  .footer-bottom { display: block; }
  .footer-bottom div + div { margin-top: .4rem; }
}

/* ——— Print ——— */
.print-only { display: none; }
@media print {
  body { background: #fff; color: #000; }
  .no-print { display: none !important; }
  .print-only { display: block; }
  .site-header, .footer { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  .btn { border: 1px solid #000; }
}

/* ——— Protocol forms (mobile-first) ——— */
.protocol-form .proto-section {
  margin: 1.25rem 0 1.5rem;
  padding-top: .5rem;
  border-top: 1px solid var(--line);
}
.protocol-form .proto-section:first-of-type { border-top: 0; padding-top: 0; }
.protocol-form h2 { font-size: 1.05rem; margin: 0 0 .75rem; letter-spacing: -.02em; }
.proto-check-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .75rem .85rem 0.4rem;
  margin: 0 0 .85rem;
  background: var(--off);
}
.proto-check-group legend {
  font-weight: 700;
  font-size: .85rem;
  padding: 0 .35rem;
}
.proto-check-row {
  display: grid;
  gap: .45rem;
  margin-bottom: .85rem;
}
@media (min-width: 640px) {
  .proto-check-row {
    grid-template-columns: 1.2fr auto 1fr;
    align-items: center;
  }
}
.proto-check-label { font-weight: 600; font-size: .92rem; }
.proto-check-status { display: flex; gap: .45rem; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: .85rem;
  font-weight: 600;
  margin: 0;
  cursor: pointer;
}
.chip input { width: auto; margin: 0; }
.chip:has(input:checked) { border-color: var(--ink); background: var(--accent); }
.chip-warn:has(input:checked) { background: #f8edd8; border-color: #b07520; }
.proto-check-note { margin: 0; }
.photo-slot-hints { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0 .75rem; }
.photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .65rem;
  margin: .75rem 0;
}
.photo-preview figure {
  margin: 0;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.photo-preview img { width: 100%; height: 90px; object-fit: cover; display: block; }
.photo-preview figcaption { font-size: .72rem; padding: .25rem .4rem; color: var(--grey); }
.photo-preview button {
  position: absolute; top: 4px; right: 4px;
  padding: .15rem .45rem !important; font-size: .8rem !important;
}
.sig-wrap {
  border: 1px dashed #b0b3b8;
  border-radius: 10px;
  background: #fff;
  padding: .5rem;
  margin: .35rem 0 .75rem;
}
.sig-pad {
  width: 100%;
  height: auto;
  max-width: 100%;
  touch-action: none;
  display: block;
  background: #fff;
  border-radius: 6px;
}
.damage-row.card-nested,
.card-nested {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .85rem;
  margin: 0 0 .75rem;
  background: var(--off);
}
.compare-card { background: #eef7f1; border-color: #b7dcc6; }
.proto-list { display: grid; gap: .75rem; }
.proto-list-item {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
}
.proto-list-item:last-child { border-bottom: 0; }

/* Document view */
.protocol-doc h1 { margin-top: 0; letter-spacing: -.02em; }
.protocol-doc h2 { font-size: 1.05rem; margin: 1.35rem 0 .55rem; }
.protocol-doc h3 { font-size: .92rem; margin: .9rem 0 .35rem; color: var(--grey); text-transform: uppercase; letter-spacing: .06em; }
.protocol-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 720px) {
  .protocol-grid { grid-template-columns: 1fr 1fr; }
}
.proto-facts { list-style: none; margin: 0; padding: 0; }
.proto-facts li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .4rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
}
.proto-facts span { color: var(--grey); }
table.proto-check { width: 100%; border-collapse: collapse; font-size: .9rem; margin-bottom: .75rem; }
table.proto-check td { padding: .4rem .3rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.proto-check td.ok { color: var(--ok); font-weight: 700; }
table.proto-check td.mangel { color: var(--danger); font-weight: 700; }
.proto-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .65rem;
}
.proto-photos figure { margin: 0; }
.proto-photos img, .proto-damage img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.proto-damage { margin: 0 0 1rem; padding: .75rem; border: 1px solid var(--line); border-radius: 8px; }
.proto-sig-row {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .proto-sig-row { grid-template-columns: 1fr 1fr; }
}
.sig-img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

/* Mehrkilometer Live-Berechnung (Rückgabe) */
.km-calc-box {
  background: var(--off);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .75rem 1rem;
  margin: 0 0 1rem;
}
.km-calc-line {
  margin: 0;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.45;
}
.extra-km-readonly {
  background: var(--off);
  color: var(--ink);
}
#extra-km-override-fields {
  margin: .5rem 0 1rem;
}

/* Verspätete Rückgabe */
.late-box { border-color: #d9a441; background: #fff8ea; }
.late-box .late-facts { margin: 0 0 .5rem; }
.late-question { border: 1px solid #d9a441; border-radius: 8px; padding: .5rem .75rem; margin: .5rem 0; }
.late-question legend { font-weight: 600; padding: 0 .25rem; }
.late-question .chip { margin-right: .75rem; font-size: 1rem; }

/* Angebote */
.offer-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.offer-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.offer-filter a { padding: .3rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--white); color: var(--ink); font-size: .85rem; }
.offer-filter a.active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.offer-filter a:hover { text-decoration: none; border-color: var(--ink); }
.offer-price { background: var(--off); box-shadow: inset 3px 0 0 var(--accent); margin: 1rem 0; }
.offer-price .offer-total { font-size: 1.25rem; margin: .5rem 0 .25rem; }
table.data.offer-lines { margin: .5rem 0; background: var(--white); }
table.data .r, table.offer-lines .r { text-align: right; white-space: nowrap; }
.offer-disc { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.copy-row { display: flex; gap: .5rem; align-items: center; }
.copy-row input { flex: 1; }
.btn-outline, .btn-light-outline { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn-outline:hover, .btn-light-outline:hover { background: var(--off); color: var(--ink); }
.offer-public .offer-hero { background: var(--black); color: var(--white); padding: 1.5rem 1.5rem 1.25rem; border-radius: var(--radius); margin-bottom: 1rem; box-shadow: inset 0 -4px 0 var(--accent); }
.offer-public .offer-hero h1 { color: var(--white); margin: .25rem 0 .5rem; }
.offer-public .offer-hero .eyebrow { color: var(--muted-footer); }
.offer-public .offer-hero .price { font-size: 1.9rem; font-weight: 760; letter-spacing: -.02em; }
.offer-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem 1.25rem; margin: 0; }
.offer-facts div { border-top: 1px solid var(--line); padding-top: .5rem; }
.offer-facts dt { font-size: .8rem; color: var(--grey); text-transform: uppercase; letter-spacing: .06em; }
.offer-facts dd { margin: .15rem 0 0; font-weight: 600; }
.offer-note { background: var(--off); border-left: 3px solid var(--accent); padding: .75rem 1rem; margin: 1rem 0; }

/* Mehrere Admin-Benutzer */
.nav-user {
  font-size: .9rem;
  align-self: center;
  white-space: nowrap;
}
.nav .nav-user { color: var(--grey); }

/* =====================================================================
   PWA / Mobil (Admin) – Touch-Ziele, Bottom-Navigation, Heute, Karten-Listen
   ===================================================================== */
.site-header { padding-top: env(safe-area-inset-top); }
.bottom-nav, .more-sheet, .offline-bar, .a2hs-hint { display: none; }
.admin-nav-desktop a.active { border-bottom-color: var(--ink); }
.remember-row { display: flex; gap: .6rem; align-items: center; margin-top: .9rem; }
.remember-row input { width: 22px; height: 22px; margin: 0; }

/* Heute */
.today-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1rem 0; }
.today-big {
  flex-direction: column; align-items: flex-start; justify-content: center;
  gap: .15rem; padding: 1rem 1.15rem; min-height: 84px; border-radius: 14px; text-align: left;
  font-size: 1.15rem;
}
.today-big span { font-weight: 780; }
.today-big small { font-weight: 500; font-size: .8rem; opacity: .75; }
.today-card h2 .count {
  display: inline-block; min-width: 1.6rem; padding: 0 .45rem; margin-left: .3rem; text-align: center;
  font-size: .9rem; letter-spacing: 0; background: var(--ink); color: var(--accent); border-radius: 999px; vertical-align: .15em;
}
.today-warn { border-color: #e0b3b3; background: #fdf3f3; }
.today-item { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between; padding: .8rem 0; border-top: 1px solid var(--line); }
.today-item:first-of-type { border-top: 0; }
.today-main { display: flex; flex-direction: column; gap: .15rem; min-width: 0; flex: 1 1 16rem; }
.today-btns { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Datei-Inputs hinter Label-Buttons */
.photo-btns { display: flex; flex-wrap: wrap; gap: .6rem; margin: .4rem 0 .6rem; }
.photo-btns .photo-btn { margin: 0; cursor: pointer; color: var(--ink); font-size: 1rem; }
.photo-btns .photo-btn.accent { color: var(--ink); }
.photo-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
.proto-msg, .net-status, .draft-bar { margin: 0 0 1rem; }
.draft-bar { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; }
.offline-bar {
  position: fixed; left: 0; right: 0; top: env(safe-area-inset-top); z-index: 80;
  background: #8a2f2f; color: #fff; text-align: center; padding: .55rem 1rem; font-size: .9rem; font-weight: 600;
}
.offline-bar:not([hidden]) { display: block; }
.alert-warn { background: #fbf1dc; border: 1px solid #e8c27a; color: #6d4a0f; }

@media (max-width: 719px) {
  html { -webkit-text-size-adjust: 100%; }
  body.is-admin { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  body.is-admin .admin-nav-desktop { display: none; }
  body.is-admin .site-header .nav, body.is-admin .site-header .sub { display: none; }
  body.is-admin .site-header .wrap { padding: .65rem 0; }
  body.is-admin .footer { display: none; }
  .wrap, .wrap-wide { width: calc(100% - 24px); padding-top: 1rem; }
  .card { padding: 1rem; }
  h1 { font-size: 1.7rem; }

  /* Touch-Ziele ≥ 48 px, 16 px Schrift (kein iOS-Zoom) */
  body.is-admin input, body.is-admin select, body.is-admin textarea {
    font-size: 16px; min-height: 48px; padding: .75rem .9rem;
  }
  body.is-admin textarea { min-height: 96px; }
  body.is-admin input[type="checkbox"], body.is-admin input[type="radio"] { width: 24px; height: 24px; min-height: 0; flex: 0 0 24px; }
  body.is-admin .btn { min-height: 48px; padding: .75rem 1.2rem; font-size: 1rem; }
  body.is-admin .btn-sm { min-height: 44px; padding: .6rem 1rem; font-size: .95rem; }
  body.is-admin .btn:hover { transform: none; }
  body.is-admin .chip { min-height: 44px; padding: .5rem 1rem; font-size: .95rem; }
  body.is-admin .checkrow { display: flex; align-items: center; gap: .7rem; min-height: 44px; font-size: 1rem; color: var(--ink); }
  body.is-admin .checkrow input { margin: 0; }
  body.is-admin .stack-actions { display: flex; flex-direction: column; gap: .6rem; }
  body.is-admin .stack-actions .btn, body.is-admin .stack-actions form, body.is-admin .stack-actions form .btn { width: 100%; }
  body.is-admin form[style*="display:inline"] { display: block !important; margin: .4rem 0 !important; }
  body.is-admin form[style*="display:inline"] .btn { width: 100%; }
  .today-actions { grid-template-columns: 1fr; }
  .today-btns { width: 100%; }
  .today-btns .btn { flex: 1 1 100%; }
  .today-btns .today-call, .today-btns .btn-ghost:not(.today-big-sm) { flex: 1 1 calc(50% - .3rem); }
  .today-big-sm { min-height: 56px !important; font-size: 1.05rem !important; }

  /* Protokoll: volle Breite, kein horizontales Scrollen */
  .protocol-form { padding: .85rem; overflow-x: hidden; }
  .protocol-form input, .protocol-form select, .protocol-form textarea { max-width: 100%; }
  .proto-check-row { gap: .5rem; padding: .6rem 0; border-top: 1px solid var(--line); }
  .proto-check-status .chip { flex: 1 1 0; justify-content: center; }
  .sig-wrap { padding: .35rem; margin-left: -.35rem; margin-right: -.35rem; }
  .sig-pad { width: 100%; aspect-ratio: 2 / 1; height: auto; }
  .sig-wrap .sig-clear { width: 100%; margin-top: .4rem; }
  .photo-btns .photo-btn { flex: 1 1 100%; min-height: 56px; font-size: 1.1rem; }
  .photo-preview { grid-template-columns: repeat(2, 1fr); }
  .photo-preview img { height: 120px; }
  .photo-preview button.photo-rm { min-height: 36px !important; min-width: 36px; padding: 0 !important; font-size: 1.2rem !important; }
  .protocol-form .stack-actions { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--white) 30%); padding-top: .8rem; z-index: 5; }
  .grid-2 { grid-template-columns: 1fr; }
  .proto-list-item { flex-direction: column; align-items: stretch; }

  /* Tabellen → Karten */
  table.data.cards-mobile, table.data.cards-mobile tbody { display: block; width: 100%; }
  table.data.cards-mobile thead { display: none; }
  table.data.cards-mobile tr {
    display: block; border: 1px solid var(--line); border-radius: 12px; background: #fff;
    margin: .7rem 0; padding: .35rem .85rem;
  }
  table.data.cards-mobile tr:hover td { background: transparent; }
  table.data.cards-mobile td {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
    border: 0; border-bottom: 1px solid var(--off); padding: .55rem 0; text-align: right; max-width: none !important; word-break: break-word;
  }
  table.data.cards-mobile td:last-child { border-bottom: 0; }
  table.data.cards-mobile td::before {
    content: attr(data-label); flex: 0 0 34%; text-align: left; font-weight: 700; font-size: .8rem;
    color: var(--grey); text-transform: uppercase; letter-spacing: .04em; padding-top: .15rem;
  }
  table.data.cards-mobile td .td-v { flex: 1 1 auto; min-width: 0; text-align: right; overflow-wrap: anywhere; }
  table.data.cards-mobile td[data-label=""]::before, table.data.cards-mobile td.td-wide::before { display: none; }
  table.data.cards-mobile td[data-label=""] { display: block; text-align: left; }
  table.data.cards-mobile td[data-label=""] .btn, table.data.cards-mobile td[data-label=""] form { width: 100%; margin: .2rem 0; }
  .table-scroll { overflow-x: visible; }
  .table-scroll table.data { min-width: 0; }
  .card.table-scroll { padding: .4rem; background: transparent; border: 0; }

  /* Bottom-Navigation */
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--black); border-top: 1px solid rgba(255,255,255,.14);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bn-item {
    flex: 1 1 0; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: rgba(255,255,255,.72); font-size: .72rem; font-weight: 600; text-decoration: none; position: relative;
    background: none; border: 0; font-family: inherit; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent;
  }
  .bn-item:hover { text-decoration: none; color: #fff; }
  .bn-item.active { color: var(--accent); }
  .bn-ico { font-size: 1.35rem; line-height: 1; }
  .bn-badge {
    position: absolute; top: 6px; left: calc(50% + 8px); min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem;
    background: var(--accent); color: var(--black); border-radius: 999px; font-size: .7rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
  }
  .more-sheet:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 70; }
  .more-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
  .more-panel {
    position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 18px 18px 0 0;
    padding: .5rem 1rem calc(1rem + env(safe-area-inset-bottom)); max-height: 82vh; overflow-y: auto;
  }
  .more-head { display: flex; justify-content: space-between; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line); }
  .more-close { background: none; border: 0; font-size: 1.3rem; min-width: 48px; min-height: 48px; cursor: pointer; }
  .more-panel a { display: flex; align-items: center; min-height: 54px; font-size: 1.05rem; font-weight: 600; border-bottom: 1px solid var(--off); text-decoration: none; }
  .more-panel a.more-logout { color: var(--danger); border-bottom: 0; }
  html.sheet-open body { overflow: hidden; }

  /* Installationshinweis */
  .a2hs-hint:not([hidden]) {
    display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; position: fixed; left: 8px; right: 8px;
    bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 55; background: #fff; border: 1px solid var(--ink);
    border-radius: 14px; padding: .75rem; box-shadow: 0 6px 24px rgba(0,0,0,.25);
  }
  .a2hs-text { flex: 1 1 100%; font-size: .9rem; line-height: 1.4; }
}
@media (display-mode: standalone) {
  body.is-admin .footer { display: none; }
}
@media (min-width: 720px) {
  .photo-btns .photo-btn { min-width: 12rem; }
}
@media (max-width: 719px) {
  body.is-admin .login-btn { width: 100%; }
  body.is-admin .card[style*="max-width:420px"] { margin: 1rem auto !important; }
}
