:root {
  --bg: #F8FAFD;
  --surface: #FFFFFF;
  --surface-2: #F0F4F9;
  --text: #1F1F1F;
  --muted: #444746;
  --outline: #C4C7C5;
  --outline-soft: #E1E3E1;
  --blue: #1A73E8;
  --blue-strong: #1765CC;
  --blue-soft: #E8F0FE;
  --blue-bright: #4285F4;
  --green-bright: #34A853;
  --red: #B3261E;
  --red-soft: #FCE8E6;
  --pdf: #C5221F;
  --lift-1: 0 1px 2px rgba(60, 64, 67, .16), 0 1px 3px 1px rgba(60, 64, 67, .08);
  --lift-2: 0 2px 4px rgba(60, 64, 67, .18), 0 8px 18px 4px rgba(60, 64, 67, .12);
  --ease: cubic-bezier(.2, 0, 0, 1);
  --gap: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
/* Keine sichtbaren Scrollbalken (Wischen und Scrollen funktionieren weiter) */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  background: var(--bg); color: var(--text);
  font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1 { margin: 0; font-size: 2rem; line-height: 1.2; font-weight: 500; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.app { position: relative; height: 100vh; height: 100dvh; overflow: hidden; }
.screen { height: 100%; }

/* Bausteine */
.card { background: var(--surface); border-radius: 28px; box-shadow: var(--lift-1); }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px;
  font-weight: 500; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.button-primary { background: var(--blue); color: #fff; }
.round, .pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none;
  height: 48px; border: 0; background: var(--surface-2); color: var(--text); cursor: pointer; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.round { width: 48px; border-radius: 50%; }
.pill { padding: 0 18px 0 12px; border-radius: 999px; font-weight: 500; white-space: nowrap; }
.pill-primary { background: var(--blue); color: #fff; }

/* Anfrage: holt alle Daten neu. Während der Anfrage wird der Knopf zum Kreis mit Ladering. */
.ask { position: relative; margin-left: auto; background: var(--blue-soft); color: #174EA6; overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease), width .3s var(--ease), padding .3s var(--ease); }
.ask .icon, .ask span { transition: opacity .15s var(--ease); }
/* Ladekreis: dreht sich langsam und füllt sich, bis die Prüfung fertig ist (Pierres Wunsch) */
.ask-ring { position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; opacity: 0; transform: rotate(-90deg); transition: opacity .2s var(--ease); }
.ask-ring circle { fill: none; stroke-width: 3; }
.ask-ring-bg { stroke: rgba(26, 115, 232, .2); }
.ask-ring-fill { stroke: var(--blue); stroke-linecap: round; transition: stroke-dasharray .5s linear; }
.ask.is-loading { padding: 0; cursor: progress; }
.ask.is-loading .icon, .ask.is-loading span { opacity: 0; }
.ask.is-loading .ask-ring { opacity: 1; animation: ask-spin 2.4s linear infinite; }
.ask.is-done .ask-ring-fill { transition: stroke-dasharray .35s var(--ease); }
@keyframes ask-spin { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
@media (prefers-reduced-motion: reduce) { .ask.is-loading .ask-ring { animation: none; } }
.round:disabled { opacity: .4; cursor: default; }
.text-button { border: 0; background: transparent; color: var(--blue); font-size: .875rem; font-weight: 500; border-radius: 999px; cursor: pointer; }
.message { padding: 14px 16px; border-radius: 16px; font-size: .9375rem; }
.message-error { background: var(--red-soft); color: var(--red); }
.message-info { background: var(--blue-soft); color: #174EA6; }
.chip { flex: none; padding: 4px 12px; border-radius: 999px; background: var(--blue-soft); color: #174EA6; font-size: .8125rem; font-weight: 500; white-space: nowrap; }

/* Anmeldung: Logo genau so breit wie die Karte */
.login { display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-box { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 32px; }
.login-logo { display: block; width: 100%; height: auto; }
.login-card { width: 100%; padding: 40px; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: .9375rem; font-weight: 700; color: var(--text); }
.field input {
  width: 100%; height: 56px; padding: 0 18px; border: 0; border-radius: 16px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--outline);
  transition: box-shadow .15s var(--ease), background-color .15s var(--ease);
}
.field input:focus { outline: none; background: var(--surface); box-shadow: inset 0 0 0 2px var(--blue); }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 112px; }
.input-wrap .text-button { position: absolute; top: 4px; right: 4px; height: 48px; padding: 0 16px; }

/* Wochenansicht */
.week { --side: 32px; display: flex; flex-direction: column; gap: 20px; padding: 20px var(--side) 28px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top-logo { display: block; height: 60px; width: auto; flex: none; }
.avatar { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 600; background: var(--blue-bright); }
.avatar.is-green { background: var(--green-bright); }
/* Benutzer-Symbol oben rechts und Profil zum Aufklappen */
.profile { position: relative; flex: none; }
.profile-btn { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer;
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease); }
.profile-btn .avatar { width: 44px; height: 44px; font-size: 1.125rem; }
.profile-btn[aria-expanded="true"] { background: var(--blue-soft); }
.profile-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: min(320px, calc(100vw - 24px)); padding: 16px;
  border-radius: 24px; background: var(--surface); box-shadow: var(--lift-2); display: flex; flex-direction: column; gap: 14px; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.avatar.is-big { width: 56px; height: 56px; font-size: 1.5rem; }
.profile-titles { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.profile-name { font-size: 1.25rem; font-weight: 600; }
.profile-sub { font-size: .875rem; color: var(--muted); }
.profile-lang { display: flex; flex-direction: column; gap: 6px; }
.profile-label { font-size: .8125rem; font-weight: 600; color: var(--muted); }
.lang-menu { display: flex; flex-direction: column; gap: 6px; }
.lang-item { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border: 0; border-radius: 16px; background: var(--surface-2); color: var(--text);
  font-weight: 500; text-align: left; cursor: pointer; transition: background-color .2s var(--ease); }
.lang-item.is-active { background: var(--blue-soft); color: #174EA6; font-weight: 600; }
.lang-name { flex: 1; }
.flag { width: 30px; height: 20px; flex: none; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.lang-check { width: 22px; height: 22px; opacity: 0; }
.lang-item.is-active .lang-check { opacity: 1; }
.profile-logout { width: 100%; height: 52px; justify-content: center; background: var(--surface-2); font-size: 1.0625rem; }

.switch { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.switch-label { display: flex; flex-direction: column; align-items: center; min-width: 168px; line-height: 1.25; }
.switch-kw { font-size: .8125rem; color: var(--muted); }
.switch-range { font-size: 1.0625rem; font-weight: 500; }

.main { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; }

.sheet {
  position: relative; flex: 1 1 0; min-height: 48px; max-width: 100%; aspect-ratio: 210 / 297;
  overflow: hidden; border-radius: 12px; background: #fff;
}
.sheet img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.sheet::after { content: ""; position: absolute; inset: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--outline-soft); pointer-events: none; }
.badge { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 2px 8px; border-radius: 6px; background: var(--pdf); color: #fff; font-size: .6875rem; font-weight: 700; }


/* Umschalter Touren / Übersicht */
/* Wochentage oben statt „Touren“ */
.day-chips { display: flex; gap: 8px; flex: none; }
.day-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 76px; height: 58px; padding: 0 12px; border: 0; border-radius: 18px;
  background: var(--surface-2); color: var(--text); cursor: pointer; line-height: 1.2;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease); }
.day-chip-name { font-size: 1.125rem; font-weight: 600; }
.day-chip-date { font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.day-chip.is-empty .day-chip-name { color: var(--muted); font-weight: 500; }
.day-chip.has-tour:not(.is-active) { box-shadow: inset 0 -3px 0 var(--blue-bright); }
.day-chip.is-active { background: var(--blue); color: #fff; box-shadow: var(--lift-1); }
.day-chip.is-active .day-chip-date { color: rgba(255, 255, 255, .88); }
/* Neue Tour: oben rechts „Neu“ */
.day-chip { position: relative; }
.day-chip-new { position: absolute; top: -8px; right: -6px; padding: 1px 7px; border-radius: 999px; background: #C5221F; color: #fff;
  font-size: .6875rem; font-weight: 700; letter-spacing: .02em; line-height: 1.5; box-shadow: 0 0 0 2px var(--bg); }
/* Geänderte Tour: gleicher Platz, Orange statt Rot */
.day-chip-new.is-changed { background: #B45309; right: -10px; }

/* Hinweis in der Tagesansicht: was sich an der Tour geändert hat */
.dv-change { display: flex; align-items: flex-start; gap: 14px; margin: 0 0 16px; padding: 16px 18px; border-radius: 18px;
  background: #FEF3E2; color: #5B2C06; }
.dv-change > .icon { flex: none; width: 28px; height: 28px; color: #B45309; }
.dv-change-title { display: block; font-size: 1.125rem; font-weight: 700; line-height: 1.4; }
.dv-change-list { margin: 6px 0 0; padding-left: 20px; font-size: 1rem; line-height: 1.5; }
/* Kennzeichen auf einer Dokumentkarte: „Neu“ (Zeichnung) oder „Aktualisiert“ (Tourliste) */
.dv-doc-tag { position: absolute; z-index: 2; top: 22px; right: 22px; padding: 3px 12px; border-radius: 999px; background: #B45309; color: #fff;
  font-size: .875rem; font-weight: 700; letter-spacing: .02em; box-shadow: 0 0 0 3px var(--surface-2); pointer-events: none; }

/* Tagesansicht: oben Dokumente, darunter Aufträge */
.dayview { gap: 18px; }
.dv-head { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; flex: none; }
.dv-titles { min-width: 0; }
.dv-titles h2 { margin: 0; font-size: 1.625rem; font-weight: 600; line-height: 1.2; }
.dv-tourline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 4px; }
.dv-tournr { font-size: 1.125rem; font-weight: 600; }
.dv-count { font-size: 1rem; color: var(--muted); }
.dv-section { flex: none; display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: 24px; background: var(--surface); box-shadow: var(--lift-1); }
.dv-section-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.dv-section-head h3 { margin: 0; font-size: 1.1875rem; font-weight: 600; }
.dv-section-meta { font-size: .9375rem; color: var(--muted); }
.dv-all { margin-left: auto; height: 56px; padding: 0 24px 0 18px; font-size: 1.0625rem; }
.dv-tmt { height: 60px; padding: 0 28px 0 20px; gap: 10px; border-radius: 999px; background: #C5221F; color: #fff; font-size: 1.25rem; font-weight: 700; letter-spacing: .05em; text-decoration: none; box-shadow: var(--lift-1); }
.dv-tmt .icon { width: 24px; height: 24px; }
.dv-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; padding: 2px; }
.dv-doc { position: relative; border-radius: 20px; background: var(--surface-2); transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease); }
.dv-doc.is-primary { background: var(--blue-soft); }
.dv-doc-open { display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: 100%; height: 100%; padding: 14px; border: 0; border-radius: 22px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.dv-doc-open .sheet { flex: none; width: 100%; height: auto; min-height: 0; aspect-ratio: 210 / 297; max-height: 40vh; border-radius: 14px; box-shadow: var(--lift-1); }
.dv-doc-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 2px 0; }
.dv-doc-kind { font-size: 1.25rem; font-weight: 600; }
.dv-doc-sub { font-size: .875rem; color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.dv-doc-pages { margin-top: auto; padding-right: 64px; font-size: .9375rem; color: var(--muted); }
.dv-doc-dl { position: absolute; right: 14px; bottom: 14px; display: grid; place-items: center; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%;
  background: var(--blue-bright); color: #fff; cursor: pointer; transition: transform .2s var(--ease), background-color .2s var(--ease); }
.dv-doc-dl .icon { width: 30px; height: 30px; }
.dv-doc-dl.is-busy { opacity: .6; cursor: progress; }
.dv-back { height: 48px; }
.ov-qty { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ov-items .ov-item-note { padding: 6px 10px; border-radius: 10px; background: #FEF7E0; color: #3C2F00; }

/* Tagesbericht (Team 2): große Auswahlfelder, klare Abschnitte */
.report { gap: 16px; }
.rp-head { justify-content: space-between; }
.rp-status { padding: 6px 14px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .9375rem; font-weight: 500; }
.rp-status.is-saved { background: #E6F4EA; color: #137333; }
.rp-card { flex: none; display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; border-radius: 24px; background: var(--surface); box-shadow: var(--lift-1); }
.rp-card-head { display: flex; align-items: center; gap: 12px; }
.rp-num { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; }
.rp-card-titles h3 { margin: 0; font-size: 1.1875rem; font-weight: 600; }
.rp-card-titles p { margin: 2px 0 0; font-size: .875rem; color: var(--muted); }
.rp-grid { display: grid; grid-template-columns: minmax(170px, 1fr) repeat(var(--people, 2), minmax(0, 1.2fr)); gap: 10px 14px; align-items: center; }
.rp-colhead { font-size: 1.0625rem; font-weight: 700; color: #174EA6; padding: 0 4px; }
.rp-label { font-size: 1rem; font-weight: 600; color: var(--text); }
.rp-cell { min-width: 0; }
.rp-select, .rp-input { width: 100%; min-height: 52px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--surface-2); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--outline); font: inherit; font-size: 1.0625rem; }
.rp-select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23444746' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; }
.rp-select:focus, .rp-input:focus { outline: none; background-color: var(--surface); box-shadow: inset 0 0 0 2px var(--blue); }
.rp-note { padding: 12px 14px; min-height: 110px; resize: vertical; line-height: 1.45; }
.rp-copy { align-self: flex-start; height: 48px; }
.rp-eval { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.rp-eval-col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rp-eval-col h4 { grid-column: 1 / -1; margin: 0; font-size: 1.0625rem; color: #174EA6; }
.rp-eval-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 16px; background: var(--surface-2); }
.rp-eval-tile.is-main { background: var(--blue-soft); }
.rp-eval-label { font-size: .8125rem; color: var(--muted); }
.rp-eval-value { font-size: 1.375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.rp-question { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.rp-qtext { flex: 1 1 260px; font-size: 1.0625rem; font-weight: 500; }
.rp-yesno { display: inline-flex; gap: 8px; flex: none; }
.rp-yn { min-width: 96px; height: 52px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 1.0625rem; font-weight: 600; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--outline); transition: background-color .2s var(--ease), transform .2s var(--ease); }
.rp-yn.is-on.is-ja { background: #137333; color: #fff; box-shadow: none; }
.rp-yn.is-on.is-nein { background: #C5221F; color: #fff; box-shadow: none; }
.rp-reklas { display: flex; flex-direction: column; gap: 8px; }
.rp-rekla { display: grid; grid-template-columns: 130px minmax(0, 1fr) 130px 48px; gap: 10px; align-items: center; }
.rp-rekla-nr { font-weight: 600; }
.rp-del { width: 48px; height: 48px; }
.rp-min { text-align: center; font-variant-numeric: tabular-nums; }
.rp-add { align-self: flex-start; height: 48px; }
.rp-extra { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; }
.rp-field { display: flex; flex-direction: column; gap: 6px; }
.rp-save { flex: none; align-self: stretch; min-height: 56px; font-size: 1.125rem; }
@media (hover: hover) { .rp-yn:not(.is-on):hover { background: var(--blue-soft); } }
@media (max-width: 700px) {
  .rp-card { padding: 14px 12px; border-radius: 20px; }
  .rp-grid { grid-template-columns: repeat(var(--people, 2), minmax(0, 1fr)); gap: 6px 8px; }
  .rp-grid .rp-colhead.is-label { display: none; }
  .rp-grid .rp-label { grid-column: 1 / -1; margin-top: 8px; font-size: .9375rem; }
  .rp-select, .rp-input { font-size: 1rem; padding: 0 10px; }
  .rp-select { padding-right: 34px; background-position: right 8px center; }
  .rp-rekla { grid-template-columns: minmax(0, 1fr) 110px 48px; }
  .rp-rekla-nr { grid-column: 1 / -1; }
  .rp-extra { grid-template-columns: minmax(0, 1fr); }
  .rp-yesno { width: 100%; }
  .rp-yn { flex: 1; }
}

/* Übersicht der Abrechnung */
.main.is-overview { justify-content: flex-start; }
/* Scrollbalken ganz am rechten Bildschirmrand: der Bereich reicht bis in den Seitenrand hinein */
.overview { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px;
  margin-right: calc(-1 * var(--side)); padding: 2px var(--side) 8px 2px; -webkit-overflow-scrolling: touch; }
.ov-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; flex: none; }
.ov-stat { padding: 18px 22px; border-radius: 24px; background: var(--surface); box-shadow: var(--lift-1); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ov-stat { border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.ov-stat-label .icon { width: 18px; height: 18px; margin-left: auto; color: var(--muted); }

/* Aufschlüsselung der Woche: öffnet sich in der Mitte */
.dialog { border: 0; padding: 0; border-radius: 28px; background: var(--surface); color: var(--text);
  width: min(600px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: var(--lift-2); overflow: hidden; }
.dialog::backdrop { background: rgba(32, 33, 36, .45); }
.dialog-box { display: flex; flex-direction: column; gap: 16px; padding: 24px; max-height: calc(100dvh - 24px); overflow-y: auto; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dialog-titles { min-width: 0; }
.dialog-head h2 { margin: 0; font-size: 1.5rem; font-weight: 500; line-height: 1.25; display: flex; align-items: center; gap: 10px; }
.dialog-head p { margin: 2px 0 0; color: var(--muted); font-size: .9375rem; }
.bd { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-variant-numeric: tabular-nums; }
.bd th, .bd td { padding: 10px 12px; text-align: right; white-space: nowrap; }
.bd th:first-child, .bd td:first-child { text-align: left; }
.bd thead th { padding-top: 0; padding-bottom: 2px; font-size: .8125rem; font-weight: 500; color: var(--muted); }
.bd thead .dot { display: inline-block; margin-right: 6px; }
.bd tbody td { background: var(--surface-2); }
.bd tbody td:first-child { border-radius: 14px 0 0 14px; }
.bd tbody td:last-child { border-radius: 0 14px 14px 0; font-weight: 500; }
.bd-day { display: block; font-weight: 500; }
.bd-date, .bd-tour { display: block; font-size: .8125rem; color: var(--muted); font-weight: 400; }
.bd .is-none { color: var(--muted); font-weight: 400; }
.bd tfoot td { padding-top: 8px; font-weight: 600; font-size: 1.0625rem; }
.bd-amount { display: block; }
.bd-cell-diff { display: block; font-size: .8125rem; font-weight: 600; }
.bd-cell-diff.is-plus { color: #137333; }
.bd-cell-diff.is-minus { color: #C5221F; }
.bd tfoot .bd-cell-diff { font-size: .9375rem; }
.bd tfoot .bd-goal td { padding-top: 2px; text-align: left; font-size: .8125rem; font-weight: 400; color: var(--muted); white-space: normal; }
.bd .is-plus { color: #137333; }
.bd .is-minus { color: #C5221F; }
.dialog.is-wide { width: min(1120px, calc(100vw - 32px)); }

/* Informationen zur Tour: übersichtlich, das Wichtige zuerst */
.inf { display: flex; flex-direction: column; gap: 16px; }
.inf-stops { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.inf-stop-btn { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px 8px 8px; border: 0; border-radius: 16px;
  background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; transition: background-color .2s var(--ease), transform .2s var(--ease); }
.inf-stop { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.inf-stop-time { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 4.2em; }
.inf-stop-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.inf-stop-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inf-stop-city { font-size: .8125rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.inf-order { padding: 18px 20px; border-radius: 24px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--outline-soft); display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 8px; }
.inf-head { display: flex; align-items: flex-start; gap: 14px; }
.inf-head .inf-stop { width: 44px; height: 44px; font-size: 1.125rem; }
.inf-head { cursor: pointer; }
.inf-fold { display: grid; place-items: center; flex: none; width: 48px; height: 48px; margin: -4px -6px 0 auto; padding: 0; border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--muted); cursor: pointer; transition: transform .2s var(--ease), background-color .2s var(--ease); }
.inf-fold .icon { transition: transform .2s var(--ease); }
.inf-order.is-collapsed .inf-fold .icon { transform: rotate(180deg); }
.inf-order.is-collapsed .inf-grid, .inf-order.is-collapsed .inf-more { display: none; }
.inf-order.is-collapsed { gap: 0; }
.inf-head-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.inf-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.inf-head h3 { margin: 0; font-size: 1.375rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.inf-time { flex: none; padding: 4px 14px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 1.0625rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inf-nr { font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.art-badge { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; font-size: .875rem; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--text); }
.ov-order-title { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.ov-order-title .art-badge { padding: 1px 10px; font-size: .8125rem; }
.art-badge.is-l { background: var(--blue-soft); color: #174EA6; }
.art-badge.is-lm { background: #E6F4EA; color: #137333; }
.art-badge.is-m { background: #F3E8FD; color: #7627BB; }
.art-badge.is-r { background: #FEEFC3; color: #8A4B00; }

.inf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 20px; align-items: start; }
.inf-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.inf-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.inf-address { line-height: 1.35; overflow-wrap: anywhere; }
.inf-street { font-size: 1.125rem; font-weight: 500; }
.inf-city { font-size: 1.0625rem; }
.inf-floor { display: inline-flex; margin-top: 6px; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); font-size: .875rem; font-weight: 500; }
.inf-links { display: flex; flex-wrap: wrap; gap: 8px; }
.inf-link { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; transition: background-color .2s var(--ease); }
.inf-link .icon { width: 18px; height: 18px; flex: none; color: var(--muted); }
.inf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.inf-chip { display: flex; flex-direction: column; padding: 8px 14px; border-radius: 16px; background: var(--surface-2); line-height: 1.25; }
.inf-chip-label { font-size: .75rem; font-weight: 500; color: var(--muted); }
.inf-chip-value { font-size: 1.0625rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.inf-chip.is-cash { background: #C5221F; color: #fff; }
.inf-chip.is-cash .inf-chip-label { color: rgba(255, 255, 255, .85); }
.inf-chip.is-saldo { background: var(--red-soft); color: var(--red); }
.inf-chip.is-saldo .inf-chip-label { color: var(--red); }
.inf-note { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 16px; background: #FEF7E0; color: #3C2F00; line-height: 1.45; overflow-wrap: anywhere; }
.inf-note-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #8A6100; }
.inf-note-text { white-space: pre-line; font-size: 1.0625rem; font-weight: 500; }

.inf-more { display: flex; flex-direction: column; gap: 8px; }
.inf-facts { margin: 0; padding: 0 16px 14px 46px; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; font-size: .9375rem; }
.inf-facts dt { color: var(--muted); }
.inf-facts dd { margin: 0; overflow-wrap: anywhere; }
.inf-pos { border-radius: 16px; background: var(--surface-2); }
.inf-pos summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 16px; cursor: pointer; list-style: none; border-radius: 16px; font-weight: 500; }
.inf-pos summary::-webkit-details-marker { display: none; }
.inf-pos summary .icon { width: 20px; height: 20px; color: var(--muted); transition: transform .2s var(--ease); }
.inf-pos[open] summary .icon { transform: rotate(90deg); }
.inf-sum-meta { margin-left: auto; font-size: .875rem; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.inf-pos ol { margin: 0; padding: 0 16px 14px 46px; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.inf-pos li { display: grid; grid-template-columns: 2.5em minmax(0, 1fr) max-content; gap: 10px; align-items: baseline; font-size: .9375rem; }
.inf-pos-lfd { color: var(--muted); font-variant-numeric: tabular-nums; }
.inf-pos-text { overflow-wrap: anywhere; }
.inf-pos-meta { display: block; font-size: .8125rem; color: var(--muted); }
.inf-pos-qty { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ov-stat-label { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--muted); }
.ov-stat-value { font-size: 1.75rem; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ov-stat-diff { font-size: .9375rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ov-stat-diff strong { font-weight: 600; }
.ov-stat-diff.is-plus { color: #137333; }
.ov-stat-diff.is-minus { color: #C5221F; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--blue-bright); }
.dot.is-green { background: var(--green-bright); }
.dot.is-grey { background: #5F6368; }
.ov-day { flex: none; padding: 20px 22px; border-radius: 24px; background: var(--surface); box-shadow: var(--lift-1); display: flex; flex-direction: column; gap: 14px; }
.ov-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ov-day h2 { margin: 0; font-size: 1.25rem; font-weight: 500; }
.ov-amount { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
.ov-day > .ov-row .ov-amount { font-size: 1.25rem; }
.ov-tour { padding: 14px 16px; border-radius: 18px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.ov-tour-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 500; }
.tag { padding: 2px 10px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .75rem; font-weight: 500; white-space: nowrap; }
.ov-team { padding: 5px 16px; border-radius: 999px; background: var(--blue-soft); color: #174EA6; font-size: 1.0625rem; font-weight: 600; white-space: nowrap; }
.ov-team.is-green { background: #E6F4EA; color: #137333; }
.ov-tour-nr { font-size: 1.0625rem; }
/* Lieferwagen hinter der Tournummer: öffnet die Tour mit Tourliste und Zeichnungen */
.ov-tour-open { display: grid; place-items: center; flex: none; width: 48px; height: 48px; margin: -6px 0; padding: 0; border: 0; border-radius: 50%;
  background: var(--blue-soft); color: #174EA6; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease); }
.ov-tour-open .icon { width: 24px; height: 24px; }
.icon.icon-fill { fill: currentColor; stroke: none; }
.ov-order-row { display: flex; align-items: flex-start; gap: 8px; }
.ov-order { flex: 1; min-width: 0; border-radius: 14px; background: var(--surface); }
.ov-info { display: grid; place-items: center; flex: none; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: var(--blue-soft); color: #174EA6; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease); }
.ov-info .icon { width: 24px; height: 24px; stroke-width: 2.8; }
.ov-order summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 14px; cursor: pointer; list-style: none; border-radius: 14px; }
.ov-order summary::-webkit-details-marker { display: none; }
.ov-order summary .icon { width: 20px; height: 20px; color: var(--muted); transition: transform .2s var(--ease); }
.ov-order[open] summary .icon { transform: rotate(90deg); }
/* Team-Übersicht ohne Beträge: Auftragszeile ohne Aufklappen */
.ov-order.is-static { display: flex; align-items: center; min-height: 48px; padding: 6px 14px; }
.ov-count { font-size: .9375rem; color: var(--muted); font-weight: 500; }
.ov-order-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ov-order-meta { font-size: .8125rem; color: var(--muted); }
.ov-items { margin: 0; padding: 4px 14px 12px 44px; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ov-items li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: .875rem; }
.ov-item-text { min-width: 0; overflow-wrap: anywhere; }
.ov-item-nr { color: var(--muted); font-size: .75rem; margin-left: 6px; white-space: nowrap; }
.ov-amount.is-minus { color: var(--red); }
.ov-empty { padding: 28px 22px; border-radius: 24px; background: var(--surface-2); color: var(--muted); text-align: center; }
.ov-hint { flex: none; margin: 0; padding: 0 6px; font-size: .8125rem; color: var(--muted); }

/* Finanzen: Auswertung mit Karten, die man ein- und ausblenden kann */
.finance { gap: 16px; }
.fin-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; flex: none; }
.fin-seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--surface-2); flex: none; }
.fin-seg-btn { height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease); }
.fin-seg-btn.is-active { background: var(--surface); color: #174EA6; box-shadow: var(--lift-1); }
.fin-range { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.fin-range-label { font-size: 1.25rem; font-weight: 500; }
.fin-range-sub { font-size: .8125rem; color: var(--muted); }
.fin-grid-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; flex: none; }
.fin-card { position: relative; min-width: 0; padding: 18px 20px; border-radius: 24px; background: var(--surface); box-shadow: var(--lift-1); display: flex; flex-direction: column; gap: 12px; }
.fin-card.is-wide { grid-column: 1 / -1; }
.fin-card-head h2 { margin: 0; font-size: 1.125rem; font-weight: 500; }
.fin-card-head p { margin: 2px 0 0; font-size: .8125rem; color: var(--muted); }
.fin-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fin-kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 18px; background: var(--surface-2); min-width: 0; }
.fin-kpi-label { font-size: .8125rem; color: var(--muted); }
.fin-kpi-value { font-size: 1.5rem; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-kpi-extra { font-size: .8125rem; color: var(--muted); }
.fin-kpi-extra.is-plus { color: #137333; font-weight: 600; }
.fin-kpi-extra.is-minus { color: #C5221F; font-weight: 600; }
.fin-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8125rem; color: var(--muted); }
.fin-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.fin-swatch { width: 12px; height: 12px; border-radius: 3px; }
.fin-swatch.is-line { width: 18px; height: 0; border-top: 2px solid #5F6368; border-radius: 0; }
.fin-chart { width: 100%; }
.fin-chart svg { display: block; overflow: visible; }
.fin-grid { stroke: #E1E3E1; stroke-width: 1; }
.fin-axis { font-size: 12px; fill: #5F6368; font-variant-numeric: tabular-nums; }
.fin-target { stroke: #5F6368; stroke-width: 2; }
.fin-bar-val { font-size: 11px; font-weight: 500; fill: #fff; pointer-events: none; font-variant-numeric: tabular-nums; }
.fin-bar-val.is-out { fill: var(--text); }
.fin-chart.is-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fin-chart.is-scroll svg { display: block; max-width: none; }
.fin-target-label { font-size: 12px; font-weight: 600; fill: #3C4043; }
.fin-hit { fill: transparent; cursor: crosshair; }
.fin-tip { position: absolute; z-index: 3; min-width: 190px; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: var(--lift-2); font-size: .875rem; pointer-events: none; display: flex; flex-direction: column; gap: 4px; }
.fin-tip-head { font-weight: 600; display: flex; gap: 8px; justify-content: space-between; }
.fin-tip-row { display: flex; align-items: center; gap: 8px; }
.fin-tip-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.fin-tip-label { flex: 1; color: var(--muted); }
.fin-tip-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.fin-tip-value.is-plus { color: #137333; }
.fin-tip-value.is-minus { color: #C5221F; }
.fin-team { display: flex; flex-direction: column; gap: 8px; padding: 6px 0 10px; }
.fin-team-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fin-team-name { display: inline-flex; align-items: center; gap: 8px; font-size: 1.0625rem; font-weight: 600; }
.fin-team-value { font-size: 1.375rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.fin-track { position: relative; height: 24px; border-radius: 8px; background: var(--surface-2); }
.fin-fill { height: 100%; border-radius: 8px; }
.fin-mark { position: absolute; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; background: #3C4043; border-radius: 1px; }
.fin-team-foot { font-size: .875rem; font-weight: 600; }
.fin-team-foot.is-plus { color: #137333; }
.fin-team-foot.is-minus { color: #C5221F; }
.fin-rings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fin-ring { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: 18px; background: var(--surface-2); text-align: center; min-width: 0; }
.fin-ring svg { width: 100%; max-width: 128px; height: auto; }
.fin-ring-track { fill: none; stroke: #E1E3E1; stroke-width: 12; }
.fin-ring-arc { fill: none; stroke-width: 12; stroke-linecap: round; }
.fin-ring-pct { font-size: 24px; font-weight: 600; fill: #1F1F1F; font-variant-numeric: tabular-nums; }
.fin-ring-sub { font-size: 12px; fill: #5F6368; }
.fin-ring-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-top: 4px; }
.fin-ring-value { font-size: 1.0625rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.fin-ring-diff { font-size: .8125rem; font-weight: 600; }
.fin-ring-diff.is-plus { color: #137333; }
.fin-ring-diff.is-minus { color: #C5221F; }
.fin-table-wrap { overflow-x: auto; }
.fin-note { margin: 0; font-size: .8125rem; color: var(--muted); }
@media (hover: hover) {
  .fin-seg-btn:not(.is-active):hover { background: var(--blue-soft); }
}
@media (max-width: 1100px) { .fin-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .fin-grid-box { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .fin-rings { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .fin-kpis { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .fin-kpi-value { font-size: 1.25rem; }
  .fin-card { padding: 14px; border-radius: 20px; }
  .fin-seg-btn { padding: 0 12px; }
}

/* Plan-Ansicht */
.viewer { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: var(--bg); }
.viewer-top { display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: var(--surface); box-shadow: var(--lift-1); z-index: 1; }
.viewer-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.viewer-name { font-size: 1.125rem; font-weight: 500; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.viewer-page { font-size: .875rem; color: var(--muted); }
.viewer-body { flex: 1; min-height: 0; overflow: auto; padding: 20px; text-align: center; -webkit-overflow-scrolling: touch; }
.viewer-body img { display: inline-block; width: 100%; max-width: 1100px; height: auto; border-radius: 12px; background: #fff; box-shadow: var(--lift-1); }
.viewer-body.is-pdf { padding: 0; overflow: hidden; }
.viewer-body iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
/* PDF-Seiten (PDF.js): untereinander, auf Bildschirmbreite; beim Zoomen auch seitlich scrollbar */
.viewer-body.is-pdf { position: relative; overflow: auto; background: var(--bg); touch-action: pan-x pan-y; }
.pdf-fehler { max-width: 420px; margin: 40px auto; padding: 0 16px; text-align: center; color: var(--muted); font-size: 1rem; }
.viewer-pages { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px; min-width: min-content; transform-origin: 0 0; }
.viewer-pages.is-zoomed { align-items: flex-start; }
.pdf-page { position: relative; flex: none; background: #fff; border-radius: 6px; box-shadow: var(--lift-1); overflow: hidden; }
.pdf-page canvas { display: block; width: 100%; height: 100%; } /* Leinwand in Bildschirm-Auflösung, angezeigt in Seitengröße */
.viewer-pages[hidden], .viewer-body iframe[hidden] { display: none; }
/* Handy: Titel und Seitenzahl in der ersten Zeile, Knöpfe in der zweiten (rechtsbündig) */
@media (max-width: 600px) {
  .viewer-top { flex-wrap: wrap; justify-content: flex-end; row-gap: 8px; padding: 10px 12px; }
  .viewer-title { flex: 1 1 calc(100% - 64px); }
  .viewer-top .round { width: 44px; height: 44px; }
}

/* Nachtrag-Hinweis (nur Gesell): schließt nur mit dem Kreuz */
.nt-backdrop { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(32, 33, 36, .45); }
.nt-dialog { width: min(560px, 100%); max-height: calc(100% - 32px); display: flex; flex-direction: column; background: var(--surface); border-radius: 24px; box-shadow: var(--lift-2); overflow: hidden; }
.nt-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px 24px; border-bottom: 1px solid var(--line, #E3E6EA); }
.nt-title { flex: 1; margin: 0; font-size: 1.25rem; font-weight: 500; }
.nt-body { overflow: auto; padding: 8px 24px 20px; -webkit-overflow-scrolling: touch; }
.nt-item { padding: 14px 0; border-bottom: 1px solid var(--line, #E3E6EA); }
.nt-item:last-child { border-bottom: 0; }
.nt-kunde { font-size: 1.0625rem; font-weight: 500; overflow-wrap: anywhere; }
.nt-meta { margin-top: 2px; font-size: .875rem; color: var(--muted); }
.nt-summe { margin-top: 6px; font-weight: 500; }
.nt-pos { margin-top: 4px; font-size: .9375rem; overflow-wrap: anywhere; }
.nt-pos.is-dazu { color: #137333; }
.nt-pos.is-weg { color: #B3261E; }

/* Meldung unten */
.toast {
  position: absolute; left: 50%; bottom: 24px; z-index: 10; transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 999px;
  background: #1F1F1F; color: #fff; font-size: .9375rem; box-shadow: var(--lift-2);
  overflow-wrap: anywhere; text-align: center;
}

/* Abheben beim Überfahren */
@media (hover: hover) {
  .button-primary:hover { transform: translateY(-2px); box-shadow: var(--lift-2); background: var(--blue-strong); }
  .ov-stat:hover { transform: translateY(-2px); box-shadow: var(--lift-2); }
  .ask:not(.is-loading):hover { background: #D2E3FC !important; }
  .round:not(:disabled):hover, .pill:hover { transform: translateY(-2px); box-shadow: var(--lift-1); background: var(--surface); }
  .pill-primary:hover { background: var(--blue-strong); }
  .inf-link:hover { background: #E3E7EC; }
  .inf-stop-btn:hover { background: var(--blue-soft); transform: translateY(-1px); }
  .inf-pos summary:hover { background: var(--blue-soft); }
  .inf-fold:hover { background: var(--blue-soft); color: #174EA6; }
  .ov-order summary:hover { background: var(--blue-soft); }
  .ov-info:hover { background: #D2E3FC; transform: translateY(-2px); box-shadow: var(--lift-1); }
  .profile-btn:hover { background: var(--surface-2); }
  .lang-item:not(.is-active):hover { background: var(--blue-soft); }
  .profile-logout:hover { background: var(--red-soft) !important; color: var(--red); }
  .day-chip:not(.is-active):hover { background: var(--blue-soft); transform: translateY(-2px); }
  .dv-doc:hover { transform: translateY(-2px); box-shadow: var(--lift-2); }
  .dv-doc-dl:hover { background: var(--blue); }
  .dv-tmt:hover { background: #A50E0E !important; color: #fff; }
  .ov-tour-open:hover { background: #D2E3FC; transform: translateY(-2px); box-shadow: var(--lift-1); }
}

/* Tablet hochkant und kleiner: Info-Karten einspaltig */
@media (max-width: 900px) {
  /* Tablet hochkant: Aktualisieren nur als Symbol, damit Wochentage und Reiter in eine Zeile passen */
  .ask { width: 48px; padding: 0; }
  .ask span { display: none; }
  .inf-grid { grid-template-columns: minmax(0, 1fr); }
  .inf-stops { grid-template-columns: minmax(0, 1fr); }
}

/* Handy */
@media (max-width: 700px) {
  /* Handy: Wochentage in der ersten Zeile (bei Samstag seitlich scrollbar), Übersicht/Finanzen/Tagesbericht darunter – alles sichtbar */
  .day-chips { gap: 6px; flex: 1 1 100%; overflow-x: auto; padding-top: 10px; margin-top: -10px; scrollbar-width: none; }
  .day-chips::-webkit-scrollbar { display: none; }
  .day-chip { min-width: 58px; height: 52px; padding: 0 8px; border-radius: 16px; }
  .day-chip-name { font-size: 1rem; }
  .day-chip-date { font-size: .75rem; }
  .dv-titles h2 { font-size: 1.25rem; }
  .dv-section { padding: 12px; border-radius: 20px; }
  .dv-docs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dv-doc-open { padding: 10px; gap: 8px; }
  .dv-doc-kind { font-size: 1.0625rem; }
  .dv-doc-sub { -webkit-line-clamp: 1; }
  .dv-doc-dl { width: 48px; height: 48px; right: 10px; bottom: 10px; }
  .dv-doc-dl .icon { width: 24px; height: 24px; }
  .dv-doc-pages { padding-right: 52px; }
  .dv-tmt { height: 52px; padding: 0 20px 0 16px; font-size: 1.125rem; }
  .dv-all span { display: none; }
  .dv-all { width: 48px; padding: 0; }
  :root { --gap: 10px; }
  h1 { font-size: 1.5rem; }
  .login-box { gap: 24px; }
  .login-card { padding: 28px 20px; }
  .login-card h1 { font-size: 1.75rem; }
  .week { --side: 12px; padding: 14px var(--side) 16px; gap: 12px; }
  .top-logo { height: 46px; }
  .avatar { width: 36px; height: 36px; }
  .pill { height: 44px; padding: 0 14px 0 10px; font-size: .9375rem; }
  .switch { flex: 0 0 auto; gap: 6px; }
  .switch .round { width: 44px; height: 44px; }
  .switch-label { min-width: 124px; }
  .switch-range { font-size: 1rem; }
  .chip { font-size: .6875rem; padding: 3px 8px; }
  .ov-summary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .ov-stat { padding: 12px 14px; border-radius: 18px; }
  .ov-stat:first-child { grid-column: 1 / -1; }
  .ov-stat-value { font-size: 1.375rem; }
  .ov-team { padding: 4px 12px; font-size: 1rem; }
  .ov-tour-nr { font-size: 1rem; }
  .ov-tour-name { gap: 6px; }
  .dialog { border-radius: 24px; }
  .dialog-box { padding: 16px; gap: 12px; }
  .dialog-head h2 { font-size: 1.25rem; }
  .bd th, .bd td { padding: 8px 8px; font-size: .875rem; }
  .bd tfoot td { font-size: .9375rem; }
  .ov-stat-diff { font-size: .8125rem; white-space: normal; }
  .ov-stat-diff strong { white-space: nowrap; }
  .overview { gap: 10px; }
  .ov-day { padding: 14px; border-radius: 20px; gap: 10px; }
  .ov-day h2, .ov-day > .ov-row .ov-amount { font-size: 1.0625rem; }
  .ov-tour { padding: 10px; border-radius: 16px; }
  .ov-order summary { padding: 6px 10px; gap: 6px; }
  .ov-order-row { gap: 6px; }
  .ov-info { width: 44px; height: 44px; margin-top: 2px; }
  .ov-tour-open { width: 44px; height: 44px; }
  .ov-items { padding: 4px 10px 10px 36px; }
  .badge { top: 6px; left: 6px; }
  .viewer-top { padding: 10px 12px; gap: 8px; }
  .viewer-name { font-size: .9375rem; }
  .viewer-body { padding: 10px; }
  #viewer-download span { display: none; }
  #viewer-download { width: 44px; padding: 0; }
  .toast { bottom: 16px; border-radius: 20px; font-size: .875rem; }
}

/* Schmale Handys: die Tabelle der Aufschlüsselung rückt zusammen */
@media (max-width: 480px) {
  /* Drei Umschalter brauchen den Platz: Aktualisieren nur als Symbol */
  .ask { width: 44px; padding: 0; }
  .ask span { display: none; }
  .dialog-box { padding: 14px 12px; }
  .inf-order { padding: 12px; border-radius: 18px; gap: 10px; }
  .inf-head { gap: 10px; }
  .inf-head .inf-stop { width: 36px; height: 36px; font-size: 1rem; }
  .inf-head h3 { font-size: 1.125rem; }
  .inf-facts { font-size: .875rem; gap: 4px 10px; padding: 0 12px 12px; grid-template-columns: minmax(0, 1fr); }
  .inf-facts dd { margin-bottom: 6px; }
  .inf-pos ol { padding: 0 12px 12px; }
  .inf-pos li { font-size: .875rem; gap: 8px; }
  .inf-sum-meta { display: none; }
  .bd th, .bd td { padding: 8px 5px; font-size: .8125rem; }
  .bd thead th { font-size: .75rem; }
  .bd thead .dot { margin-right: 4px; width: 8px; height: 8px; }
  .bd tfoot td { font-size: .8125rem; }
}

/* Kleine Handys: etwas enger, damit die Vorschau groß bleibt */
@media (max-width: 380px) {
  .ov-day { padding: 10px; }
  .ov-tour { padding: 8px; }
  .ov-team { padding: 4px 10px; }
  .dialog-box { padding: 12px 8px; }
  .bd th, .bd td { padding: 8px 3px; font-size: .75rem; }
  .bd th:first-child, .bd td:first-child { padding-left: 8px; }
  .bd th:last-child, .bd td:last-child { padding-right: 8px; }
  .bd tfoot td { font-size: .75rem; }
}
@media (max-width: 700px) and (max-height: 700px) {
  .week { --side: 12px; padding: 10px var(--side); gap: 8px; }
}

/* Niedrige Bildschirme, zum Beispiel ein quer gehaltenes Handy */
@media (max-height: 520px) {
  :root { --gap: 10px; }
  h1 { font-size: 1.375rem; }
  .login { align-items: flex-start; overflow-y: auto; }
  .login-box { max-width: 380px; gap: 12px; margin: 0 auto; }
  .login-logo { width: 60%; margin: 0 auto; }
  .login-card { padding: 16px 20px; gap: 10px; }
  .login-card h1 { font-size: 1.25rem; }
  .field { gap: 4px; }
  .field input { height: 44px; }
  .input-wrap .text-button { top: 0; height: 44px; }
  .week { --side: 16px; padding: 10px var(--side) 12px; gap: 10px; }
  .top-logo { height: 40px; }
  .avatar { width: 36px; height: 36px; }
  .round { width: 44px; height: 44px; }
  .pill { height: 44px; padding: 0 14px 0 10px; font-size: .9375rem; }
  .switch { flex: 0 0 auto; margin-left: auto; gap: 6px; }
  .switch-label { min-width: 124px; flex: none; }
  .switch-range { font-size: 1rem; }
  .badge { top: 6px; left: 6px; }
  .viewer-top { padding: 6px 12px; }
  .ov-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ov-stat { padding: 8px 12px; border-radius: 16px; }
  .ov-stat:first-child { grid-column: auto; }
  .ov-stat-value { font-size: 1.125rem; }
  .dialog-box { padding: 12px 16px; gap: 8px; }
  .dialog-head h2 { font-size: 1.125rem; }
  .bd { border-spacing: 0 3px; }
  .bd th, .bd td { padding: 4px 10px; font-size: .875rem; }
  .bd-date, .bd-tour { display: inline; margin-left: 6px; }
  .ov-stat-diff { font-size: .8125rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Tagesbericht: noch nicht an den Server übertragen (z. B. ohne Netz) */
.rp-status.is-pending::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: #B45309; vertical-align: middle; }

/* Ersteinrichtung auf dem Server */
.setup { display: grid; gap: 14px; }
.setup-title { margin: 0; font-size: 1.375rem; }
.setup-text { margin: 0; color: var(--muted); line-height: 1.5; }
.setup-field { display: grid; gap: 6px; font-weight: 600; }
.setup-field input { height: 52px; padding: 0 14px; border: 1px solid var(--line, #c4c7c5); border-radius: 12px; font: inherit; font-weight: 400; }
.setup-go { height: 52px; justify-content: center; }

/* Tagesbericht: Tag mit Pfeilen wählen */
.rp-day { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.rp-day-btn { display: grid; place-items: center; width: 56px; height: 56px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text); cursor: pointer; }
.rp-day-btn .icon { width: 28px; height: 28px; }
.rp-day-btn:active { transform: scale(.96); }
.rp-day-label { min-width: 190px; text-align: center; font-size: 1.375rem; font-weight: 600; }
@media (max-width: 640px) {
  .rp-day { width: 100%; justify-content: space-between; margin-left: 0; }
  .rp-day-btn { width: 48px; height: 48px; }
  .rp-day-label { min-width: 0; font-size: 1.125rem; }
}

/* Tagesbericht: Zusatzfrage unter einer Ja/Nein-Frage */
.rp-subq { display: block; flex: none; margin: 4px 0 -4px; }

/* Übersicht: Tage eingeklappt, Kopf zum Aufklappen */
/* Tippfläche mindestens 44 Punkte hoch; der negative Rand gleicht das aus, die Karte bleibt optisch gleich groß */
.ov-day.is-klappbar > .ov-day-head { align-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; min-height: 44px; margin: -8px 0; }
.ov-day.is-klappbar > .ov-day-head h2 { flex: 1; }
.ov-day-pfeil { flex: none; width: 22px; height: 22px; margin-right: 6px; color: var(--muted); transition: transform .2s var(--ease); }
.ov-day.is-offen .ov-day-pfeil { transform: rotate(90deg); }
.ov-day-body { display: flex; flex-direction: column; gap: inherit; }
.ov-day-body[hidden] { display: none; }
.ov-day.is-klappbar:not(.is-offen) { gap: 0; }

/* ---------- Navigation (Vollbild): Bereiche links als Leiste (Tablet/Computer), unten als Leiste (Handy) ---------- */
.week { flex-direction: row; gap: 0; padding: 0; }
.rail { flex: none; z-index: 5; width: 96px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0;
  background: var(--surface); box-shadow: 1px 0 0 var(--outline-soft); }
.rail-logo { display: block; width: 56px; height: auto; margin-bottom: 18px; }
.nav-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 88px; padding: 6px 0; border: 0; background: none;
  color: var(--muted); font-size: .8125rem; font-weight: 500; line-height: 1.2; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nav-pill { display: grid; place-items: center; width: 60px; height: 34px; border-radius: 999px; transition: background-color .2s var(--ease); }
.nav-btn.is-active { color: var(--text); font-weight: 600; }
.nav-btn.is-active .nav-pill { background: var(--blue-soft); color: #174EA6; }
.nav-btn:active .nav-pill { transform: scale(.96); }
@media (hover: hover) { .nav-btn:not(.is-active):hover .nav-pill { background: var(--surface-2); } }

.frame { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 16px; padding: 16px var(--side) 20px; }
.week { --side: 24px; }
.top { justify-content: flex-start; gap: 16px; min-height: 58px; }
.top .top-logo { display: none; }
.switch { flex: none; margin-left: 0; gap: 4px; }
.switch-label { min-width: 120px; }
.switch-kw { font-size: .8125rem; }
.day-chips { flex: 0 1 auto; min-width: 0; overflow-x: auto; padding: 10px 2px 2px; margin: -10px 0 -2px; }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.ask { margin-left: 0; }
.ask, .ask.round { width: 48px; padding: 0; }
.ask span { display: none; }

/* Tablet hochkant: Wochentage in eine eigene Zeile unter Woche und Knöpfen */
@media (max-width: 1060px) and (min-width: 701px) {
  .top { flex-wrap: wrap; row-gap: 12px; }
  .day-chips { order: 3; flex: 1 1 100%; }
  .day-chip { flex: 1 1 0; }
}

/* Handy: oben Logo, Woche, Aktualisieren, Profil; darunter die Wochentage; unten die Bereiche */
@media (max-width: 700px) {
  .week { flex-direction: column; --side: 12px; }
  .rail { order: 2; width: auto; flex-direction: row; justify-content: space-around; align-items: stretch; gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -1px 0 var(--outline-soft); }
  .rail-logo { display: none; }
  .nav-btn { flex: 1 1 0; width: auto; padding: 4px 0; font-size: .75rem; }
  .nav-pill { width: 56px; height: 32px; }
  .frame { order: 1; padding: 8px var(--side) 0; gap: 8px; }
  .top { flex-wrap: wrap; gap: 6px; row-gap: 8px; min-height: 0; }
  .top .top-logo { display: block; height: 38px; }
  .switch { flex: 1 1 auto; justify-content: center; gap: 2px; }
  .switch .round { width: 40px; height: 40px; }
  .switch-label { min-width: 0; }
  .switch-kw { font-size: .75rem; }
  .switch-range { font-size: .9375rem; }
  .top-actions { gap: 2px; }
  .ask, .ask.round { width: 44px; height: 44px; }
  .profile-btn { width: 46px; height: 46px; }
  .profile-btn .avatar { width: 38px; height: 38px; font-size: 1rem; }
  .day-chips { order: 3; flex: 1 1 100%; max-height: 80px; transition: max-height .22s var(--ease), opacity .18s var(--ease), padding .22s var(--ease), margin .22s var(--ease); }
  .day-chip { flex: 1 1 0; min-width: 0; padding: 0 4px; }  /* auch mit Samstag (6 Tage) in einer Zeile */
  .day-chips { padding-right: 6px; }
  .day-chip-new { right: -4px; }
  .day-chip-new.is-changed { right: -6px; }
  .week.tage-weg .day-chips { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; margin-top: -8px; pointer-events: none; }
  .main { padding-bottom: 8px; }
}
@media (max-width: 700px) and (max-height: 700px) {
  .frame { padding-top: 6px; gap: 6px; }
}

/* Auftragskarte: Kunde neben Zeit und Art, darunter Adresse, Auftragsnummer dahinter */
.inf-row h3 { flex: 1 1 auto; min-width: 0; }
.inf-sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; line-height: 1.35; }
.inf-sub-adr { font-size: 1.0625rem; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 480px) { .inf-sub-adr { font-size: 1rem; } }

/* Übersicht: Auftrag mit Kunde vorn, darunter Adresse · Auftragsnummer */
.ov-order-title .is-raw { font-weight: 500; overflow-wrap: anywhere; }
.ov-order-sub { display: block; font-size: .8125rem; color: var(--muted); }
.ov-order-sub > span:not(:last-child)::after { content: "\00a0·"; }
.ov-order-nr, .ov-order-zeit { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Depot hinter der Auftragsart */
.depot-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 8px; line-height: 1.3; font-size: .875rem; font-weight: 500; white-space: nowrap;
  background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--outline-soft); }
.ov-order-title .depot-badge { padding: 1px 10px; font-size: .8125rem; }
@media (max-width: 480px) { .depot-badge { white-space: normal; } }

/* Profil: Passwort ändern */
.profile-pw { width: 100%; height: 52px; justify-content: center; background: var(--surface-2); font-size: 1.0625rem; }
@media (hover: hover) { .profile-pw:hover { background: var(--blue-soft); } }
.pw-form .field { gap: 6px; }
.pw-form .rp-select { min-height: 56px; border-radius: 16px; }
.pw-save { align-self: stretch; min-height: 56px; font-size: 1.0625rem; }

/* Dokumentkarten (Bugfix 29.11.): Text nie unter dem Download-Knopf, ganze Seite im Vorschaubild,
   Tablet hoch: drei Karten nebeneinander statt zwei riesige; Handy: kompakte Zeilen */
.dv-docs { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.dv-doc-open .sheet { max-height: 34vh; }
.dv-doc-open .sheet img { object-fit: contain; object-position: center top; }
.dv-doc-sub, .dv-doc-pages { padding-right: 66px; }

@media (max-width: 1060px) {
  .dv-section-meta { order: 5; flex: 1 1 100%; }
}
@media (max-width: 700px) {
  .dv-docs { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .dv-doc-open { flex-direction: row; align-items: center; gap: 12px; padding: 8px 64px 8px 8px; }
  .dv-doc-open .sheet { width: 64px; max-height: none; border-radius: 8px; box-shadow: none; }
  .dv-doc-open .sheet .badge { top: 4px; left: 4px; padding: 1px 5px; font-size: .625rem; }
  .dv-doc-sub, .dv-doc-pages { padding-right: 0; }
  .dv-doc-sub { -webkit-line-clamp: 2; }
  .dv-doc-pages { margin-top: 2px; }
  .dv-doc-dl { top: 50%; bottom: auto; right: 10px; margin-top: -24px; }
  .dv-doc-tag { top: 6px; right: 6px; left: auto; padding: 2px 8px; font-size: .75rem; box-shadow: none; }
}

/* Auftragskarte: Kundenname immer in eigener Zeile unter Zeit, Art und Depot (Tablet: nicht mehr mitten in den Kennzeichen) */
.inf-row h3 { flex: 1 1 100%; }
/* Fokusrahmen: nur bei Bedienung mit Tastatur (am iPad blieb nach dem Schließen eines Fensters ein blauer Rahmen stehen);
   in den Listen nach innen gesetzt, damit ihn der Rand der Liste nicht abschneidet */
html:not(.mit-tastatur) :focus-visible { outline: none; }
.overview :focus-visible { outline-offset: -3px; }
/* Übersicht: Zielzeile darf umbrechen (Betrag bleibt zusammen) */
.ov-stat-diff { white-space: normal; }
.ov-stat-diff strong { white-space: nowrap; }
/* Tagesbericht: Hinweis bei unplausiblen Zeiten */
.rp-warn { grid-column: 1 / -1; margin: 0; padding: 10px 14px 10px 30px; border-radius: 14px; background: #FEF3E2; color: #5B2C06; font-size: .9375rem; line-height: 1.45; }
/* Profilmenü liegt über den Wochentagen (das „Neu“-Schild schaute oben heraus) */
.top-actions { position: relative; z-index: 4; } /* über Badges (1–3), unter Ansicht (5) und Dialogen */
/* Finanzen am Handy: Wochentabelle passt in die Karte (vorher war „Gesamt“ abgeschnitten) */
@media (max-width: 480px) {
  .fin-table { font-size: .8125rem; }
  .fin-table th, .fin-table td { padding-left: 4px; padding-right: 4px; }
  .fin-table th:first-child, .fin-table td:first-child { padding-left: 8px; }
}
/* Alle Pläne einer Tour in einer Ansicht: Name über jedem Dokument */
.pdf-doc-head { align-self: stretch; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 14px 4px 0; text-align: left; }
.pdf-doc-head:first-child { padding-top: 2px; }
.pdf-doc-kind { font-size: 1rem; font-weight: 600; color: var(--text); }
.pdf-doc-name { font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
.viewer-pages > .pdf-fehler { margin: 8px auto; }
/* Safari auf iPad/iPhone: kein Zoomen der ganzen Seite durch Doppeltippen (z. B. schnell zweimal auf „−“) */
body, body * { touch-action: pan-x pan-y; } /* nur scrollen – kein Zoomen der Seite (das PDF zoomt selbst) */
/* PDF-Ansicht: Kopfzeile ganz ohne Seiten-Zoom; im PDF scrollen mit einem Finger, zoomen mit zwei übernimmt die App */
.viewer-top, .viewer-top * { touch-action: none; }
.viewer-body.is-pdf, .viewer-body.is-pdf * { touch-action: pan-x pan-y; }
.viewer-pages { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.pdf-page canvas.pdf-detail { position: absolute; display: block; pointer-events: none; }
/* Während das PDF lädt: Vorschau der ersten Seite mit Fortschritt */
.pdf-platzhalter { position: relative; flex: none; max-width: 100%; background: #fff; border-radius: 6px; box-shadow: var(--lift-1); overflow: hidden; }
.pdf-platzhalter img { display: block; width: 100%; height: auto; opacity: .85; }
.pdf-platzhalter-text { position: absolute; left: 50%; top: 24px; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgba(32, 33, 36, .82); color: #fff; font-size: .875rem; white-space: nowrap; }
/* Vorab-Bild der ersten Seite (gemerktes Seitenbild oder Vorschau), bis die Seite gezeichnet ist */
.pdf-platzhalter img.pdf-vorbild { opacity: 1; }
.pdf-page img.pdf-vorbild { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
/* Plan-Ansicht: nichts außer dem PDF lässt sich zoomen oder markieren */
.viewer-top { -webkit-user-select: none; user-select: none; }
.viewer-body.is-pdf { touch-action: pan-x pan-y; overscroll-behavior: contain; }
/* Kennzahlen: kurze Erklärung, was die Zahl bedeutet */
.fin-kpi-hint { margin-top: 6px; font-size: .75rem; line-height: 1.35; color: var(--muted); }
/* Tagestabelle: auf dem Handy kurze Tagesnamen */
.tag-kurz { display: none; }
@media (max-width: 600px) { .tag-lang { display: none; } .tag-kurz { display: inline; } }

/* Übersicht: Team-Kopf (Gesell / Team 2) groß und klar abgesetzt */
.ov-tour.is-blue { box-shadow: inset 6px 0 0 #1A73E8; }
.ov-tour.is-green { box-shadow: inset 6px 0 0 #34A853; }
.ov-tour.is-blue, .ov-tour.is-green { padding-left: 22px; }
.ov-tour-head { align-items: center; padding: 2px 0 12px; margin-bottom: 4px; border-bottom: 1px solid rgba(60, 64, 67, .12); }
.ov-tour-head .ov-team { padding: 7px 20px; font-size: 1.375rem; font-weight: 700; }
.ov-tour-head .ov-tour-nr { font-size: 1rem; font-weight: 500; color: var(--muted); }
.ov-tour-head .ov-tour-name { gap: 12px; }
.ov-tour-sum { font-size: 1.375rem; font-weight: 600; }
@media (max-width: 700px) {
  .ov-tour.is-blue, .ov-tour.is-green { padding-left: 16px; }
  .ov-tour-head { padding-bottom: 10px; }
  .ov-tour-head .ov-team { padding: 5px 14px; font-size: 1.1875rem; }
  .ov-tour-head .ov-tour-nr { font-size: .9375rem; }
  .ov-tour-head .ov-tour-name { gap: 8px; }
  .ov-tour-sum { font-size: 1.1875rem; }
}
@media (max-width: 380px) {
  .ov-tour.is-blue, .ov-tour.is-green { padding-left: 13px; }
  .ov-tour-head .ov-team { font-size: 1.0625rem; padding: 4px 12px; }
}
/* Handy: Zeile 1 = Team, Lieferwagen, Summe; Zeile 2 = Tournummer und Anzahl Aufträge */
@media (max-width: 700px) {
  .ov-tour-head { display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "team open sum" "nr nr nr"; column-gap: 8px; row-gap: 6px; }
  .ov-tour-head .ov-tour-name { display: contents; }
  .ov-tour-head .ov-team { grid-area: team; justify-self: start; }
  .ov-tour-head .ov-tour-open { grid-area: open; margin: 0; }
  .ov-tour-head .ov-tour-sum { grid-area: sum; justify-self: end; }
  .ov-tour-head .ov-tour-nr { grid-area: nr; }
}

/* Start: bis die Anmeldung geprüft ist nur das Logo (kein kurzes Aufblitzen des Anmeldefensters) */
html.startet .screen.login > * { visibility: hidden; }
html.startet .screen.login { background: url(logo-g.svg) center / 72px auto no-repeat; }

/* Viewer: gelber Knopf „Im neuen Tab öffnen“ neben „Herunterladen“ */
.pill-gelb { background: #FBBC04; color: #202124; }
@media (hover: hover) { .pill-gelb:hover { background: #F9AB00; } }
@media (max-width: 700px) {
  #viewer-newtab span { display: none; }
  #viewer-newtab { width: 44px; padding: 0; }
}
/* Ohne Download-Knopf auf den Dokumentkarten: kein Platz mehr rechts freihalten */
.dv-doc-sub, .dv-doc-pages { padding-right: 0; }
@media (max-width: 700px) { .dv-doc-open { padding-right: 8px; } }

/* Startseite: gelber Knopf „Im neuen Tab öffnen“ links neben „Alle herunterladen“; Gelb hell und klar (kein Senfgelb) */
.pill-gelb { background: #FFE033; color: #202124; }
@media (hover: hover) { .pill-gelb:hover { background: #FFD60A; } }
.dv-neutab { margin-left: auto; height: 56px; padding: 0 24px 0 18px; font-size: 1.0625rem; }
.dv-neutab + .dv-all { margin-left: 10px; }
@media (max-width: 700px) {
  .dv-neutab span { display: none; }
  .dv-neutab { width: 48px; padding: 0; }
  .dv-neutab + .dv-all { margin-left: 8px; }
}
@media (max-width: 700px) {
  .dv-neutab, .dv-neutab + .dv-all { width: 44px; height: 44px; }
  .dv-neutab + .dv-all { margin-left: 6px; }
}
@media (max-width: 700px) {
  .dv-neutab + .dv-all { margin-left: 0; } /* Abstand kommt vom gap der Kopfzeile */
  .dv-section-head { column-gap: 10px; }
}
@media (max-width: 380px) {
  .dv-section-head h3 { font-size: 1.0625rem; }
  .dv-tmt { padding: 0 14px 0 12px; gap: 6px; font-size: 1rem; }
  .dv-section-head { column-gap: 8px; }
}
@media (max-width: 380px) {
  .dv-section-head h3 { font-size: 1rem; }
  .dv-section-head { column-gap: 6px; }
  .dv-tmt .icon { width: 20px; height: 20px; }
}

/* Neuer-Tab-Knopf: nur das Symbol, im selben Blau wie „Herunterladen“ (Pierres Wunsch) */
.dv-neutab { width: 56px; padding: 0; }
#viewer-newtab { width: 48px; padding: 0; }
@media (max-width: 700px) {
  .dv-neutab, #viewer-newtab { width: 44px; height: 44px; }
}

/* Meldung mit Knopf (z. B. „Jetzt speichern“ auf dem iPhone) */
.toast-knopf { margin-left: 10px; padding: 8px 16px; border: 0; border-radius: 999px; background: #8AB4F8; color: #1F1F1F; font: inherit; font-weight: 600; cursor: pointer; }
.toast-knopf:active { background: #AECBFA; }

/* Übersicht: Tag ist eingeplant, abgerechnet wird er erst später */
.ov-offen { color: #5F6368; font-size: .8125rem; white-space: nowrap; align-self: center; }
