/* Farben. Die Seite setzt --p-color und --p-accent aus dem Instanzprofil;
   alles Weitere leitet sich daraus ab. Das dunkle Schema gilt mit data-theme="dark" am html-Element. */
:root {
  color-scheme: light;
  --p-color: #2f343b;
  --p-accent: #39ff14;
  --ink: #1b2733;
  --ink-soft: #3c4b5a;
  --muted: #5b6b7a;
  --faint: #8b99a8;
  --line: #dde4ec;
  --line-strong: #c3cfdb;
  --bg: #f3f6f9;
  --card: #fff;
  --field: #fff;
  --tint: #f6f8fb;
  --hover: #eaeff4;
  --overlay: #1b273373;
  --focus: #7db7dd;
  /* Hauptfarbe: Flächen der Hauptknöpfe, Markierungen, Verweise. */
  --brand: var(--p-color);
  --on-brand: #fff;
  --brand-dark: color-mix(in srgb, var(--p-color) 80%, #000);
  --brand-soft: color-mix(in srgb, var(--p-color) 8%, #fff);
  /* Akzent: sparsam für aktive Stellen. */
  --accent: var(--p-accent);
  --on-accent: #0c2206;
  --logo-ink: #2f343b;
  --rail: #2f8f6f;
  --rail-soft: #e3f3ed;
  --rail-ink: #1f6a52;
  --truck: #c62a3b;
  --truck-soft: #fbe9eb;
  --barge: #297fb6;
  --barge-soft: #e6f1f9;
  --warn: #8a4b12;
  --warn-soft: #fff4e2;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e6ebf0;
  --ink-soft: #c2cbd5;
  --muted: #98a5b3;
  --faint: #6f7c8a;
  --line: #2b333d;
  --line-strong: #3c4652;
  --bg: #12161b;
  --card: #1a2027;
  --field: #141920;
  --tint: #20272f;
  --hover: #28303a;
  --overlay: #000000a8;
  --focus: color-mix(in srgb, var(--p-accent) 60%, transparent);
  /* Im Dunkeln trägt der Akzent die Hauptfarbe: neongrüne Knöpfe mit dunkler Schrift. */
  --brand: var(--p-accent);
  --on-brand: var(--on-accent);
  --brand-dark: color-mix(in srgb, var(--p-accent) 84%, #000);
  --brand-soft: color-mix(in srgb, var(--p-accent) 13%, var(--card));
  --logo-ink: #fff;
  --rail: #5fd0aa;
  --rail-soft: color-mix(in srgb, var(--rail) 16%, var(--card));
  --rail-ink: var(--rail);
  --truck: #ff7a8a;
  --truck-soft: color-mix(in srgb, var(--truck) 16%, var(--card));
  --barge: #6bb8ec;
  --barge-soft: color-mix(in srgb, var(--barge) 16%, var(--card));
  --warn: #f2b866;
  --warn-soft: color-mix(in srgb, var(--warn) 14%, var(--card));
}
/* Das Zeichen: das Q folgt dem Schema (dunkelgrau auf hell, weiß auf dunkel), der Container bleibt neongrün. */
.mark .q {
  stroke: var(--logo-ink);
}
* {
  box-sizing: border-box;
}
html {
  font:
    15px/1.45 Roboto,
    "Segoe UI",
    Inter,
    Arial,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
body {
  margin: 0;
}
a {
  color: var(--brand);
}
button,
a.button,
select,
input,
textarea {
  font: inherit;
}
button,
.button {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  padding: 9px 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
}
button:hover,
.button:hover {
  background: var(--hover);
}
button.primary,
.button.primary {
  background: var(--brand);
  color: var(--on-brand);
  border-color: transparent;
}
button.primary:hover,
.button.primary:hover {
  background: var(--brand-dark);
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
button.link {
  border: 0;
  background: none;
  color: var(--brand);
  padding: 4px 0;
  font-weight: 600;
}
button.link:hover {
  text-decoration: underline;
  background: none;
}
.small {
  font-size: 13px;
  padding: 6px 10px;
}
.iconbtn {
  padding: 6px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.iconbtn:hover {
  color: var(--brand);
  background: var(--brand-soft);
}
svg {
  flex-shrink: 0;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Rahmen */
.shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr); /* wide enough for the longest menu entry, „Entfernungsberechnung“, in bold */
  min-height: 100vh;
}
.shell > div {
  min-width: 0; /* wide tables scroll in their own box instead of widening the page */
}
.sidebar {
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  gap: 18px;
}
.brand {
  display: block;
  padding: 0 6px;
}
.brand img {
  display: block;
  width: 100%;
  max-width: 190px;
  height: auto;
}
/* Ein eigenes Logo ist für hellen Grund gezeichnet; im Dunkeln steht es deshalb auf einer hellen Fläche. */
:root[data-theme="dark"] .brand img {
  box-sizing: border-box;
  padding: 6px 10px;
  border-radius: 10px;
  background: #fff;
}
.brand small {
  display: block;
  margin: 2px 0 0 4px;
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
}
.brand.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand.wordmark .mark {
  flex: none;
}
.brand.wordmark b {
  display: block;
  font-size: 19px;
  line-height: 1.1;
  letter-spacing: -0.4px;
  color: var(--ink);
}
.brand.wordmark small {
  margin: 2px 0 0;
}
.brand.big img {
  max-width: min(340px, 80%);
}
.brand.big.wordmark {
  gap: 14px;
}
.brand.big.wordmark b {
  font-size: 30px;
  letter-spacing: -0.8px;
}
.brand.big.wordmark small {
  font-size: 11.5px;
}
.nav {
  display: grid;
  gap: 3px;
}
.nav button {
  white-space: nowrap;
  justify-content: flex-start;
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  border-radius: 8px;
  font-weight: 500;
  font-size: 14.5px;
  padding: 10px 12px;
}
.nav button:hover {
  background: var(--hover);
}
.nav button.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--accent);
}
.navnote {
  margin: 0 6px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--tint);
  font-size: 12px;
  color: var(--muted);
}
.sidefoot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding: 14px 4px 0;
  font-weight: 600;
  font-size: 14px;
}
.sidefoot small {
  display: block;
  font-weight: 400;
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.top {
  padding: 0 4%;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 3;
}
.top .crumb {
  color: var(--muted);
  font-size: 13px;
}
.top .crumb b {
  color: var(--ink);
}
.top select {
  width: auto;
  min-height: 34px;
  padding: 4px 8px;
}
.main {
  padding: 26px 4% 70px;
  max-width: 1500px;
  margin: auto;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.pagehead h1 {
  margin: 0 0 2px;
  font-size: 27px;
  letter-spacing: -0.5px;
}
.pagehead p {
  margin: 0;
  color: var(--muted);
}

/* Schritte */
.steps {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  flex-wrap: wrap;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.steps li i {
  font-style: normal;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--hover);
  font-size: 12px;
}
.steps li.now {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: var(--brand-soft);
}
.steps li.now i {
  background: var(--accent);
  color: var(--on-accent);
}
.steps li.done i {
  background: var(--rail);
  color: var(--card);
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(250px, 1fr);
  gap: 20px;
  align-items: start;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  min-width: 0;
}
.card + .card,
.section + .card {
  margin-top: 16px;
}
.section {
  margin: 20px 0 12px;
}
.head,
.actions,
.between {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.head {
  margin-bottom: 16px;
}
.head > svg {
  color: var(--brand);
  background: var(--brand-soft);
  padding: 7px;
  border-radius: 8px;
  width: 34px;
  height: 34px;
}
.head h2,
.head h3 {
  margin: 0;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  letter-spacing: -0.8px;
  font-size: 30px;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.2px;
}
h3 {
  font-size: 15px;
}
p {
  line-height: 1.5;
}
.muted,
small {
  color: var(--muted);
}
small {
  font-size: 12px;
}
.tiny {
  font-size: 12px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}
.row > label {
  flex: 1;
  min-width: 110px;
}
.grid2,
.grid3 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.grid3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
label {
  display: grid;
  gap: 5px;
  font-weight: 600;
  font-size: 13px;
}
select,
input,
textarea {
  width: 100%;
  padding: 9px 11px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  background: var(--field);
  border-radius: 7px;
  min-height: 40px;
}
textarea {
  min-height: 78px;
  resize: vertical;
}
input[type="checkbox"],
input[type="radio"] {
  width: 17px;
  min-height: 17px;
  accent-color: var(--brand);
}
.inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.toggle {
  display: inline-flex;
  padding: 3px;
  background: var(--hover);
  border-radius: 9px;
  margin-bottom: 16px;
}
.toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  padding: 7px 16px;
}
.toggle button.on {
  color: var(--brand-dark);
  background: var(--card);
  box-shadow: 0 1px 4px #1b273320;
}
.hint {
  color: var(--muted);
  font-size: 13px;
  margin: -6px 0 14px;
}
.stop {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  position: relative;
  margin-bottom: 10px;
}
.dot {
  position: relative;
  margin: 0 auto 14px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--brand);
  background: var(--card);
  border-radius: 50%;
}
.stop:not(:last-child) .dot:after {
  content: "";
  height: 50px;
  width: 2px;
  background: var(--line-strong);
  position: absolute;
  left: 3px;
  top: 12px;
}
.stop:last-child .dot {
  background: var(--accent);
}
.stop button {
  margin-bottom: 4px;
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}
.preset {
  width: 100%;
  display: flex;
  text-align: left;
  justify-content: space-between;
  margin-top: 8px;
  padding: 11px 12px;
  background: var(--tint);
}
.preset small {
  display: block;
  font-weight: 400;
}
.note {
  padding: 11px 13px;
  background: var(--brand-soft);
  border-left: 3px solid var(--brand);
  border-radius: 4px;
  margin-bottom: 10px;
}
.note.warn {
  background: var(--warn-soft);
  border-color: #d9912f;
  color: var(--warn);
}
.stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.stats strong {
  font-variant-numeric: tabular-nums;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--hover);
  color: var(--ink-soft);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.tag.good {
  background: var(--rail-soft);
  color: var(--rail-ink);
}
.tag.blue {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.tag.open {
  background: var(--warn-soft);
  color: var(--warn);
}
.mode {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
}
.mode.Rail {
  background: var(--rail-soft);
  color: var(--rail);
}
.mode.Truck {
  background: var(--truck-soft);
  color: var(--truck);
}
.mode.Barge {
  background: var(--barge-soft);
  color: var(--barge);
}
.provider {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.provider img {
  height: 20px;
  width: auto;
  display: block;
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chips button {
  border-radius: 999px;
  font-size: 13px;
  padding: 6px 13px;
  font-weight: 600;
  color: var(--muted);
}
.chips button.on {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}
.tablewrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
th {
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  background: var(--tint);
  white-space: nowrap;
}
th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
td input,
td select {
  min-width: 82px;
}

/* Routenvergleich */
.routecard {
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 10px 0;
  background: var(--card);
  font-weight: 400;
  font-size: 14px;
}
label.routecard {
  cursor: pointer;
}
label.routecard:hover {
  border-color: var(--line-strong);
}
.routecard:has(input:checked) {
  background: var(--brand-soft);
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}
.routehead {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.routehead b {
  font-size: 15px;
}
.routehead .cost {
  margin-left: auto;
  text-align: right;
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.routehead .cost small {
  display: block;
  font-weight: 400;
}
.routemeta {
  color: var(--muted);
  font-size: 13px;
  margin: 2px 0 10px 27px;
}
.leg {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.leg .where {
  font-weight: 600;
}
.leg small {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.leg small.lands {
  display: block;
  color: var(--muted);
}
.leg small.lands b {
  color: var(--ink);
}
.leg small.tolladd {
  display: block;
  margin: 0;
  text-align: right;
  color: var(--muted);
}
.warntext {
  color: var(--warn);
}
.leg .provider {
  color: var(--ink);
}
.leg .provider img {
  height: 15px;
}
.leg .amount {
  display: flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.actionbar {
  position: sticky;
  bottom: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--brand);
  box-shadow: 0 8px 24px #1b273326;
}
.actionbar small {
  display: block;
}
.price {
  color: var(--brand-dark);
  font-size: 22px;
  font-weight: 700;
}

/* Anmeldung */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--bg);
}
.splash {
  background: var(--card);
  padding: 7% 8%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  border-right: 1px solid var(--line);
}
.splash .brand {
  padding: 0;
}
.splash .brand + div {
  margin: auto 0;
}
.splash h1 {
  font-size: clamp(34px, 3.8vw, 54px);
  line-height: 1.06;
  letter-spacing: -1.6px;
  max-width: 560px;
  margin: 10px 0 14px;
}
.splash p {
  color: var(--muted);
  font-size: 16px;
  max-width: 480px;
}
.eyebrow {
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--brand);
}
.modes {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
  font-weight: 600;
  font-size: 14px;
}
.modes span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.auth {
  align-self: center;
  justify-self: center;
  width: min(460px, 92%);
  padding: 34px;
  margin: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 30px #1b273314;
}
.auth .langrow {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
}
.auth .langrow select {
  width: auto;
}
.auth form {
  display: grid;
  gap: 14px;
}
.auth .primary {
  width: 100%;
  min-height: 44px;
}
.pwfield {
  position: relative;
  display: block;
}
.pwfield input {
  padding-right: 92px;
}
.pwfield button {
  position: absolute;
  right: 5px;
  top: 5px;
  font-size: 12px;
  padding: 5px 9px;
  border: 0;
  color: var(--brand);
}
.secret {
  font:
    700 20px/1.3 Consolas,
    "Courier New",
    monospace;
  letter-spacing: 1px;
  padding: 14px;
  background: var(--tint);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  text-align: center;
  user-select: all;
}

.drop {
  border: 2px dashed var(--line-strong);
  background: var(--tint);
  padding: 28px;
  text-align: center;
  border-radius: 10px;
}
.drop.over {
  background: var(--brand-soft);
}
.drop input {
  margin: 12px auto;
  max-width: 420px;
}
.question {
  display: grid;
  gap: 8px;
}
.question .qtext {
  display: grid;
  gap: 4px;
  justify-items: start;
}
.question .qanswer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.linklike {
  background: none;
  border: 0;
  padding: 0;
  color: var(--brand);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}
/* Tarif aus dem ganzen Eingang: Hauptweg (Tarif erstellen, Vorschlag, übernehmen) */
.subhead {
  margin: 16px 0 8px;
  font-size: 15px;
}
.makebox {
  margin-top: 16px;
  padding: 16px 18px;
  border: 2px solid var(--brand);
  border-radius: 10px;
  background: var(--card);
}
.makebox h3 {
  margin: 0 0 6px;
}
.makebox .actions {
  align-items: center;
}
button.big {
  font-size: 16px;
  padding: 11px 22px;
}
button.quiet {
  background: none;
  border-color: var(--line);
  color: var(--muted);
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 10px 0;
}
.facts small {
  display: block;
  color: var(--muted);
}
.matrix.proposal td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
details.coverage {
  margin-top: 12px;
}
details.coverage summary {
  cursor: pointer;
  font-weight: 600;
}
details.coverage ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 6px;
}
details.coverage li {
  display: grid;
  grid-template-columns: 9.5em 1fr;
  gap: 8px;
  align-items: start;
}
details.coverage li .tag {
  justify-self: start;
}
.partplan {
  display: grid;
  gap: 2px;
  justify-items: start;
  margin-top: 6px;
}
small.bad {
  color: var(--truck);
}
fieldset.docset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px 4px;
  margin: 0 0 12px;
}
fieldset.docset legend {
  font-weight: 700;
  padding: 0 6px;
}
fieldset.docset legend small {
  font-weight: 400;
  color: var(--muted);
}
@media (max-width: 600px) {
  details.coverage li {
    grid-template-columns: 1fr;
  }
}
/* Ergebniskarte einer Auslesung: oben kurz, Einzelheiten eingeklappt */
p.brief {
  margin: 0 0 6px;
}
p.brief.todo {
  color: var(--warn);
}
p.brief.ok {
  color: var(--muted);
}
details.more {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
details.more summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
}
details.qgroup {
  margin-bottom: 10px;
}
details.qgroup summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 8px;
}
details.note.fromdoc summary {
  cursor: pointer;
}
details.answered {
  margin-bottom: 12px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
details.answered summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-soft);
}
details.answered .qa {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
details.answered .linklike {
  display: block;
  margin-top: 4px;
}
.qa-line {
  margin: 8px 0 0;
}
.dialog.wide {
  width: min(1100px, 100%);
}
.docnav {
  margin-bottom: 10px;
}
.docpage {
  position: relative;
  margin-bottom: 24px;
  background: #fff;
}
.docpage img {
  display: block;
  width: 100%;
}
.hitbox {
  position: absolute;
  background: rgba(255, 214, 0, 0.35);
  outline: 2px solid #e0a800;
  border-radius: 3px;
  pointer-events: none;
}
.doctext {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-bottom: 24px;
}
.hitline,
tr.hitline td,
tr.hitline th {
  background: rgba(255, 214, 0, 0.3);
}
td.hitcell {
  outline: 2px solid #e0a800;
}
.doctable {
  margin-bottom: 24px;
}
.pending {
  margin: 12px 0 8px;
}
.pending ul {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.pending li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
}
.pending li + li {
  border-top: 1px solid var(--line);
}
.pending li span {
  overflow-wrap: anywhere;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 5;
  background: var(--overlay);
  display: grid;
  place-items: center;
  padding: 18px;
}
.dialog {
  width: min(640px, 100%);
  background: var(--card);
  border-radius: 14px;
  padding: 24px 24px 0;
  max-height: 90vh;
  overflow: auto;
}
.dialog > :last-child {
  margin-bottom: 24px;
}
.dialog label {
  margin: 8px 0;
}
.dialog .dialogfoot {
  position: sticky;
  bottom: 0;
  margin: 16px -24px 0;
  padding: 14px 24px;
  background: var(--card);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.dialogfoot .sumlines {
  font-size: 13px;
  color: var(--muted);
}
.waiting {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: var(--overlay);
  display: grid;
  place-items: center;
  padding: 18px;
}
.waitbox {
  width: min(430px, 100%);
  background: var(--card);
  border-radius: 14px;
  padding: 28px 24px 20px;
  text-align: center;
  outline: none;
}
.waitbox h2 {
  margin: 12px 0 4px;
}
.waitbox .hint {
  margin: 8px 0 0;
}
.waitstep {
  margin: 0 0 6px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.waittime {
  margin: 0 0 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.waittime b {
  color: var(--ink);
}
.waitbar {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 14px;
}
.waitbar i {
  display: block;
  width: 35%;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  animation: waitslide 1.6s ease-in-out infinite;
}
.hourglass {
  color: var(--ink);
  animation: hourturn 2.6s ease-in-out infinite;
}
.hourglass .sand {
  fill: var(--accent);
  stroke: none;
}
@keyframes waitslide {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(290%);
  }
}
@keyframes hourturn {
  0%,
  65% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(180deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hourglass,
  .waitbar i {
    animation: none;
  }
  .waitbar i {
    width: 100%;
  }
}
#toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: 80vw;
  background: var(--ink);
  color: var(--card);
  padding: 12px 16px;
  border-radius: 8px;
  z-index: 10;
  display: none;
}
#toast.show {
  display: block;
}
.formgap {
  display: grid;
  gap: 14px;
}
.empty {
  color: var(--muted);
  padding: 22px 0;
  text-align: center;
}
.empty button {
  margin-top: 10px;
}
.modal h2 {
  margin: 0;
}
.extragrid {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 124px 104px;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}
.extragrid.off span,
.extragrid.off .extraPrice {
  color: var(--faint);
}
.chipline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.offer {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin: 10px 0;
}
.offer .stopsline {
  margin: 6px 0 4px;
  font-weight: 600;
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 200px 1fr;
  }
  .content {
    grid-template-columns: minmax(0, 1.5fr) minmax(210px, 1fr);
  }
  .main {
    padding: 20px 3% 60px;
  }
  .card {
    padding: 17px;
  }
}
@media (max-width: 800px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 10px 12px;
    gap: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand img {
    max-width: 130px;
  }
  .brand small,
  .sidefoot,
  .navnote {
    display: none;
  }
  .nav {
    display: flex;
    overflow: auto;
  }
  .nav button {
    flex-shrink: 0;
    padding: 8px 10px;
  }
  .content {
    grid-template-columns: 1fr;
  }
  .top {
    height: 48px;
    position: static;
  }
  .top .crumb {
    display: none;
  }
  .top .actions {
    margin-left: auto;
  }
  .login {
    display: block;
  }
  .splash {
    padding: 22px;
    border-right: 0;
  }
  .splash h1 {
    font-size: 30px;
  }
  .splash .modes {
    display: none;
  }
  .auth {
    margin: 16px auto;
    padding: 24px 20px;
  }
  .auth .langrow {
    margin-bottom: 12px;
  }
  .extragrid {
    grid-template-columns: 1fr 104px 78px;
  }
}
@media (max-width: 480px) {
  .main {
    padding: 14px 10px 60px;
  }
  .card {
    padding: 14px;
  }
  .grid2,
  .grid3 {
    grid-template-columns: 1fr;
  }
  .nav svg {
    display: none;
  }
  .leg {
    grid-template-columns: 30px minmax(0, 1fr);
  }
  .leg .amount {
    grid-column: 2;
  }
}

/* Assistent: schwebender Chat */
#optiDock {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
#optiFab {
  border: 0;
  border-radius: 999px;
  padding: 6px 18px 6px 8px;
  background: var(--card);
  box-shadow:
    0 10px 28px #1b273333,
    0 0 0 1px var(--line);
  font-size: 14.5px;
  gap: 8px;
}
#optiFab:hover {
  background: var(--card);
  box-shadow:
    0 12px 32px #1b273340,
    0 0 0 2px var(--accent);
}
#optiDock.open #optiFab span {
  display: none;
}
#optiDock.open #optiFab {
  padding: 6px 8px;
}
.mascot {
  display: block;
  animation: ride 3.2s ease-in-out infinite;
}
.mascot .eyes {
  transform-origin: 32px 27.5px;
  animation: blink 4.6s infinite;
}
.mascot .blip {
  animation: blip 2.3s ease-in-out infinite;
}
@keyframes ride {
  50% {
    transform: translateY(-2px);
  }
}
@keyframes blink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.12);
  }
}
@keyframes blip {
  50% {
    opacity: 0.45;
  }
}
#optiChat {
  width: min(380px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 48px #1b273340;
  overflow: hidden;
}
#optiChat[hidden] {
  display: none;
}
#optiChat header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--brand-soft);
  border-bottom: 1px solid var(--line);
}
#optiChat header div {
  flex: 1;
  line-height: 1.25;
}
#optiChat header small {
  display: block;
}
#optiLog {
  flex: 1;
  overflow: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: var(--tint);
}
.bubble {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.bubble.opti {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.bubble.me {
  align-self: flex-end;
  background: var(--brand);
  color: var(--on-brand);
  border-bottom-right-radius: 4px;
}
.bubble .fact {
  margin: 6px 0;
  padding: 7px 9px;
  background: var(--tint);
  border-radius: 8px;
}
.bubble.typing {
  display: flex;
  gap: 4px;
  padding: 12px;
}
.bubble.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
  animation: blip 1s infinite;
}
.bubble.typing i:nth-child(2) {
  animation-delay: 0.2s;
}
.bubble.typing i:nth-child(3) {
  animation-delay: 0.4s;
}
#optiChat .tips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
  background: var(--tint);
}
#optiChat .tips button {
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--brand-dark);
  border-color: var(--line-strong);
}
#optiForm {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
}
#optiForm button {
  padding: 9px 12px;
}
/* Branchenmeldungen */
.news {
  list-style: none;
  padding: 0;
  margin: 12px 0 10px;
}
.news li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.news a {
  display: block;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.35;
}
.news a:hover {
  color: var(--brand);
  text-decoration: underline;
}
.main {
  padding-bottom: 110px;
}
@media (prefers-reduced-motion: reduce) {
  .mascot,
  .mascot .eyes,
  .mascot .blip,
  .bubble.typing i {
    animation: none;
  }
}
@media (max-width: 480px) {
  #optiDock {
    right: 12px;
    bottom: 12px;
  }
  #optiFab span {
    display: none;
  }
  #optiFab {
    padding: 6px 8px;
  }
}
/* Meldungen links in der Navigation (Startbildschirm); auf schmalen Bildschirmen als Karte */
.sidenews {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0 2px;
  padding: 12px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--tint);
}
.sidenews h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 9px;
  font-size: 13px;
  color: var(--brand-dark);
}
.sidenews .newsbox {
  overflow: auto;
  min-height: 0;
  padding-right: 2px;
}
.sidenews .chips button {
  font-size: 12px;
  padding: 4px 10px;
}
.sidenews .news {
  margin: 8px 0 6px;
}
.sidenews .news li {
  padding: 8px 0;
}
.sidenews .news a {
  font-size: 12.5px;
}
.sidenews small {
  font-size: 11px;
}
.sidenews .empty {
  padding: 8px 0;
  font-size: 12.5px;
}
.sidebar .sidenews ~ .sidefoot {
  margin-top: 0;
}
.content #newsCard {
  display: none;
}
@media (max-width: 800px) {
  .sidenews {
    display: none;
  }
  .content #newsCard {
    display: block;
  }
}
/* Eingang */
table.intake td {
  vertical-align: top;
}
table.intake tr.faded td {
  color: var(--faint);
}
table.intake .hints {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12.5px;
}
.tag.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
table.intake td:nth-child(2) {
  min-width: 230px;
}
table.intake td:last-child {
  min-width: 340px;
}
table.intake td:nth-child(5) {
  white-space: nowrap;
}
/* Ausgelesene Preise */
table.matrix {
  font-size: 13px;
}
table.matrix caption {
  text-align: left;
  font-weight: 700;
  padding: 10px 0 6px;
}
table.matrix td,
table.matrix th {
  padding: 6px 9px;
  white-space: nowrap;
}
table.matrix th small {
  font-weight: 400;
  color: var(--muted);
}
table.matrix td:nth-child(n + 4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
table.matrix tr.noquote td:first-child {
  border-left: 3px solid var(--warn);
}
/* Prüfansicht einer Auslesung: Kopfzeile und erste Spalte bleiben beim Rollen stehen. */
.tabletitle {
  font-weight: 700;
  font-size: 13px;
  margin: 12px 0 6px;
}
.tablewrap.read {
  max-height: 70vh;
  border: 1px solid var(--line);
  border-radius: 6px;
}
table.matrix.read {
  width: auto;
  border-collapse: separate;
  border-spacing: 0;
}
table.matrix.read td,
table.matrix.read th {
  padding: 5px 7px;
}
table.matrix.read th {
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: normal;
  min-width: 4.8em;
  max-width: 8.5em;
  vertical-align: bottom;
  overflow-wrap: anywhere;
}
table.matrix.read td:first-child,
table.matrix.read th:first-child {
  position: sticky;
  left: 0;
  max-width: none;
  text-align: left;
  box-shadow: 1px 0 0 var(--line-strong);
}
table.matrix.read td:first-child {
  background: var(--card);
  z-index: 1;
}
table.matrix.read th:first-child {
  z-index: 2;
}
table.matrix.read td:nth-child(n + 2) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
table.matrix.read tr:hover td:first-child {
  background: var(--hover);
}
table.matrix.read td.left {
  text-align: left;
  white-space: normal;
  min-width: 12em;
}
table.matrix.rule {
  width: auto;
}
table.matrix.rule td:nth-child(n + 4) {
  text-align: left;
}
details.alts {
  margin: -6px 0 12px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: var(--tint);
  font-size: 13.5px;
}
details.alts summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-soft);
}
details.alts .alt {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
details.alts .amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
details.alts .amount small {
  font-weight: 400;
  color: var(--muted);
}
.routemap {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.maplegs {
  list-style: none;
  padding: 0;
  margin: 10px 0 4px;
  font-size: 13.5px;
}
.maplegs i {
  display: inline-block;
  width: 22px;
  margin-right: 8px;
  vertical-align: middle;
  border-top: 3px solid var(--truck);
}
.maplegs i.air {
  border-top: 3px dashed var(--muted);
}
.rowok,
.rowbad {
  display: inline-block;
  width: 1.3em;
  font-weight: 700;
}
.rowok {
  color: var(--rail);
}
.rowbad {
  color: var(--truck);
}
.legend .c-plain {
  border: 1px solid var(--line);
}
.c-judge {
  background: var(--barge-soft);
}
.c-open {
  background: var(--truck-soft);
  color: var(--truck);
  font-weight: 700;
}
.c-one {
  background: var(--warn-soft);
}
.c-nosrc {
  outline: 2px solid var(--warn);
  outline-offset: -2px;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 4px;
  font-size: 12px;
}
.legend span {
  padding: 2px 8px;
  border-radius: 4px;
}
.weightinfo {
  grid-column: span 2;
  display: grid;
  grid-template-columns: auto auto auto auto;
  gap: 2px 14px;
  align-content: end;
  justify-content: start;
  padding-bottom: 8px;
}
.weightinfo small {
  color: var(--muted);
  grid-row: 1;
}
.weightinfo b {
  grid-row: 2;
}

/* Choice of the routing service in the administration */
.service {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.service small {
  color: var(--muted);
}
.service em {
  font-style: normal;
  font-size: 12px;
  padding: 2px 8px;
  margin-left: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
}
.service input:disabled + span {
  opacity: 0.55;
}

/* Anbieterblatt */
tr.clickable {
  cursor: pointer;
}
tr.clickable:hover td {
  background: var(--hover);
}
tr.faded td {
  opacity: 0.6;
}
.missing {
  border-color: var(--truck) !important;
  box-shadow: 0 0 0 1px var(--truck);
}
.rulebox {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin: 12px 0;
  background: var(--tint);
}
.formgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}
small.label {
  display: block;
  font-weight: 700;
  color: var(--muted);
  margin: 6px 0;
}
table.sheettable td {
  padding: 5px 6px;
}
table.sheettable input,
table.sheettable select {
  padding: 6px 8px;
  min-width: 70px;
}
table.sheettable input[type="text"] {
  min-width: 130px;
}
table.sheettable select {
  min-width: 110px;
}
.placerows details.more + p.hint {
  margin-top: 10px;
}
.rowform + .actions {
  margin-top: 10px;
}
table.sheettable tr.sub td {
  padding-top: 0;
  border-bottom-color: var(--line);
  color: var(--muted);
}
ul.plain {
  margin: 6px 0 0;
  padding-left: 18px;
}
.nowrap {
  white-space: nowrap;
}
.placerows .rowq {
  max-width: 320px;
}
.placerows .rowtable {
  max-height: 340px;
  margin-top: 8px;
}
.pagehead h1 .tag {
  vertical-align: middle;
  margin-left: 8px;
}
@media (max-width: 760px) {
  .formgrid {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* The lorry PTV drives */
.ptvprofile small {
  font-weight: 400;
}
.ptvrange {
  display: flex;
  gap: 12px;
  align-items: center;
}
.ptvrange input[type="range"] {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: none;
  accent-color: var(--brand);
}
.ptvrange output {
  min-width: 48px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
/* Anbieterblatt aus dem Import: prüfen und aktivieren */
.card.review {
  border: 2px solid var(--brand);
}
.openfields {
  display: grid;
  gap: 8px;
}
.openfield {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 260px);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--warn-soft);
}
.openfield small {
  color: var(--muted);
}
.dispute {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.dispute .dchoices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.dispute .dvalue {
  width: 110px;
}
.choicelist {
  display: grid;
  gap: 6px;
}
.choicelist label {
  display: flex;
  gap: 8px;
  align-items: center;
}
details.qbox {
  margin-top: 14px;
}
@media (max-width: 640px) {
  .openfield {
    grid-template-columns: 1fr;
  }
}
/* A row of the list of intakes: the intake itself and the button that deletes it. */
.presetrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.presetrow .preset {
  flex: 1;
  min-width: 0;
  margin-top: 0;
}
.presetrow .iconbtn:hover {
  color: var(--truck);
}
/* A surcharge in the review box: its class and, where the document does not say it, what it counts by. */
.openfield .pair {
  display: grid;
  gap: 6px;
}
.openfield.sur {
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 260px) auto;
}
@media (max-width: 720px) {
  .openfield.sur {
    grid-template-columns: 1fr;
  }
}
