:root {
  --navy: #0f2540;
  --navy-2: #16314f;
  --accent: #f5b301;
  --accent-ink: #3a2a00;
  --primary: #1d5fd1;
  --primary-ink: #fff;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e3e8ef;
  --line-2: #cfd7e2;
  --text: #0f1b2d;
  --muted: #5b6b80;
  --faint: #8a99ad;
  --red: #dc2626;
  --red-bg: #fde8e8;
  --yellow: #e5a100;
  --yellow-bg: #fff6d6;
  --green: #16a34a;
  --green-bg: #e3f6e9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 1px 3px rgba(15, 27, 45, .05);
  --sidebar: 240px;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); line-height: 1.45; min-height: 100vh; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75em; }
small, .small { font-size: .84em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mono { font-variant-numeric: tabular-nums; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }

/* ---------- Shell ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--navy); color: #c9d5e5;
  display: flex; flex-direction: column; z-index: 40; transition: transform .2s ease;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--navy); display: grid; place-items: center; }
.brand-mark .icon { width: 18px; height: 18px; }
.nav { flex: 1; overflow-y: auto; padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: #c9d5e5; font-weight: 500; }
.nav a:hover { background: var(--navy-2); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(245, 179, 1, .14); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav-sep { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #7d90aa; padding: 16px 10px 6px; }
.nav-badge { margin-left: auto; background: var(--red); color: #fff; border-radius: 999px; font-size: .72rem; padding: 1px 7px; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.08); padding: 12px; display: flex; align-items: center; gap: 8px; }
.me { display: flex; align-items: center; gap: 10px; color: #fff; flex: 1; min-width: 0; }
.me:hover { text-decoration: none; }
.me span { display: flex; flex-direction: column; min-width: 0; }
.me b { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: #94a6bf; }
.sidebar .icon-btn { color: #c9d5e5; }
.sidebar .icon-btn:hover { background: var(--navy-2); color: #fff; }

.topbar {
  position: sticky; top: 0; z-index: 30; margin-left: var(--sidebar); height: 60px; background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 24px;
}
.topbar-title { font-weight: 600; }
.topbar .menu-btn { display: none; }
.search { flex: 1; max-width: 520px; position: relative; display: flex; align-items: center; }
.search .icon { position: absolute; left: 11px; color: var(--faint); }
.search input[type=search] { width: 100%; padding: 9px 12px 9px 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); font: inherit; }
.search input[type=search]:focus { outline: 2px solid rgba(29,95,209,.25); border-color: var(--primary); background: #fff; }
.topbar-new { margin-left: auto; }
.main { margin-left: var(--sidebar); padding: 24px; max-width: 1500px; }
.no-nav .main { margin: 0; max-width: none; padding: 0; }
.nav-backdrop { display: none; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }

/* ---------- Cards / grid ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 8px; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }
.card-foot { padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

.kpi { padding: 16px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.kpi .label { color: var(--muted); font-size: .85rem; font-weight: 500; }
.kpi .value { font-size: 1.8rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .hint { font-size: .8rem; color: var(--faint); }
.kpi.red { border-left: 4px solid var(--red); }
.kpi.yellow { border-left: 4px solid var(--yellow); }
.kpi.green { border-left: 4px solid var(--green); }
.kpi.blue { border-left: 4px solid var(--primary); }
a.kpi:hover { text-decoration: none; border-color: var(--line-2); }
a.kpi { color: inherit; }

/* ---------- Ampel ---------- */
.light { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; vertical-align: middle; box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.light-red { background: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.light-yellow { background: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-bg); }
.light-green { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.light-grey, .light-done { background: #b5c0cf; }
.lights-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line); }
.lights-bar span { display: block; }
.lights-bar .r { background: var(--red); } .lights-bar .y { background: var(--yellow); } .lights-bar .g { background: var(--green); }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #eef2f7; color: #344459; white-space: nowrap; }
.badge-phase { background: #e8eefb; color: #1d4aa0; }
.phase-anfrage { background: #eef2f7; color: #344459; }
.phase-besichtigung { background: #e6f0ff; color: #1d4aa0; }
.phase-angebot { background: #efe8ff; color: #5b2fc0; }
.phase-freigabe { background: #fff1d6; color: #8a5a00; }
.phase-vorbereitung { background: #e1f5f3; color: #0d6e63; }
.phase-ausfuehrung { background: #e3f6e9; color: #136b33; }
.phase-abrechnung { background: #fde8f1; color: #9d1d58; }
.phase-nachbetreuung { background: #eceff3; color: #44536a; }
.badge-done { background: var(--green-bg); color: #136b33; }
.badge-lost { background: #f1f1f1; color: #6b7280; }
.badge-red { background: var(--red-bg); color: #a61b1b; }
.badge-yellow { background: var(--yellow-bg); color: #7a5600; }
.badge-green { background: var(--green-bg); color: #136b33; }
.badge-st-entwurf { background: #eef2f7; color: #44536a; }
.badge-st-versendet, .badge-st-eingereicht, .badge-st-bestellt, .badge-st-geplant { background: #e6f0ff; color: #1d4aa0; }
.badge-st-angenommen, .badge-st-bezahlt, .badge-st-genehmigt, .badge-st-geliefert, .badge-st-bestaetigt { background: var(--green-bg); color: #136b33; }
.badge-st-abgelehnt, .badge-st-storniert, .badge-st-abgesagt { background: #f3f4f6; color: #6b7280; text-decoration: line-through; }
.badge-st-offen { background: var(--yellow-bg); color: #7a5600; }
.badge-st-nicht_erforderlich { background: #f3f4f6; color: #6b7280; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--c); white-space: nowrap; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }

.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: .72rem; font-weight: 700; flex: none; }
.avatar-empty { background: #e5e9f0; color: var(--faint); }
.avatar.sm { width: 22px; height: 22px; font-size: .62rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line-2);
  background: #fff; color: var(--text); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; line-height: 1.2;
}
.btn:hover { background: var(--surface-2); text-decoration: none; border-color: #b9c4d3; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: #174fb0; border-color: #174fb0; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #e0a400; border-color: #e0a400; }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #138a3f; }
.btn-danger { color: var(--red); border-color: #f1c4c4; }
.btn-danger:hover { background: var(--red-bg); border-color: var(--red); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 5px 10px; font-size: .82rem; }
.btn-lg { padding: 12px 18px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.inline-form { display: inline; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .label { font-size: .84rem; font-weight: 600; color: #34465c; }
.field .help { font-size: .8rem; color: var(--faint); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time],
input[type=datetime-local], input[type=search], input[type=url], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font: inherit; color: var(--text); min-height: 40px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(29,95,209,.22); border-color: var(--primary); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; margin: 0; }
legend { font-weight: 700; padding: 0 6px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters select, .filters input { width: auto; min-width: 140px; min-height: 36px; padding: 6px 10px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: #fff; }
.seg a { padding: 7px 12px; color: var(--muted); font-weight: 600; font-size: .85rem; border-right: 1px solid var(--line); }
.seg a:last-child { border-right: 0; }
.seg a.on { background: var(--navy); color: #fff; }
.seg a:hover { text-decoration: none; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcff; }
.table tr.row-red td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.table tr.row-yellow td:first-child { box-shadow: inset 3px 0 0 var(--yellow); }
.table .title-cell a { font-weight: 600; color: var(--text); }
.table .title-cell small { display: block; color: var(--muted); }
.table input, .table select { min-height: 34px; padding: 5px 8px; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .meta { font-size: .82rem; color: var(--muted); display: flex; gap: 4px 12px; flex-wrap: wrap; margin-top: 2px; }
.task-title { font-weight: 600; }
.task-done .task-title { text-decoration: line-through; color: var(--faint); }

.timeline { list-style: none; margin: 0; padding: 0 16px; }
.timeline li { position: relative; padding: 10px 0 10px 22px; border-left: 2px solid var(--line); margin-left: 6px; font-size: .88rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: #b5c0cf; border: 2px solid #fff; }
.timeline li.ev-phase::before { background: var(--primary); }
.timeline li.ev-created::before { background: var(--accent); }
.timeline li.ev-mail::before { background: #7c3aed; }
.timeline li.ev-task_done::before { background: var(--green); }
.timeline li.ev-blocked::before { background: var(--red); }
.timeline .when { color: var(--faint); font-size: .78rem; }

.empty { padding: 28px 16px; text-align: center; color: var(--faint); }
.empty-state { max-width: 520px; margin: 60px auto; text-align: center; }
.empty-state h1 { margin-bottom: 10px; }

/* ---------- Flash ---------- */
.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; font-weight: 500; border: 1px solid; }
.flash-success { background: var(--green-bg); border-color: #b5e3c4; color: #10532a; }
.flash-error { background: var(--red-bg); border-color: #f4b9b9; color: #8f1717; }
.flash-info { background: #e8f0fe; border-color: #c2d5f8; color: #173f8a; }
.flash-warning { background: var(--yellow-bg); border-color: #f0d98a; color: #6b4b00; }
.alert { padding: 12px 14px; border-radius: 8px; border: 1px solid; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert-red { background: var(--red-bg); border-color: #f4b9b9; color: #7d1414; }
.alert-yellow { background: var(--yellow-bg); border-color: #f0d98a; color: #6b4b00; }
.alert-green { background: var(--green-bg); border-color: #b5e3c4; color: #10532a; }
.alert-blue { background: #e8f0fe; border-color: #c2d5f8; color: #173f8a; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs .count { background: #eef2f7; color: var(--muted); border-radius: 999px; font-size: .72rem; padding: 0 7px; }
.tabs .count.red { background: var(--red-bg); color: var(--red); }

/* ---------- Phase stepper ---------- */
.stepper { display: flex; gap: 4px; margin-bottom: 18px; overflow-x: auto; padding-bottom: 2px; }
.stepper .step { flex: 1; min-width: 92px; padding: 8px 10px 9px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: .76rem; color: var(--faint); font-weight: 600; position: relative; }
.stepper .step b { display: block; font-size: .7rem; color: var(--faint); }
.stepper .step.done { background: #eef4ff; border-color: #d6e3fb; color: #1d4aa0; }
.stepper .step.current { background: var(--navy); border-color: var(--navy); color: #fff; }
.stepper .step.current b { color: var(--accent); }

/* ---------- Board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.board-col { background: #e9edf3; border-radius: var(--radius); padding: 10px; min-height: 200px; }
.board-col h3 { font-size: .85rem; display: flex; justify-content: space-between; padding: 2px 4px 10px; color: #34465c; }
.board-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; margin-bottom: 8px; color: var(--text); box-shadow: var(--shadow); }
.board-card:hover { text-decoration: none; border-color: var(--line-2); }
.board-card .t { font-weight: 600; font-size: .9rem; display: flex; gap: 8px; align-items: flex-start; }
.board-card .t .light { margin-top: 4px; }
.board-card .m { font-size: .78rem; color: var(--muted); margin-top: 6px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }

/* ---------- Calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-wrap { overflow-x: auto; }
.cal-day { background: #fff; min-height: 380px; display: flex; flex-direction: column; }
.cal-day.weekend { background: #fafbfc; }
.cal-day.today .cal-head { background: var(--navy); color: #fff; }
.cal-head { padding: 8px 10px; font-weight: 700; font-size: .85rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.cal-head a { color: inherit; opacity: .6; }
.cal-items { padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.appt { display: block; border-radius: 7px; padding: 6px 8px 7px; font-size: .78rem; color: var(--text); background: #f3f6fb; border-left: 4px solid var(--c, #64748b); }
.appt:hover { text-decoration: none; background: #e9eef7; }
.appt .time { font-weight: 700; font-variant-numeric: tabular-nums; }
.appt .who { color: var(--muted); display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.appt.kind-montage { background: #eefaf2; }
.appt.st-abgesagt { opacity: .5; text-decoration: line-through; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.slots { display: flex; flex-wrap: wrap; gap: 6px; }
.slot { padding: 6px 10px; border-radius: 7px; border: 1px solid var(--line-2); background: #fff; font-size: .82rem; cursor: pointer; font-weight: 600; font-variant-numeric: tabular-nums; }
.slot:hover { border-color: var(--primary); color: var(--primary); }
.slot.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Photos ---------- */
.photo-req { display: grid; grid-template-columns: 1fr; gap: 10px; }
.photo-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; gap: 12px; align-items: flex-start; background: #fff; }
.photo-item.missing { border-color: #f4b9b9; background: #fffafa; }
.photo-item.ok { border-color: #b5e3c4; }
.photo-item .info { flex: 1; min-width: 0; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.thumbs a { display: block; width: 72px; height: 72px; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); background: #f1f4f8; position: relative; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-btn { position: relative; overflow: hidden; }
.upload-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- Bars ---------- */
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 60px; gap: 10px; align-items: center; font-size: .88rem; }
.bar-track { height: 12px; border-radius: 999px; background: #edf1f6; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 999px; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 10% -10%, #1f4a7a 0%, transparent 60%), var(--navy); }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 14px; padding: 30px 28px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.auth-card .brand { color: var(--navy); padding: 0 0 18px; }
.auth-card h1 { font-size: 1.25rem; margin-bottom: 6px; }
.auth-card form > * + * { margin-top: 14px; }

/* ---------- Public request page ---------- */
.public-wrap { max-width: 680px; margin: 0 auto; padding: 32px 16px; }
.public-wrap .card { padding: 24px; }

/* ---------- Print ---------- */
.print-doc { background: #fff; max-width: 820px; margin: 0 auto; padding: 48px 56px; font-size: 14px; color: #111; }
.print-doc h1 { font-size: 22px; margin: 28px 0 4px; }
.print-doc table { width: 100%; border-collapse: collapse; margin-top: 18px; }
.print-doc th, .print-doc td { padding: 7px 6px; border-bottom: 1px solid #ddd; text-align: left; vertical-align: top; }
.print-doc th { font-size: 12px; text-transform: uppercase; color: #555; border-bottom: 2px solid #111; }
.print-doc .num { text-align: right; white-space: nowrap; }
.print-doc .totals td { border: 0; padding: 4px 6px; }
.print-doc .totals tr.sum td { border-top: 2px solid #111; font-weight: 700; font-size: 15px; }
.print-head { display: flex; justify-content: space-between; gap: 20px; }
.print-head .company { text-align: right; font-size: 12px; color: #444; }
.print-head .company b { font-size: 16px; color: #111; }
.print-toolbar { max-width: 820px; margin: 16px auto; display: flex; gap: 8px; justify-content: flex-end; padding: 0 16px; }
.print-foot { margin-top: 40px; font-size: 11px; color: #666; border-top: 1px solid #ddd; padding-top: 10px; }
body.print-page { background: #e9edf2; }
@media print {
  body.print-page { background: #fff; }
  .print-toolbar, .sidebar, .topbar, .flash { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; }
  .print-doc { padding: 0; max-width: none; }
}

/* ---------- Technician ---------- */
.job-tile { display: block; color: var(--text); padding: 14px 16px; border-bottom: 1px solid var(--line); }
.job-tile:last-child { border-bottom: 0; }
.job-tile:hover { text-decoration: none; background: #fafcff; }
.job-tile .t { font-weight: 700; display: flex; gap: 8px; align-items: center; }
.job-tile .m { color: var(--muted); font-size: .86rem; margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.big-time { font-size: 1.1rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }

dl.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; margin: 0; font-size: .9rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

details.more > summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: .88rem; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary.btn { color: var(--text); }
details.more[open] > summary { margin-bottom: 12px; }

.pagination { display: flex; gap: 6px; justify-content: center; padding: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  :root { --sidebar: 0px; }
  .sidebar { width: 270px; transform: translateX(-100%); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(10,20,35,.45); z-index: 35; }
  .topbar .menu-btn { display: inline-grid; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-new span { display: none; }
  .main { padding: 16px 12px 40px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 1.25rem; }
  .table .hide-sm { display: none; }
  dl.kv { grid-template-columns: 110px 1fr; }
  .bar-row { grid-template-columns: 100px 1fr 44px; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px; }
  .kpi .value { font-size: 1.45rem; }
  .print-doc { padding: 24px 18px; }
  .btn { padding: 9px 12px; }
}
