/* ==========================================================
   HART & HEFTIG, Stylesheet
   ========================================================== */

:root {
  --bg:           #0d0d0f;
  --bg-2:         #16161a;
  --bg-3:         #1f1f24;
  --card:         #202028;
  --border:       #2a2a32;
  --text:         #f5f5f5;
  --text-muted:   #a8a8b3;
  --primary:      #ffb800;          /* Warn-Gelb */
  --primary-dark: #d99c00;
  --accent:       #dc2626;          /* Stop-Rot */
  --accent-dark:  #991b1b;
  --success:      #16a34a;
  --info:         #2563eb;
  --shadow:       0 10px 40px rgba(0,0,0,.5);
  --radius:       6px;
  --radius-lg:    14px;
  --container:    1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }

h1, h2, h3, h4 {
  font-family: 'Bebas Neue', 'Oswald', Impact, sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 .5em;
  line-height: 1.1;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.4rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: #000; padding: .5rem 1rem; z-index: 999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ===== Hazard Stripe ===== */
.hazard-stripe {
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    var(--primary) 0 18px,
    #111 18px 36px
  );
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,13,15,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: .75rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: .75rem;
  color: var(--text); font-weight: 700;
}
.brand img { width: 56px; height: 56px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-line1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem; letter-spacing: 2px; color: var(--primary);
}
.brand-line2 {
  font-size: .75rem; letter-spacing: 4px; color: var(--text-muted);
  text-transform: uppercase;
}

.primary-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: .25rem; align-items: center;
}
.primary-nav a {
  display: inline-block;
  padding: .55rem 1rem;
  color: var(--text);
  font-weight: 600; font-size: .95rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: all .2s;
}
.primary-nav a:hover { background: var(--bg-3); color: var(--primary); }
.primary-nav a.active { color: var(--primary); border-color: var(--primary); }
.primary-nav a.cta {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.primary-nav a.cta:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.primary-nav a.ghost {
  border-color: var(--border);
}
.primary-nav a.ghost:hover { border-color: var(--primary); }

.nav-toggle {
  display: none;
  background: transparent; border: 2px solid var(--border);
  padding: .5rem; border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--primary); margin: 4px 0;
  transition: all .2s;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  .primary-nav.open { max-height: 600px; }
  .primary-nav ul { flex-direction: column; padding: 1rem; gap: .5rem; }
  .primary-nav a { width: 100%; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 5rem 1.25rem 6rem;
  background:
    radial-gradient(ellipse at top right, rgba(255,184,0,.15), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(220,38,38,.12), transparent 50%),
    var(--bg);
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
}
.hero h1 { color: #fff; }
.hero h1 .accent { color: var(--primary); }
.hero .lead {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 700px; margin: 1rem auto 2rem;
}
.hero-actions {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
}

/* ===== Container ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 4rem 1.25rem;
}
.container.narrow { max-width: 800px; }
.container.wide { max-width: 1500px; }

.section-title {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 2rem;
}
.section-title::after {
  content: ''; flex: 1; height: 4px;
  background: repeating-linear-gradient(-45deg, var(--primary) 0 10px, transparent 10px 20px);
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: .9rem 1.75rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem; letter-spacing: 2px;
  text-transform: uppercase;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}
.btn-primary {
  background: var(--primary); color: #000; border-color: var(--primary);
}
.btn-danger {
  background: var(--accent, #dc2626); color: #fff; border-color: var(--accent, #dc2626);
}
.btn-danger:hover { filter: brightness(1.1); }
.btn-primary:hover { background: #fff; border-color: #fff; color: #000; }
.btn-accent {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn-accent:hover { background: #fff; color: var(--accent); }
.btn-ghost {
  background: transparent; color: var(--text); border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ===== Cards ===== */
.grid { display: grid; gap: 1.5rem; }
/* Abstand, wenn direkt nach einem Karten-Grid eine neue Abschnitts-Überschrift folgt */
.grid + .section-title,
.form-card + .section-title { margin-top: 2.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); border-color: var(--primary); }
.card h3 { color: var(--primary); }

.team-card {
  text-align: center;
  position: relative;
  overflow: hidden;
}
.team-card .avatar {
  width: 120px; height: 120px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--bg-3);
  border: 3px solid var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: var(--primary);
}
.team-card .role {
  color: var(--accent);
  font-weight: 600;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.team-card.unofficial {
  border-style: dashed;
  opacity: .9;
}
.team-card.unofficial .avatar {
  border-color: var(--accent);
  border-style: dashed;
}

.vehicle-card {
  display: flex;
  flex-direction: column;
}
.vehicle-card .vehicle-img {
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  height: 200px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}
.vehicle-card .badge {
  display: inline-block;
  padding: .25rem .75rem;
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  border-radius: 999px;
  font-weight: 600;
  margin-bottom: .5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.vehicle-card .badge.mascot { background: var(--primary); color: #000; }
.vehicle-card .badge.coming { background: var(--info); }

/* ===== Forms ===== */
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 700px;
  margin: 0 auto;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.form-group {
  display: flex; flex-direction: column;
  margin-bottom: 1rem;
}
.form-group label {
  font-weight: 600;
  margin-bottom: .35rem;
  color: var(--text);
  font-size: .95rem;
}
.form-group label .req { color: var(--accent); }
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .7rem .9rem;
  color: var(--text);
  font: inherit;
  transition: border-color .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,184,0,.15);
}
.form-group textarea { min-height: 110px; resize: vertical; }
.form-group .hint {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .25rem;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  border-left: 4px solid;
}
.alert-success { background: rgba(22,163,74,.12); border-color: var(--success); color: #86efac; }
.alert-error   { background: rgba(220,38,38,.12); border-color: var(--accent);  color: #fca5a5; }
.alert-info    { background: rgba(37,99,235,.12); border-color: var(--info);    color: #93c5fd; }

/* ===== Map ===== */
#schlagloch-map {
  height: 380px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
  z-index: 1;
}

/* ===== Tables ===== */
.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
table.data {
  width: 100%;
  border-collapse: collapse;
}
table.data th, table.data td {
  padding: .9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.data th {
  background: var(--bg-3);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1px;
  color: var(--primary);
  font-weight: 400;
}
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: rgba(255,255,255,.02); }

.status-pill {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.status-pill.neu             { background: var(--accent); color: #fff; }
.status-pill.in_bearbeitung  { background: var(--info); color: #fff; }
.status-pill.erledigt        { background: var(--success); color: #fff; }
.status-pill.nicht_zustaendig{ background: #555; color: #fff; }
.status-pill.offen           { background: var(--accent); color: #fff; }
.status-pill.bestellt        { background: var(--info); color: #fff; }
.status-pill.erhalten        { background: var(--success); color: #fff; }
.status-pill.storniert       { background: #555; color: #fff; }
.status-pill.role-admin      { background: var(--primary); color: #0d0d0f; }
.status-pill.role-lead       { background: var(--info);    color: #fff; }
.status-pill.role-extern     { background: #3a3f4b;        color: #cfd3da; }
.status-pill.role-intern     { background: #e6e6ea;        color: #0d0d0f; }

/* ===== Dashboard (Mitglieder + Admin), aktions-fokussiert ===== */
.dash-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, var(--primary) 0%, #e0a000 100%);
  color: #000;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
  box-shadow: 0 4px 0 rgba(0,0,0,.35);
}
.dash-hero:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(0,0,0,.35); }
.dash-hero:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.dash-hero-icon { font-size: 2.75rem; line-height: 1; }
.dash-hero-text { display: flex; flex-direction: column; gap: .2rem; }
.dash-hero-text strong {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.7rem;
  letter-spacing: 1.5px;
  line-height: 1.1;
}
.dash-hero-text span { font-size: .95rem; opacity: .85; }
.dash-hero-wrap { margin-bottom: 1.5rem; }
.dash-hero-wrap .dash-hero { margin-bottom: .6rem; }
.dash-hero-modes { display: flex; gap: .5rem; flex-wrap: wrap; }
.dash-hero-modes a {
  flex: 1; min-width: 140px; text-align: center;
  padding: .6rem .8rem; font-size: .85rem; text-decoration: none;
  color: var(--text-muted); background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.dash-hero-modes a.is-active { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.dash-hero-modes a:hover { color: var(--primary); border-color: var(--primary); }

.dash-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 2rem;
}
.dash-badge {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: .7rem 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .12s ease, transform .12s ease;
}
.dash-badge:hover { border-left-color: var(--accent); transform: translateY(-1px); }
.dash-badge-icon { font-size: 1.1rem; }
.dash-badge-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.9rem;
  color: var(--primary);
  line-height: 1;
}
.dash-badge-label {
  color: var(--text-muted);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.dash-allclear {
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.4);
  color: var(--success);
  border-radius: var(--radius);
  padding: .9rem 1.25rem;
  margin-bottom: 2rem;
  font-weight: 600;
}
@media (max-width: 520px) {
  .dash-hero-icon { font-size: 2.2rem; }
  .dash-hero-text strong { font-size: 1.4rem; }
  .dash-badge { flex: 1; min-width: 140px; }
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 3rem 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-col h3 {
  color: var(--primary);
  margin-bottom: .5rem;
}
.footer-col h4 {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 2px;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .35rem; }
.footer-col a { color: var(--text-muted); }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  text-align: center;
  padding: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .85rem;
}
.muted { color: var(--text-muted); }

@media (max-width: 700px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ===== Tagesbericht-Editor ===== */
.tb-fields {
  display: grid;
  grid-template-columns: 80px 100px 1fr 90px 100px;
  gap: .5rem;
  margin-bottom: .75rem;
}
.tb-field-group { display: flex; flex-direction: column; min-width: 0; }
.tb-field-group > label {
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: .25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tb-input {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .55rem .6rem;
  font: inherit;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.tb-input:focus { outline: none; border-color: var(--primary); }
.tb-input-locked {
  cursor: default;
  font-weight: 600;
  color: var(--primary);
  background: var(--card);
  border-style: dashed;
}
.tb-input-locked:focus { border-color: var(--border); }

/* Bulk-Zuweisung Fahr-/Absicherungs-/Rüstzeit für alle Mitarbeiter */
.tb-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: .25rem 0 .75rem;
  padding: .6rem .75rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tb-bulk-label { font-weight: 600; font-size: .9rem; }
.tb-bulk label {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  color: var(--text-muted);
}
.tb-bulk .tb-input { width: 72px; }
.tb-bulk .tb-hint { flex-basis: 100%; margin: 0; }

/* Zuklappbare Stellen im Tagesbericht */
.tb-entry-toggle {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  text-align: left;
}
.tb-entry-caret {
  font-size: .9rem;
  color: var(--text-muted);
  width: 1rem;
  flex-shrink: 0;
}
.tb-entry-summary { display: none; }
.tb-entry.is-collapsed .tb-entry-body { display: none; }
.tb-entry.is-collapsed .tb-entry-summary {
  display: block;
  cursor: pointer;
}
.tb-entry.is-collapsed { padding-bottom: .85rem !important; }
.tb-sum-act {
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: .35rem;
}
.tb-sum-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.tb-sum-chip {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .78rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.tb-hint {
  display: block;
  margin-top: .25rem;
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Tätigkeitsdropdown + ?-Tooltip */
.tb-activity-row {
  display: flex;
  gap: .4rem;
  align-items: center;
  min-width: 0;
}
.tb-activity-row .tb-input { flex: 1; min-width: 0; }

.tb-info-btn {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
  line-height: 1;
}
.tb-info-btn:hover,
.tb-info-btn:focus {
  background: var(--primary);
  color: #000;
  outline: none;
}
.tb-info-btn:hover::after,
.tb-info-btn:focus::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: var(--bg-3);
  color: var(--text);
  padding: .65rem .85rem;
  border-radius: 6px;
  border: 1px solid var(--primary);
  white-space: normal;
  width: max-content;
  max-width: 320px;
  z-index: 100;
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  text-align: left;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  pointer-events: none;
}
@media (max-width: 520px) {
  .tb-info-btn:hover::after,
  .tb-info-btn:focus::after {
    right: auto;
    left: 0;
    max-width: calc(100vw - 2rem);
  }
}

.tb-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: .5rem;
}

.tb-vehicle-slot {
  display: grid;
  grid-template-columns: 1fr 80px 36px;
  gap: .4rem;
  align-items: center;
}

/* Anbaugeräte-Chips unter einer Fahrzeug-Zeile (Träger-Fahrzeuge) */
.tb-attach-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: -.1rem 0 .15rem;
  padding-left: .1rem;
}
.tb-attach-chip {
  background: var(--bg-2);
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 999px;
  padding: .2rem .65rem;
  font-size: .78rem;
  cursor: pointer;
  line-height: 1.3;
}
.tb-attach-chip:hover {
  border-style: solid;
  border-color: var(--primary);
  color: var(--primary);
}

.tb-hours-row {
  display: grid;
  grid-template-columns: 1fr 90px 130px;
  gap: .5rem;
  align-items: center;
}
.tb-max-cell { font-size: .8rem; color: var(--text-muted); }

.tb-member-card {
  padding: .6rem .9rem !important;
  display: flex;
  gap: .6rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Zeitpaare in den Bottom-Zellen */
.tb-time-pair {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.tb-time-pair input { width: 100%; min-width: 0; }

/* Bottom-Tabelle: Spaltenbreiten */
.tb-bottom-table th:nth-child(2),
.tb-bottom-table th:nth-child(3),
.tb-bottom-table th:nth-child(4) { width: 90px; }
.tb-bottom-table th:nth-child(5),
.tb-bottom-table th:nth-child(6),
.tb-bottom-table th:nth-child(7) { width: 130px; }

/* ----- Bottom-Tabelle als Cards auf Mobil ----- */
@media (max-width: 800px) {
  .tb-bottom-wrap {
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
  }
  .tb-bottom-table { display: block; width: 100%; }
  .tb-bottom-table thead { display: none; }
  .tb-bottom-table tbody { display: block; }
  .tb-bottom-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem .8rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: .75rem;
  }
  .tb-bottom-table tr:hover td { background: transparent !important; }
  .tb-bottom-table td {
    display: block;
    padding: 0 !important;
    border: none !important;
  }
  .tb-bottom-table td::before {
    content: attr(data-label);
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: .8rem;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: .35rem;
    line-height: 1;
  }
  .tb-bottom-table td[data-label="Mitarbeiter"] {
    grid-column: 1 / -1;
    padding-bottom: .6rem !important;
    border-bottom: 1px solid var(--border) !important;
    margin-bottom: .25rem;
  }
  .tb-bottom-table td[data-label="Mitarbeiter"]::before { display: none; }
  .tb-bottom-table td[data-label="Arbeitszeit"],
  .tb-bottom-table td[data-label="Außerplanmäßig"],
  .tb-bottom-table td[data-label="Σ benötigt / max"] {
    grid-column: 1 / -1;
  }
  /* Zeitpaare nebeneinander auf Mobil */
  .tb-bottom-table .tb-time-pair {
    flex-direction: row;
    gap: .5rem;
  }
  .tb-bottom-table .tb-time-pair input { flex: 1; }
}

/* ----- Tagesberichte-Liste als Cards auf Mobil ----- */
@media (max-width: 800px) {
  .tb-reports-wrap {
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
  }
  .tb-reports { display: block; width: 100%; }
  .tb-reports thead { display: none; }
  .tb-reports tbody { display: block; }
  .tb-reports tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .7rem .8rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: .75rem;
  }
  .tb-reports tr:hover td { background: transparent !important; }
  .tb-reports td {
    display: block;
    padding: 0 !important;
    border: none !important;
  }
  .tb-reports td::before {
    content: attr(data-label);
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: .75rem;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: .25rem;
    line-height: 1;
  }
  /* Explizite Grid-Platzierung, DOM-Reihenfolge (Bericht, Datum, Ausführender,
     Stellen, Mitarbeiter, Status, Aktionen) weicht von der Card-Optik ab. */
  /* Kopfzeile: Bericht-Nr. links groß, Status rechts, kein Label */
  .tb-reports td[data-label="Bericht"] {
    grid-row: 1; grid-column: 1;
    font-size: 1.25rem;
    align-self: center;
  }
  .tb-reports td[data-label="Bericht"]::before { display: none; }
  .tb-reports td[data-label="Status"] {
    grid-row: 1; grid-column: 2;
    text-align: right;
    align-self: center;
  }
  .tb-reports td[data-label="Status"]::before { display: none; }
  .tb-reports td[data-label="Datum"] {
    grid-row: 2; grid-column: 1 / -1;
    border-top: 1px solid var(--border) !important;
    padding-top: .7rem !important;
  }
  .tb-reports td[data-label="Ausführender"] {
    grid-row: 3; grid-column: 1 / -1;
  }
  .tb-reports td[data-label="Stellen"]     { grid-row: 4; grid-column: 1; }
  .tb-reports td[data-label="Mitarbeiter"] { grid-row: 4; grid-column: 2; }
  /* Aktionen volle Breite, Buttons als striktes 2er-Raster
     (immer zwei nebeneinander: Bearbeiten|Löschen / Tracks|PDF) */
  .tb-reports td[data-label="Aktionen"] {
    grid-row: 5; grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .4rem;
    border-top: 1px solid var(--border) !important;
    padding-top: .7rem !important;
  }
  .tb-reports td[data-label="Aktionen"]::before {
    grid-column: 1 / -1;
  }
  .tb-reports td[data-label="Aktionen"] > .btn,
  .tb-reports td[data-label="Aktionen"] > form { width: auto; min-width: 0; text-align: center; }
  .tb-reports td[data-label="Aktionen"] > form .btn { width: 100%; }
}

/* ----- Bestellliste als Cards auf Mobil ----- */
@media (max-width: 800px) {
  .tb-orders-wrap {
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
  }
  .tb-orders { display: block; width: 100%; }
  .tb-orders thead { display: none; }
  .tb-orders tbody { display: block; }
  .tb-orders tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .7rem .8rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: .75rem;
  }
  .tb-orders tr:hover td { background: transparent !important; }
  .tb-orders td {
    display: block;
    padding: 0 !important;
    border: none !important;
  }
  .tb-orders td::before {
    content: attr(data-label);
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: .75rem;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: .25rem;
    line-height: 1;
  }
  /* Explizite Grid-Platzierung, DOM-Reihenfolge (Datum, Mitglied, Artikel,
     Größe, Farbe, Anzahl, Status, Status ändern) weicht von der Card-Optik ab. */
  .tb-orders td[data-label="Mitglied"] {
    grid-row: 1; grid-column: 1;
    font-size: 1.1rem;
    align-self: center;
  }
  .tb-orders td[data-label="Mitglied"]::before { display: none; }
  .tb-orders td[data-label="Status"] {
    grid-row: 1; grid-column: 2;
    text-align: right;
    align-self: center;
  }
  .tb-orders td[data-label="Status"]::before { display: none; }
  .tb-orders td[data-label="Artikel"] {
    grid-row: 2; grid-column: 1 / -1;
    border-top: 1px solid var(--border) !important;
    padding-top: .7rem !important;
  }
  .tb-orders td[data-label="Größe"]  { grid-row: 3; grid-column: 1; }
  .tb-orders td[data-label="Farbe"]  { grid-row: 3; grid-column: 2; }
  .tb-orders td[data-label="Anzahl"] { grid-row: 4; grid-column: 1; }
  .tb-orders td[data-label="Datum"]  { grid-row: 4; grid-column: 2; }
  .tb-orders td[data-label="Status ändern"] {
    grid-row: 5; grid-column: 1 / -1;
    border-top: 1px solid var(--border) !important;
    padding-top: .7rem !important;
  }
  .tb-orders td[data-label="Status ändern"] form { width: 100%; }
  .tb-orders td[data-label="Status ändern"] select {
    flex: 1;
    padding: .5rem !important;
    font-size: .95rem;
  }
}

/* Mitglieder-Tabelle (Desktop): kompakter + lange Felder umbrechen,
   damit der breitere Container ohne Horizontal-Scroll auskommt */
.adm-members th, .adm-members td { padding: .65rem .7rem; }
.adm-members .adm-email { word-break: break-word; }
.adm-members td[data-label="Benutzername"] code { word-break: break-all; }

/* ----- Mitglieder-Verwaltung als Cards auf Mobil ----- */
@media (max-width: 800px) {
  .adm-members-wrap {
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
  }
  .adm-members { display: block; width: 100%; }
  .adm-members thead { display: none; }
  .adm-members tbody { display: block; }
  .adm-members tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .7rem .8rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: .75rem;
  }
  .adm-members tr:hover td { background: transparent !important; }
  .adm-members td {
    display: block;
    padding: 0 !important;
    border: none !important;
    min-width: 0;
  }
  .adm-members td::before {
    content: attr(data-label);
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: .75rem;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: .25rem;
    line-height: 1;
  }
  /* Explizite Grid-Platzierung (DOM: Name, Spitzname, Benutzername, Rolle,
     E-Mail, Typ, Status, Aktionen) */
  .adm-members td[data-label="Name"] {
    grid-row: 1; grid-column: 1;
    font-size: 1.15rem;
    align-self: center;
  }
  .adm-members td[data-label="Name"]::before { display: none; }
  .adm-members td[data-label="Status"] {
    grid-row: 1; grid-column: 2;
    text-align: right;
    align-self: center;
  }
  .adm-members td[data-label="Status"]::before { display: none; }
  .adm-members td[data-label="Benutzername"] { grid-row: 2; grid-column: 1; }
  .adm-members td[data-label="Typ"]          { grid-row: 2; grid-column: 2; }
  .adm-members td[data-label="Spitzname"]    { grid-row: 3; grid-column: 1; }
  .adm-members td[data-label="Rolle"]        { grid-row: 3; grid-column: 2; }
  .adm-members td[data-label="E-Mail"] {
    grid-row: 4; grid-column: 1 / -1;
    word-break: break-word;
    border-top: 1px solid var(--border) !important;
    padding-top: .7rem !important;
  }
  .adm-members td[data-label="Aktionen"] {
    grid-row: 5; grid-column: 1 / -1;
    border-top: 1px solid var(--border) !important;
    padding-top: .7rem !important;
  }
  .adm-members td[data-label="Aktionen"]::before { display: none; }
  .adm-members td[data-label="Aktionen"] > div { gap: .5rem; }
  .adm-members td[data-label="Aktionen"] .btn,
  .adm-members td[data-label="Aktionen"] form { flex: 1; min-width: 110px; }
  .adm-members td[data-label="Aktionen"] form .btn { width: 100%; }
}

@media (max-width: 900px) {
  .tb-fields { grid-template-columns: 1fr 1fr; }
  .tb-split  { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .tb-fields { grid-template-columns: 1fr; }
  .tb-hours-row {
    grid-template-columns: 1fr 90px;
    gap: .3rem .5rem;
  }
  .tb-hours-row .tb-max-cell {
    grid-column: 1 / -1;
    text-align: right;
  }
  .tb-vehicle-slot { grid-template-columns: 1fr 70px 32px; }
  .tb-member-card { font-size: .9rem; }
}

/* ===== Tätigkeits-Katalog-Sidebar ===== */
.catalog-toggle {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: .5rem .9rem;
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  transition: all .15s;
}
.catalog-toggle:hover { border-color: var(--primary); color: var(--primary); }

/* ===== Schnellauswahl-Kacheln (Lieblings-Tätigkeiten) ===== */
.fav-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: stretch;
  margin-bottom: 1rem;
  padding: .75rem;
  background: var(--bg-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.fav-tiles-label {
  align-self: center;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 0 .25rem;
}
.fav-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .15rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  color: var(--text);
  padding: .55rem .8rem;
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  min-width: 130px;
  max-width: 220px;
  text-align: left;
  transition: all .15s;
}
.fav-tile:hover {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
  transform: translateY(-1px);
}
.fav-tile-code {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--primary);
  letter-spacing: .03em;
}
.fav-tile:hover .fav-tile-code { color: #000; }
.fav-tile-desc {
  font-size: .8rem;
  line-height: 1.15;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fav-tile-unit {
  font-size: .7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}
.fav-tile:hover .fav-tile-unit { color: rgba(0,0,0,.65); }
@media (max-width: 600px) {
  .fav-tile { min-width: 110px; padding: .5rem .65rem; }
  .fav-tile-code { font-size: 1.1rem; }
  .fav-tile-desc { font-size: .75rem; }
}

/* ===== Notizen-Block mit Spracheingabe ===== */
.tb-notes-wrap {
  display: flex;
  gap: .5rem;
  align-items: stretch;
  margin-top: .4rem;
}
.tb-notes-area {
  flex: 1;
  min-height: 70px;
  resize: vertical;
}
.tb-mic-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  padding: .5rem .65rem;
  min-width: 70px;
  transition: all .15s;
}
.tb-mic-btn:hover { border-color: var(--primary); color: var(--primary); }
.tb-mic-icon { font-size: 1.4rem; line-height: 1; }
.tb-mic-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.tb-mic-btn.listening {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  animation: tb-mic-pulse 1.2s infinite;
}
.tb-mic-btn.listening .tb-mic-icon { animation: tb-mic-wobble .9s infinite; }
@keyframes tb-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, .55); }
  50%      { box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); }
}
@keyframes tb-mic-wobble {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}
@media (max-width: 600px) {
  .tb-mic-btn { min-width: 60px; padding: .4rem .5rem; }
  .tb-mic-icon { font-size: 1.2rem; }
}

.catalog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 998;
}
.catalog-backdrop.open { opacity: 1; pointer-events: auto; }

.catalog-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 100vw;
  background: var(--bg-2);
  border-left: 3px solid var(--primary);
  box-shadow: -8px 0 30px rgba(0,0,0,.6);
  transform: translateX(100%);
  transition: transform .25s ease;
  z-index: 999;
  display: flex;
  flex-direction: column;
}
.catalog-panel.open { transform: translateX(0); }

.catalog-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
}
.catalog-header h3 {
  flex: 1;
  margin: 0;
  font-size: 1.2rem;
  color: var(--primary);
}
.catalog-close {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.catalog-close:hover { border-color: var(--accent); color: var(--accent); }

.catalog-search {
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.catalog-search input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: .65rem .85rem;
  font: inherit;
  font-size: .95rem;
}
.catalog-search input:focus {
  outline: none;
  border-color: var(--primary);
}

.catalog-list {
  flex: 1;
  overflow-y: auto;
  padding: .5rem 0;
  -webkit-overflow-scrolling: touch;
}

.catalog-group { padding: .5rem 0; }
.catalog-group-title {
  margin: 0;
  padding: .5rem 1.25rem;
  background: var(--bg);
  color: var(--primary);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 1.5px;
  position: sticky;
  top: 0;
  z-index: 1;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.catalog-item {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: .75rem;
  padding: .7rem 1.25rem;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.catalog-item .cat-code {
  color: var(--primary);
  font-weight: 700;
  font-family: monospace;
  font-size: 1rem;
  padding-top: 1px;
}
.catalog-item .cat-desc {
  font-size: .9rem;
  line-height: 1.35;
  color: var(--text);
}
.catalog-item .cat-meta {
  display: block;
  margin-top: .2rem;
  font-size: .75rem;
  color: var(--text-muted);
}
.catalog-item .cat-meta strong { color: var(--text); }

.catalog-empty {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .catalog-panel {
    width: 100vw;
    border-left: none;
    border-top: 3px solid var(--primary);
  }
  .catalog-close {
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
  }
  .catalog-item {
    padding: .85rem 1rem;
  }
}

/* ===== Staging-Banner (nur auf staging.-Subdomain) ===== */
/* Lila statt gelb, damit man sofort sieht, in welchem Tab man ist. */
.staging-banner {
  background: #7c3aed;
  color: #fff;
  text-align: center;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: .35rem .75rem;
  border-bottom: 2px solid #5b21b6;
}

/* ===== PWA-Banners (Install / Update) ===== */
.pwa-bar {
  position: fixed;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: .85rem 1rem;
  display: flex;
  gap: .9rem;
  align-items: center;
  z-index: 250;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  animation: pwaSlideIn .3s ease;
}
.pwa-bar[hidden] { display: none; }
@keyframes pwaSlideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.pwa-bar-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  flex-shrink: 0;
}
.pwa-bar-text {
  flex: 1;
  font-size: .9rem;
  line-height: 1.35;
  min-width: 0;
}
.pwa-bar-text strong { color: var(--primary); }
.pwa-bar-text span { color: var(--text-muted); font-size: .85rem; }
.pwa-bar-actions {
  display: flex;
  gap: .4rem;
  align-items: center;
}
.pwa-bar-actions .btn {
  padding: .5rem 1rem;
  font-size: .85rem;
  letter-spacing: 1px;
}
.pwa-bar-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: .25rem .5rem;
  border-radius: 4px;
}
.pwa-bar-close:hover { color: var(--accent); }

@media (max-width: 520px) {
  .pwa-bar {
    top: auto;
    bottom: 1rem;
    flex-wrap: wrap;
  }
  .pwa-bar-icon { width: 40px; height: 40px; }
  .pwa-bar-actions { width: 100%; justify-content: flex-end; margin-top: .4rem; }
}

/* Standalone-Modus: einige Bildschirm-Anpassungen */
html.is-standalone .cookie-info { display: none !important; }
html.is-standalone body {
  /* Sichere Bereiche auf modernen Phones (Notch etc.) */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
html.is-standalone .site-header {
  padding-top: env(safe-area-inset-top);
}

/* Großer Webseiten-Footer im PWA-Modus ausblenden */
html.is-standalone .site-footer { display: none !important; }

/* PWA: Website-Navigation raus, kompakte Kopfzeile rein.
   Auf der Website (kein is-standalone) bleibt alles unverändert. */
.pwa-headerbar { display: none; }
html.is-standalone .nav-toggle,
html.is-standalone .primary-nav { display: none !important; }
html.is-standalone .brand-text { display: none; }      /* Logo reicht in der App */
html.is-standalone .pwa-headerbar {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-left: auto;
}
.pwa-whoami {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.2;
  text-align: right;
}
.pwa-whoami strong { color: var(--primary); display: block; }
.pwa-home-btn { padding: .45rem .9rem; font-size: .85rem; white-space: nowrap; }

/* Generischer „nur in der App ausblenden"-Helfer (z.B. Dashboard-Begrüßung) */
html.is-standalone .standalone-hide { display: none !important; }

/* Tagesberichte-Kopf: Titel + „+ Neuer Bericht" in EINER Zeile.
   Überschrift bleibt in Originalgröße, stattdessen wird der Button
   kompakt, damit er daneben passt (kein Umbruch, kein Schrumpf-Titel). */
.tb-head { flex-wrap: nowrap; gap: .6rem; align-items: center; }
.tb-head h1 { margin: 0; min-width: 0; }
.tb-head .btn {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: .45rem .8rem;
  font-size: .8rem;
}
@media (max-width: 600px) {
  .tb-head .btn { padding: .4rem .65rem; font-size: .72rem; }
}
html.is-standalone .tb-head .btn { padding: .4rem .65rem; font-size: .72rem; }

/* Dashboard: offenen Tagesbericht fortsetzen, über dem Hero */
.dash-resume {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--bg-3);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  padding: .7rem 1rem;
  margin-bottom: .75rem;
  font-weight: 600;
}
.dash-resume:hover { background: var(--bg-2); }
.dash-resume small {
  margin-left: auto;
  font-weight: 500;
  color: var(--text-muted);
}

/* Mini-Footer (nur im PWA-Modus sichtbar) */
.pwa-footer {
  display: none;
  text-align: center;
  font-size: .72rem;
  color: var(--text-muted);
  padding: .85rem 1rem calc(.85rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  margin-top: 2rem;
  letter-spacing: .5px;
}
.pwa-footer a {
  color: var(--text-muted);
  text-decoration: none;
}
.pwa-footer a:hover { color: var(--primary); }
.pwa-footer .sep { margin: 0 .5rem; opacity: .5; }
/* Versions-„Span" ist in Wahrheit ein Button (klickbar → Changelog-Modal).
   Button-Defaults zurücksetzen, damit es weiter wie der dezente Footer-Text aussieht. */
.pwa-footer .version {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer;
  opacity: .6;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
.pwa-footer .version:hover { opacity: 1; }
html.is-standalone .pwa-footer { display: block; }

/* ===== Changelog-Modal / -Vollseite ===== */
.changelog-modal { max-width: 640px; }
.changelog-frag-h { margin: 0 0 .25rem; font-size: 1.1rem; }
.changelog-frag-sub { font-size: .8rem; margin: 0 0 .75rem; }
.changelog-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .55rem;
}
.changelog-item {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: .65rem;
  padding: .5rem .25rem;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
  line-height: 1.4;
}
.changelog-item:last-child { border-bottom: 0; }
.changelog-date {
  font-family: monospace;
  color: var(--primary);
  white-space: nowrap;
  font-size: .78rem;
  padding-top: .1rem;
}
.changelog-what { color: var(--text); }
.changelog-what code {
  background: var(--bg-3);
  padding: .05rem .3rem;
  border-radius: 3px;
  font-size: .82em;
  word-break: break-word;
}
.changelog-what strong { color: var(--primary); }
@media (max-width: 480px) {
  .changelog-item {
    grid-template-columns: 1fr;
    gap: .15rem;
  }
}

/* ===== Cookie-Hinweis ===== */
.cookie-info {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  z-index: 200;
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
}
.cookie-info[hidden] { display: none; }
.cookie-info-text {
  flex: 1;
  font-size: .9rem;
  min-width: 240px;
  line-height: 1.4;
}
.cookie-info-text a { color: var(--primary); }
.cookie-info .btn {
  padding: .55rem 1.1rem;
  font-size: .9rem;
  letter-spacing: 1px;
}
@media (max-width: 600px) {
  .cookie-info {
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: none;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .cookie-info .btn { width: 100%; }
}

/* ===== Live-Modus (Tagesbericht) ===== */
.live-container {
  max-width: 720px;
  padding-top: .75rem;
  padding-bottom: 1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}
.live-status {
  text-align: center;
  font-size: .9rem;
  padding: 0;
  margin: 0;
}
.live-status:not(:empty) { margin: 0 0 .5rem; }
.live-gps-live {
  font-size: .8rem;
  margin-top: .1rem;
  color: var(--text-muted);
}
.live-list {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.live-empty { padding: 2rem 1.25rem; }

.live-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: .8rem;
  transition: border-color .2s, box-shadow .2s;
}
.live-card-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), 0 8px 24px rgba(255,184,0,.18);
}

/* Header */
.live-card-hdr {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: .7rem;
  row-gap: .15rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .5rem;
  margin-bottom: .6rem;
}
.live-card-title {
  display: flex;
  align-items: baseline;
  gap: .5rem;
}
.live-pos {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  color: var(--text-muted);
}
.live-road {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.35rem;
  color: var(--primary);
  letter-spacing: 1px;
}
.live-activity {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  font-size: .85rem;
}
.live-code {
  font-family: monospace;
  font-weight: 700;
  color: var(--primary);
}
.live-desc {
  color: var(--text-muted);
  line-height: 1.3;
}

/* Counter */
.live-counter {
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  padding: .7rem;
  margin-bottom: .6rem;
}
.live-amount-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .6rem;
  margin-bottom: .4rem;
}
/* Tap auf die Mengen-Anzeige öffnet das Numpad */
.live-amount-button {
  background: transparent;
  border: 2px dashed transparent;
  border-radius: var(--radius);
  cursor: pointer;
  padding: .35rem .75rem;
  transition: border-color .15s, background .15s;
  width: 100%;
  position: relative;
  font: inherit;
  color: inherit;
}
.live-amount-button:hover,
.live-amount-button:active {
  border-color: var(--border);
  background: rgba(255,255,255,.03);
}
.live-amount-edit-hint {
  position: absolute;
  top: .5rem;
  right: .75rem;
  font-size: .85rem;
  color: var(--text-muted);
  opacity: .5;
}
.live-amount-label {
  font-size: .85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.live-amount {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.6rem;
  color: var(--primary);
  line-height: 1;
}
.live-unit {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Step-Beschriftung auf den Buttons */
.live-btn-step {
  display: block;
  line-height: 1;
}
.live-btn-unit {
  display: block;
  font-size: .55em;
  font-family: 'Inter', sans-serif;
  letter-spacing: 1px;
  font-weight: 600;
  opacity: .8;
  margin-top: .25em;
}

/* Counter-Buttons, Mobil-first, viel größer */
.live-counter-buttons {
  display: grid;
  grid-template-columns: 1fr 2.5fr;
  gap: .6rem;
}
.live-btn-minus, .live-btn-plus {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 2px;
  border-radius: var(--radius);
  border: 3px solid;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, background .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.live-btn-minus {
  background: var(--bg-3);
  color: var(--text);
  border-color: var(--border);
  font-size: 1.5rem;
  min-height: 62px;
}
.live-btn-plus {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
  font-size: 2.4rem;
  min-height: 62px;
  box-shadow: 0 4px 0 rgba(0,0,0,.35);
}
.live-btn-minus:active {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(1px);
}
.live-btn-plus:active {
  background: #fff;
  border-color: #fff;
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(0,0,0,.35);
}

/* Timer */
.live-timer {
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  padding: .7rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.live-timer-display {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.live-timer-clock {
  display: block;
  font-family: monospace;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
  line-height: 1.1;
}
.live-card-active .live-timer-clock {
  color: var(--success);
}
.live-timer-rounded {
  display: block;
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .1rem;
}
.live-timer-rounded strong { color: var(--text); font-size: .9rem; }

.live-btn-timer {
  flex: 0 0 auto;
  min-width: 44%;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 2px;
  padding: .6rem 1.4rem;
  min-height: 62px;
  border-radius: var(--radius);
  border: 3px solid;
  cursor: pointer;
  font-weight: 700;
  transition: transform .08s ease, box-shadow .08s ease, background .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  box-shadow: 0 4px 0 rgba(0,0,0,.35);
}
.live-btn-start {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.live-btn-start:active {
  background: #15803d;
  border-color: #15803d;
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(0,0,0,.35);
}
.live-btn-stop {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.live-btn-stop:active {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(0,0,0,.35);
}

/* ===== GPS-Sektion in der Live-Card ===== */
.live-gps {
  margin-top: .6rem;
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  padding: .6rem .7rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.live-gps-active {
  background: rgba(255,184,0,.16);
  border: 1px solid var(--primary);
  animation: live-gps-pulse 1.2s ease-out infinite;
}
.live-gps-paused {
  border: 1px dashed var(--border);
}
/* „Radar": ein einzelner Ring expandiert weit nach außen und fadet aus ,
   klassischer Tracking-Sweep-Look, 1,2s Zyklus. */
@keyframes live-gps-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(255,184,0,.6); }
  100% { box-shadow: 0 0 0 32px rgba(255,184,0,0); }
}
.live-gps-display {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.live-gps-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.live-gps-stats { flex: 1; }
.live-gps-main {
  font-size: 1rem;
  font-weight: 600;
}
.live-gps-main strong {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  color: var(--primary);
  letter-spacing: 1px;
  margin-left: .3rem;
}
.live-gps-sub {
  font-size: .85rem;
  margin-top: .15rem;
}
.live-btn-gps {
  width: 100%;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 1.5px;
  padding: .55rem 1rem;
  min-height: 52px;
  border-radius: var(--radius);
  border: 2px solid;
  cursor: pointer;
  font-weight: 700;
  transition: transform .08s ease, background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.live-btn-gps-start {
  background: var(--bg-3);
  color: var(--primary);
  border-color: var(--primary);
}
.live-btn-gps-start:active {
  background: var(--primary);
  color: #000;
  transform: translateY(1px);
}
.live-btn-gps-stop {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.live-btn-gps-stop:active {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(1px);
}
.live-btn-gps-resume {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.live-btn-gps-resume:active {
  background: #15803d;
  border-color: #15803d;
  transform: translateY(1px);
}
.live-btn-gps-pause {
  background: var(--bg-3);
  color: var(--primary);
  border-color: var(--primary);
}
.live-btn-gps-pause:active {
  background: var(--primary);
  color: #000;
  transform: translateY(1px);
}
.live-btn-gps-cancel {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.live-btn-gps-cancel:active {
  background: var(--bg-3);
  color: var(--text);
  transform: translateY(1px);
}
.live-gps-armed-head {
  font-size: .8rem;
  text-align: center;
  padding: 0;
  line-height: 1.25;
}
/* Armed-Aktionen kompakter als die regulären GPS-Buttons, weil daneben
   noch der Header steht und die Stelle sonst aus dem Bild rutscht. */
.live-gps-armed .live-btn-gps {
  min-height: 46px;
  padding: .4rem .9rem;
  font-size: 1.1rem;
}
.live-gps-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}

/* ===== GPS-Tracks-Karte (tagesbericht_tracks.php) ===== */
.tracks-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1rem;
  align-items: stretch;
}
.tracks-map {
  height: 70vh;
  min-height: 480px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-2);
}
.tracks-sidebar {
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 1rem;
  max-height: 70vh;
  overflow-y: auto;
}
.tracks-list { display: flex; flex-direction: column; gap: .5rem; }
.track-item {
  display: flex;
  gap: .5rem;
  align-items: stretch;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .55rem .65rem;
}
.track-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding-top: .15rem;
  cursor: pointer;
}
.track-color {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25);
  background: var(--primary);
}
.track-info {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
  padding: 0;
}
.track-info:hover .track-title { color: var(--primary); }
.track-title {
  font-weight: 600;
  font-size: .95rem;
  display: flex;
  gap: .4rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.track-act {
  font-family: monospace;
  font-size: .8rem;
  color: var(--primary);
  background: rgba(255,184,0,.15);
  padding: 0 .3rem;
  border-radius: 3px;
}
.track-meta { font-size: .82rem; line-height: 1.4; }

.track-delete-form { display: flex; align-items: flex-start; margin: 0; }
.track-delete-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: .3rem .45rem;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1;
  transition: all .15s;
}
.track-delete-btn:hover {
  background: rgba(220, 38, 38, .15);
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 900px) {
  .tracks-layout { grid-template-columns: 1fr; }
  .tracks-map { height: 55vh; min-height: 360px; }
  .tracks-sidebar { max-height: none; }
}

/* Tablet/Desktop: Mengen-Buttons-Verhältnis etwas ruhiger, sonst
   bewusst dieselbe kompakte Dichte wie auf dem Handy (kein Vergrößern). */
@media (min-width: 768px) {
  .live-counter-buttons { grid-template-columns: 1fr 2fr; }
}

/* Auf SEHR schmalen Bildschirmen (kleine Handys) Cards full-bleed */
@media (max-width: 380px) {
  .live-container { padding-left: .5rem; padding-right: .5rem; }
  .live-card { padding: .65rem; }
  .live-counter, .live-timer { padding: .6rem; }
}

/* ===== Aufträge / Todo-Liste ===== */

/* Filter-Leiste */
.task-filters {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: .5rem;
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
/* View-Umschalter: am Desktop rechts, am Handy eigene linksbündige Zeile
   mit Trenner (sonst schob margin-left:auto ihn nach Umbruch komisch ein) */
.task-view-toggle {
  margin-left: auto;
  display: flex;
  gap: .4rem;
}
@media (max-width: 640px) {
  .task-view-toggle {
    margin-left: 0;
    flex-basis: 100%;
    margin-top: .5rem;
    padding-top: .5rem;
    border-top: 1px solid var(--border);
  }
}

.task-filter {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem .9rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  color: var(--text);
  font-weight: 600;
  font-size: .85rem;
  text-decoration: none;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.task-filter:hover { background: var(--bg-3); color: var(--primary); }
.task-filter.is-active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}
.task-filter-count {
  background: rgba(0,0,0,.3);
  color: inherit;
  padding: 0 .45rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}
.task-filter.is-active .task-filter-count {
  background: rgba(0,0,0,.2);
}

/* Auftrag-Liste */
.task-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.task-card {
  display: flex;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: var(--radius-lg);
  padding: .85rem 1rem;
  color: inherit;
  text-decoration: none;
  transition: transform .12s, border-color .12s, box-shadow .12s;
  -webkit-tap-highlight-color: transparent;
}
.task-card:hover, .task-card:active {
  transform: translateY(-1px);
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(0,0,0,.3);
}
.task-status-offen         { border-left-color: var(--accent); }
.task-status-in_bearbeitung{ border-left-color: var(--info); }
.task-status-erledigt      { border-left-color: var(--success); opacity: .75; }
.task-status-verworfen     { border-left-color: #555; opacity: .55; }

.task-thumb {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.task-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.task-thumb-empty {
  font-size: 2rem;
  color: var(--text-muted);
}

.task-content {
  flex: 1;
  min-width: 0;
}
.task-card-hdr {
  display: flex;
  gap: .4rem;
  align-items: center;
  margin-bottom: .3rem;
  flex-wrap: wrap;
}
.task-title {
  margin: .15rem 0 .35rem;
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.2;
}
.task-desc {
  margin: 0 0 .5rem;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.35;
}
.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .8rem;
  color: var(--text);
}
.task-meta .muted { color: var(--text-muted); }

.task-prio-high {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.task-prio-low {
  display: inline-block;
  background: var(--bg-3);
  color: var(--text-muted);
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: 1px;
}

@media (max-width: 480px) {
  .task-card { padding: .65rem .75rem; gap: .75rem; }
  .task-thumb { flex: 0 0 64px; width: 64px; height: 64px; }
  .task-title { font-size: 1rem; }
}

/* Mehrfach-Zuweisung: Tap-fertige Checkbox-Kacheln */
.task-assignees {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .5rem;
  margin-top: .35rem;
}
.task-assignee {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem .85rem;
  background: var(--bg-2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.task-assignee:hover { border-color: var(--primary); }
.task-assignee.is-checked {
  border-color: var(--primary);
  background: rgba(255,184,0,.12);
}
.task-assignee input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--primary);
}
.task-assignee-name {
  flex: 1;
  font-size: .95rem;
}

/* Detail-Seite */
.task-status-bar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: .85rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.task-status-current {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: .95rem;
}

.task-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: .6rem;
  margin-bottom: .75rem;
}
.task-photo a { display: block; }
.task-photo img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}

.status-pill.verworfen { background: #555; color: #fff; }

/* ===== Auftrags-Verlauf (Timeline) ===== */
.task-timeline {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1.25rem;
}
.task-event {
  display: flex;
  gap: .6rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
  padding: .6rem .8rem;
}
.task-event.ev-created { border-left-color: var(--text-muted); }
.task-event.ev-status  { border-left-color: var(--info); }
.task-event.ev-assign  { border-left-color: var(--primary); }
.task-event.ev-comment { border-left-color: var(--success); }
.task-event-icon { font-size: 1.1rem; line-height: 1.4; flex-shrink: 0; }
.task-event-body { flex: 1; min-width: 0; }
.task-event-head {
  display: flex;
  gap: .5rem;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: .9rem;
}
.task-event-head .muted { font-size: .8rem; }
.task-event-text {
  font-size: .9rem;
  margin-top: .15rem;
  word-wrap: break-word;
}
.task-comment-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: .85rem 1rem;
  margin-bottom: 1.5rem;
}

/* ===== Numpad-Overlay ===== */
body.no-scroll { overflow: hidden; }

.live-numpad {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.live-numpad[hidden] { display: none; }
.live-numpad-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(2px);
}
.live-numpad-panel {
  position: relative;
  background: var(--card);
  border: 2px solid var(--primary);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 520px;
  padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 60px rgba(0,0,0,.6);
  animation: numpadSlide .25s ease;
}
@keyframes numpadSlide {
  from { transform: translateY(20%); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}
.live-numpad-hdr {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.live-numpad-hdr h3 {
  margin: 0 0 .25rem;
  color: var(--primary);
  font-size: 1.3rem;
}
.live-numpad-context {
  font-size: .9rem;
  color: var(--text-muted);
  font-family: monospace;
}
.live-numpad-x {
  margin-left: auto;
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}
.live-numpad-x:active { border-color: var(--accent); color: var(--accent); }

.live-numpad-display {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  text-align: right;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  color: var(--primary);
  letter-spacing: 1px;
  line-height: 1;
  margin-bottom: 1rem;
  min-height: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-numpad-keys {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .6rem;
  margin-bottom: 1rem;
}
.live-numpad-keys button {
  background: var(--bg-2);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  min-height: 64px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  transition: transform .08s, background .15s;
}
.live-numpad-keys button:active {
  background: var(--bg-3);
  transform: scale(.96);
}

.live-numpad-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: .6rem;
}
.live-numpad-cancel, .live-numpad-save {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 2px;
  padding: 1rem;
  border-radius: var(--radius);
  border: 3px solid;
  cursor: pointer;
  font-weight: 700;
  min-height: 60px;
  -webkit-tap-highlight-color: transparent;
}
.live-numpad-cancel {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.live-numpad-save {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.live-numpad-save:active { background: #15803d; border-color: #15803d; }

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* ===== Tagesbericht Schnell-Erfassung (Wizard) ===== */
.wiz-container { max-width: 720px; padding-bottom: 6rem; }

.wiz-progress { display: flex; gap: .35rem; margin: 0 0 1.25rem; }
.wiz-dot {
  flex: 1; text-align: center; font-size: .7rem; letter-spacing: .5px;
  text-transform: uppercase; color: var(--text-muted);
  padding: .45rem .2rem; border-radius: 999px; background: var(--bg-2);
  border: 1px solid var(--border); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer; user-select: none; transition: border-color .15s, color .15s;
}
.wiz-dot:hover { border-color: var(--primary); color: var(--text); }
.wiz-dot:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.wiz-dot.is-active { color: #1a1a1a; background: var(--primary); border-color: var(--primary); font-weight: 700; }
.wiz-dot.is-done   { color: var(--success); border-color: var(--success); }

.wiz-step { animation: pwaSlideIn .2s ease; }
.wiz-h  { font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem; color: var(--primary); margin: 0 0 .35rem; letter-spacing: 1px; }
.wiz-h3 { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; color: var(--text); margin: 1.75rem 0 .35rem; }
.wiz-hint { color: var(--text-muted); font-size: .85rem; margin: .15rem 0 1rem; }
.wiz-count, .wiz-net { font-size: 1rem; margin-top: 1rem; }
.wiz-net strong, .wiz-count strong { color: var(--primary); }
.wiz-empty { color: var(--text-muted); text-align: center; padding: 2rem 1rem; }

.wiz-tilegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.wiz-tile {
  position: relative; display: flex; flex-direction: column; gap: .2rem;
  align-items: center; justify-content: center; text-align: center;
  min-height: 78px; padding: .9rem .6rem; cursor: pointer;
  background: var(--card); color: var(--text);
  border: 2px solid var(--border); border-radius: var(--radius-lg); font: inherit;
}
.wiz-tile:active { transform: scale(.97); }
.wiz-tile.is-sel { border-color: var(--primary); background: rgba(255,184,0,.12); }
.wiz-tile-big { font-size: 1.1rem; font-weight: 700; }
.wiz-tile-sub { font-size: .8rem; color: var(--text-muted); }
.wiz-person { min-height: 64px; }
.wiz-check { position: absolute; top: .35rem; right: .5rem; color: var(--primary); font-weight: 700; }

.wiz-datelabel { display: block; margin-top: 1.25rem; font-size: .9rem; color: var(--text-muted); }
.wiz-datelabel input { display: block; margin-top: .35rem; width: 100%; padding: .85rem; font-size: 1rem;
  background: var(--bg-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); }

.wiz-wide { width: 100%; margin: .5rem 0; padding: .9rem; font-size: .95rem; }

.wiz-timebig { display: flex; gap: .75rem; }
.wiz-timebig label { flex: 1; font-size: .85rem; color: var(--text-muted); }
.wiz-timebig input {
  display: block; width: 100%; margin-top: .3rem; padding: 1rem .6rem;
  font-size: 1.4rem; text-align: center;
  background: var(--bg-2); color: var(--text);
  border: 2px solid var(--border); border-radius: var(--radius);
}
.wiz-bulk3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.wiz-stepfield {
  display: flex; flex-direction: column; gap: .25rem; align-items: center;
  padding: .85rem .4rem; cursor: pointer; font: inherit;
  background: var(--card); color: var(--text);
  border: 2px solid var(--border); border-radius: var(--radius-lg);
}
.wiz-stepfield span { font-size: .75rem; color: var(--text-muted); }
.wiz-stepfield strong { font-size: 1.1rem; color: var(--primary); }

.wiz-favs { margin-bottom: 1rem; }
.wiz-favgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .5rem; }
.wiz-fav {
  display: flex; flex-direction: column; gap: .25rem; text-align: left;
  padding: .75rem .8rem; cursor: pointer; font: inherit;
  background: var(--card); color: var(--text);
  border: 2px solid var(--primary); border-radius: var(--radius-lg);
}
.wiz-fav:active { transform: scale(.97); }
.wiz-fav-other { border-color: var(--border); border-style: dashed; }
.wiz-fav-code { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; color: var(--primary); line-height: 1; }
.wiz-fav-desc { font-size: .8rem; color: var(--text-muted); }

.wiz-ecard {
  background: var(--card); border: 1px solid var(--border);
  border-left: 4px solid var(--primary); border-radius: var(--radius-lg);
  padding: 1rem; margin-bottom: 1rem;
}
.wiz-ecard-head { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-bottom: .75rem; }
.wiz-ecard-head strong { font-size: 1.05rem; color: var(--primary); margin-right: auto; }
.wiz-livebadge { font-size: .75rem; background: rgba(255,184,0,.15); color: var(--primary);
  padding: .2rem .5rem; border-radius: 999px; }
.wiz-x {
  background: transparent; border: 1px solid var(--accent); color: var(--accent);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.wiz-row {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  width: 100%; padding: .85rem .9rem; margin-bottom: .5rem; cursor: pointer; font: inherit;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius); text-align: left;
}
.wiz-row:active { border-color: var(--primary); }
.wiz-row-lbl { font-size: .8rem; color: var(--text-muted); flex-shrink: 0; }
.wiz-row-val { font-weight: 600; text-align: right; }
.wiz-row-val em { color: var(--text-muted); font-weight: 400; }
.wiz-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.wiz-row2 .wiz-row { flex-direction: column; align-items: flex-start; gap: .25rem; }
.wiz-row2 .wiz-row-val { text-align: left; }

.wiz-roadrow { display: flex; gap: .5rem; align-items: center; margin: .5rem 0; }
.wiz-typechips { display: flex; gap: .3rem; }
.wiz-roadnr-btn {
  flex: 1; min-width: 0; padding: .75rem; font: inherit; font-size: 1rem;
  text-align: left; cursor: pointer;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.wiz-roadnr-btn:active { border-color: var(--primary); }
.wiz-rn-ph { color: var(--text-muted); }

.wiz-daybar {
  display: flex; gap: .5rem; margin-bottom: 1rem;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .6rem .5rem;
}
.wiz-daybar div { flex: 1; text-align: center; display: flex; flex-direction: column; gap: .15rem; }
.wiz-daybar span { font-size: .7rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.wiz-daybar strong { font-size: 1.05rem; color: var(--text); }
.wiz-daybar div:last-child strong { color: var(--primary); }
.wiz-daybar.is-exact { border-color: var(--success); }
.wiz-daybar.is-exact div:last-child strong { color: var(--success); }
.wiz-daybar.is-over { border-color: var(--accent); }
.wiz-daybar.is-over div:last-child strong { color: var(--accent); }

.wiz-numpad-info {
  font-size: .85rem; color: var(--text-muted);
  margin-bottom: .6rem; text-align: center;
}
.wiz-numpad-chips {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-bottom: .6rem;
}
.wiz-numpad-free {
  text-align: center; font-size: 1.05rem; margin-bottom: .6rem;
  padding: .55rem; border-radius: var(--radius);
  background: rgba(255,184,0,.12); border: 1px solid var(--primary);
  color: var(--text);
}
.wiz-numpad-free strong { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; color: var(--primary); }
.wiz-numpad-free.is-exact { background: rgba(22,163,74,.14); border-color: var(--success); }
.wiz-numpad-free.is-exact strong { color: var(--success); }
.wiz-numpad-free.is-over { background: rgba(220,38,38,.14); border-color: var(--accent); }
.wiz-numpad-free.is-over strong { color: var(--accent); }
.wiz-np-empty { background: transparent; border: none; pointer-events: none; }
.wiz-chip {
  padding: .55rem .8rem; cursor: pointer; font: inherit; font-size: .9rem;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px;
}
.wiz-chip.is-sel { background: var(--primary); color: #1a1a1a; border-color: var(--primary); font-weight: 700; }
.wiz-chip-sm { font-size: .8rem; padding: .4rem .65rem; }

.wiz-crew, .wiz-veh { margin-top: .85rem; }
.wiz-crewchips, .wiz-vehadd { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
/* Live-Knopf pro Stelle (Schritt „Stellen"), rechts dank strong{margin-right:auto} */
.wiz-livebtn {
  background: var(--primary, #ffb800); color: #1a1a1a;
  border: none; border-radius: var(--radius); cursor: pointer;
  font: inherit; font-weight: 700; font-size: .85rem;
  padding: .5rem 1.1rem; min-width: 8rem; text-align: center;
  white-space: nowrap;
}
.wiz-livebtn:active { transform: scale(.96); }
.wiz-vehadd-btn { border-style: dashed; }
.wiz-vehchips { display: flex; flex-direction: column; gap: .5rem; margin-top: .4rem; }
.wiz-vehchips:empty { display: none; }
.wiz-vehrow { display: flex; flex-direction: column; gap: .35rem; }
.wiz-vehtag {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 999px; padding: .4rem .4rem .4rem .85rem;
}
.wiz-vehtag button { background: var(--accent); color: #fff; border: none;
  width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1; }
.wiz-attchips {
  display: flex; flex-wrap: wrap; gap: .35rem;
  margin-left: 1rem; padding-left: .75rem;
  border-left: 2px solid var(--border);
}
.wiz-attchip { border-style: dashed; color: var(--text-muted); }
.wiz-attchip:active { color: #1a1a1a; }
.wiz-attchip.is-added {
  border-style: solid; border-color: var(--success); color: var(--success);
  opacity: .8; cursor: default; pointer-events: none;
}
.wiz-notes { margin-top: .85rem; }
.wiz-notes summary { cursor: pointer; font-size: .85rem; color: var(--text-muted); }
.wiz-notes textarea {
  width: 100%; margin-top: .5rem; min-height: 70px; padding: .7rem;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius); resize: vertical;
}

.wiz-sumcard, .wiz-sumstelle {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1rem; margin-bottom: .75rem;
}
.wiz-sumcard div { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; }
.wiz-sumcard span { color: var(--text-muted); font-size: .85rem; }
.wiz-sumstelle { border-left: 4px solid var(--primary); }
.wiz-savebar { margin-top: 1.5rem; }
.wiz-savebar .btn { margin-bottom: .6rem; }

.wiz-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  display: flex; align-items: center; gap: 1rem;
  padding: .75rem 1rem; padding-bottom: calc(.75rem + env(safe-area-inset-bottom));
  background: var(--bg-2); border-top: 1px solid var(--border);
}
.wiz-nav .btn { padding: .85rem 1.4rem; font-size: .95rem; }
.wiz-nav-label { flex: 1; text-align: center; font-size: .8rem; color: var(--text-muted); }
.wiz-btn-next { margin-left: auto; }
.wiz-hide { display: none; }
html.is-standalone .wiz-nav { padding-bottom: calc(1.25rem + env(safe-area-inset-bottom)); }

.wiz-numpad-back {
  position: fixed; top: 0; left: 0; right: 0;
  height: 100vh;            /* Fallback */
  height: 100dvh;           /* dynamisch, Address-Bar-Verhalten */
  z-index: 400; display: flex;
  align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,.6); animation: pwaSlideIn .15s ease;
  /* Tastaturhöhe wird auf iOS/Android per JS (visualViewport) zusätzlich
     in inline style.height / style.top gesetzt, sonst deckt die Tastatur
     den Picker am Bildschirmrand ab. */
}
.wiz-numpad, .wiz-picker {
  width: 100%; max-width: 480px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1rem;
  /* An den Overlay binden, nicht ans Viewport, wenn die Tastatur das
     Overlay (via JS visualViewport) verkleinert, schrumpft der Picker mit
     und die Inhalts-Liste innen scrollt korrekt. */
  max-height: 100%;
  display: flex; flex-direction: column;
  min-height: 0;
}
.wiz-numpad-head { display: flex; justify-content: space-between; font-size: 1rem; margin-bottom: .5rem; }
.wiz-numpad-unit { color: var(--text-muted); }
.wiz-numpad-display {
  font-family: 'Bebas Neue', sans-serif; font-size: 2.4rem; text-align: right;
  color: var(--primary); background: var(--bg-2); border-radius: var(--radius);
  padding: .5rem 1rem; margin-bottom: .6rem; min-height: 3rem;
}
.wiz-numpad-steps { display: flex; gap: .5rem; margin-bottom: .6rem; }
.wiz-numpad-steps button {
  flex: 1; padding: .7rem; font-size: 1rem; cursor: pointer;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.wiz-numpad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.wiz-np-key {
  padding: 1.1rem 0; font-size: 1.4rem; cursor: pointer;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.wiz-np-key:active { background: var(--primary); color: #1a1a1a; }
.wiz-numpad-foot, .wiz-picker-head { display: flex; gap: .5rem; margin-top: .75rem; }
.wiz-numpad-foot .btn { flex: 1; padding: .85rem; }

.wiz-picker { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.wiz-picker-head { margin: 0 0 .5rem; }
.wiz-picker-head input {
  flex: 1; padding: .85rem; font-size: 1rem;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.wiz-picker-head .btn { padding: .5rem .9rem; }
.wiz-picker-list {
  /* Im Flex-Picker MUSS min-height:0 stehen, sonst schrumpft die Liste
     nicht unter ihre Content-Höhe und overflow-y:auto greift nie
     (Picker überquillt sein Container statt intern zu scrollen). */
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;  /* iOS Momentum-Scroll */
}
.wiz-picker-item {
  display: flex; gap: .75rem; align-items: center; width: 100%; text-align: left;
  padding: .8rem .6rem; cursor: pointer; font: inherit;
  background: transparent; color: var(--text);
  border: none; border-bottom: 1px solid var(--border);
}
.wiz-picker-item:active { background: var(--bg-2); }
.wiz-picker-item em { color: var(--text-muted); font-style: normal; }

@media (min-width: 600px) {
  .wiz-numpad-back { align-items: center; }
  .wiz-numpad, .wiz-picker { border-radius: var(--radius-lg); }
}

/* Desktop: keine fixe Bodenleiste (klebte über/unter dem Footer), die
   Navigation läuft im normalen Fluss am Ende des Formulars mit. */
@media (min-width: 760px) {
  .wiz-container { padding-bottom: 1.5rem; }
  .wiz-nav {
    position: static; max-width: 720px; margin: 1.75rem auto 0;
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    padding-bottom: 1rem;
  }
  html.is-standalone .wiz-nav { padding-bottom: 1rem; }
}

/* ===== Pinnwand, Zettel an dunkler Wand ===== */
.wall-grid {
  /* Masonry über CSS-Spalten → organische, unterschiedlich hohe Zettel */
  column-count: 3;
  column-gap: 1.5rem;
  margin-top: 1.5rem;
  padding: 1.75rem 1.5rem .75rem;
  border-radius: var(--radius-lg);
  /* Dunkle „Wand" statt Kork: tiefer Verlauf + feine helle Punkttextur */
  background:
    radial-gradient(circle, rgba(255,255,255,.025) 1px, transparent 1.6px) 0 0 / 16px 16px,
    linear-gradient(135deg, #15151a 0%, #0e0e12 100%);
  box-shadow: inset 0 0 70px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.04);
}
@media (max-width: 900px) { .wall-grid { column-count: 2; } }
@media (max-width: 560px) { .wall-grid { column-count: 1; padding: 1.25rem 1rem; } }

.wall-card {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  margin: 0 0 1.5rem;
  padding: 1.5rem 1.4rem 1.25rem;
  position: relative;
  color: var(--text);
  background: #20202a;
  border: 1px solid rgba(255,255,255,.06);
  border-top: 3px solid var(--primary);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,.4), 0 10px 22px rgba(0,0,0,.5);
  transition: transform .16s ease, box-shadow .16s ease;
}
/* Pinnnadel, pollt schön auf dem dunklen Grund */
.wall-card::before {
  content: "";
  position: absolute;
  top: -9px; left: 50%;
  width: 18px; height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd34d 0 28%, #e0a000 60%, #7a5800 100%);
  box-shadow: 0 2px 4px rgba(0,0,0,.6);
  z-index: 2;
}
/* Leicht schräg gepinnt, im Wechsel, Hover richtet auf und hebt an */
.wall-card:nth-child(4n+1) { transform: rotate(-2.2deg); }
.wall-card:nth-child(4n+2) { transform: rotate(1.6deg); }
.wall-card:nth-child(4n+3) { transform: rotate(-0.8deg); }
.wall-card:nth-child(4n)   { transform: rotate(2.4deg); }
.wall-card:hover,
.wall-card:focus-within {
  transform: rotate(0) scale(1.03);
  box-shadow: 0 2px 4px rgba(0,0,0,.4), 0 18px 34px rgba(0,0,0,.6);
  z-index: 3;
}
/* Akzentfarbe der Oberkante abwechselnd (dezent, kein Knall) */
.wall-card:nth-child(5n+2) { border-top-color: #4ea15a; }
.wall-card:nth-child(5n+3) { border-top-color: #4f8fd6; }
.wall-card:nth-child(5n+4) { border-top-color: #d65f86; }
.wall-card:nth-child(5n+5) { border-top-color: #d68a3f; }

.wall-card blockquote {
  margin: 0 0 1rem;
  font-size: 1.18rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--text);
  position: relative;
}
.wall-card blockquote::before {
  content: "\201E";
  position: absolute;
  top: -1.6rem; left: -.6rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  line-height: 1;
  color: rgba(255,255,255,.08);
}
.wall-card figcaption { display: flex; flex-direction: column; gap: .15rem; }
.wall-by {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  transform: rotate(-1deg);
  align-self: flex-start;
}
.wall-meta { font-size: .78rem; color: var(--text-muted); }

.wall-card.is-pending {
  background: #1a1a1f;
  border-top-color: var(--text-muted);
  opacity: .85;
}
/* Wartende Zettel: „Klebeband" statt Nadel */
.wall-card.is-pending::before {
  width: 64px; height: 22px;
  margin-left: -32px; top: -10px;
  border-radius: 2px;
  background: rgba(255,255,255,.12);
  box-shadow: 0 1px 2px rgba(0,0,0,.4);
}

.wall-actions {
  display: flex; gap: .5rem; flex-wrap: wrap;
  margin-top: 1rem; padding-top: .85rem;
  border-top: 1px dashed rgba(255,255,255,.12);
}

/* Admin-Inline-Edit-Zeilen (Azubis / Fahrzeuge / Tätigkeiten / Kleidung):
   Desktop behält das jeweils inline gesetzte grid-template-columns. Auf
   schmalen Screens lief das feste px-Grid über → Speichern-Button rutschte
   raus. Hier: sauber gestapelt, Felder + Button volle Breite. */
@media (max-width: 800px) {
  .adm-edit-row {
    grid-template-columns: 1fr !important;
    gap: .55rem !important;
  }
  .adm-edit-row > * { width: 100% !important; }
  .adm-edit-row > label { justify-content: flex-start; }
  .adm-edit-row > button[type="submit"] {
    width: 100% !important;
    padding: .7rem 1rem !important;
    margin-top: .15rem;
  }
}

/* „Nur Schnell-Erfassung" (installierte PWA ODER Touch-Gerät):
   Editor-Umschalter/-Cross-Links ausblenden. Links auf den klassischen
   Editor werden zusätzlich per main.js auf den Wizard umgebogen (kein
   Redirect). Maus-Desktop unverändert sichtbar. */
html.is-schnellonly .dash-hero-modes { display: none !important; }
html.is-schnellonly .pwa-hide { display: none !important; }

/* ===== Bestätigungs-Modal (eigenes confirm/alert, Schwarz-Gelb-Theme) ===== */
.huh-modal-back {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  animation: huh-modal-fade .12s ease-out;
}
@keyframes huh-modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.huh-modal {
  background: var(--bg-2, #1a1a1f);
  color: var(--text, #f0f0f0);
  border: 1px solid var(--primary, #ffb800);
  border-radius: 10px;
  max-width: 28rem;
  width: 100%;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 184, 0, .15);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  animation: huh-modal-pop .15s ease-out;
}
@keyframes huh-modal-pop {
  from { transform: translateY(8px) scale(.97); opacity: 0; }
  to   { transform: translateY(0) scale(1);     opacity: 1; }
}
.huh-modal-hdr {
  padding: .9rem 1.2rem .5rem;
  border-bottom: 1px solid rgba(255, 184, 0, .2);
}
.huh-modal-hdr h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary, #ffb800);
}
.huh-modal-body {
  padding: 1rem 1.2rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.huh-modal-body p {
  margin: 0 0 .6rem;
  line-height: 1.45;
  font-size: .95rem;
}
.huh-modal-body p:last-child { margin-bottom: 0; }
.huh-modal-actions {
  padding: .75rem 1.2rem 1rem;
  display: flex;
  gap: .6rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.huh-modal-actions .btn {
  min-width: 6rem;
  padding: .5rem 1rem;
  font-size: .9rem;
}
@media (max-width: 480px) {
  .huh-modal-actions { flex-direction: column-reverse; }
  .huh-modal-actions .btn { width: 100%; }
}
