/* Buchungsportal – Design angelehnt an www.gruber-kg.de (öffentlich + Admin) */

/* Hausschrift Muli (Dateien von gruber-kg.de, lokal eingebunden – keine externen Anfragen) */
@font-face { font-family: "Muli"; src: url("fonts/muli-400.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Muli"; src: url("fonts/muli-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Muli"; src: url("fonts/muli-800.woff2") format("woff2"); font-weight: 800 900; font-display: swap; }

:root {
  --brand: #b4c71a;        /* Gruber-Grün (Buttons, Auswahl) */
  --brand-dark: #8a9a10;
  --brand-soft: rgba(180, 199, 26, .14);
  --red: #e2000f;          /* Gruber-Rot (Logo, Überschriften, Links) */
  --ink: #222222;
  --muted: #5f6368;
  --line: #e3e5e8;
  --bg: #f4f5f2;
  --card: #ffffff;
  --ok: #4b7a0f;
  --ok-bg: #eef5dc;
  --err: #c4000d;
  --err-bg: #fdecec;
  --info-bg: #f1f6d6;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(0, 0, 0, .06);
  --font: "Muli", "Mulish", Arial, Verdana, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--font); }
a { color: var(--red); }
h1, h2 { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; color: var(--red); text-transform: uppercase; font-weight: 900; letter-spacing: .2px; }
h1 { font-size: 1.7rem; line-height: 1.15; margin: 0 0 .5rem; }
h2 { font-size: 1.2rem; margin: 0 0 .75rem; }
h3 { font-size: 1.02rem; margin: 1.25rem 0 .5rem; font-weight: 800; }
.wrap { max-width: 800px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
[hidden] { display: none !important; }

/* Kopf / Fuß */
.site-header { background: #fff; border-bottom: 4px solid var(--brand); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 12px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 54px; width: auto; display: block; }
.brand-text { color: var(--red); font-weight: 900; text-transform: uppercase; }
.header-contact { display: flex; gap: 16px; font-size: .9rem; }
.header-contact a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.header-contact a:hover { color: var(--red); }
@media (max-width: 480px) { .header-contact .hide-sm { display: none; } .brand img { height: 44px; } }

.hero-band {
  background: linear-gradient(110deg, #6f7f0c 0%, var(--brand) 55%, #d4e35a 100%);
  color: #fff; padding: 34px 0 30px; margin-bottom: 20px;
}
.hero-band h1 { color: #fff; font-size: clamp(1.45rem, 6vw, 2.6rem); margin: 0; text-shadow: 0 1px 12px rgba(0, 0, 0, .18); hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.hero-band .lead { font-size: 1.15rem; margin: 8px 0 0; font-weight: 600; text-shadow: 0 1px 8px rgba(0, 0, 0, .15); }
.intro { background: var(--card); border-left: 5px solid var(--brand); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 20px; box-shadow: var(--shadow); }

.site-footer { background: #fff; border-top: 1px solid var(--line); color: var(--ink); font-size: .9rem; padding: 28px 0; margin-top: 32px; }
.site-footer h4 { color: var(--red); text-transform: uppercase; font-weight: 900; margin: 0 0 6px; font-size: .95rem; }
.site-footer .foot-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .site-footer .foot-grid { grid-template-columns: 1fr 1fr; } }
.site-footer p { margin: 0 0 4px; }
.site-footer a { color: var(--ink); }
.site-footer .legal { margin-top: 16px; color: var(--muted); font-size: .825rem; }
.site-footer .legal a { color: var(--muted); }

/* Bausteine */
.hero { padding: 28px 0 12px; }
.hero .lead { font-size: 1.1rem; color: var(--muted); margin: 0 0 .75rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin: 0 0 16px; }
.card.narrow { max-width: 660px; margin: 32px auto; }
fieldset.card { min-width: 0; }
legend {
  font-weight: 900; font-size: 1.05rem; text-transform: uppercase; color: var(--red);
  padding: 0; display: flex; align-items: center; gap: 10px; float: left; width: 100%; margin-bottom: 14px;
}
legend + * { clear: both; }
.step { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .95rem; flex: none; }
.alert { padding: 12px 16px; border-radius: 10px; margin: 16px 0; }
.alert-success { background: var(--ok-bg); color: var(--ok); }
.alert-error { background: var(--err-bg); color: var(--err); }
.alert-info { background: var(--info-bg); color: #4a5300; }
.note { background: var(--brand-soft); border-left: 4px solid var(--brand); color: #3d4500; padding: 10px 14px; border-radius: 0 10px 10px 0; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #eef0f2; font-size: .78rem; font-weight: 700; white-space: nowrap; text-transform: none; letter-spacing: 0; vertical-align: middle; }
.badge-green { background: var(--ok-bg); color: var(--ok); }
.badge-red { background: var(--err-bg); color: var(--err); }
.badge-gray { background: #eef0f2; color: var(--muted); }
.badge-orange { background: #fff1e0; color: #a14e00; }
.text-warn { color: #a14e00; font-weight: 700; }

/* Formulare */
.field { margin-bottom: 14px; }
label, .label { display: block; font-weight: 700; font-size: .93rem; margin-bottom: 4px; }
input[type=text], input:not([type]), input[type=email], input[type=tel], input[type=password],
input[type=number], input[type=date], input[type=datetime-local], input[type=color], input[type=search], select, textarea {
  width: 100%; font: inherit; color: inherit; background: #fff;
  border: 1px solid #c9cdd2; border-radius: 6px; padding: 11px 12px; min-height: 46px;
}
input[type=color] { padding: 4px; width: 80px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(180, 199, 26, .45); border-color: var(--brand-dark); }
[aria-invalid=true] { border-color: var(--err) !important; background: #fffafa; }
.field-error { color: var(--err); font-size: .875rem; margin: 4px 0 0; font-weight: 600; }
.grid-2, .grid-zip, .grid-3 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .grid-zip { grid-template-columns: 140px 1fr; }
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.packages { display: grid; gap: 10px; }
.package {
  display: flex; align-items: center; gap: 12px; margin: 0; cursor: pointer; font-weight: 400;
  border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; transition: border-color .15s, background .15s;
}
.package:hover { border-color: #c9cdd2; }
.package:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.package input { width: 20px; height: 20px; accent-color: var(--brand-dark); flex: none; }
.package-body { flex: 1; }
.package-name { display: block; font-weight: 800; }
.package-desc { display: block; color: var(--muted); font-size: .875rem; }
.package-price { font-weight: 900; white-space: nowrap; text-align: right; font-size: 1.05rem; }
.package-price small { display: block; font-weight: 400; color: var(--muted); font-size: .75rem; }

.segmented { display: inline-flex; border: 2px solid var(--brand); border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.segmented label { margin: 0; font-weight: 800; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 9px 26px; cursor: pointer; min-width: 90px; text-align: center; text-transform: uppercase; font-size: .9rem; }
.segmented label + label span { border-left: 2px solid var(--brand); }
.segmented input:checked + span { background: var(--brand); color: #fff; }
.segmented input:focus-visible + span { outline: 3px solid rgba(0, 0, 0, .25); outline-offset: -4px; }

.check-line { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 14px 0; }
.check-line input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand-dark); flex: none; }

.summary { display: grid; grid-template-columns: 1fr; gap: 2px 16px; margin: 0 0 12px; }
.summary dt { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.summary dd { margin: 0; overflow-wrap: anywhere; }
@media (min-width: 560px) {
  .summary { grid-template-columns: minmax(150px, max-content) 1fr; }
  .summary dt { margin-top: 0; }
}

/* Buttons – wie auf gruber-kg.de: grün, eckig, Großbuchstaben */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--brand); color: #fff; border: 0; border-radius: 0; padding: 10px 22px; min-height: 44px;
  font: inherit; font-weight: 800; font-size: .9rem; text-transform: uppercase; letter-spacing: .3px; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-lg { min-height: 54px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-ghost { background: #fff; color: var(--ink); border: 2px solid var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #b0000b; }
.btn-sm { min-height: 32px; padding: 4px 12px; font-size: .78rem; }
.link-btn { background: none; border: 0; padding: 0; color: var(--err); cursor: pointer; font: inherit; text-decoration: underline; }

.success-card { text-align: center; }
.success-card .summary { text-align: left; }
.check { width: 64px; height: 64px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 2rem; display: grid; place-items: center; margin: 0 auto 12px; }
.event-list { display: grid; gap: 12px; }
.event-teaser { text-decoration: none; color: inherit; display: block; }

/* ---------- Admin ---------- */
body.admin .wrap { max-width: 1200px; }
body.admin .site-header .wrap { min-height: 64px; }
body.admin .brand img { height: 42px; }
.brand-sub { color: var(--muted); font-weight: 700; font-size: .85rem; margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line); text-transform: uppercase; }
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.admin-nav a { color: var(--ink); text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: .92rem; font-weight: 700; }
.admin-nav a:hover, .admin-nav a.active { background: var(--brand-soft); }
.nav-ico, .nav-short { display: none; }
.nav-logout { display: inline; margin: 0; }

/* Smartphone: Menü als App-Leiste unten, Tabellen als Karten */
@media (max-width: 760px) {
  body.has-tabbar { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .site-header { padding-top: env(safe-area-inset-top); }
  body.admin .site-header .wrap { min-height: 56px; }
  body.admin .brand img { height: 36px; }
  .brand-sub { display: none; }
  .admin-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; display: flex; flex-wrap: nowrap; gap: 0;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -2px 12px rgba(0, 0, 0, .07);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .admin-nav a, .nav-logout button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 0; border-radius: 8px;
    background: none; min-height: 0; font-size: .7rem; font-weight: 800; text-transform: none; letter-spacing: 0; color: var(--ink);
  }
  .nav-logout { flex: 1; display: flex; }
  .nav-ico { display: block; font-size: 1.35rem; line-height: 1.1; }
  .nav-long { display: none; }
  .nav-short { display: inline; }
  .page-head { margin: 16px 0 12px; }
  .btn-sm { min-height: 38px; }
  .site-footer { display: none; }
}
@media (max-width: 640px) {
  table.table-cards thead { display: none; }
  table.table-cards, table.table-cards tbody, table.table-cards tr, table.table-cards td { display: block; width: 100%; }
  table.table-cards tr { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 8px 0; }
  table.table-cards td { border: 0; padding: 5px 14px; text-align: left; white-space: normal; }
  table.table-cards td.num { text-align: left; }
  table.table-cards td[data-label]::before {
    content: attr(data-label); display: block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; color: var(--muted);
  }
  .table-wrap:has(> .table-cards) { background: transparent; border: 0; overflow: visible; }
  tbody tr:hover { background: #fff; }
}
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 16px; }
.page-head h1 { margin: 0; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb { font-size: .875rem; color: var(--muted); margin-top: 20px; }
.breadcrumb a { color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 800; }
.tabs a.active { color: var(--ink); border-color: var(--brand); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .num { font-size: 1.6rem; font-weight: 900; }
.stat .lbl { color: var(--muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f7f8f5; font-weight: 800; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbf7; }
tr.row-hit td { background: var(--brand-soft); }
td.num, th.num { text-align: right; white-space: nowrap; }
.row-link { color: inherit; font-weight: 800; text-decoration: none; }
.row-link:hover { color: var(--red); }
.filters { display: grid; gap: 10px; grid-template-columns: 1fr; align-items: end; margin-bottom: 16px; }
@media (min-width: 760px) { .filters { grid-template-columns: 2fr 1fr 1fr 1fr auto; } }
.filters .field { margin: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.inline-form .field { margin: 0; }
.cols { display: grid; gap: 16px; grid-template-columns: 1fr; }
.cols > * { min-width: 0; } /* breite Tabellen scrollen in ihrem Rahmen statt die Seite zu verbreitern */
@media (min-width: 900px) { .cols { grid-template-columns: 2fr 1fr; } }
.log { list-style: none; padding: 0; margin: 0; font-size: .875rem; }
.log li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.secret { font-family: ui-monospace, Menlo, monospace; background: #fff3c4; padding: 2px 8px; border-radius: 6px; }
.capacity-bar { height: 6px; background: #eceee8; border-radius: 3px; overflow: hidden; margin-top: 4px; min-width: 80px; }
.capacity-bar span { display: block; height: 100%; background: var(--brand); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.check-grid label { font-weight: 400; display: flex; gap: 8px; align-items: center; }
.danger-zone { border-color: #f5c2c4; }
.login-box { max-width: 420px; margin: 60px auto; }
.login-box .login-logo { display: block; height: 64px; margin: 0 auto 16px; }

/* Karten (PLZ-Auswahl, Route) */
.plz-map, .route-map { height: 440px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 0; }
@media (max-width: 640px) { .plz-map, .route-map { height: 340px; } }
.leaflet-interactive:focus { outline: none; }
.map-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 8px; }
.map-tools .plz-search { max-width: 200px; min-height: 38px; padding: 6px 10px; }
.legend { font-size: .82rem; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: middle; }
.lg-on { background: rgba(180, 199, 26, .7); border: 2px solid #5f6c06; }
.lg-other { background: rgba(154, 160, 166, .4); border: 1px dashed #8a8f96; }
.plz-label { color: #333; font: 700 11px/16px var(--font); text-align: center; text-shadow: 0 0 3px #fff, 0 0 3px #fff; white-space: nowrap; }
.plz-label.on { color: #2f3600; }
.map-dialog { width: min(960px, 96vw); max-height: 94vh; border: 0; border-radius: var(--radius); padding: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.map-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.map-dialog textarea { margin-bottom: 8px; }
.dlg-head, .dlg-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.dlg-foot { margin: 12px 0 0; justify-content: flex-end; }
.route-num { background: var(--red); color: #fff; border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; font: 800 13px var(--font); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.route-num.depot { background: var(--ink); }

/* E-Mail bei Statuswechsel (Event-Einstellungen) */
.status-mail-list { display: grid; gap: 6px; }
.status-mail-row { border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px; }
.status-mail-text { padding-bottom: 8px; }

/* PIN-Feld mit Auge */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; letter-spacing: .12em; }
.pw-toggle { position: absolute; top: 0; right: 0; height: 100%; width: 48px; display: grid; place-items: center;
  background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 0 6px 6px 0; }
.pw-toggle:hover, .pw-toggle[aria-pressed="true"] { color: var(--brand-dark); }
.pw-toggle:focus-visible { outline: 3px solid rgba(180, 199, 26, .45); }
.pw-toggle .eye-closed { display: none; }
.pw-toggle[aria-pressed="true"] .eye-open { display: none; }
.pw-toggle[aria-pressed="true"] .eye-closed { display: block; }

/* Rechtstexte */
.legal-text { max-width: 860px; margin: 24px auto; }
.legal-text h2 { margin-top: 1.8rem; font-size: 1.1rem; }
.legal-text h3 { margin-top: 1.2rem; }
.legal-text p, .legal-text li { overflow-wrap: anywhere; }

/* QR-Code */
.qr-box { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.qr-box img { border: 1px solid var(--line); border-radius: 8px; background: #fff; flex: none; }
.qr-box > div { flex: 1; min-width: 240px; }
.qr-url { overflow-wrap: anywhere; }

/* Route */
.route-actions { display: grid; gap: 10px; margin-bottom: 12px; }
.nav-links { display: grid; gap: 8px; }
.stop-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.stop { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stop.off { opacity: .55; }
.stop-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 900; }
.stop.off .stop-num { background: #9aa0a6; }
.stop-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.stop-check { display: flex; gap: 8px; align-items: center; margin: 0; font-weight: 400; }
.stop-check input { width: 20px; height: 20px; accent-color: var(--brand-dark); }
.stop-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 3px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -3px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }


/* ===================== App-Modus auf dem Smartphone (interner Bereich) ===================== */
@media (min-width: 761px) { .m-only { display: none !important; } }
@media (max-width: 760px) { .desk-only { display: none !important; } }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; }
.log-card summary { cursor: pointer; }

@media (max-width: 760px) {
  html:has(body.admin) { touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
  body.admin { overflow-x: hidden; overscroll-behavior-y: none; }
  /* mindestens 16 px, sonst vergrößert iOS beim Antippen eines Feldes */
  body.admin input, body.admin select, body.admin textarea { font-size: 16px; }
  body.admin .wrap { padding: 0 12px; }
  body.admin h1 { font-size: 1.35rem; }
  body.admin .card { padding: 14px; border-radius: 14px; margin-bottom: 12px; }
  body.admin a, body.admin button { -webkit-user-select: none; user-select: none; }

  /* Feste Kopfleiste mit Zurück-Pfeil + Reiter (ersetzt in Events die normale Kopfzeile) */
  /* Logo-Zeile ausblenden – die App-Leiste unten (steckt in der Kopfzeile, ist aber fixiert) bleibt */
  body.in-event .site-header { background: transparent; border: 0; padding-top: 0; }
  body.in-event .site-header .wrap { min-height: 0; padding: 0; }
  body.in-event .site-header .brand { display: none; }
  .event-headline { display: none; }
  .m-actions-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 12px; }
  .m-actions-bar:not(:has(a:not(.desk-only))) { display: none; }
  .m-actions-bar .btn { flex: 1; }
  .event-nav { position: sticky; top: 0; z-index: 900; margin: 0 -12px 12px; background: #fff;
    padding-top: env(safe-area-inset-top); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
  .m-head { display: flex; align-items: center; gap: 4px; padding: 6px 12px; min-height: 52px; }
  .m-back { font-size: 2.2rem; line-height: 1; color: var(--ink); text-decoration: none; padding: 0 10px 6px 0; }
  .m-title { display: flex; flex-direction: column; min-width: 0; }
  .m-title strong { font-size: 1.05rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-title small { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .event-nav .tabs { margin: 0; padding: 0 6px; border-bottom: 3px solid var(--brand); scrollbar-width: none; }
  .event-nav .tabs::-webkit-scrollbar { display: none; }
  .event-nav .tabs a { flex: 1 0 auto; text-align: center; padding: 10px 8px 8px; font-size: .92rem; }

  /* Kennzahlen kompakt in zwei Spalten */
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
  .stat { padding: 10px 12px; border-radius: 12px; }
  .stat .num { font-size: 1.35rem; }
  .stat .lbl { font-size: .78rem; }

  /* Übersicht (Dashboard) */
  .dash-actions { display: grid !important; grid-template-columns: 1fr 1fr; width: 100%; }
  .dash-actions .btn { width: 100%; }
  .dash-actions .tour-btn { grid-column: 1 / -1; order: -1; min-height: 50px; font-size: .95rem; }

  /* Buchungsliste: Suchfeld + aufklappbare Filter, kompakte Einträge */
  .filters { padding: 10px; gap: 8px; margin-bottom: 8px; }
  .filters:not(.open) .more-filter { display: none !important; }
  .filter-toggle { flex: none; min-height: 46px; padding: 0 12px; font-size: .8rem; }
  .list-count { margin: 4px 2px 8px; font-size: .85rem; color: var(--muted); }
  .m-list { display: grid; gap: 8px; margin-bottom: 16px; }
  .m-item { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 12px 10px 12px 14px; color: inherit; text-decoration: none; }
  .m-item:active { background: var(--brand-soft); }
  .m-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
  .m-item-main > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-item-main strong { font-size: 1rem; }
  .m-item-main span { font-size: .85rem; }
  .m-item-side { display: flex; align-items: center; gap: 4px; flex: none; max-width: 42%; }
  .m-item-side .badge { white-space: normal; text-align: center; line-height: 1.25; padding: 3px 8px; }
  .chev { font-size: 1.6rem; color: #b5b9bf; line-height: 1; }

  /* Buchung: Kopfkarte, Status direkt darunter, Details, Verlauf aufklappbar */
  .booking-cols { display: flex; flex-direction: column; gap: 0; }
  .booking-cols > div { display: contents; }
  .sec-status { order: -1; }
  .sec-details .summary { grid-template-columns: minmax(105px, 38%) 1fr; gap: 7px 12px; }
  .sec-details .summary dt { margin: 0; font-size: .8rem; padding-top: 2px; }
  .sec-details .summary dd { font-size: .95rem; min-width: 0; }
  .sec-details .badge { white-space: normal; }
  .m-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
  .m-hero-top .badge { white-space: normal; text-align: center; max-width: 45%; }
  .m-hero-pkg { font-weight: 800; font-size: 1.02rem; line-height: 1.3; }
  .m-hero-addr { margin-top: 10px; font-size: 1.05rem; line-height: 1.4; }
  .m-note { background: #fff7d6; border-left: 4px solid #e8b400; padding: 8px 10px; border-radius: 0 10px 10px 0; margin-top: 10px; }
  .m-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 12px; }
  .m-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px;
    border-radius: 12px; background: #fff; border: 2px solid var(--brand); color: var(--ink); text-decoration: none; font-weight: 800; font-size: .82rem; }
  .m-act:first-child { background: var(--brand); color: #fff; }
  .m-act:active { filter: brightness(.92); }
  .m-act .ico { font-size: 1.35rem; line-height: 1; }
  .m-actions.compact { margin-top: 8px; }
  .m-actions.compact .m-act { min-height: 48px; font-size: .78rem; }
  .next-step { min-height: 56px; font-size: 1rem; }
  .log-card summary { list-style: none; }
  .log-card summary::after { content: ' ▾'; color: var(--muted); }
  .log-card[open] summary::after { content: ' ▴'; }

  /* Tagesliste / Route: Karten */
  .day-picker { margin-bottom: 8px !important; flex-wrap: nowrap; }
  .day-picker .field { flex: 1; min-width: 0; }
  .day-picker .btn { flex: none; }
  .stop { padding: 12px; border-radius: 14px; }
  .stop-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; color: inherit; text-decoration: none; }
  .stop-title .badge { white-space: normal; text-align: center; max-width: 45%; }
  .route-actions .btn-lg { min-height: 54px; }

  /* Fenster (Kunden-Mail, Karte): Knöpfe untereinander, wichtigster oben */
  .map-dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 16px 16px 0 0; padding: 16px 14px calc(14px + env(safe-area-inset-bottom)); }
  .dlg-foot { flex-direction: column-reverse; align-items: stretch; }
  .dlg-foot .btn { width: 100%; }

  /* Meldungen etwas kompakter */
  body.admin .alert { margin: 8px 0; padding: 10px 12px; font-size: .92rem; }
}

@media screen { .print-only { display: none !important; } }

@media print {
  .site-header, .site-footer, .no-print, .page-head .actions, .tabs { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .table-wrap, .card { border: 0; box-shadow: none; }
  th, td { padding: 6px; }
  .wrap { max-width: none; }
}
