:root {
  font-family:Inter,"Segoe UI",Arial,sans-serif;
  color:#292d33;
  background:#f5f6f7;
  font-size:16px;
  font-synthesis:none;
  --brand-primary:#810C41;
  --brand-accent:#F9DF18;
  --green:var(--brand-primary);
  --accent:var(--brand-accent);
  --muted:#697079;
  --line:#dfe2e6
}
.view-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  overflow-x: auto;
}
.view-tabs a {
  padding: 0 0 14px;
  text-decoration: none;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.view-tabs a[aria-current] {
  color: var(--green);
  font-weight: 650;
  border-bottom: 3px solid var(--green);
}
.order-toolbar { flex-wrap: wrap; }
.order-toolbar .search { min-width: 100%; }
.order-toolbar select { flex: 1; }
.badge.review { background: #fff0d9; color: #805120; }
.check-field { display: flex; align-items: center; gap: 10px; line-height: 1.6; }
.check-field input { width: 18px; min-height: 18px; height: 18px; margin: 0; accent-color: var(--green); }
.related-orders, .history-panel { margin-top: 30px; }
.appointment-card { padding: 24px; }
.appointment-card p { font-size: 14px; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.button-row .button { white-space: normal; font-size: 13px; }
.timeline { list-style: none; padding: 0 28px; margin: 0; }
.timeline-entry { padding: 26px 0 26px 24px; border-top: 1px solid var(--line); border-left: 3px solid #dfe2e6; }
.timeline-entry p { font-size: 14px; }
.history-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.history-facts p { line-height: 1.7; }
.timeline-entry summary { font-size: 13px; color: var(--muted); cursor: pointer; }
.timeline-entry .button { padding: 7px 12px; }
.order-detail .info-list dd { white-space: pre-line; }
@media(max-width:800px) {
  .history-facts { grid-template-columns: 1fr; gap: 0; }
  .timeline { padding: 0 16px; }
  .timeline-entry { padding-left: 14px; }
  .history-panel .panel-head { flex-wrap: wrap; }
  .order-toolbar select { flex-basis: 100%; }
}
* {
  box-sizing:border-box
}
body {
  margin:0
}
button,input,select,textarea {
  font:inherit
}
button,a,input,select,textarea {
  -webkit-tap-highlight-color:transparent
}
button,a {
  touch-action:manipulation
}
button {
  cursor:pointer
}
a {
  color:inherit
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid #5b9692;
  outline-offset:3px
}
button:disabled {
  opacity:.55;
  cursor:wait
}
.skip {
  position:absolute;
  left:250px;
  top:-100px;
  background:white;
  padding:16px;
  z-index:10
}
.skip:focus {
  top:10px
}
.sidebar {
  width:236px;
  position:fixed;
  inset:0 auto 0 0;
  background:var(--green);
  color:#f3f8f6;
  padding:32px 20px 20px;
  display:flex;
  flex-direction:column
}
.brand {
  display:flex;
  gap:12px;
  text-decoration:none;
  font-size:25px;
  font-weight:750;
  letter-spacing:2px;
  align-items:center;
  margin:0 9px 54px
}
.brand small {
  display:block;
  font-size:10px;
  font-weight:500;
  letter-spacing:2px;
  margin-top:5px
}
.nav-label {
  font-size:11px;
  letter-spacing:1.6px;
  color:#a9c0bc;
  margin:0 15px 14px
}
nav {
  display:grid;
  gap:7px
}
nav a {
  display:flex;
  align-items:center;
  gap:13px;
  padding:14px;
  border-radius:6px;
  text-decoration:none;
  color:#c4d5d1;
  font-size:15px
}
nav a>span {
  width:20px;
  font-size:21px
}
nav a small {
  margin-left:auto;
  font-size:11px;
  border:1px solid #567370;
  border-radius:4px;
  padding:2px 5px
}
nav a[aria-current="page"] {
  background:var(--accent);
  color:var(--green);
  font-weight:650
}
nav a[aria-current="page"] small {
  border:0
}
nav a:hover {
  background:#315756
}
nav a[aria-current="page"]:hover {
  background:#e4f3b8
}
.sidebar-note {
  margin:auto 12px 30px;
  padding-top:40px
}
.sidebar-note strong {
  font-size:16px;
  font-weight:550
}
.sidebar-note p {
  color:#b4cbc5;
  font-size:14px;
  line-height:1.7
}
.sidebar-note>span {
  font-size:10px;
  letter-spacing:1.4px;
  color:#afc995
}
.local-label {
  font-size:12px;
  color:#b4cbc5;
  border-top:1px solid #41615d;
  padding:21px 10px 0;
  display:flex;
  gap:10px
}
.workspace {
  margin-left:236px
}
.topbar {
  height:76px;
  background:#fff;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 42px;
  font-size:14px;
  color:var(--muted)
}
.stage {
  font-size:12px;
  border:1px solid var(--line);
  border-radius:30px;
  padding:8px 12px
}
.stage span {
  margin:0 7px;
  color:#83938e
}
main {
  padding:39px 42px 50px;
  max-width:1600px;
  margin:auto;
  min-height:calc(100vh - 133px)
}
h1 {
  font-size:32px;
  letter-spacing:-1px;
  margin:6px 0 10px;
  font-weight:650
}
h2 {
  font-size:20px;
  letter-spacing:-.4px;
  margin:0
}
h3 {
  font-size:16px;
  margin:0 0 10px
}
p {
  line-height:1.6
}
.eyebrow {
  color:var(--muted);
  font-size:11px;
  font-weight:650;
  letter-spacing:1.6px
}
.page-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:28px
}
.page-head p {
  margin:0;
  color:var(--muted);
  font-size:14px
}
.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  padding:11px 17px;
  font-size:14px;
  font-weight:600;
  color:var(--green);
  text-decoration:none;
  white-space:nowrap
}
.button.primary {
  background:var(--green);
  color:white;
  border-color:var(--green)
}
.button:hover {
  filter:brightness(.94)
}
.button.primary span {
  font-size:21px;
  line-height:16px;
  font-weight:400
}
.stats {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
  margin-bottom:28px
}
.stat {
  background:#fff;
  border:1px solid var(--line);
  border-radius:9px;
  padding:21px 24px;
  display:flex;
  align-items:center;
  gap:18px
}
.stat-icon {
  height:43px;
  width:43px;
  background:#edf3ec;
  color:#527164;
  border-radius:8px;
  display:grid;
  place-items:center;
  font-size:22px
}
.stat strong {
  font-size:28px;
  font-weight:600;
  letter-spacing:-1px
}
.stat small {
  display:block;
  font-size:13px;
  color:var(--muted);
  margin-top:3px
}
.stat:last-child .stat-icon {
  background:#edf1f6;
  color:#576e8d
}
.panel {
  background:#fff;
  border:1px solid var(--line);
  border-radius:9px;
  overflow:hidden
}
.panel-head {
  padding:24px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px
}
.panel-head h2 {
  font-size:18px
}
.subtle {
  font-size:13px;
  color:var(--muted)
}
.toolbar {
  display:flex;
  gap:12px;
  padding:0 24px 23px
}
.search {
  position:relative;
  flex:1
}
.search span {
  position:absolute;
  left:14px;
  top:10px;
  color:#6f8582;
  font-size:22px
}
.search input {
  padding-left:43px
}
input,select,textarea {
  width:100%;
  border:1px solid #cbd7d8;
  border-radius:6px;
  background:#fff;
  color:#243d3e;
  padding:11px 12px;
  font-size:14px;
  min-height:43px
}
input::placeholder,textarea::placeholder {
  color:#78888b
}
.toolbar select {
  width:210px
}
.table-scroll {
  overflow:auto
}
table {
  border-collapse:collapse;
  width:100%;
  text-align:left
}
th {
  font-size:11px;
  letter-spacing:.8px;
  text-transform:uppercase;
  font-weight:600;
  color:#66797d;
  background:#f8fafb;
  padding:14px 24px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line)
}
td {
  font-size:14px;
  padding:17px 24px;
  border-bottom:1px solid #eaf0f1;
  vertical-align:middle
}
tr:last-child td {
  border-bottom:0
}
tbody tr:hover {
  background:#f8fbf8
}
td a {
  font-weight:600;
  text-decoration:none;
  display:block
}
td a:hover {
  text-decoration:underline
}
.customer-name {
  display:flex;
  align-items:center;
  gap:12px
}
.avatar {
  width:37px;
  height:37px;
  flex-shrink:0;
  display:grid;
  place-items:center;
  background:#eef2e8;
  color:#5a6e4c;
  border-radius:7px;
  font-size:12px;
  font-weight:650
}
.secondary {
  display:block;
  color:var(--muted);
  font-size:12px;
  font-weight:400;
  margin-top:5px
}
.badge {
  display:inline-block;
  border-radius:4px;
  padding:5px 8px;
  font-size:11px;
  font-weight:600;
  background:#edf2f3;
  color:#58696d;
  white-space:nowrap
}
.badge.active {
  background:#e9f3e9;
  color:#386a49
}
.badge.do_not_contact {
  background:#fff0df;
  color:#986025
}
.badge.decommissioned {
  background:#f6e8e8;
  color:#995555
}
.table-footer {
  border-top:1px solid var(--line);
  padding:14px 24px;
  font-size:12px;
  color:var(--muted)
}
.empty {
  padding:60px 24px;
  text-align:center;
  color:var(--muted)
}
.empty h2 {
  color:var(--green);
  margin-bottom:10px
}
.empty p {
  font-size:14px;
  max-width:540px;
  margin:12px auto 25px
}
.empty-icon {
  font-size:36px;
  color:#547f72;
  background:#eff5e8;
  border-radius:16px;
  display:grid;
  place-items:center;
  width:76px;
  height:76px;
  margin:0 auto 24px
}
.notice {
  display:flex;
  gap:12px;
  font-size:13px;
  line-height:1.6;
  background:#eaf0f2;
  color:#566d73;
  padding:14px 18px;
  border-radius:6px;
  margin-top:22px
}
.notice strong {
  font-weight:600;
  color:#3f585c
}
footer {
  border-top:1px solid var(--line);
  padding:20px 42px;
  font-size:11px;
  color:#75878a;
  display:flex;
  justify-content:space-between;
  gap:20px
}
.error {
  color:#8d3434;
  background:#fff0ef;
  border:1px solid #f0ceca;
  padding:13px 16px;
  border-radius:6px;
  font-size:14px
}
.toast {
  position:fixed;
  right:28px;
  bottom:28px;
  background:var(--green);
  color:white;
  border-radius:7px;
  padding:16px 23px;
  box-shadow:0 8px 35px #183a3b26;
  z-index:5;
  font-size:14px
}
.breadcrumb {
  display:flex;
  gap:12px;
  font-size:13px;
  color:var(--muted);
  margin-bottom:24px
}
.breadcrumb a {
  text-decoration:none
}
.detail-grid {
  display:grid;
  grid-template-columns:330px minmax(0,1fr);
  gap:24px;
  align-items:start
}
.info-panel {
  padding:24px
}
.info-panel h2 {
  margin-bottom:22px
}
.info-list {
  margin:0;
  display:grid;
  gap:18px
}
.info-list dt {
  font-size:12px;
  color:var(--muted);
  margin-bottom:5px
}
.info-list dd {
  margin:0;
  font-size:14px;
  line-height:1.5;
  overflow-wrap:anywhere;
  white-space:pre-line
}
.info-panel hr {
  border:0;
  border-top:1px solid var(--line);
  margin:23px 0
}
.id {
  font-family:monospace;
  font-size:11px!important;
  word-break:break-all;
  color:var(--muted)
}
.section-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:0 0 17px;
  gap:10px
}
.sites {
  display:grid;
  gap:20px
}
.site-head {
  padding:23px 24px;
  display:flex;
  gap:16px;
  justify-content:space-between;
  border-bottom:1px solid var(--line)
}
.site-head p {
  font-size:13px;
  margin:5px 0;
  color:var(--muted)
}
.site-head .button {
  padding:8px 12px;
  align-self:flex-start
}
.site-notes {
  padding:0 24px;
  font-size:13px;
  color:var(--muted);
  white-space:pre-wrap
}
.lift {
  padding:20px 24px;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  gap:12px
}
.lift h3 {
  margin:0 0 8px
}
.lift .button {
  align-self:flex-start;
  padding:8px 12px
}
.lift p {
  font-size:13px;
  margin:7px 0;
  color:var(--muted)
}
.lift-add {
  padding:15px 24px
}
.lift-add .button {
  border:0;
  background:#f0f5ed
}
.notes {
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.reference {
  font-size:13px;
  line-height:1.8;
  margin:0 0 9px
}
.reference span {
  display:block;
  color:var(--muted);
  font-size:12px
}
dialog {
  width:min(760px,calc(100vw - 32px));
  max-height:90vh;
  padding:0;
  border:1px solid var(--line);
  border-radius:12px;
  color:#292d33;
  box-shadow:0 24px 100px #153c3d40
}
dialog::backdrop {
  background:#0c282d70;
  backdrop-filter:blur(2px)
}
.dialog-head {
  padding:24px 28px;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center
}
.dialog-head p {
  font-size:13px;
  color:var(--muted);
  margin:7px 0 0
}
.close {
  background:transparent;
  border:0;
  color:var(--muted);
  font-size:28px;
  line-height:1;
  padding:5px 10px
}
.form-body {
  padding:24px 28px
}
.form-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px
}
.full {
  grid-column:1/-1
}
label {
  display:block;
  font-size:13px;
  font-weight:600
}
label input,label select,label textarea {
  display:block;
  margin-top:7px;
  font-weight:400
}
textarea {
  resize:vertical;
  min-height:90px
}
.form-section {
  border-top:1px solid var(--line);
  margin-top:25px;
  padding-top:22px
}
.form-section p {
  font-size:13px;
  color:var(--muted)
}
.ref-row {
  display:grid;
  grid-template-columns:1fr 1fr auto;
  gap:12px;
  align-items:end;
  margin-bottom:12px
}
.ref-row .button {
  padding:10px 12px
}
.form-actions {
  display:flex;
  justify-content:flex-end;
  gap:12px;
  position:sticky;
  bottom:0;
  background:white;
  border-top:1px solid var(--line);
  padding:19px 28px
}
.form-error {
  margin-bottom:18px
}
.helper {
  font-size:12px;
  color:var(--muted);
  font-weight:400;
  line-height:1.6;
  margin-top:7px
}
.form-section .button {
  font-size:12px
}
.loading {
  padding:40px;
  color:var(--muted)
}
[hidden] {
  display:none!important
}
@media(min-width:1550px) {
  main {
    padding-top:45px
  }
  .stat {
    padding:25px
  }
  td {
    padding-top:21px;
    padding-bottom:21px
  }
}
@media(max-width:1100px) {
  .sidebar {
    width:200px;
    padding-left:12px;
    padding-right:12px
  }
  .brand {
    font-size:21px;
    gap:8px
  }
  .workspace {
    margin-left:200px
  }
  main {
    padding:28px 24px
  }
  .topbar {
    padding:0 24px
  }
  td,th {
    padding-left:16px;
    padding-right:16px
  }
  .detail-grid {
    grid-template-columns:280px minmax(0,1fr)
  }
  .toolbar {
    flex-wrap:wrap
  }
  .toolbar select {
    width:190px
  }
  .stat {
    padding:16px;
    gap:10px
  }
  .stat-icon {
    width:34px
  }
}
@media(max-width:800px) {
  .sidebar {
    position:static;
    width:auto;
    padding:16px
  }
  .brand {
    margin:0 0 20px
  }
  .nav-label,.sidebar-note,.local-label {
    display:none
  }
  nav {
    grid-template-columns:repeat(4,1fr);
    gap:4px
  }
  nav a {
    padding:10px;
    gap:6px;
    font-size:13px;
    flex-wrap:wrap
  }
  nav a small {
    display:none
  }
  .workspace {
    margin-left:0
  }
  .topbar {
    height:54px
  }
  main {
    padding:25px 18px
  }
  .page-head {
    align-items:flex-start;
    flex-wrap:wrap
  }
  h1 {
    font-size:28px
  }
  .stats {
    gap:8px
  }
  .stat {
    display:block;
    padding:13px
  }
  .stat-icon {
    display:none
  }
  .stat strong {
    font-size:24px
  }
  .stat small {
    font-size:11px
  }
  .toolbar {
    padding:0 16px 16px
  }
  .toolbar select {
    width:100%
  }
  .search {
    min-width:100%
  }
  .detail-grid {
    grid-template-columns:1fr
  }
  .form-grid {
    grid-template-columns:1fr
  }
  .form-grid>* {
    grid-column:1
  }
  .ref-row {
    grid-template-columns:1fr
  }
  .panel-head {
    padding:20px 16px
  }
  footer {
    padding:18px;
    flex-wrap:wrap
  }
  .site-head,.lift {
    padding:18px
  }
  .site-head h3,.lift h3 {
    overflow-wrap:anywhere
  }
  .form-body,.dialog-head {
    padding:20px
  }
  .form-actions {
    padding:16px
  }
  .section-head {
    flex-wrap:wrap
  }
  .topbar>span:first-child {
    font-size:12px
  }
}
/* Touren: gleiche Grundbausteine wie Kunden und Aufträge. */
.tour-day{margin:24px 0}.tour-day .panel-head{align-items:flex-start}.tour-day .panel-head p{max-width:650px;margin:8px 0;line-height:1.5}.planning-warnings{margin:16px}.planning-warnings ul{padding-left:18px;margin:0}.planning-warnings li+li{margin-top:5px}.plan-table{table-layout:fixed}.plan-table th:first-child{width:145px}.plan-table th:last-child{width:175px}.plan-table td{vertical-align:top;overflow-wrap:anywhere}.plan-table p{margin:7px 0;line-height:1.5}.plan-actions .button{margin:3px 0;font-size:12px;white-space:normal}.plan-actions .button-row{margin:0}.plan-time{font-variant-numeric:tabular-nums;font-weight:600}.plan-drive{background:#f4f7f5}.plan-cancelled{background:#fff0e9}.plan-cancelled strong{text-decoration:line-through}.tour-day-footer{display:flex;gap:10px;flex-wrap:wrap;padding:20px;border-top:1px solid var(--line,#dce4df)}.overnight-summary{background:#f0f3e7;padding:18px 24px;border-top:1px solid #d7ddc8}.overnight-summary p{line-height:1.6}.preserve-lines{white-space:pre-wrap}.form-grid [hidden]{display:none!important}section.panel+.panel{margin-top:22px}.button-row{display:flex;gap:8px;flex-wrap:wrap}.plan-table small{color:#526766}
.routing-panel{margin:20px 0}.routing-panel .form-grid{margin-top:14px}.suggestion{border-top:1px solid #dce4df;padding:20px 0}.suggestion p{line-height:1.6}.suggestion details{margin:12px 0}.suggestion li{margin:5px 0}code{overflow-wrap:anywhere}#location-results .button{margin:3px;font-size:12px}#routing-feedback{margin-top:12px}.routing-panel .subtle{line-height:1.6}
.route-map { width:100%; max-height:480px; border:1px solid #d7dfd9; border-radius:12px; }
.map-background { fill:#f1f5ef; }
.map-road { fill:none; stroke:#176b5b; stroke-width:3; stroke-linejoin:round; }
.map-stop { fill:#d8f36a; stroke:#163f35; stroke-width:2; }
.map-number { text-anchor:middle; font-size:13px; font-weight:700; }
.demo-banner { padding:12px 24px; background:#eaf4c5; border-bottom:1px solid #c9d7a0; color:#254437; font-size:14px; }

/* Confirmed Brandt palette; original logo is served locally without image transforms. */
:root { --green:var(--brand-primary); --accent:var(--brand-accent); }
.sidebar { background:#fff; color:#30343a; border-right:1px solid var(--line); overflow-y:auto; padding-top:16px; }
.brand { color:var(--brand-primary); flex-direction:column; gap:0; margin:0 0 24px; font-size:21px; line-height:1.35; font-weight:650; letter-spacing:0; }
.brand-logo { display:block; width:100%; max-width:196px; height:auto; object-fit:contain; }
.brand-product { display:block; margin-top:4px; }
.brand:focus-visible { outline:3px solid var(--brand-primary); outline-offset:4px; }
.sidebar nav a,.nav-label,.sidebar-note,.local-label { color:#555c65; }
.sidebar nav a { padding:12px 14px; }
.sidebar nav a:hover { background:#f7eef2; color:var(--brand-primary); }
.sidebar nav a[aria-current],.sidebar nav a[aria-current]:hover { background:var(--brand-primary); color:#fff; font-weight:650; }
.sidebar nav a[aria-current] { box-shadow:inset 3px 0 var(--brand-accent); }
.local-label { margin-top:auto; border-color:var(--line); }
.sidebar-note { display:none; }
.sidebar-note { border-color:#d2d5da; background:transparent; }
.sidebar-note strong { color:#30343a; }
.topbar { gap:14px; flex-wrap:wrap; height:auto; min-height:76px; padding-top:12px;padding-bottom:12px; }
.topbar .stage { display:none; }
.workflow-steps { display:flex; list-style:none; padding:0; gap:8px; margin:0 0 30px; }
.workflow-steps li { flex:1; padding:15px 12px; background:#eceef1; border-radius:6px; font-size:14px; color:#606773; }
.workflow-steps li[aria-current] { background:var(--brand-primary); color:white; font-weight:650; box-shadow:inset 0 -3px var(--brand-accent); }
.step-status { display:block; font-size:11px; margin-top:5px; color:#fff; }
.workflow-steps a { color:inherit; text-decoration:none; }
.workflow-hero { padding:36px; margin-bottom:28px; max-width:1000px; }
.workflow-hero p { max-width:680px; line-height:1.7; }
.workflow-hero .button { margin:12px 10px 0 0; }
.workflow-form { padding:30px; max-width:1000px; margin:0 0 26px; }
.workflow-form label { display:flex; flex-direction:column; gap:8px; margin:10px 0; font-size:14px; }
.workflow-form label.check-field { flex-direction:row; }
.workflow-form input,.workflow-form select { width:100%; }
.workflow-form .form-grid { margin:16px 0; gap:24px; }
.workflow-form details { padding:18px 0; border-top:1px solid var(--line); }
.workflow-form summary { cursor:pointer; font-weight:600; }
.workflow-form .form-actions { padding:24px 0 0; }
.duration-input { display:flex; gap:14px; }
.duration-input label { flex:1; }
.search-results { max-height:320px; overflow:auto; }
.search-result { display:flex; width:100%; justify-content:space-between; text-align:left; gap:15px; background:white; border:1px solid var(--line); border-radius:5px; padding:13px; cursor:pointer; margin:4px 0; }
.search-result:hover { background:#edf0f3; }
.search-result small { color:var(--muted); }
.workflow-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:20px; margin:6px 0 26px; }
.workflow-metrics strong { display:block; font-size:19px; line-height:1.5; }
.workflow-metrics small { display:block; color:var(--muted); margin-top:6px; }
.workflow-day,.call-card { padding:22px 0; border-top:1px solid var(--line); }
.workflow-day li,.call-card p { line-height:1.7; }
.workflow-warnings { margin:20px 0; border:1px solid #d7cbaa; padding:16px; border-radius:6px; }
.workflow-tour-link { display:flex; align-items:center; justify-content:space-between; padding:18px 0; border-bottom:1px solid var(--line); }
.workflow-tour-link span { display:block; color:var(--muted); font-size:13px; margin-top:5px; }
.map-road { stroke:var(--brand-primary); } .map-stop { fill:var(--brand-accent); stroke:#292d33; } .map-number { fill:#292d33; } .map-background { fill:#f5f6f7; }
.map-legend { line-height:1.6; font-size:13px; }
@media(max-width:1050px) { .workflow-metrics { grid-template-columns:1fr 1fr; } .workflow-steps { flex-wrap:wrap; } .workflow-steps li { min-width:40%; } }

.sidebar-note p,.sidebar-note span { color:#697079; }

/* Restrained accents; visit and booking states retain their explicit text labels. */
:focus-visible { outline:3px solid var(--brand-primary); outline-offset:3px; }
input,select,textarea { color:#292d33; border-color:#b8bec6; }
input::placeholder,textarea::placeholder { color:var(--muted); }
footer { color:var(--muted); }
.demo-banner { background:var(--brand-accent); color:#292d33; border-color:#dac217; }
.notice { background:#f1f3f5; color:#4b535e; }
.notice strong { color:#292d33; }
.avatar,.stat-icon,.empty-icon,.lift-add .button,.overnight-summary { background:#f2f3f5; color:#4b535e; }
.plan-drive,tbody tr:hover { background:#f7f8fa; }
@media(max-width:800px) { .brand { flex-direction:row; justify-content:flex-start; gap:18px; margin-bottom:16px; } .brand-logo { width:132px; } .brand-product { margin:0; } }

/* Compact trip overview: individual time positions are progressively disclosed. */
.compact-overview { display:grid; grid-template-columns:minmax(280px,1fr) minmax(320px,1.25fr); gap:28px; align-items:start; }
.compact-map .route-map { width:100%; height:235px; }
.compact-map .subtle { font-size:12px; line-height:1.5; }
.compact-day { border-top:1px solid var(--line); padding:14px 0; }
.compact-day summary { cursor:pointer; line-height:1.6; }
.compact-day summary span,.compact-day summary small { display:block; margin-left:16px; }
.compact-day summary small { color:var(--muted); }
.time-positions { line-height:1.6; padding-left:24px; }
.time-positions li { padding:10px 0; border-top:1px solid var(--line); }
.compact-variants { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:18px; margin:24px 0; }
.variant-card { border:1px solid var(--line); padding:20px; border-radius:8px; }
.variant-card h3 { line-height:1.5; }
.variant-card p { line-height:1.6; }
.variant-effort { background:#fff9ca; color:#292d33; padding:12px; border-left:3px solid var(--brand-accent); }
@media(max-width:1100px) { .compact-overview { grid-template-columns:1fr; } }

.geographic-map { height:350px; width:100%; border:1px solid var(--line); border-radius:7px; z-index:0; }
.geo-pin { background:var(--brand-primary); border:2px solid white; border-radius:16px; color:white; min-width:30px; width:max-content!important; padding:3px 7px; font-weight:700; text-align:center; }
.geo-proposal { background:var(--brand-accent); color:#292d33; border:2px dashed #810c41; }
.geo-legend { font-size:12px; line-height:1.5; }
.geo-legend p { padding:5px 0; margin:0; }
.geo-legend strong { display:inline-block; padding:1px 6px; background:#f9df18; color:#292d33; }
.leaflet-control-attribution { font-size:10px; }
.maintenance-option { margin:20px 0; border-top:1px solid var(--line); padding-top:12px; }
.maintenance-option h4 { margin:0; font-size:16px; line-height:1.5; }
.maintenance-option p { margin:8px 0; }
.variant-card details { margin:18px 0; }
.basic-variant { background:#f7f8f9; }
.planning-progress,#proposal-progress { line-height:1.7; font-weight:600; }
.planning-progress:before,#proposal-progress:not(:empty):before { content:'◷ '; color:var(--brand-primary); font-size:22px; }
.advanced-planning { margin-top:20px; padding-top:12px; border-top:1px solid var(--line); }
.planning-in-progress>.form-grid,.planning-in-progress>button { display:none; }

.variant-card { min-width:0; }
.variant-card .button { max-width:100%; white-space:normal; text-align:center; }
/* Compact controls must override full-width form input rules. */
.workflow-form label.check-field { display:flex; flex-direction:row; align-items:center; justify-content:flex-start; gap:9px; width:fit-content; }
.workflow-form label.check-field input[type="checkbox"],.maintenance-check input[type="checkbox"] { width:18px; height:18px; min-height:18px; flex:0 0 18px; margin:0; accent-color:#810C41; }
[hidden] { display:none !important; }
.device-choice { margin:16px 0; padding:14px; background:#f5f5f6; border-radius:8px; }
.maintenance-check { display:flex; align-items:flex-start; gap:12px; padding:12px 0; border-bottom:1px solid #e7e4e5; cursor:pointer; }
.maintenance-check small,.day-visits small { display:block; color:#514851; margin-top:3px; }
.compact-day h3 { margin:0 0 8px; font-size:16px; }
.compact-day { padding:14px; }
.day-visits { padding-left:22px; margin:8px 0 12px; }
.day-visits li { margin-bottom:8px; }
.hotel-open { font-size:13px; background:#fff8ce; padding:8px; }
.compact-map .geo-legend { max-height:170px; overflow:auto; }
.compact-map .geographic-map { height:280px; }
#selection-impact { font-weight:600; }
@media(max-width:1000px) { .compact-overview {grid-template-columns:1fr;} .workflow-metrics {grid-template-columns:repeat(2,minmax(0,1fr));} }
/* Keep the everyday capture short; uncommon settings remain disclosed on demand. */
#capture #selected-customer .notice { padding:12px; margin:12px 0; }
#capture #selected-customer p { margin:5px 0; }
#capture .device-choice { padding:12px; margin:12px 0; }
#capture .device-options { padding:7px 0 0; border:0; }
#capture .device-options summary { font-size:13px; }
#capture .device-options .button-row { margin-top:8px; }
#capture > .full { margin:14px 0; }
.work-position { border:1px solid var(--line); border-radius:8px; margin:12px 0; padding:12px; min-width:0; }
.work-position legend { font-weight:600; padding:0 5px; }
.work-position input,.work-position select { width:100%; }
.missing-maintenance { margin-top:18px; font-size:14px; }
.missing-maintenance details { margin-top:12px; }
.reason-counts { line-height:1.8; }
.workflow-warnings h3 { font-size:16px; margin:0 0 8px; }
.compact-order-form h2 { font-size:18px; margin:12px 0; }
.customer-picker { display:flex; align-items:end; gap:12px; }
.customer-picker>label { flex:1; }
.compact-customer { display:flex; flex-wrap:wrap; align-items:center; gap:16px; padding:12px 0; }
.compact-customer label { min-width:240px; flex:1; }
.compact-customer #site-address { color:var(--muted); }
.work-position-grid { display:grid; grid-template-columns:minmax(180px,1fr) minmax(140px,.7fr) minmax(230px,1.6fr) minmax(150px,.7fr); gap:12px; align-items:start; }
.work-position-grid .duration-input { gap:8px; }
.work-position-grid input,.work-position-grid select { min-width:0; }
.work-position-tools { display:flex; justify-content:space-between; align-items:center; gap:12px; font-size:13px; }
.work-position-tools details { flex:1; }
.work-total { background:#f6f4f5; border-radius:8px; padding:14px; margin:16px 0; }
.work-total>strong,.work-total>small { display:block; margin:4px 0; }
.work-total .check-field { font-weight:400; font-size:14px; }
.work-total .duration-input { max-width:520px; margin:10px 0; flex-wrap:wrap; }
.order-context { display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:14px; }
.order-compact-layout { display:grid; grid-template-columns:1fr; gap:18px; }
.order-compact-layout .sites { display:block; }
.compact-open-appointment { margin:6px 0; padding:10px 14px; background:#f5f5f6; border-radius:6px; }
.order-compact-layout .notice { margin:8px 0; padding:10px; font-size:13px; }
.order-work-table { table-layout:fixed; width:100%; }
.order-work-table th:first-child { width:25%; }
.order-work-table th:last-child { width:140px; }
.work-description-text { display:block; white-space:pre-wrap; margin-top:4px; }
.history-panel>details>summary { padding:16px 20px; font-weight:600; }
.order-extra { margin-top:16px; }
@media(max-width:1100px) { .work-position-grid { grid-template-columns:1fr 1fr; } }
@media(max-width:650px) { .work-position-grid { grid-template-columns:1fr; }.customer-picker{display:block;} }

/* Normal guided flow: settings and hotel choice remain compact. */
.capture-defaults { margin:14px 0; padding:10px 0; border-bottom:1px solid var(--line); font-size:14px; }
.inline-hotel { padding:14px 0; border-top:1px solid var(--line); }
.inline-hotel h3 { margin:4px 0 12px; font-size:16px; }
.inline-hotel .button-row { margin:8px 0; }
.inline-hotel [data-hotel-progress] { margin-left:12px; }
.workflow-warnings>strong { display:block; font-size:18px; }
.workflow-warnings details { font-size:13px; margin-top:16px; }
/* Laptop order capture: shared by new and existing orders, no zoom scaling. */
main:has(.compact-order-form) { padding-top:18px; padding-bottom:20px; }
.capture-heading { margin-bottom:12px; }
.capture-heading h1 { font-size:26px; margin:0; }
.compact-order-form { padding:18px 22px; max-width:1100px; margin-bottom:0; }
.compact-order-form label { margin:0; gap:5px; font-size:14px; }
.compact-order-form input,.compact-order-form select { min-height:38px; padding:8px 10px; font-size:14px; margin-top:0; }
.compact-order-form h2 { font-size:17px; margin:0; }
.compact-order-form .customer-picker { align-items:end; }
.compact-order-form .customer-picker .button { height:38px; padding:8px 14px; }
.compact-order-form .compact-customer { padding:7px 0 12px; gap:12px; font-size:14px; }
.compact-order-form .compact-customer label { flex:0 1 330px; }
.compact-order-form .compact-customer #site-address { color:var(--text); }
.compact-order-form .work-heading { display:flex; align-items:center; justify-content:space-between; margin:5px 0 8px; }
.compact-order-form details.device-tools { position:relative; padding:0; border:0; font-size:13px; }
.compact-order-form .device-tools[open] { display:flex; flex-wrap:wrap; gap:6px; }
.compact-order-form .work-position { margin:0 0 7px; padding:10px; }
.compact-order-form .work-position legend { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.compact-order-form .work-position-grid { grid-template-columns:minmax(160px,1.05fr) minmax(120px,.75fr) minmax(170px,1.5fr) 140px; gap:10px; }
.compact-order-form .single-device { display:flex; align-items:center; min-height:38px; line-height:1.3; font-weight:600; }
.compact-order-form .work-position-tools { min-height:0; gap:8px; }
.compact-order-form .work-position-tools details { border:0; padding:3px 0 0; font-size:12px; }
.compact-order-form .work-position-tools .button { padding:3px 7px; font-size:12px; margin-top:3px; }
.compact-order-form .work-position-tools label { margin-top:8px; }
.compact-order-form [data-add-work] { padding:6px 10px; font-size:13px; }
.compact-order-form .work-total { padding:9px 12px; margin:8px 0 13px; }
.compact-order-form .work-total-line { display:flex; justify-content:space-between; align-items:center; gap:14px; font-size:14px; }
.text-button { background:transparent; border:0; padding:3px; font:inherit; color:#810C41; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.compact-order-form .work-total .duration-input { margin:8px 0; }
.compact-order-form [data-override-fields] { margin-top:10px; }
.compact-order-form .capture-period-grid { display:grid; grid-template-columns:1fr 1fr 1.2fr; align-items:end; gap:18px; margin-top:8px; }
.compact-order-form .capture-period-grid .check-field { min-height:38px; align-items:center; }
.compact-order-form .form-grid { margin:8px 0; gap:12px 18px; }
.compact-order-form .order-extra { margin:12px 0 0; padding:11px 0; border-bottom:1px solid var(--line); }
.compact-order-form .order-extra summary { font-size:14px; }
.compact-order-form [data-planning-summary] { margin-left:12px; font-weight:400; font-size:13px; color:var(--muted); }
.compact-order-form .form-actions { padding:12px 0 0; margin:0; gap:12px; }
.compact-order-form .secondary-action { border-color:transparent; background:transparent; font-weight:400; }
.compact-order-form #agreed-fields { margin-top:8px; }
@media(max-width:1000px) {
  .compact-order-form .work-position-grid { grid-template-columns:1fr 1fr; }
  .compact-order-form .capture-period-grid { grid-template-columns:1fr 1fr; }
  .compact-order-form [data-planning-summary] { display:block; margin:5px 0 0 18px; }
}
@media(max-width:650px) {
  .compact-order-form .work-position-grid,.compact-order-form .capture-period-grid { grid-template-columns:1fr; }
  .compact-order-form .work-total-line { flex-wrap:wrap; }
}
/* Two daily views: order capture and the integrated tour workspace. */
main:has(.tour-workspace) { padding-top:18px; }
.tour-title { margin-bottom:14px; align-items:flex-start; }
.tour-title h1 { font-size:25px; margin:0 0 5px; }
.tour-title span { font-size:13px; color:var(--muted); }
.tour-workspace .workflow-metrics { margin:0 0 15px; padding:12px 16px; background:white; border:1px solid var(--line); border-radius:8px; }
.tour-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(325px,1fr); gap:18px; align-items:start; }
.tour-map { padding:10px; margin:0 0 12px; }
.tour-map .geographic-map { height:420px; }
.tour-map .geo-pin { font-size:14px; line-height:1.3; }
@media(max-width:750px){.tour-map .geographic-map{height:300px}}
.tour-map .geo-legend { display:none; }
.tour-map .map-status { font-size:12px; margin:5px 0 0; }
.map-line-key{display:block;margin-top:4px;line-height:1.5}
.map-line-sample{display:inline-block;width:24px;border-top:3px solid #810c41;vertical-align:middle;margin-right:3px}
.map-line-sample.dashed{border-top-style:dashed;margin-left:8px}
.tour-recommendations { padding:15px; position:sticky; top:12px; }
.tour-recommendations h2 { font-size:18px; }
.tour-recommendations>.subtle { font-size:13px; line-height:1.4; margin:8px 0; }
.maintenance-option { padding:11px 0; border-top:1px solid var(--line); }
.maintenance-option>strong { font-size:14px; }
.maintenance-option p { font-size:13px; line-height:1.5; margin:5px 0; }
.maintenance-option .button { padding:6px 14px; }
.more-maintenance { border-top:1px solid var(--line); padding:10px 0; font-size:14px; }
.tour-day-card { background:white; border:1px solid var(--line); border-radius:8px; padding:14px; margin-bottom:12px; }
.tour-day-card>header,.visit-line { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.tour-day-card h2 { font-size:18px; }
.tour-day-card header>span { font-size:13px; color:var(--muted); }
.tour-day-card p { font-size:13px; line-height:1.45; margin:6px 0; }
.tour-visit { border-left:3px solid #810C41; background:#faf8f9; padding:9px 11px; margin:10px 0; }
.visit-line { font-size:14px; }
.visit-line>span { white-space:nowrap; font-size:13px; }
.visit-actions { display:flex; flex-wrap:wrap; align-items:baseline; gap:12px; font-size:13px; margin-top:7px; }
.visit-actions details { flex:1; }
.visit-actions .button { white-space:normal; padding:6px 9px; font-size:13px; }
.day-night { border-top:1px solid var(--line); padding-top:9px; font-size:13px; }
.day-night .button { font-size:13px; padding:7px 10px; }
.tour-tools { display:flex; gap:20px; font-size:13px; padding:10px 0; }
#tour-action-status:not(:empty) { position:sticky; top:8px; z-index:600; padding:12px; background:#fff8cf; color:#292d33; border:1px solid #d0b927; border-radius:6px; margin-bottom:12px; }
.tour-changing a,.tour-changing summary { pointer-events:none; }
.tour-workspace [disabled] { opacity:.55; cursor:wait; }
@media(max-width:1050px) { .tour-layout { grid-template-columns:1fr; }.tour-recommendations { position:static; }.tour-title { flex-wrap:wrap; } }

/* Release obstacles: one customer/date per line; screen workspace only. */
.tour-workspace #tour-action-status { white-space:pre-line; }
/* Jahreskalender: getrennte Zustände mit Text und Farbe, keine Kalender-Verschiebung. */
.year-calendar{display:grid;grid-template-columns:repeat(3,minmax(240px,1fr));gap:16px;margin-bottom:24px}
.calendar-month{background:white;border:1px solid #dce0e6;border-radius:8px;padding:14px}
.calendar-month h2{font-size:18px;margin:0 0 10px}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
.calendar-grid .weekday{text-align:center;font-size:12px;color:#505c6b;padding:3px}
.calendar-day{position:relative;min-height:48px;border:1px solid transparent;border-radius:4px;background:#f6f7f8;color:#202b36;cursor:pointer;font:inherit;padding:3px 1px}
.calendar-day:hover,.calendar-day:focus-visible{outline:2px solid #810c41;outline-offset:1px}
.calendar-day.today{border:2px solid #810c41}
.calendar-day.has-events{background:#fff;border-color:#c5cad1}
.calendar-day small{font-size:10px;margin-left:3px;color:#5c3747}
.calendar-marks{display:flex;justify-content:center;gap:1px;min-height:14px}
.calendar-marks i{font-style:normal;font-size:9px;line-height:12px;padding:0 3px;border-radius:2px}
.calendar-label{display:inline-block;font-size:12px;padding:3px 6px;border-radius:3px;border:1px solid #ccd1d6}
.calendar-label.planned,.calendar-marks .planned{background:#fff4ce;color:#594900}
.calendar-label.confirmed,.calendar-marks .confirmed{background:#810c41;color:white}
.calendar-label.due,.calendar-marks .due{background:#e1eef7;color:#143e5c}
.calendar-toolbar,.calendar-legend{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.calendar-toolbar{margin:12px 0}.calendar-toolbar h2{margin:0 10px}
.calendar-legend>span:last-child{font-size:12px;color:#526070}
.calendar-entry{padding:14px 0;border-bottom:1px solid #dce0e6}.calendar-entry p{margin:5px 0}
.calendar-entry>a{margin:0 8px}
.calendar-due-row{display:flex;flex-wrap:wrap;gap:5px 14px;padding:9px 0;border-bottom:1px solid #eceef1}
.calendar-due-row>a{min-width:230px}.calendar-due-row>span{font-size:14px}
.calendar-maintenance{margin-bottom:18px}.calendar-maintenance select{width:85px;padding:6px}
@media(min-width:1600px){.year-calendar{grid-template-columns:repeat(4,minmax(240px,1fr))}}
@media(max-width:1000px){.year-calendar{grid-template-columns:repeat(2,minmax(200px,1fr))}}
@media(max-width:600px){.year-calendar{grid-template-columns:1fr}}
.mail-editor textarea{width:100%;height:clamp(240px,38vh,420px);min-height:240px;font:inherit;line-height:1.45;resize:vertical}
.mail-editor .mail-rich{border:1px solid #ddd;padding:16px;background:white;line-height:1.45}
.mail-editor .mail-rich p{margin:0 0 1em}
.mail-editor details{margin:16px 0}.mail-editor [data-mail-status]{margin:8px 0;color:#810c41}
.mail-editor .form-grid{align-items:end}.mail-editor [data-build]{margin-top:12px}

.mail-editor .mail-copy-row{display:flex;align-items:end;gap:12px;margin-bottom:10px}
.mail-editor .mail-copy-row label{flex:1;margin:0}
.mail-editor .mail-missing:empty{display:none}
.mail-editor .mail-missing{margin:10px 0}
.mail-editor [hidden]{display:none!important}
.mail-editor button:disabled{cursor:not-allowed}
.mail-editor button[aria-busy="true"]{cursor:wait}

/* Large map only: reuse the existing Leaflet instance; no print styles changed. */
.map-expand{margin-bottom:8px}
.geo-business{background:#26384a;border-radius:4px}
.geo-hotel{background:#F9DF18;color:#27242b;border-radius:4px;border-color:#810C41}
dialog.tour-map-large{width:96vw;max-width:none;height:94vh;max-height:96vh;padding:16px;box-sizing:border-box;overflow:hidden}
.tour-map-large[open]{display:flex;flex-direction:column;gap:8px}
.tour-map-large header{display:flex;justify-content:space-between;align-items:center;gap:12px}
.tour-map-large h2{font-size:22px;margin:0}.tour-map-large header p{margin:4px 0}
.tour-map-large .large-map-notice{font-size:14px;color:#810C41;max-height:110px;overflow:auto}
.tour-map-large .large-map-notice:empty{display:none}
.tour-map-large .large-map-content{flex:1;min-height:0}
.tour-map-large #geographic-host{height:100%;display:grid;grid-template-columns:minmax(0,1fr) 280px;grid-template-rows:minmax(0,1fr) auto;gap:8px 14px}
.tour-map-large .geographic-map{height:100%;min-height:0;grid-column:1;grid-row:1}
.tour-map-large .map-status{grid-column:1;grid-row:2;margin:0;font-size:13px}
.tour-map-large .geo-legend{display:block;grid-column:2;grid-row:1 / 3;overflow:auto;font-size:14px;max-height:none}
.tour-map-large .geo-legend p{padding:7px 0;border-bottom:1px solid #e5e5e5}
.tour-map-large .geo-legend summary{font-weight:700;list-style:none;pointer-events:none}
.station-badge{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:26px;padding:0 4px;box-sizing:border-box;background:#810C41;color:white;border-radius:50%;font-weight:700;font-size:13px;flex-shrink:0}
.station-badge.station-hotel{background:#F9DF18;color:#27242b;border-radius:4px;border:1px solid #810C41}
.station-badge.station-business{background:#26384a;border-radius:4px}
.station-cluster{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;width:max-content;max-width:128px;padding:5px;background:white;border:1px solid #66717d;border-radius:6px;box-shadow:0 1px 4px #0004;transform:translate(-50%,-50%)}
.tour-map-large #geographic-host{grid-template-columns:minmax(0,1fr) 305px}
.tour-map-large .geo-legend .station-row{display:flex;gap:8px;align-items:center;margin:0;padding:6px 0;line-height:1.2}
.station-row small{display:block;color:#526070;margin-top:2px;font-size:12px}
.station-name{display:block;font-size:14px}
.tour-map-large .geo-legend summary{margin-bottom:5px;font-size:13px}
@media(max-width:750px){.tour-map-large #geographic-host{grid-template-columns:minmax(0,1fr) 190px}.tour-map-large header{flex-wrap:wrap}}
@media(max-width:600px){
 .tour-map-large #geographic-host{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(200px,1fr) auto auto}
 .tour-map-large .geographic-map{grid-column:1;grid-row:1}
 .tour-map-large .map-status{grid-column:1;grid-row:2}
 .tour-map-large .geo-legend{grid-column:1;grid-row:3;max-height:22vh}
 .tour-map-large header{gap:6px}.tour-map-large header h2{font-size:18px}
}
.maintenance-state{display:inline-block;font-size:.85rem;line-height:1.3;padding:3px 7px;margin:2px 3px 2px 0;border:1px solid #999;border-radius:4px;white-space:normal;font-weight:400}
.maintenance-state.green{background:#e6f3e8;color:#194d26;border-color:#7aa583}
.maintenance-state.yellow{background:#fff8d0;color:#534300;border-color:#bba54a}
.maintenance-state.red{background:#fbe6e6;color:#8a1919;border-color:#c77}
.maintenance-state.gray{background:#eee;color:#444}

.instance-label{position:fixed;bottom:2px;left:6px;z-index:5;background:#fff;color:#555;font-size:11px;padding:2px 6px;border:1px solid #ddd;pointer-events:none}@media print{.instance-label{display:none}}

/* Wartungsanfragen: kompakter Kopf und gemeinsam ausgerichtete Aktionen. */
.maintenance-head { margin-bottom:12px; }
.maintenance-head h1 { margin:0; }
.maintenance-head p { margin:6px 0 0; }
.maintenance-head + .view-tabs { margin-bottom:12px; }
.maintenance-panel .panel-head { padding:14px 20px 10px; }
.maintenance-panel .toolbar { padding:0 20px 12px; }
.maintenance-panel th, .maintenance-panel td { padding:12px 16px; }
.maintenance-actions { display:grid; gap:8px; width:230px; }
.maintenance-actions .button { width:100%; min-height:40px; white-space:normal; text-align:center; }
.maintenance-panel td:first-child { min-width:220px; }
@media screen and (max-width:700px) {
  .maintenance-panel .table-scroll { overflow:visible; }
  .maintenance-panel table, .maintenance-panel tbody { display:block; }
  .maintenance-panel thead { display:none; }
  .maintenance-panel tr { display:grid; grid-template-columns:1fr 1fr; padding:14px; gap:12px; border-bottom:1px solid var(--line); }
  .maintenance-panel td { display:block; padding:0; border:0; min-width:0; }
  .maintenance-panel td:first-child, .maintenance-panel td:last-child { grid-column:1 / -1; min-width:0; }
  .maintenance-panel td:nth-child(2)::before { content:'Wartungsgrundlage'; }
  .maintenance-panel td:nth-child(3)::before { content:'Fälligkeit'; }
  .maintenance-panel td:nth-child(4)::before { content:'Wiedervorlage'; }
  .maintenance-panel td:nth-child(n+2):nth-child(-n+4)::before { display:block; font-size:12px; color:var(--muted); margin-bottom:4px; }
  .maintenance-actions { width:100%; }
}

/* Wunschzeitraum zuerst; eine vorhandene Kundenzusage ist eine bewusste Ausnahme. */
.compact-order-form .capture-period-grid { grid-template-columns:1fr 1fr; gap:8px 18px; }
.compact-order-form .capture-period-grid .check-field { grid-column:1 / -1; min-height:32px; }
.time-title,.time-toolbar,.time-filter,.time-pages{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.time-title,.time-toolbar{justify-content:space-between;margin-bottom:14px}
.time-title h1{margin:0}.time-filter{align-items:end;margin:16px 0}.time-filter label{display:grid;gap:4px;font-size:13px;min-width:125px;flex:1}.time-filter input,.time-filter select{width:100%;min-height:40px}.time-filter .button,.time-toolbar .button{min-height:40px}
.time-toolbar [role=tablist]{display:inline-flex;gap:6px;margin:8px}.time-table-wrap{overflow-x:auto}.time-table{width:100%;margin:0}.time-table td{vertical-align:top;padding:12px 10px}.time-table .button{padding:6px 10px;min-height:34px;margin-bottom:4px}.time-activity{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:240px}.time-pages{justify-content:flex-end;margin:12px 0}.time-help{margin-top:16px}.time-help p{max-width:850px}
@media(max-width:650px){.time-filter label{flex-basis:40%}.time-toolbar{align-items:start}.time-table{min-width:720px}.time-title h1{font-size:24px}.time-toolbar [role=tablist]{margin-left:0;display:flex}.time-table td{padding:8px}}

/* User-operated import: checkbox rules stay scoped. */
.local-import-option {display:flex;align-items:center;gap:10px;margin:12px 0;}
.local-import-option input[type=checkbox] {width:18px;height:18px;min-height:18px;flex:0 0 18px;margin:0;}
.local-import .import-step {padding:14px 18px;margin:12px 0;}
.local-import .import-step>summary {font-weight:600;cursor:pointer;}
.local-import h2 {font-size:1.15rem;margin:16px 0 10px;}
.import-table td {vertical-align:top;padding:10px 12px;}
.import-table small {display:block;margin-top:3px;font-size:.85em;}
.import-warning {color:#8a3d00;}
.import-actions {position:sticky;bottom:0;z-index:3;background:#fff;border-top:1px solid #d5d9de;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.import-actions [role=alert]:empty,.import-editor [role=alert]:empty {display:none;}
.import-actions [role=alert] {flex-basis:100%;margin:0;color:#a51d20;}
.import-editor {padding:20px;max-width:850px;}
.import-editor .form-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.import-editor input[type=checkbox] {width:18px;height:18px;min-height:18px;flex:0 0 18px;margin:0;}
@media(max-width:650px){.import-editor .form-grid {grid-template-columns:1fr;} .import-actions .button {width:100%;} .import-table {min-width:720px;} .import-editor {padding:12px;}}
#order-location-map { height: 300px; min-height: 240px; width: 100%; margin: 12px 0; }

.tour-layout:has(.route-contact-table){display:block;min-width:0}.tour-recommendations:has(.route-contact-table){margin-top:20px;min-width:0}
.tour-workspace .tour-recommendations{position:static}
#tour-days{position:relative;scroll-margin-top:20px}
.route-contact-scroll{max-width:100%}
.route-contact-table{table-layout:fixed;width:100%}
.contact-col-name{width:28%}.contact-col-contact{width:24%}.contact-col-state{width:23%}.contact-col-actions{width:25%}
.route-contact-table th,.route-contact-table td{padding:12px 10px;vertical-align:top;white-space:normal;overflow-wrap:anywhere;min-width:0}
.route-contact-table td:first-child>span,.route-contact-table td:first-child>small{display:block;margin-top:4px}
.route-contact-table .button{display:block;width:100%;min-width:0;max-width:100%;height:auto;min-height:40px;margin:0 0 8px;padding:9px 10px;white-space:normal;overflow-wrap:anywhere;line-height:1.35}
.route-contact-table .maintenance-state{max-width:100%;box-sizing:border-box;margin-right:0}
.contact-details{margin-top:8px}.contact-details summary{cursor:pointer}.contact-details p{margin:8px 0;font-size:14px}
@media(max-width:760px){
 .route-contact-table colgroup,.route-contact-table thead{display:none}
 .route-contact-table,.route-contact-table tbody{display:block;width:100%}
 .route-contact-table tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;padding:14px 0;border-bottom:1px solid var(--line)}
 .route-contact-table td{display:block;padding:0;border:0;min-width:0}
 .route-contact-table td:before{content:attr(data-label);display:block;font-size:12px;color:#66797d;margin-bottom:5px}
 .route-contact-table .contact-actions{grid-column:1 / -1;display:flex;gap:8px;flex-wrap:wrap}
 .route-contact-table .contact-actions:before{display:none}
 .route-contact-table .contact-actions .button{flex:1 1 140px;margin:0}
}

/* Geoapify pilot: notices stay in document flow. */
#tour-action-status:not(:empty){position:static;top:auto;z-index:auto;padding:8px 12px;margin:8px 0;font-size:13px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}

/* CSP-safe dimensions: inline style attributes are intentionally disallowed. */
.hotel-map { height: 180px; min-height: 180px; width: 100%; }
.hotel-map-large { height: 260px; min-height: 260px; }

.geographic-map { display:flex; align-items:center; justify-content:center; background:#f4f6f7; overflow:hidden; }
.geographic-canvas { width:100%; height:100%; flex:none; }
.map-boundary { margin:4px 0; font-size:12px; }

/* Compact native maintenance checkbox; keep the label an ample click target. */
.maintenance-mark { display:flex; align-items:center; gap:.5rem; min-height:32px; }
.maintenance-mark input[type="checkbox"] { width:18px; height:18px; min-height:18px; padding:0; margin:0; flex:0 0 18px; }
[data-maintenance-selection] > label { display:flex; align-items:center; gap:.5rem; padding:.5rem 0; }
[data-maintenance-selection] input[type="checkbox"] { width:18px; height:18px; min-height:18px; flex:0 0 18px; }
