/* ============================================================
   Reinigungsprotokoll – Oberflaeche
   ============================================================ */
:root {
  --brand: #0f766e;
  --brand-dark: #0a4f49;
  --brand-soft: #e6f4f2;
  --ink: #16202a;
  --ink-2: #4b5563;
  --ink-3: #6b7280;
  --bg: #f3f5f7;
  --card: #ffffff;
  --line: #e3e7eb;
  --line-2: #eef1f4;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 20px 40px -12px rgba(16, 24, 40, 0.28);

  /* Status-Farben (Text / Hintergrund) */
  --s-amber: #a15c07;   --s-amber-bg: #fef4e2;
  --s-orange: #c2410c;  --s-orange-bg: #ffedd5;
  --s-rose: #be123c;    --s-rose-bg: #ffe4e8;
  --s-blue: #1d4ed8;    --s-blue-bg: #e3ecfd;
  --s-green: #15803d;   --s-green-bg: #dcf5e4;
  --s-gray: #475569;    --s-gray-bg: #e8edf2;

  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); -webkit-tap-highlight-color: transparent; font-size: 15px; line-height: 1.45; }
[hidden] { display: none !important; }
h1 { font-size: 1.45rem; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1rem; margin: 0 0 12px; }
p { margin: 0 0 10px; }
.muted { color: var(--ink-3); }
.small { font-size: 0.82rem; }
.ic { flex-shrink: 0; vertical-align: middle; }

/* ---------- Formularelemente ---------- */
label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 5px; color: var(--ink-2); }
input[type=text], input[type=date], input[type=time], input[type=email], input[type=password], input[type=search], input:not([type]), textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15); }
.form-error { color: var(--danger); font-size: 0.85rem; min-height: 1.1em; margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
.grid-2 > div, .grid-3 > div { min-width: 0; }
input, select, textarea { min-width: 0; }
@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 0.8fr; gap: 0 10px; }
  .grid-3 input { padding: 10px 8px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 9px;
  padding: 10px 16px; font-size: 0.95rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background .15s, border-color .15s, transform .05s;
  white-space: nowrap; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { background: #f7f9fa; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); }
.btn-warning { background: var(--s-orange-bg); color: var(--s-orange); border-color: #fed7aa; }
.btn-warning:hover { background: #fed7aa; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8f1c13; }
.btn-danger-outline { background: #fff; color: var(--danger); border-color: #f4c7c2; }
.btn-danger-outline:hover { background: var(--danger-soft); }
.btn-small { padding: 6px 11px; font-size: 0.83rem; border-radius: 7px; }
.btn-lg { padding: 14px 20px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px; border: none; cursor: pointer;
  background: transparent; color: inherit;
}
.icon-btn:hover { background: rgba(127, 127, 127, 0.14); }

/* ---------- Login ---------- */
#login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(1200px 500px at 20% -10%, #cfeae6 0%, transparent 60%), var(--bg);
}
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 28px; box-shadow: var(--shadow-lg); }
.login-card .brand { margin-bottom: 24px; color: var(--ink); }
.login-card .brand-sub { color: var(--ink-3); }

/* ---------- Kopfbereich ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.brand-lg .brand-mark { width: 46px; height: 46px; border-radius: 12px; }
.brand-name { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; }
.brand-lg .brand-name { font-size: 1.2rem; }
.brand-sub { font-size: 0.8rem; opacity: .8; }

.topbar { background: var(--brand-dark); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.topbar .brand-mark { background: rgba(255,255,255,.14); }
.topbar-inner { max-width: 1080px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 8px; min-width: 0; }
.user-meta { text-align: right; min-width: 0; }
.user-email { font-size: 0.85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.user-rolle { font-size: 0.75rem; opacity: .8; }
@media (max-width: 520px) { .user-meta { display: none; } }

.tabbar { max-width: 1080px; margin: 0 auto; padding: 0 10px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar button {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: none; color: rgba(255,255,255,.75);
  padding: 10px 12px 12px; font-size: 0.9rem; font-weight: 600; font-family: inherit;
  cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap;
}
.tabbar button:hover { color: #fff; }
.tabbar button.active { color: #fff; border-bottom-color: #5eead4; }

/* ---------- Layout ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 22px 16px 80px; }
.view { display: none; }
.view.active { display: block; animation: fadeIn .18s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
#view-form { max-width: 720px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-head h2 { margin: 0; }
.card-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.card-toolbar h2 { margin: 0; }
.select-compact { width: auto; margin: 0; padding: 6px 10px; font-size: 0.88rem; }

/* ---------- Hinweise ---------- */
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 0.92rem; border: 1px solid transparent; }
.callout-body { flex: 1; }
.callout-warning { background: var(--s-amber-bg); color: #7a4504; border-color: #f7dca8; align-items: center; }
.callout-rose { background: var(--s-rose-bg); color: #8a1030; border-color: #fbc8d2; }
.callout-orange { background: var(--s-orange-bg); color: #8a2f08; border-color: #fdd2a8; }
.callout-gray { background: var(--s-gray-bg); color: #334155; border-color: #d5dde5; }
.callout-info { background: var(--brand-soft); color: var(--brand-dark); border-color: #b9e3dd; align-items: center; }
.cell-sub { font-size: 0.8rem; color: var(--ink-3); }
.pill-aktiv { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--s-green-bg); color: var(--s-green); }
.pill-inaktiv { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--s-gray-bg); color: var(--s-gray); }
.warn-text { color: var(--s-orange); font-size: 0.8rem; font-weight: 600; display: block; margin-top: 3px; }
tr.inaktiv td { opacity: .6; }
#dialog-felder label { margin-top: 2px; }

/* ---------- Dashboard ---------- */
.hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.hero h1 { font-size: 1.6rem; }
.hero p { margin: 4px 0 0; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .hero-actions .btn { padding: 12px 10px; font-size: 0.95rem; }
  .hero-actions .btn:first-child { grid-column: 1 / -1; }
  .hero h1 { font-size: 1.4rem; }
}
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tile {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); text-align: left; font-family: inherit; color: var(--ink);
  position: relative; overflow: hidden; cursor: pointer; transition: transform .12s, box-shadow .12s;
}
button.tile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16,24,40,.08); }
div.tile { cursor: default; }
.tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tile-accent, var(--brand)); }
.tile-num { font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.tile-label { font-size: 0.88rem; font-weight: 600; color: var(--ink-2); margin-top: 4px; }
.tile-sub { font-size: 0.78rem; color: var(--ink-3); margin-top: 2px; }
.tile.attention .tile-num { color: var(--tile-accent); }
.tile[data-accent=amber] { --tile-accent: var(--s-amber); }
.tile[data-accent=orange] { --tile-accent: var(--s-orange); }
.tile[data-accent=rose] { --tile-accent: var(--s-rose); }
.tile[data-accent=blue] { --tile-accent: var(--s-blue); }
.tile[data-accent=green] { --tile-accent: var(--s-green); }
.tile[data-accent=gray] { --tile-accent: var(--s-gray); }
.tile[data-accent=brand] { --tile-accent: var(--brand); }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }
.count-pill { background: var(--brand-soft); color: var(--brand-dark); font-size: 0.78rem; font-weight: 700; border-radius: 999px; padding: 2px 9px; }
.empty { padding: 28px 18px; text-align: center; color: var(--ink-3); }
.empty .ic { color: var(--s-green); margin-bottom: 6px; }

/* ---------- Status ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.s-eingereicht { color: var(--s-amber); background: var(--s-amber-bg); }
.status.s-zurueck_an_ol { color: var(--s-orange); background: var(--s-orange-bg); }
.status.s-zurueckgewiesen { color: var(--s-rose); background: var(--s-rose-bg); }
.status.s-bei_buchhaltung { color: var(--s-blue); background: var(--s-blue-bg); }
.status.s-abgeschlossen { color: var(--s-green); background: var(--s-green-bg); }
.status.s-abgelehnt { color: var(--s-gray); background: var(--s-gray-bg); }
.rolle-pill { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); }

/* ---------- Berichtsliste ---------- */
.report-list { display: flex; flex-direction: column; }
.report-item {
  display: flex; align-items: center; gap: 14px; padding: 13px 18px; border: none; border-bottom: 1px solid var(--line-2);
  background: #fff; width: 100%; text-align: left; font-family: inherit; color: inherit; cursor: pointer; position: relative;
}
.report-item:last-child { border-bottom: none; }
.report-item:hover { background: #f8fafb; }
.report-item::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--item-accent, transparent); }
.report-item[data-status=eingereicht] { --item-accent: var(--s-amber); }
.report-item[data-status=zurueck_an_ol] { --item-accent: var(--s-orange); }
.report-item[data-status=zurueckgewiesen] { --item-accent: var(--s-rose); }
.report-item[data-status=bei_buchhaltung] { --item-accent: var(--s-blue); }
.report-item[data-status=abgeschlossen] { --item-accent: var(--s-green); }
.report-item[data-status=abgelehnt] { --item-accent: var(--s-gray); }
.date-box { width: 50px; flex-shrink: 0; text-align: center; border-radius: 10px; background: var(--line-2); padding: 6px 0; }
.date-box .d { font-size: 1.15rem; font-weight: 700; line-height: 1; }
.date-box .m { font-size: 0.7rem; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-top: 3px; }
.ri-main { flex: 1; min-width: 0; }
.ri-title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ri-meta { font-size: 0.84rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.ri-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ri-note { font-size: 0.82rem; margin-top: 5px; color: var(--s-rose); display: flex; gap: 5px; align-items: flex-start; }
.ri-note.orange { color: var(--s-orange); }
.ri-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ri-side .chev { color: var(--ink-3); }
@media (max-width: 600px) {
  .report-item { flex-wrap: wrap; padding: 12px 14px; gap: 10px; }
  .ri-side { width: 100%; justify-content: space-between; padding-left: 60px; }
}

.filter-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filter-bar input[type=search] { margin: 0; max-width: 280px; }
@media (max-width: 600px) { .filter-bar input[type=search] { max-width: none; } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-family: inherit;
  font-size: 0.84rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer;
}
.chip-btn:hover { border-color: #c9d1d8; }
.chip-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip-btn .n { font-size: 0.74rem; opacity: .7; }
#export-presets { margin-bottom: 14px; }

/* ---------- Bericht-Formular ---------- */
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin-bottom: 12px; }
@media (max-width: 560px) { .checklist { grid-template-columns: 1fr; } }
.checklist label { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; font-weight: 500; color: var(--ink); padding: 8px 10px; border-radius: 8px; margin: 0; cursor: pointer; }
.checklist label:hover { background: var(--line-2); }
.checklist input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.arbeitszeit-hint { font-size: 0.88rem; color: var(--brand-dark); font-weight: 600; min-height: 1.2em; margin-top: -4px; }
.file-drop {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px;
  border: 2px dashed var(--line); border-radius: 10px; color: var(--ink-2); cursor: pointer; font-weight: 600; margin-bottom: 12px;
}
.file-drop:hover { border-color: var(--brand); color: var(--brand); }
.photo-preview { display: flex; gap: 10px; flex-wrap: wrap; }
.photo-thumb { position: relative; }
.photo-thumb img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.photo-thumb button {
  position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff;
  background: var(--ink); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
#signature-pad { width: 100%; height: 170px; border: 1px dashed #c9d1d8; border-radius: 10px; touch-action: none; background: #fcfdfd; display: block; }
.sig-actions { display: flex; justify-content: flex-end; margin-top: 6px; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; font-size: 0.76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 700; padding: 11px 16px; background: #fafbfc; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions .btn { margin-left: 4px; }
.row-select { width: auto; margin: 0; padding: 6px 8px; font-size: 0.86rem; }
.inline-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.inline-form > div { flex: 1; min-width: 170px; }
.inline-form > .inline-form-btn { flex: 0 0 auto; min-width: 0; padding-bottom: 14px; }
.rollen-hilfe { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin-top: 8px; }
.rollen-hilfe div { font-size: 0.82rem; color: var(--ink-3); background: #fafbfc; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; }
.rollen-hilfe strong { color: var(--ink); display: block; }
.segmented { display: inline-flex; background: #e6eaee; padding: 3px; border-radius: 10px; margin-bottom: 16px; }
.segmented button { border: none; background: none; padding: 7px 16px; border-radius: 8px; font-family: inherit; font-weight: 600; font-size: 0.9rem; color: var(--ink-2); cursor: pointer; }
.segmented button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Modals ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 32, 0.5); z-index: 50;
  display: flex; justify-content: center; align-items: center; padding: 32px 16px;
  animation: fadeBg .15s ease-out;
}
.modal-top { z-index: 60; align-items: center; }
@keyframes fadeBg { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: 16px; width: 100%; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: pop .16s ease-out; max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); }
@keyframes pop { from { transform: translateY(8px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-lg { max-width: 760px; }
.modal-sm { max-width: 460px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; }
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-head .status { margin-left: 6px; vertical-align: 2px; }
.modal-body { padding: 4px 20px 16px; overflow-y: auto; flex: 1 1 auto; overscroll-behavior: contain; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line-2); flex-wrap: wrap; background: #fafbfc; border-radius: 0 0 16px 16px; flex-shrink: 0; }
#detail-actions .spacer { flex: 1; }
@media (max-width: 600px) {
  .modal-backdrop { padding: 0; }
  .modal { border-radius: 0; height: 100%; max-height: none; }
  .modal-top .modal { height: auto; max-height: calc(100dvh - 32px); border-radius: 16px; margin: 16px; }
  .modal-foot { border-radius: 0; }
  #detail-actions .btn { flex: 1 1 auto; }
  #detail-actions .spacer { display: none; }
}

/* Workflow-Schritte */
.stepper { display: flex; align-items: flex-start; margin: 6px 0 18px; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; font-size: 0.78rem; font-weight: 600; color: var(--ink-3); }
.step + .step::before { content: ''; position: absolute; top: 14px; right: 50%; left: -50%; height: 2px; background: var(--line); z-index: 0; }
.step.done + .step::before, .step.done + .step.current::before { background: var(--brand); }
.step .dot { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; border: 2px solid var(--line); color: var(--ink-3); position: relative; z-index: 1; margin-bottom: 6px; font-size: 0.8rem; }
.step.done .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.done { color: var(--ink-2); }
.step.current .dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px rgba(15,118,110,.14); }
.step.current { color: var(--ink); }
.step.warn .dot { border-color: var(--s-orange); color: var(--s-orange); box-shadow: 0 0 0 4px rgba(194,65,12,.12); }
.step.warn { color: var(--s-orange); }
.step.error .dot { background: var(--s-gray); border-color: var(--s-gray); color: #fff; }
.step.error { color: var(--s-gray); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
.fact { background: #fafbfc; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.fact .k { font-size: 0.74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 700; }
.fact .v { font-weight: 650; margin-top: 2px; overflow-wrap: anywhere; }
.fact-wide { grid-column: 1 / -1; }
.section { margin-bottom: 18px; }
.section h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 0 0 8px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 5px; background: var(--brand-soft); color: var(--brand-dark); border-radius: 7px; padding: 4px 10px; font-size: 0.85rem; font-weight: 600; }
.text-box { background: #fafbfc; border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; white-space: pre-wrap; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; display: block; }
.sig-img { max-width: 280px; width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: block; }
.privacy-note { font-size: 0.82rem; color: var(--ink-3); display: flex; gap: 8px; align-items: center; background: #fafbfc; border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; }

/* Verlauf */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 26px; }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 16px; bottom: -2px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .tdot { position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--tl, var(--brand)); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.timeline .t-title { font-weight: 600; font-size: 0.9rem; }
.timeline .t-meta { font-size: 0.78rem; color: var(--ink-3); }
.timeline .t-comment { margin-top: 5px; font-size: 0.87rem; background: #fafbfc; border-left: 3px solid var(--tl, var(--line)); padding: 6px 10px; border-radius: 0 6px 6px 0; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* Toasts */
.toast-container { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; width: calc(100% - 32px); max-width: 440px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 0.92rem; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; animation: pop .18s ease-out; pointer-events: auto; }
.toast.ok .ic { color: #5eead4; }
.toast.err { background: var(--danger); }

.skeleton { padding: 24px 18px; color: var(--ink-3); }

@media print {
  .topbar, .tabbar, .modal-foot, .toast-container { display: none !important; }
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; background: var(--line-2); padding: 2px 6px; border-radius: 5px; }
input.readonly { background: var(--line-2); color: var(--ink-2); cursor: default; }
input.readonly:focus { box-shadow: none; border-color: var(--line); }
.pos-btns { white-space: nowrap; }
.pos-btns .btn { padding: 4px 7px; }
