/* Portal-Design: Schwarz/Rot aus dem Logo, Schrift Aileron, heller und dunkler Modus */
:root {
  --bg: #f3f3f4;
  --flaeche: #ffffff;
  --flaeche-2: #f8f8f9;
  --flaeche-hover: #f1f1f3;
  --rand: #e6e6e9;
  --rand-stark: #d2d2d7;
  --text: #16161a;
  --text-2: #62626c;
  --text-3: #9696a0;
  --akzent: #e53935;
  --akzent-hover: #c92c28;
  --akzent-weich: #fdedec;
  --akzent-text: #b42622;
  --gruen: #147a3d;
  --gruen-weich: #e6f4eb;
  --orange: #b4530b;
  --orange-weich: #fdf0e3;
  --blau: #1f4fc2;
  --blau-weich: #e9effd;
  --grau-weich: #eeeef1;
  --seite: #101012;
  --seite-2: #1b1b1f;
  --seite-text: #9f9fa8;
  --seite-text-hell: #f4f4f5;
  --hervor: #141416;
  --hervor-text: #ffffff;
  --radius: 14px;
  --radius-klein: 10px;
  --schatten: 0 1px 2px rgba(16, 16, 20, 0.04), 0 6px 20px -8px rgba(16, 16, 20, 0.08);
  --schatten-hoch: 0 20px 50px -12px rgba(16, 16, 20, 0.28);
  --fokus: 0 0 0 3px rgba(229, 57, 53, 0.22);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0c0c0e;
    --flaeche: #151518;
    --flaeche-2: #1b1b1f;
    --flaeche-hover: #212126;
    --rand: #26262c;
    --rand-stark: #36363e;
    --text: #f2f2f4;
    --text-2: #a3a3ad;
    --text-3: #6e6e78;
    --akzent: #f04e4a;
    --akzent-hover: #ff625e;
    --akzent-weich: rgba(240, 78, 74, 0.14);
    --akzent-text: #ff8481;
    --gruen: #4ade80;
    --gruen-weich: rgba(74, 222, 128, 0.12);
    --orange: #fdba74;
    --orange-weich: rgba(253, 186, 116, 0.12);
    --blau: #93b4ff;
    --blau-weich: rgba(147, 180, 255, 0.12);
    --grau-weich: #232328;
    --seite: #0a0a0b;
    --seite-2: #19191d;
    --hervor: #f2f2f4;
    --hervor-text: #0c0c0e;
    --schatten: 0 1px 2px rgba(0, 0, 0, 0.3);
    --schatten-hoch: 0 20px 50px -12px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0c0c0e;
  --flaeche: #151518;
  --flaeche-2: #1b1b1f;
  --flaeche-hover: #212126;
  --rand: #26262c;
  --rand-stark: #36363e;
  --text: #f2f2f4;
  --text-2: #a3a3ad;
  --text-3: #6e6e78;
  --akzent: #f04e4a;
  --akzent-hover: #ff625e;
  --akzent-weich: rgba(240, 78, 74, 0.14);
  --akzent-text: #ff8481;
  --gruen: #4ade80;
  --gruen-weich: rgba(74, 222, 128, 0.12);
  --orange: #fdba74;
  --orange-weich: rgba(253, 186, 116, 0.12);
  --blau: #93b4ff;
  --blau-weich: rgba(147, 180, 255, 0.12);
  --grau-weich: #232328;
  --seite: #0a0a0b;
  --seite-2: #19191d;
  --hervor: #f2f2f4;
  --hervor-text: #0c0c0e;
  --schatten: 0 1px 2px rgba(0, 0, 0, 0.3);
  --schatten-hoch: 0 20px 50px -12px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
}
body {
  font-family: Aileron, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--akzent-text);
}
svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
h1 {
  font-size: 26px;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.005em;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  text-wrap: balance;
}
h2 {
  font-size: 18px;
  margin: 0;
}
h3 {
  font-size: 15px;
  margin: 0 0 16px;
  letter-spacing: 0.005em;
}
h4 {
  font-size: 11px;
  margin: 22px 0 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
code {
  background: var(--grau-weich);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12px;
}
:focus-visible {
  outline: none;
  box-shadow: var(--fokus);
}

/* ---------- Seitenleiste ---------- */
.seitenleiste {
  background: var(--seite);
  color: var(--seite-text-hell);
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.marke {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 6px;
}
.marke small {
  display: block;
  color: var(--seite-text);
  font-size: 11px;
}
.marke-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #e53935;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.marke-logo {
  width: 100%;
  max-width: 172px;
  display: block;
  margin: 0 auto;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-klein);
  color: var(--seite-text);
  text-decoration: none;
  font-weight: 400;
  position: relative;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav a:hover {
  background: var(--seite-2);
  color: var(--seite-text-hell);
}
.nav a.aktiv {
  background: var(--seite-2);
  color: #fff;
  font-weight: 700;
}
.nav a.aktiv::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #e53935;
}
.nav a.aktiv svg {
  color: #e53935;
}
.neu-menu {
  position: relative;
}
.neu-menu summary {
  list-style: none;
  width: 100%;
  justify-content: center;
}
.neu-menu summary::-webkit-details-marker {
  display: none;
}
.neu-menu > div {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius-klein);
  box-shadow: var(--schatten-hoch);
  padding: 6px;
  z-index: 30;
  display: flex;
  flex-direction: column;
}
.neu-menu > div a,
.neu-menu > div button {
  display: block;
  text-align: left;
  border: 0;
  background: none;
  padding: 9px 12px;
  font: inherit;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  border-radius: 8px;
}
.neu-menu > div a:hover,
.neu-menu > div button:hover {
  background: var(--flaeche-hover);
}
.demo-box {
  margin-top: auto;
}
.demo-box + .thema-knopf {
  margin-top: 0;
}
.thema-knopf {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  background: none;
  border: 0;
  color: var(--seite-text);
  font: inherit;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: var(--radius-klein);
  cursor: pointer;
  text-align: left;
}
.thema-knopf:hover {
  background: var(--seite-2);
  color: var(--seite-text-hell);
}
.mobil-kopf {
  display: none;
}
main {
  padding: 32px 40px 72px;
  min-width: 0;
  max-width: 1560px;
  width: 100%;
}

/* ---------- Bausteine ---------- */
.seiten-kopf {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.seiten-kopf p {
  margin: 4px 0 0;
  color: var(--text-2);
}
.zurueck {
  font-size: 13px;
  text-decoration: none;
  color: var(--text-2);
  display: inline-flex;
  margin-bottom: 6px;
}
.zurueck:hover {
  color: var(--text);
}
.karte {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--schatten);
  margin-bottom: 18px;
  min-width: 0;
}
.karte-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.karte-kopf h3 {
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: var(--radius-klein);
  border: 1px solid var(--rand-stark);
  background: var(--flaeche);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.05s;
}
.btn:hover {
  background: var(--flaeche-hover);
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn-primaer {
  background: var(--akzent);
  border-color: var(--akzent);
  color: #fff;
}
.btn-primaer:hover {
  background: var(--akzent-hover);
  border-color: var(--akzent-hover);
}
.btn-gruen {
  background: var(--gruen-weich);
  border-color: transparent;
  color: var(--gruen);
}
.btn-gruen:hover {
  background: var(--gruen-weich);
  filter: brightness(0.96);
}
.btn.rot,
button.rot {
  color: var(--akzent-text);
}
.btn-klein {
  padding: 6px 11px;
  font-size: 12.5px;
}
.btn-icon {
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-3);
  padding: 5px 7px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
}
.btn-icon:hover {
  background: var(--flaeche-hover);
  color: var(--text);
}
.btn-gruppe {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.btn-gruppe.rechts {
  justify-content: flex-end;
  margin-top: 18px;
}
.mehr {
  position: relative;
}
.mehr summary {
  list-style: none;
}
.mehr summary::-webkit-details-marker {
  display: none;
}
.mehr > div {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius-klein);
  box-shadow: var(--schatten-hoch);
  z-index: 20;
  min-width: 230px;
  padding: 6px;
}
.mehr > div button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 9px 12px;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
}
.mehr > div button:hover {
  background: var(--flaeche-hover);
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 14px;
}
.label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 8px;
}
input,
select,
textarea {
  font: inherit;
  font-size: 14px;
  color: var(--text);
  padding: 10px 12px;
  border: 1px solid var(--rand);
  border-radius: var(--radius-klein);
  background: var(--flaeche-2);
  width: 100%;
  font-weight: 400;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--rand-stark);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--akzent);
  background: var(--flaeche);
  box-shadow: var(--fokus);
}
input::placeholder,
textarea::placeholder {
  color: var(--text-3);
}
input[type='color'] {
  padding: 3px;
  height: 42px;
}
textarea {
  resize: vertical;
}
label.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  color: var(--text);
  font-size: 13.5px;
}
label.checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--akzent);
}
.hilfe {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 400;
}
.hinweis-box {
  background: var(--orange-weich);
  color: var(--text);
  border-radius: var(--radius-klein);
  padding: 12px 14px;
  font-size: 13px;
}
.raster-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.raster-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 16px;
}
.raster-2.innen {
  gap: 0 12px;
}
.span-2 {
  grid-column: span 2;
}
.leer {
  color: var(--text-3);
  padding: 28px;
  text-align: center;
}
.rot {
  color: var(--akzent-text);
}
.gruen {
  color: var(--gruen);
}
.filter-leiste {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-leiste input,
.filter-leiste select {
  width: auto;
  min-width: 160px;
  background: var(--flaeche);
}
.filter-leiste input[type='search'] {
  flex: 1;
  min-width: 220px;
}
.seiten-kopf > select {
  width: auto;
  min-width: 120px;
  background: var(--flaeche);
}

/* ---------- Tabellen ---------- */
.tabelle {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.tabelle th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rand);
}
.tabelle td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--rand);
  vertical-align: middle;
}
.tabelle tbody tr:last-child td {
  border-bottom: 0;
}
.tabelle tfoot td {
  border-top: 1px solid var(--rand);
  border-bottom: 0;
  color: var(--text-2);
}
.tabelle tr.klickbar {
  cursor: pointer;
  transition: background 0.12s;
}
.tabelle tr.klickbar:hover td {
  background: var(--flaeche-hover);
}
.tabelle small {
  color: var(--text-3);
}
.c-num {
  text-align: right !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.karte > .tabelle {
  margin: -10px 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px 3px 8px;
  border-radius: 20px;
  background: var(--grau-weich);
  color: var(--text-2);
  vertical-align: middle;
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-offen {
  background: var(--blau-weich);
  color: var(--blau);
}
.badge-bezahlt,
.badge-angenommen {
  background: var(--gruen-weich);
  color: var(--gruen);
}
.badge-storniert,
.badge-abgelehnt {
  background: var(--grau-weich);
  color: var(--text-3);
}
.badge-rot {
  background: var(--akzent-weich);
  color: var(--akzent-text);
}
.punkt {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
}

/* ---------- Übersicht ---------- */
.begruessung {
  margin-bottom: 26px;
}
.begruessung p {
  margin: 6px 0 0;
  color: var(--text-2);
}
.kpi-reihe {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--schatten);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kpi span {
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 700;
}
.kpi b {
  display: block;
  font-size: 27px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.kpi small {
  font-size: 12px;
  color: var(--text-3);
}
.kpi-hervor {
  background: var(--hervor);
  border-color: var(--hervor);
  color: var(--hervor-text);
}
.kpi-hervor span,
.kpi-hervor small {
  color: var(--hervor-text);
  opacity: 0.7;
}
.trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  width: fit-content;
}
.trend-gut {
  background: var(--gruen-weich);
  color: var(--gruen);
}
.trend-schlecht {
  background: var(--akzent-weich);
  color: var(--akzent-text);
}
.raster-dash {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}
.chart-box {
  position: relative;
  height: 300px;
}
.chart-box.klein {
  height: 190px;
}
.anteile {
  margin-top: 14px;
  font-variant-numeric: tabular-nums;
}
.anteile > div {
  display: grid;
  grid-template-columns: 12px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--rand);
  font-size: 13px;
}
.anteile > div:last-child {
  border-bottom: 0;
}
.anteile > div:not(:has(i)) {
  grid-template-columns: 1fr auto auto;
}
.anteile i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.anteile small {
  color: var(--text-3);
  min-width: 90px;
  text-align: right;
}
.termin-liste {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}
.termin-liste li {
  padding: 10px 0;
  border-bottom: 1px solid var(--rand);
}
.termin-liste small {
  color: var(--text-3);
}
.grenze {
  margin-bottom: 16px;
}
.grenze-kopf {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.grenze small {
  color: var(--text-3);
  font-size: 12px;
}
.balken {
  height: 8px;
  background: var(--grau-weich);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 4px;
}
.balken > div {
  height: 100%;
  border-radius: 10px;
}
.balken-gruen {
  background: var(--gruen);
}
.balken-orange {
  background: var(--orange);
}
.balken-rot {
  background: var(--akzent);
}
.summen-box {
  font-variant-numeric: tabular-nums;
}
.summen-box > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rand);
}
.summen-box > div:last-child {
  border-bottom: 0;
}
.summen-box .summe {
  border-top: 2px solid var(--text);
  font-size: 15px;
}
.raster-buch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 18px;
  align-items: start;
}
.schnellstart {
  background: linear-gradient(135deg, var(--akzent-weich), var(--flaeche) 70%);
}
.schnellstart ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 8px 28px;
}
.schnellstart li a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}
.schnellstart li a:hover {
  color: var(--akzent-text);
}
.schnellstart li.erledigt a {
  color: var(--text-3);
  font-weight: 400;
}
.schnellstart li.erledigt::marker {
  color: var(--gruen);
}

/* ---------- Editor ---------- */
.editor-layout {
  display: grid;
  grid-template-columns: minmax(440px, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.editor-vorschau {
  position: sticky;
  top: 20px;
}
.vorschau-rahmen {
  background: var(--grau-weich);
  border-radius: var(--radius);
  padding: 16px;
  overflow: hidden;
}
.vorschau-rahmen .doc-page {
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.25);
}
.vorschau-rahmen.klein {
  max-width: 560px;
  margin-top: 12px;
}
.vorschau-skaliert {
  width: 210mm;
  transform-origin: top left;
}
.summen-box {
  margin-top: 12px;
}
.pos-tabelle {
  width: 100%;
  border-collapse: collapse;
}
.pos-tabelle th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  text-align: left;
  padding: 4px;
}
.pos-tabelle td {
  padding: 4px;
  vertical-align: top;
}
.pos-tabelle td:nth-child(2) {
  width: 100%;
}
.pos-tabelle textarea {
  min-height: 42px;
  overflow: hidden;
  min-width: 200px;
}
.pos-tabelle input.schmal {
  width: 84px;
}
.pos-tabelle select {
  width: 78px;
  padding-left: 8px;
  padding-right: 2px;
}
.pos-tabelle .pos-summe {
  padding-top: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pos-griff {
  display: flex;
  flex-direction: column;
}
.pos-griff .btn-icon {
  font-size: 9px;
  padding: 2px 5px;
}
.extra-feld {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.extra-feld.artikel {
  grid-template-columns: 2fr 1fr 1fr auto;
}
.verlauf {
  padding-left: 18px;
  margin: 0;
  font-size: 13px;
}
.verlauf li {
  padding: 3px 0;
}
.verlauf span {
  color: var(--text-3);
}

/* ---------- Einstellungen ---------- */
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  background: var(--grau-weich);
  padding: 4px;
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
}
.tabs a {
  padding: 8px 14px;
  text-decoration: none;
  color: var(--text-2);
  font-weight: 700;
  font-size: 13px;
  border-radius: 9px;
}
.tabs a:hover {
  color: var(--text);
}
.tabs a.aktiv {
  color: var(--text);
  background: var(--flaeche);
  box-shadow: var(--schatten);
}
.radio-karte {
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--rand);
  border-radius: var(--radius-klein);
  padding: 16px;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
  font-size: 13.5px;
}
.radio-karte input {
  width: auto;
  margin-top: 3px;
  accent-color: var(--akzent);
}
.radio-karte:has(input:checked) {
  border-color: var(--akzent);
  background: var(--akzent-weich);
}
.logo-feld {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.logo-feld img {
  max-height: 76px;
  max-width: 220px;
  border: 1px solid var(--rand);
  border-radius: 10px;
  padding: 6px;
  background: #fff;
}
.logo-feld img.logo-dunkel {
  background: #2b2b2b;
}
.logo-feld input {
  width: auto;
}

/* ---------- Kalender ---------- */
.kal-titel {
  min-width: 190px;
}
.kal-raster {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--rand);
  border: 1px solid var(--rand);
  border-radius: var(--radius-klein);
  overflow: hidden;
}
.kal-wt {
  padding: 10px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: center;
  background: var(--flaeche-2);
}
.kal-tag {
  min-height: 116px;
  padding: 8px;
  background: var(--flaeche);
  cursor: pointer;
  overflow: hidden;
  transition: background 0.12s;
}
.kal-tag:hover {
  background: var(--flaeche-hover);
}
.kal-tag.fremd {
  background: var(--flaeche-2);
  color: var(--text-3);
}
.kal-tag.heute .kal-nr {
  background: var(--akzent);
  color: #fff;
}
.kal-nr {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}
.kal-termin {
  font-size: 12px;
  padding: 4px 7px;
  border-radius: 6px;
  margin-bottom: 3px;
  background: color-mix(in srgb, var(--f) 16%, var(--flaeche));
  border-left: 3px solid var(--f);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.mitarbeiter-legende {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-2);
}
.mitarbeiter-legende i,
.chip i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
}
.mitarbeiter-wahl {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.chip {
  flex-direction: row;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--rand);
  border-radius: 20px;
  padding: 7px 13px;
  margin: 0;
  cursor: pointer;
  color: var(--text);
  font-weight: 400;
}
.chip input {
  width: auto;
  margin: 0 4px 0 0;
  accent-color: var(--akzent);
}
.chip:has(input:checked) {
  border-color: var(--akzent);
  background: var(--akzent-weich);
}

/* ---------- Dialoge & Meldungen ---------- */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 10, 0.5);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 16px;
  animation: einblenden 0.15s ease-out;
}
.modal {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: 18px;
  width: min(620px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  box-shadow: var(--schatten-hoch);
  animation: hochgleiten 0.18s ease-out;
}
.modal-breit {
  width: min(900px, 100%);
}
.modal-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--rand);
  position: sticky;
  top: 0;
  background: var(--flaeche);
  z-index: 1;
}
.modal-kopf h3 {
  margin: 0;
}
.modal-inhalt {
  padding: 22px;
}
.frage {
  font-size: 15px;
  margin: 0;
}
#toasts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
}
.toast {
  background: var(--hervor);
  color: var(--hervor-text);
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: var(--schatten-hoch);
  max-width: 380px;
  font-size: 13.5px;
  animation: hochgleiten 0.18s ease-out;
}
.toast-fehler {
  background: var(--akzent);
  color: #fff;
}
@keyframes einblenden {
  from {
    opacity: 0;
  }
}
@keyframes hochgleiten {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Druck / PDF ---------- */
#druckbereich,
.pdf-holder {
  position: fixed;
  left: -10000px;
  top: 0;
}
@media print {
  @page {
    size: A4;
    margin: 0;
  }
  body.druckt {
    display: block;
    background: #fff;
  }
  body.druckt > *:not(#druckbereich) {
    display: none !important;
  }
  body.druckt #druckbereich {
    position: static;
  }
}

/* ---------- Mobil ---------- */
@media (max-width: 1200px) {
  .editor-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .editor-vorschau {
    position: static;
  }
  .raster-buch {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 860px) {
  body {
    grid-template-columns: 1fr;
  }
  .seitenleiste {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 50;
    width: 264px;
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  body.menu-offen .seitenleiste {
    transform: none;
    box-shadow: var(--schatten-hoch);
  }
  .mobil-kopf {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    background: var(--seite);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 40;
  }
  .mobil-kopf .btn-icon {
    color: #fff;
  }
  .mobil-kopf svg {
    width: 22px;
    height: 22px;
  }
  main {
    padding: 20px 16px 64px;
  }
  h1 {
    font-size: 22px;
  }
  .raster-dash,
  .raster-2,
  .raster-3 {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: auto;
  }
  .pos-tabelle thead {
    display: none;
  }
  .pos-tabelle tr {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
    border-bottom: 1px solid var(--rand);
    padding: 8px 0;
  }
  .pos-tabelle td:nth-child(2) {
    grid-column: 1 / -1;
    order: -1;
  }
  .pos-griff {
    flex-direction: row;
  }
  .kal-tag {
    min-height: 72px;
    padding: 4px;
  }
  .kal-termin {
    font-size: 10px;
    padding: 2px 4px;
  }
  .tabelle {
    font-size: 13px;
  }
  .karte {
    padding: 16px;
    overflow-x: auto;
  }
  .tabs {
    width: 100%;
  }
}

/* ---------- Neue Bausteine ---------- */
.sprungmarke {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--akzent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 300;
}
.sprungmarke:focus {
  left: 8px;
}
main:focus {
  outline: none;
}
body.rolle-mitarbeiter .nur-chef {
  display: none !important;
}
.btn-gefahr {
  background: var(--akzent);
  border-color: var(--akzent);
  color: #fff;
}
.link-knopf {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--akzent-text);
  cursor: pointer;
  text-decoration: underline;
}
fieldset {
  min-width: 0;
}
fieldset.karte {
  margin-inline: 0;
}
fieldset.ohne-rahmen {
  border: 0;
  padding: 0;
  margin: 0;
}
fieldset[disabled] input,
fieldset[disabled] select,
fieldset[disabled] textarea {
  opacity: 0.75;
  cursor: not-allowed;
}
.feld-anzeige {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 14px;
}
.feld-knopf {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.nur-breit {
}
.kpi-link {
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.kpi-link:hover {
  border-color: var(--rand-stark);
  transform: translateY(-1px);
}
kbd {
  font-family: inherit;
  font-size: 11px;
  border: 1px solid var(--rand-stark);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
  background: var(--flaeche-2);
  color: var(--text-2);
}

/* Seitenleiste unten, Suche */
.seitenleiste-fuss {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.seitenleiste-fuss .thema-knopf {
  margin-top: 0;
}
.benutzer-zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  color: var(--seite-text);
  font-size: 13px;
}
.benutzer-zeile .btn-icon {
  color: var(--seite-text);
}
.benutzer-zeile .btn-icon:hover {
  background: var(--seite-2);
  color: #fff;
}
.suche-knopf {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: var(--seite-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--seite-text);
  border-radius: var(--radius-klein);
  padding: 9px 12px;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}
.suche-knopf span {
  flex: 1;
  text-align: left;
}
.suche-knopf kbd {
  background: transparent;
  color: var(--seite-text);
  border-color: rgba(255, 255, 255, 0.15);
}
.suche-knopf:hover {
  color: #fff;
}
.demo-box {
  margin-top: auto;
  padding: 14px;
  border-radius: 12px;
  background: var(--seite-2);
  font-size: 12px;
  color: var(--seite-text);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.demo-box + .seitenleiste-fuss {
  margin-top: 0;
}
.demo-box b {
  color: var(--seite-text-hell);
  font-size: 13px;
}
.demo-box .btn {
  background: transparent;
  color: var(--seite-text-hell);
  border-color: rgba(255, 255, 255, 0.16);
  white-space: normal;
  text-align: center;
}
.demo-box .btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Meldungen mit Aktion */
.toast {
  display: flex;
  align-items: center;
  gap: 14px;
}
.toast-aktion {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

/* Hilfetipps */
.tipp {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--blau-weich);
  color: var(--text);
  border-radius: var(--radius-klein);
  padding: 11px 12px 11px 14px;
  margin-bottom: 16px;
  font-size: 13.5px;
}
.tipp > span:nth-child(2) {
  flex: 1;
}

/* Editor */
.speicherstatus {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 4px;
  min-height: 18px;
}
.gesperrt-box {
  margin-bottom: 18px;
}
.strecke {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: -4px 0 14px;
}
.dublette {
  margin: -4px 0 12px;
}
.baustein-menue > div {
  max-width: 360px;
  max-height: 320px;
  overflow: auto;
}
.baustein-menue > div button {
  white-space: normal;
}

/* Adressvorschläge */
.mit-vorschlaege {
  position: relative;
}
.vorschlaege {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius-klein);
  box-shadow: var(--schatten-hoch);
  z-index: 40;
  overflow: hidden;
}
.vorschlaege div {
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 400;
  color: var(--text);
  font-size: 13.5px;
}
.vorschlaege div:hover,
.vorschlaege div.aktiv {
  background: var(--flaeche-hover);
}

/* Listen: Mehrfachauswahl */
.c-check {
  width: 36px;
}
.c-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--akzent);
}
.auswahl-leiste {
  position: sticky;
  bottom: 16px;
  z-index: 30;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--hervor);
  color: var(--hervor-text);
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: var(--schatten-hoch);
  margin-top: 12px;
}
.auswahl-leiste .btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: transparent;
  color: var(--hervor-text);
}
.auswahl-leiste .btn-gruen {
  background: var(--gruen);
  color: #fff;
}
.auswahl-leiste .btn-icon {
  color: var(--hervor-text);
  margin-left: auto;
}

/* Segment-Umschalter */
.segment {
  display: inline-flex;
  background: var(--grau-weich);
  padding: 3px;
  border-radius: 10px;
}
.segment button {
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.segment button.aktiv {
  background: var(--flaeche);
  color: var(--text);
  box-shadow: var(--schatten);
}

/* Kalender: Woche/Tag, Drag & Drop */
.kal-woche {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.kal-tagesansicht {
  grid-template-columns: repeat(var(--spalten), minmax(200px, 1fr));
  overflow-x: auto;
}
.kal-spalte {
  background: var(--flaeche-2);
  border-radius: var(--radius-klein);
  padding: 8px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.12s;
}
.kal-spalte.heute {
  box-shadow: inset 0 0 0 2px var(--akzent);
}
.kal-spalte-kopf {
  display: flex;
  gap: 6px;
  align-items: baseline;
  padding: 4px 4px 6px;
  cursor: pointer;
  flex-wrap: wrap;
}
.kal-spalte-kopf span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  font-weight: 700;
}
.kal-spalte-kopf small {
  color: var(--text-3);
  margin-left: auto;
}
.kal-karte {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-left: 4px solid var(--f);
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  font-size: 13px;
}
.kal-karte small {
  color: var(--text-3);
  font-size: 11.5px;
}
.kal-karte-zeit {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-2);
}
.kal-leer {
  color: var(--text-3);
  font-size: 12px;
  text-align: center;
  padding: 16px 0;
}
.kal-termin.erledigt,
.kal-karte.erledigt {
  opacity: 0.6;
}
.kal-termin.abgesagt,
.kal-karte.abgesagt {
  opacity: 0.45;
  text-decoration: line-through;
}
.zieht {
  opacity: 0.4;
}
.drop-ziel {
  background: var(--akzent-weich) !important;
  box-shadow: inset 0 0 0 2px var(--akzent);
}
.kal-nav {
  flex-wrap: nowrap;
}
.einsatz-details p {
  margin: 0 0 10px;
}

/* Auftrags-Board */
.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(148px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: start;
}
.board-spalte {
  background: var(--flaeche-2);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 10px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}
.board-spalte header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 10px;
  flex-wrap: wrap;
}
.board-spalte header small {
  width: 100%;
  color: var(--text-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.board-zahl {
  background: var(--grau-weich);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 20px;
}
.board-karten {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  border-radius: 10px;
  min-height: 60px;
  transition: background 0.12s;
}
.board-karte {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: 12px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: grab;
  box-shadow: var(--schatten);
  font-size: 13.5px;
}
.board-karte:hover {
  border-color: var(--rand-stark);
}
.board-karte small {
  color: var(--text-3);
}
.board-fuss {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.board-leer {
  color: var(--text-3);
  text-align: center;
  font-size: 12px;
  padding: 12px 0;
}
.board-spalte[data-status='bezahlt'] .board-karte {
  opacity: 0.75;
}

/* Übersicht: Aufgaben */
.todo-liste {
  list-style: none;
  padding: 0;
  margin: 0;
}
.todo-liste li {
  padding: 9px 0 9px 16px;
  border-bottom: 1px solid var(--rand);
  position: relative;
  font-size: 13.5px;
}
.todo-liste li:last-child {
  border-bottom: 0;
}
.todo-liste li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
}
.todo-liste li.todo-ueberfaellig::before,
.todo-liste li.todo-aufgabe::before {
  background: var(--akzent);
}
.todo-liste li.todo-morgen::before,
.todo-liste li.todo-team::before {
  background: var(--orange);
}
.todo-liste li.todo-nachfassen::before,
.todo-liste li.todo-rechnung::before {
  background: var(--blau);
}
.todo-liste a {
  color: var(--text);
  text-decoration: none;
}
.todo-liste a:hover {
  color: var(--akzent-text);
}
.aufgabe-form {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  margin-bottom: 14px;
}
.aufgaben-liste {
  list-style: none;
  padding: 0;
  margin: 0;
}
.aufgaben-liste li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--rand);
}
.aufgaben-liste li label {
  margin: 0;
}
.aufgaben-liste li.erledigt span {
  text-decoration: line-through;
  color: var(--text-3);
}
.aufgaben-liste li.ueberfaellig small {
  color: var(--akzent-text);
  font-weight: 700;
}
.aufgaben-liste small {
  color: var(--text-3);
}

/* Kunde: Zeitleiste und Fotos */
.raster-kunde {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.notiz-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 16px;
}
.zeitleiste {
  list-style: none;
  margin: 0;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--rand);
}
.zeitleiste li {
  position: relative;
  padding: 0 28px 16px 14px;
}
.zeitleiste li::before {
  content: '';
  position: absolute;
  left: -23px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--flaeche);
  border: 2px solid var(--text-3);
}
.zeitleiste li.zl-notiz::before {
  border-color: var(--blau);
  background: var(--blau);
}
.zeitleiste li.zl-bezahlt::before {
  border-color: var(--gruen);
  background: var(--gruen);
}
.zeitleiste li.zl-storniert::before,
.zeitleiste li.zl-gelöscht::before {
  border-color: var(--akzent);
}
.zeitleiste li.zl-termin::before {
  border-color: var(--orange);
}
.zeitleiste li .btn-icon {
  position: absolute;
  right: 0;
  top: -2px;
}
.zl-zeit {
  font-size: 11.5px;
  color: var(--text-3);
}
.zl-text {
  font-size: 13.5px;
  white-space: pre-wrap;
}
.foto-raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.foto-raster figure {
  margin: 0;
}
.foto-raster img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  cursor: zoom-in;
  display: block;
}
.foto-vorschau.datei-kachel {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  background: var(--flaeche-hover);
  border: 1px solid var(--rand-stark);
  cursor: pointer;
}
.datei-kachel span {
  font-size: 34px;
  line-height: 1;
}
.datei-kachel small {
  font-size: 11px;
  color: var(--text-2, inherit);
  word-break: break-word;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.foto-raster figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-3);
}
.foto-gross {
  width: 100%;
  border-radius: 10px;
}

/* Einstellungen: Vorlagen */
.vorlage-zeile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rand);
}
.vorlage-zeile small {
  display: block;
  color: var(--text-3);
}

/* Suche */
.suche-modal {
  width: min(640px, 100%);
  align-self: start;
  margin-top: 10vh;
}
.suche-feld {
  font-size: 16px;
  padding: 13px 14px;
}
.suche-treffer {
  list-style: none;
  padding: 0;
  margin: 12px 0 8px;
  max-height: 50vh;
  overflow: auto;
}
.suche-treffer li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.suche-treffer li small {
  color: var(--text-3);
  white-space: nowrap;
}
.suche-treffer li.aktiv,
.suche-treffer li:hover {
  background: var(--flaeche-hover);
}
.kuerzel td:first-child {
  white-space: nowrap;
  width: 1%;
}

/* Anmeldung */
body.login-modus > :not(.login-wand):not(#toasts) {
  display: none !important;
}
body.login-modus {
  display: block;
}
.login-wand {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: radial-gradient(circle at 20% 10%, var(--akzent-weich), transparent 40%), var(--bg);
}
.login-karte {
  width: min(400px, 100%);
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: var(--schatten-hoch);
  display: flex;
  flex-direction: column;
}
.login-logo {
  width: 150px;
  margin: 0 auto 12px;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
}
.login-karte h1 {
  justify-content: center;
  margin-bottom: 4px;
}
.login-karte > .hilfe {
  text-align: center;
  margin: 0 0 20px;
}
.login-karte .btn {
  margin-top: 6px;
  padding: 12px;
}

/* Handy: Leiste unten */
.mobil-leiste {
  display: none;
}
@media (max-width: 860px) {
  .nur-breit {
    display: none;
  }
  .mobil-kopf {
    justify-content: space-between;
  }
  .mobil-leiste {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    background: var(--flaeche);
    border-top: 1px solid var(--rand);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  body.rolle-mitarbeiter .mobil-leiste {
    grid-template-columns: repeat(2, 1fr);
  }
  .mobil-leiste a,
  .mobil-leiste button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font: inherit;
    font-size: 10.5px;
    color: var(--text-2);
    text-decoration: none;
    background: none;
    border: 0;
    padding: 4px 0;
    cursor: pointer;
  }
  .mobil-leiste svg {
    width: 22px;
    height: 22px;
  }
  .mobil-leiste .aktiv {
    color: var(--akzent-text);
  }
  .mobil-leiste .mobil-neu {
    background: var(--akzent);
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    margin: -14px auto 0;
    justify-content: center;
    box-shadow: var(--schatten-hoch);
  }
  main {
    padding-bottom: 96px;
  }
  #toasts {
    bottom: 84px;
    left: 16px;
    right: 16px;
  }
  .auswahl-leiste {
    bottom: 76px;
  }
  .kal-woche {
    grid-template-columns: 1fr;
  }
  .kal-tagesansicht {
    grid-template-columns: 1fr;
  }
  .raster-kunde {
    grid-template-columns: 1fr;
  }
  .aufgabe-form {
    grid-template-columns: 1fr 1fr;
  }
  .aufgabe-form input:first-child {
    grid-column: 1 / -1;
  }
  .board {
    grid-auto-columns: 82%;
    scroll-snap-type: x mandatory;
  }
  .board-spalte {
    scroll-snap-align: start;
  }
  .editor-kopf .btn-gruppe {
    width: 100%;
  }
}
.foto-raster > p {
  grid-column: 1 / -1;
}
.btn-gruppe > input,
.btn-gruppe > select {
  width: auto;
}
.aufgabe-form input[type='date'],
.aufgabe-form select {
  width: auto;
}
.todo-liste li.leer {
  padding-left: 0;
}
.todo-liste li.leer::before {
  display: none;
}

/* Fotos an Aufträgen, Terminen und Kunden */
.foto-kopf {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.foto-kopf .foto-beschreibung {
  flex: 1;
  min-width: 200px;
  width: auto;
}
.foto-knopf {
  cursor: pointer;
}
.foto-status:empty {
  display: none;
}
.foto-status {
  margin-bottom: 8px;
}
.foto-vorschau {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 10px;
}
.foto-raster figcaption {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 4px;
}
.foto-raster figcaption b {
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
}
.foto-gross-rahmen {
  position: relative;
  background: #0c0c0e;
  border-radius: 12px;
  display: grid;
  place-items: center;
  min-height: 240px;
}
.foto-gross-rahmen .foto-gross {
  max-height: 70vh;
  width: auto;
  max-width: 100%;
  border-radius: 12px;
  object-fit: contain;
}
.foto-pfeil {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.85);
  color: #111;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.foto-pfeil.links {
  left: 10px;
}
.foto-pfeil.rechts {
  right: 10px;
}
.foto-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.foto-meta {
  color: var(--text-3);
}
.foto-zahl {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-2);
  white-space: nowrap;
}

.datei-vormerk {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.datei-vormerk li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--rand);
  border-radius: 8px;
  font-size: 13px;
  word-break: break-word;
}
.datei-vormerk li.hilfe {
  border-style: dashed;
}

/* Website-Statistik */
.balken {
  height: 8px;
  border-radius: 99px;
  background: var(--flaeche-2);
  overflow: hidden;
  min-width: 80px;
}
.balken i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--akzent);
}
.link-bauer {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 2fr) auto;
  gap: 8px;
  align-items: center;
}
@media (max-width: 760px) {
  .link-bauer {
    grid-template-columns: minmax(0, 1fr);
  }
  .nur-breit {
    display: none;
  }
}
.kpi-hervor a {
  color: inherit;
}

/* ---------- Anfragen (Posteingang) ---------- */
.nav-zahl {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 20px;
  background: #e53935;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  line-height: 18px;
  animation: nav-zahl-rein 0.4s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.nav-zahl[hidden] {
  display: none;
}
@keyframes nav-zahl-rein {
  from {
    transform: scale(0.3);
  }
}
.mobil-leiste a {
  position: relative;
}
.mobil-leiste .nav-zahl {
  position: absolute;
  top: 2px;
  left: calc(50% + 4px);
  margin: 0;
  min-width: 17px;
  font-size: 10.5px;
  line-height: 15px;
  padding: 0 4px;
}
.anfragen-zahlen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.anfragen-zahl {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--schatten);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.anfragen-zahl b {
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}
.anfragen-zahl span {
  color: var(--text-2);
  font-size: 13px;
}
.anfragen-zahl.rot b {
  color: var(--akzent);
}
.anfragen-zahl.gruen b {
  color: var(--gruen);
}
.tabs a small {
  color: var(--text-3);
  font-weight: 700;
  margin-left: 2px;
}
.anfragen-liste {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.anfrage-karte {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--schatten);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  animation: anfrage-rein 0.35s ease both;
  transition:
    border-color 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
}
.anfrage-karte:hover {
  border-color: var(--rand-stark);
  transform: translateY(-1px);
  box-shadow: var(--schatten-hoch);
}
.anfrage-karte:focus-visible {
  outline: none;
  box-shadow: var(--fokus);
}
.anfrage-karte.neu {
  border-left: 4px solid var(--akzent);
  background: linear-gradient(90deg, var(--akzent-weich), var(--flaeche) 45%);
}
.anfrage-karte.status-abgesagt {
  opacity: 0.65;
}
@keyframes anfrage-rein {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.anfrage-kopf {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.anfrage-name {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.neu-punkt {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--akzent);
  box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.5);
  animation: neu-puls 1.8s infinite;
}
@keyframes neu-puls {
  70% {
    box-shadow: 0 0 0 8px rgba(229, 57, 53, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(229, 57, 53, 0);
  }
}
.anfrage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
  color: var(--text-2);
  font-size: 13px;
}
.badge-leistung {
  background: var(--akzent-weich);
  color: var(--akzent-text);
}
.badge-leistung::before {
  display: none;
}
.anfrage-zeit {
  color: var(--text-3);
  white-space: nowrap;
  font-weight: 700;
}
.anfrage-infos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--text-2);
  font-size: 13.5px;
}
.anfrage-infos .pfeil,
.anfrage-infos b {
  color: var(--text);
}
.anfrage-aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.anfrage-aktionen .abstand {
  flex: 1;
}
.anfrage-aktionen a.btn {
  text-decoration: none;
}
.btn-wa {
  color: #128c4b;
}
.btn-leise {
  background: none;
  border-color: transparent;
  color: var(--text-3);
}
.btn-leise:hover {
  color: var(--akzent);
}
.leer-karte {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-2);
}
.leer-symbol {
  font-size: 40px;
  margin-bottom: 8px;
}
.anfrage-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.anfrage-daten {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
}
.anfrage-daten dt {
  color: var(--text-2);
}
.anfrage-daten dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.anfrage-notiz {
  white-space: pre-wrap;
  font-family: inherit;
  background: var(--flaeche-2);
  border: 1px solid var(--rand);
  border-radius: var(--radius-klein);
  padding: 12px 14px;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
}
.hilfe-liste {
  margin: 0 0 6px;
  padding-left: 20px;
  line-height: 1.8;
}
@media (max-width: 640px) {
  .anfrage-aktionen .abstand {
    flex-basis: 100%;
    height: 0;
  }
  .anfragen-zahlen {
    grid-template-columns: 1fr 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .anfrage-karte,
  .neu-punkt,
  .nav-zahl {
    animation: none;
  }
}
