/* ============================================================
   Design-Tokens
   ============================================================ */
:root {
  --bg: #14171A;
  --surface: #1D2124;
  --surface-raised: #24292D;
  --border: #32383D;
  --text: #F2EFE9;
  --text-muted: #8B9096;
  --amber: #E8A33D;
  --amber-dim: #6b5228;
  --teal: #4FB8A6;
  --red: #E2604F;
  --font-display: 'Oswald', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
/* Mindestens 16px, sonst zoomt iOS Safari beim Fokussieren automatisch hinein und
   zoomt danach nicht von selbst zurück - das war Ursache für "Seite zusammenziehen". */
input, select, textarea { font-size: 16px; }
a { color: var(--amber); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; letter-spacing: 0.01em; }

/* ============================================================
   Layout
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; }

.sidenav {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: calc(24px + env(safe-area-inset-top)) 16px 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  padding: 0 8px;
}
.brand-mark { color: var(--amber); font-size: 12px; }
.brand-text {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.1;
}
.nav-scroll { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  background: none;
  border: none;
  text-align: left;
  color: var(--text-muted);
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--surface-raised); color: var(--text); }
.nav-item.active { background: var(--amber-dim); color: var(--amber); }
.nav-footer {
  margin-top: auto;
  color: var(--text-muted);
  font-size: 11px;
  padding: 0 8px;
  font-family: var(--font-mono);
}

.main { flex: 1; padding: 32px 40px; max-width: 1100px; }

/* ============================================================
   Gemeinsame Elemente
   ============================================================ */
.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}
.view-header h1 { font-size: 28px; text-transform: uppercase; }
.view-header .subtitle { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.btn {
  background: var(--amber);
  color: #14171A;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.secondary:hover { border-color: var(--amber); color: var(--amber); }
.btn.danger { background: var(--red); color: white; }
.btn.small { padding: 6px 12px; font-size: 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.table-card { padding: 0; overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.assign-table th { white-space: normal; line-height: 1.3; padding: 8px 6px; }
td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}
tr:hover td { background: var(--surface-raised); cursor: pointer; }
tr:last-child td { border-bottom: none; }
.mono { font-family: var(--font-mono); }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pill-geplant { background: #3a3320; color: #E8A33D; }
.pill-bestaetigt { background: #1e3a30; color: #4FB8A6; }
.pill-laeuft { background: #1e2f3a; color: #6bb3e8; }
.pill-abgeschlossen { background: #2a2d30; color: #8B9096; }
.pill-storniert { background: #3a1f1e; color: #E2604F; }

.ical-info {
  margin-top: 14px; font-size: 12px; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.ical-info a { color: var(--text-muted); text-decoration: underline; }
.ical-info a:hover { color: var(--amber); }
.ical-info .icon-btn { font-size: 13px; padding: 2px 6px; }

/* ============================================================
   Ladeliste - bewusst sehr kompakt (Material, Menge, Lagerort, Checkbox)
   ============================================================ */
.ladeliste-head {
  font-size: 13px; color: var(--text-muted); margin-bottom: 10px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.ladeliste-head strong { color: var(--text); }
.ladeliste-cols {
  column-count: 2; column-gap: 28px;
}
.ladeliste-row {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 4px 0; font-size: 12.5px; line-height: 1.35;
  border-bottom: 1px solid var(--border);
  break-inside: avoid; cursor: pointer;
}
.ladeliste-row input[type="checkbox"] {
  width: 13px; height: 13px; accent-color: var(--amber); flex-shrink: 0; margin-top: 2px;
}
.ladeliste-row .ll-name { flex: 1; min-width: 0; }
.ladeliste-row .ll-menge { flex-shrink: 0; color: var(--text-muted); font-family: var(--font-mono); font-size: 11.5px; }
.ladeliste-row .ll-ort { flex-shrink: 0; color: var(--text-muted); font-size: 11px; max-width: 110px; text-align: right; }
.ladeliste-row.checked .ll-name { text-decoration: line-through; color: var(--text-muted); }
.ll-verpackung { color: var(--amber); font-weight: 500; }

/* ============================================================
   Material-Export (Angebot/Rechnung)
   ============================================================ */
.export-doc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.export-title { font-family: var(--font-display); font-size: 22px; text-transform: uppercase; }
.export-sub { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.export-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.export-table th { text-align: left; font-size: 11px; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border); padding: 8px 6px; }
.export-table td { padding: 7px 6px; border-bottom: 1px solid var(--border); font-size: 13px; }
.export-table .export-num { text-align: right; font-family: var(--font-mono); }
.export-table tfoot td { padding: 4px 6px; border-bottom: none; font-size: 13px; }
.export-table tfoot tr:first-child td { padding-top: 14px; border-top: 2px solid var(--border); }
.export-table tfoot .export-total-row td { padding-top: 8px; font-size: 15px; color: var(--amber); }
.export-doc.hide-prices .price-col { display: none; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state h3 { color: var(--text); margin-bottom: 8px; }
.muted-card { opacity: 0.75; }
.muted-card:hover { opacity: 1; }

/* ============================================================
   Formulare / Modal
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
}
.modal h2 { font-size: 18px; text-transform: uppercase; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid.single { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.field input, .field select, .field textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 9px 10px;
  color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--amber);
}
.field textarea { resize: vertical; min-height: 60px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ============================================================
   Event-Detail (Signatur-Element: Zeitleiste)
   ============================================================ */
.event-header { margin-bottom: 28px; }
.event-header .date-big {
  font-family: var(--font-display);
  font-size: 34px;
  color: var(--amber);
  line-height: 1.15;
  overflow-wrap: break-word;
}
.event-header h1 { font-size: 26px; margin-top: 4px; }

.timeline {
  display: flex;
  align-items: center;
  margin: 28px 0;
  padding: 20px 0;
}
.timeline-point { flex: 1; text-align: center; position: relative; }
.timeline-point .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border);
  margin: 0 auto 10px;
  position: relative; z-index: 2;
}
.timeline-point.filled .dot { background: var(--amber); }
.timeline-point .label { font-size: 10px; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.04em; }
.timeline-point .value { font-family: var(--font-mono); font-size: 15px; margin-top: 3px; }
.timeline-point:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 5px; left: 50%; width: 100%; height: 1px;
  background: var(--border);
  z-index: 1;
}

.detail-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-bottom: 20px; }
.section-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); margin-bottom: 12px; font-weight: 600;
}
.section-title .btn { text-transform: none; letter-spacing: normal; }
.kv-list { display: flex; flex-direction: column; gap: 10px; }
.kv-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.kv-row .k { color: var(--text-muted); }
.kv-row .v { text-align: right; white-space: pre-wrap; }

.cost-bar {
  display: flex; gap: 20px; background: var(--surface-raised);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 24px; margin: 24px 0;
}
.cost-item { flex: 1; }
.cost-item .label { font-size: 11px; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.04em; }
.cost-item .amount { font-family: var(--font-mono); font-size: 22px; margin-top: 4px; }
.cost-item.total .amount { color: var(--amber); }

.assign-table-wrap { overflow-x: auto; }
.personal-assign-table { width: 100%; }
.scroll-hint { display: none; }
.assign-table { table-layout: fixed; }
.assign-table td input, .assign-table td select {
  width: 100%; background: transparent; border: 1px solid transparent;
  padding: 6px 8px; border-radius: 4px;
}
.assign-table td input:focus, .assign-table td select:focus {
  border-color: var(--amber); background: var(--bg); outline: none;
}
.assign-table td input:disabled {
  background: transparent; border-color: transparent;
}
.assign-table td input::placeholder { color: var(--text); opacity: 0.5; }
.assign-table .rowtotal { font-family: var(--font-mono); color: var(--amber); white-space: nowrap; }
.name-preview { display: none; }
.checkbox-cell { text-align: center; }
.checkbox-cell input { width: 16px; height: 16px; accent-color: var(--amber); }
.icon-btn {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 16px; padding: 4px 8px; text-decoration: none; display: inline-block;
}
.icon-btn:hover { color: var(--red); }
.avoid-break { break-inside: avoid; }

.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--surface-raised); border: 1px solid var(--amber);
  color: var(--text); padding: 12px 20px; border-radius: var(--radius);
  font-size: 13px; z-index: 200;
}

/* ============================================================
   Material-Picker (Shopping-Liste)
   ============================================================ */
.picker-modal { max-width: 640px; }
.picker-modal #picker-search {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 11px 14px; color: var(--text); margin-bottom: 14px;
  font-size: 14px;
}
.picker-modal #picker-search:focus { outline: none; border-color: var(--amber); }
.picker-list { max-height: 55vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }

.picker-custom {
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border);
}
.picker-custom-title { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.picker-custom-row { display: flex; gap: 8px; flex-wrap: wrap; }
.picker-custom-row input[type="text"] { flex: 2; min-width: 140px; }
.picker-custom-row input[type="number"] { flex: 1; min-width: 80px; }
.picker-custom-row input {
  background: var(--bg); border: 1px solid var(--border); border-radius: 4px;
  padding: 9px 10px; color: var(--text);
}
.picker-custom-row input:focus { outline: none; border-color: var(--amber); }
.picker-item {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; text-align: left; background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 10px 14px; cursor: pointer; color: var(--text);
  transition: border-color 0.12s, background 0.12s;
}
.picker-item:hover { border-color: var(--amber); background: var(--surface-raised); }
.picker-item.added { opacity: 0.5; cursor: default; border-color: var(--teal); }
.picker-item.added:hover { background: var(--bg); }
.picker-item-main { display: flex; flex-direction: column; gap: 2px; }
.picker-item-name { font-size: 13px; font-weight: 500; }
.picker-item-meta { font-size: 11px; color: var(--text-muted); }
.picker-item-right { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.usage-badge {
  font-family: var(--font-mono); font-size: 10px; color: var(--teal);
  background: #17332d; padding: 2px 6px; border-radius: 3px;
}
.added-check { font-size: 11px; color: var(--teal); margin-left: 12px; white-space: nowrap; }
.warn-flag { cursor: help; }
.katalog-hint { cursor: help; font-size: 11px; margin-left: 4px; opacity: 0.7; }
.assign-table td input:disabled { opacity: 0.55; cursor: not-allowed; }

.warn-banner {
  background: #3a1f1e; border-bottom: 1px solid var(--red);
  color: #f5c6be; padding: 12px 24px; font-size: 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.warn-banner[hidden] { display: none; }
.warn-banner .warn-items { display: flex; gap: 18px; flex-wrap: wrap; }
.warn-banner .warn-item { cursor: pointer; text-decoration: underline; }
.warn-banner .warn-close { background: none; border: none; color: #f5c6be; cursor: pointer; font-size: 16px; padding: 8px 12px; line-height: 1; }

.field.wide input[type="search"] {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px; color: var(--text); font-size: 13px; width: 100%;
}
.field.wide input[type="search"]:focus { outline: none; border-color: var(--amber); }

/* ============================================================
   Login / Ersteinrichtung
   ============================================================ */
.auth-screen {
  min-height: 100vh; width: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 32px;
  width: 100%; max-width: 380px;
}
.auth-card h2 { text-align: center; text-transform: uppercase; font-size: 18px; margin-bottom: 18px; }
.auth-card .field { margin-bottom: 14px; }
.auth-error {
  background: #3a1f1e; border: 1px solid var(--red); color: #f5a89f;
  border-radius: 4px; padding: 8px 12px; font-size: 12px; margin-bottom: 10px;
}
#nav-account { color: var(--text-muted); font-size: 11px; }
#nav-account .nav-item { text-align: left; margin-top: 2px; padding: 8px 12px; text-transform: none; letter-spacing: normal; }
.account-toggle { display: none; }

.tag-checklist { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-checklist label {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font-size: 12px; cursor: pointer;
}
.tag-checklist input { accent-color: var(--amber); }

@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .sidenav {
    width: 100%; height: auto; position: sticky; top: 0; z-index: 50;
    flex-direction: row; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; gap: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }
  .brand { margin-bottom: 0; margin-right: 2px; flex-shrink: 0; }
  .brand-text { font-size: 11px; }
  .nav-scroll { display: flex; flex-direction: row; gap: 4px; overflow-x: auto; flex: 1; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav-scroll::-webkit-scrollbar { display: none; }
  .nav-item { white-space: nowrap; flex-shrink: 0; padding: 9px 12px; font-size: 11px; }

  .nav-footer {
    margin-top: 0; margin-left: 0; flex-shrink: 0; width: auto; padding: 0; position: relative;
  }
  .account-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%; background: var(--amber-dim);
    color: var(--amber); border: none; font-family: var(--font-display); font-weight: 700;
    font-size: 13px; cursor: pointer;
  }
  #nav-account {
    display: none;
    position: absolute; top: 42px; right: 0; z-index: 60;
    background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 12px; width: 200px; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }
  #nav-account.open { display: block; }
  #nav-account .nav-item { display: block; width: 100%; text-align: left; }

  .main { padding: 16px; }
  .view-header { flex-direction: column; align-items: stretch; gap: 12px; }
  .view-header h1 { font-size: 22px; }
  .view-header .btn { width: 100%; }

  .detail-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .timeline-point::after { display: none; }
  .timeline {
    flex-direction: column; align-items: stretch; gap: 0;
    border-left: 2px solid var(--border); padding: 4px 0 4px 18px; margin: 24px 0 24px 6px;
  }
  .timeline-point {
    flex: none; text-align: left; display: flex; align-items: baseline; gap: 10px;
    padding: 10px 0; position: relative;
  }
  .timeline-point .dot {
    margin: 0; flex-shrink: 0; position: absolute; left: -23px; top: 14px;
  }
  .timeline-point .label { width: 78px; flex-shrink: 0; }
  .timeline-point .value { margin-top: 0; }

  .cost-bar { flex-direction: column; gap: 12px; padding: 14px 16px; }
  .cost-item .amount { font-size: 19px; }

  /* ---- Ladeliste: auf Mobile einspaltig, etwas grosszuegiger fuer Touch ---- */
  .ladeliste-cols { column-count: 1; }
  .ladeliste-row { padding: 8px 0; font-size: 13.5px; }
  .ladeliste-row input[type="checkbox"] { width: 18px; height: 18px; }
  .ladeliste-row .ll-ort { width: auto; max-width: 90px; }

  /* ---- Tabellen -> gestapelte Karten (statt horizontal scrollen) ---- */
  .table-card { background: none; border: none; padding: 0; }
  .assign-table-wrap { overflow: visible; margin: 0; padding: 0; }
  .scroll-hint { display: none; }

  .responsive-table { min-width: 0; width: 100%; }
  .responsive-table thead { display: none; }
  .responsive-table, .responsive-table tbody { display: block; width: 100%; }
  .responsive-table tr {
    display: block; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 10px; padding: 6px 14px;
  }
  .responsive-table tr:hover td { background: none; }
  .responsive-table td {
    display: flex; align-items: center; justify-content: space-between; gap: 8px 12px;
    border-bottom: 1px solid var(--border); padding: 9px 0; font-size: 13px; text-align: right;
    flex-wrap: wrap;
  }
  .responsive-table td:last-child { border-bottom: none; }
  .responsive-table td[data-label=""] { justify-content: flex-end; }
  .responsive-table td::before {
    content: attr(data-label); flex-shrink: 0; text-align: left;
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted);
  }
  .responsive-table td[data-label=""]::before { content: none; }
  .responsive-table td.ort-cell {
    flex-direction: column; align-items: flex-start; gap: 3px; text-align: left;
  }
  .responsive-table td.ort-cell .subtitle { text-align: left; }
  .responsive-table td.material-name-cell {
    flex-direction: column; align-items: stretch; gap: 4px;
  }
  .responsive-table td.material-name-cell input {
    text-align: left; width: 100%; display: none;
  }
  .responsive-table td.material-name-cell .name-preview {
    display: block; white-space: normal; word-break: break-word;
    text-align: left; font-weight: 600; cursor: text; padding: 2px 0;
  }
  .responsive-table td.material-name-cell.editing input { display: block; }
  .responsive-table td.material-name-cell.editing .name-preview { display: none; }
  .responsive-table td input, .responsive-table td select {
    text-align: right; flex: 1;
  }
  /* Kein flex-end mehr fuer Checkbox-Zellen: bei zu wenig Platz schiebt flex-end
     den Inhalt ueber den linken Rand hinaus statt umzubrechen. Normales
     space-between (wie bei allen anderen Zeilen) verhaelt sich zuverlaessig. */
  /* Zellen ohne Inhalt (z.B. reine Aktions-Spalten) nicht als leere Zeile anzeigen */
  .responsive-table td:empty { display: none; }

  .icon-btn { font-size: 18px; padding: 8px 10px; }
  table th, table td { font-size: 12px; }
  .modal { padding: 18px; }
  .picker-item { padding: 12px; }

  /* Export-Tabelle (Materialliste für Angebot/Rechnung) - auf Mobile ebenfalls
     als gestapelte Karten statt einer Tabelle, die seitlich abgeschnitten wird. */
  .export-doc { padding: 16px; }
  .export-table, .export-table tbody, .export-table tfoot { display: block; width: 100%; }
  .export-table thead { display: none; }
  .export-table tr {
    display: block; border-bottom: 1px solid var(--border); padding: 10px 0;
  }
  .export-table tfoot tr { border-bottom: none; padding: 3px 0; }
  .export-table td {
    display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
    padding: 2px 0; border-bottom: none; font-size: 13px;
  }
  .export-table td[data-label]:not([data-label=""])::before {
    content: attr(data-label); color: var(--text-muted); font-size: 10px;
    text-transform: uppercase; letter-spacing: 0.04em; flex-shrink: 0;
  }
  .export-table td:first-child {
    display: block; font-weight: 600; margin-bottom: 4px;
  }
  .export-table tfoot tr {
    display: flex; justify-content: space-between; align-items: baseline;
    border-bottom: none; padding: 3px 0;
  }
  .export-table tfoot td { display: inline; padding: 0; font-weight: normal; }
  .export-table tfoot td::before { content: none; }
  .export-table tfoot .export-total-row td { font-weight: 600; }
}

@media (max-width: 480px) {
  .event-header .date-big { font-size: 30px; }
  .event-header h1 { font-size: 20px; }
  .sidenav .brand-text { display: none; }
}

/* ============================================================
   Druckansicht (DIN A4) - nur für die Event-Detailseite gedacht
   ============================================================ */
@media print {
  @page { size: A4; margin: 10mm; }

  html, body { background: #fff; color: #111; font-size: 11px; }
  .sidenav, .toast, .modal-overlay, .no-print { display: none !important; }
  .app-shell { display: block; }
  .main { padding: 0; max-width: 100%; }

  /* Material-Export: helles Layout fuer Angebot/Rechnung-Anhang */
  .export-doc { background: #fff; border: none; padding: 0; }
  .export-title, .export-sub, .export-table th, .export-table td { color: #111; }
  .export-table th { border-bottom: 1px solid #111; }
  .export-table td { border-bottom: 1px solid #ddd; }
  .export-table tfoot tr:first-child td { border-top: 2px solid #111; }
  .export-table tfoot .export-total-row td { color: #111; }

  /* Ladeliste: eigene, besonders enge Druckdarstellung fuer max. Ausnutzung der Seite */
  .ladeliste-head { font-size: 11px; color: #111; border-bottom: 1px solid #111; margin-bottom: 6px; padding-bottom: 4px; }
  .ladeliste-head strong { color: #111; }
  .ladeliste-cols { column-count: 3; column-gap: 16px; }
  .ladeliste-row { font-size: 10px; padding: 1.5px 0; border-bottom: 1px solid #ccc; color: #111; }
  .ladeliste-row .ll-menge, .ladeliste-row .ll-ort { color: #333; }
  .ladeliste-row input[type="checkbox"] { width: 10px; height: 10px; accent-color: #111; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ladeliste-row.checked .ll-name { color: #666; }

  .event-header .date-big { color: #111; font-size: 30px; }
  .event-header h1 { color: #111; font-size: 20px; }
  .pill { border: 1px solid #999; background: #fff !important; color: #111 !important; }

  .timeline { border: 1px solid #ccc; border-radius: 4px; padding: 12px 0; margin: 16px 0; break-inside: avoid; }
  .timeline-point .dot { background: #ccc !important; border: 1px solid #111; }
  .timeline-point.filled .dot { background: #111 !important; }
  .timeline-point .label, .timeline-point .value { color: #111; }
  .timeline-point::after { background: #ccc; }

  .card {
    background: #fff !important;
    border: 1px solid #999;
    box-shadow: none;
    padding: 12px 14px;
  }
  .detail-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .section-title { color: #444; }
  .kv-row .k, .kv-row .v { color: #111; }

  .cost-bar { background: #f2f2f2 !important; border: 1px solid #999; color: #111; padding: 10px 16px; }
  .cost-item .label { color: #444; }
  .cost-item .amount, .cost-item.total .amount { color: #111 !important; }

  table { font-size: 10.5px; }
  th { color: #444; border-bottom: 1px solid #999; }
  td { border-bottom: 1px solid #ddd; padding: 6px 8px; }
  tr:hover td { background: none; cursor: default; }
  tr { break-inside: avoid; }

  .assign-table input, .assign-table select {
    border: none !important; background: transparent !important; color: #111 !important;
    padding: 2px 0; -webkit-appearance: none;
  }
  .checkbox-cell input { accent-color: #111; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rowtotal { color: #111 !important; }

  a { color: #111; text-decoration: none; }
}

