/* HMP Fleet Manager – Oberfläche im Stil von hansemobilepower.de
   Schrift: Mona Sans (SIL Open Font License), Farben aus dem Webflow-Theme der Website. */

@font-face { font-family: "Mona Sans"; src: url("../fonts/MonaSans-Light.c917d327ecf6.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Mona Sans"; src: url("../fonts/MonaSans-Regular.1515527a58e8.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Mona Sans"; src: url("../fonts/MonaSans-Medium.51119aeb7b11.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Mona Sans"; src: url("../fonts/MonaSans-Bold.97da83aefb8a.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --ink: #151314;
  --ink-2: #2b2528;
  --text: #4d464a;
  --muted: #766c72;
  --subtle: #9f979c;
  --line: #dbd3d3;
  --line-soft: #ebe6e6;
  --bg: #f5f6f8;
  --bg-soft: #f9f6f6;
  --white: #fff;
  --on-dark: #c9c1c5;

  --green: #11845b;  --green-bg: #def2e6;
  --orange: #d5691b; --orange-bg: #fff3e4;
  --red: #dc2b2b;    --red-bg: #ffeff0;
  --blue: #086cd9;   --blue-bg: #eaf4ff;

  --shadow-1: 0 2px 7px 0 rgba(0, 0, 0, .06);
  --shadow-2: 0 10px 30px rgba(20, 20, 43, .12);
  --pill: 48px;
  --sidebar-w: 264px;
  --topbar-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Mona Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* --- Grundlagen ----------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 500; line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.625rem, 1.25rem + 1.3vw, 2.375rem); letter-spacing: -.01em; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }
a { color: var(--ink); text-underline-offset: 3px; transition: color .2s; }
a:hover { color: var(--text); }
img { max-width: 100%; height: auto; }
strong { color: var(--ink); font-weight: 500; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.icon { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow {
  margin: 0 0 .5rem;
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--light { color: var(--subtle); }
.skip-link { position: absolute; left: -9999px; top: 12px; z-index: 100; padding: 10px 18px; background: var(--white); color: var(--ink); }
.skip-link:focus { left: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- App-Gerüst ----------------------------------------------------------- */

.app { min-height: 100vh; min-height: 100dvh; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; min-height: 100dvh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: min(86vw, var(--sidebar-w));
  background: var(--ink);
  color: var(--on-dark);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(-100%);
  transition: transform .28s var(--ease);
  padding-bottom: env(safe-area-inset-bottom);
}
.sidebar.is-open { transform: none; box-shadow: var(--shadow-2); }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(21, 19, 20, .55); }
.sidebar-backdrop[hidden] { display: none; }

.sidebar__brand {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: calc(24px + env(safe-area-inset-top)) 24px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.sidebar__logo { display: inline-block; width: 124px; transition: transform .3s var(--ease); }
.sidebar__logo:hover { transform: scale(1.04); }
.sidebar__logo img { display: block; width: 100%; height: auto; }
.sidebar__app { font-size: .75rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); }
.sidebar__close { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 10px; color: var(--white); }
.sidebar__foot { padding: 20px 24px 24px; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.nav { flex: 1; padding: 12px 12px 8px; }
.nav__title { padding: 18px 12px 6px; font-size: .6875rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.nav__list { list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 9px 14px;
  border-radius: var(--pill);
  color: var(--on-dark);
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
.nav__link .icon { width: 19px; height: 19px; opacity: .85; }
.nav__link:hover { background: rgba(255, 255, 255, .07); color: var(--white); }
.nav__link.is-active { background: var(--white); color: var(--ink); }
.nav__link.is-active .icon { opacity: 1; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: var(--topbar-h);
  padding: env(safe-area-inset-top) 12px 0;
  background: var(--ink);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.topbar__brand { display: block; width: 78px; margin-left: 4px; }
.topbar__brand img { display: block; width: 100%; height: auto; }
.topbar__spacer { flex: 1; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background-color .2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .1); color: inherit; }

.usermenu { position: relative; }
.usermenu summary { list-style: none; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu__trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px;
  border-radius: var(--pill);
  cursor: pointer;
  transition: background-color .2s;
}
.usermenu__trigger:hover { background: rgba(255, 255, 255, .1); }
.usermenu__name, .usermenu__chevron { display: none; }
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.usermenu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 60;
  min-width: 240px;
  padding: 8px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}
.usermenu__head { display: flex; flex-direction: column; padding: 10px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); line-height: 1.35; }
.usermenu__head span { font-size: .8125rem; color: var(--muted); }
.usermenu__panel a, .usermenu__panel button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: .9375rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.usermenu__panel a:hover, .usermenu__panel button:hover { background: var(--bg); }
.usermenu__panel form { margin: 0; }

.content { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 24px 16px 40px; }
.content-foot { padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); text-align: center; font-size: .8125rem; color: var(--subtle); }

@media (min-width: 768px) {
  .content { padding: 32px 32px 48px; }
}

@media (min-width: 1024px) {
  .app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; height: 100vh; width: auto; transform: none; transition: none; z-index: auto; }
  .sidebar__close, .sidebar-backdrop, .topbar__menu, .topbar__brand { display: none !important; }
  .topbar { padding: 0 32px; background: var(--white); color: var(--ink); border-bottom-color: var(--line); gap: 8px; }
  .icon-btn:hover, .usermenu__trigger:hover { background: var(--bg); }
  .avatar { background: var(--ink); color: var(--white); }
  .usermenu__trigger { padding: 4px 12px 4px 4px; }
  .usermenu__name { display: flex; flex-direction: column; font-size: .9375rem; font-weight: 500; line-height: 1.25; }
  .usermenu__name small { font-size: .75rem; font-weight: 400; color: var(--muted); }
  .usermenu__chevron { display: inline-block; width: 16px; height: 16px; color: var(--muted); }
  .content { padding: 40px 48px 56px; }
}

/* --- Seitenkopf ----------------------------------------------------------- */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 28px;
}
.page-head h1 { margin: 0; }
.page-head__sub { margin: .4rem 0 0; color: var(--muted); }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 24px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font: 500 .9375rem/1.1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform .3s var(--ease), background-color .3s, border-color .3s, color .3s;
}
.btn:hover { transform: translate3d(0, -2px, 0); }
.btn:active { transform: none; }
.btn .icon { width: 18px; height: 18px; }
.btn--primary { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn--primary:hover { background: var(--ink-2); border-color: var(--ink-2); color: var(--white); }
.btn--secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--bg); color: var(--ink); }
.btn--danger { background: var(--red); border-color: var(--red); color: var(--white); }
.btn--danger:hover { background: #b92222; border-color: #b92222; color: var(--white); }
.btn--light { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn--light:hover { background: transparent; color: var(--white); }
.btn--sm { min-height: 36px; padding: 7px 16px; font-size: .875rem; }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* --- Karten & Raster ------------------------------------------------------ */

.card { background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.card--narrow { max-width: 560px; }
.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.card__head h2 { margin: 0; font-size: 1.0625rem; }
.card__body { padding: 20px; }
.card__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--bg-soft); }
@media (min-width: 768px) {
  .card__head { padding: 18px 24px; }
  .card__body { padding: 24px; }
  .card__foot { padding: 16px 24px; }
}

.grid { display: grid; gap: 16px; }
/* Kennzahlen: Handy 1+2+2, Tablet/Laptop 2+3, breite Bildschirme 5 in einer Reihe */
.grid--kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid--kpi > :first-child { grid-column: 1 / -1; }
@media (min-width: 560px) {
  .grid--kpi { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .grid--kpi > * { grid-column: span 2; }
  .grid--kpi > :nth-child(-n+2) { grid-column: span 3; }
}
@media (min-width: 768px) { .grid--kpi { gap: 24px; } }
@media (min-width: 1280px) {
  .grid--kpi { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .grid--kpi > *, .grid--kpi > :nth-child(-n+2) { grid-column: auto; }
}
.grid--2 { grid-template-columns: minmax(0, 1fr); }
.section-gap { margin-top: 16px; }
.stack > * + * { margin-top: 16px; }
@media (min-width: 768px) {
  .grid { gap: 24px; }
  .section-gap { margin-top: 24px; }
  .stack > * + * { margin-top: 24px; }
}
@media (min-width: 1100px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.link-more { display: inline-flex; align-items: center; gap: 4px; font-size: .875rem; font-weight: 500; text-decoration: none; }
.link-more .icon { width: 16px; height: 16px; transition: transform .2s; }
.link-more:hover .icon { transform: translateX(3px); }

/* --- Kennzahlen ----------------------------------------------------------- */

.kpi {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  color: inherit;
  text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s;
}
a.kpi:hover { transform: translate3d(0, -3px, 0); box-shadow: var(--shadow-2); color: inherit; }
.kpi__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .875rem; font-weight: 500; color: var(--muted); line-height: 1.3; }
.kpi__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--bg); color: var(--ink); }
.kpi__value { font-size: 2.5rem; font-weight: 500; line-height: 1; letter-spacing: -.02em; color: var(--ink); }
.kpi__hint { font-size: .8125rem; color: var(--muted); }
@media (max-width: 559px) {
  .kpi { gap: 6px; padding: 14px 16px; }
  .kpi__top { font-size: .8125rem; }
  .kpi__icon { width: 32px; height: 32px; }
  .kpi__icon .icon { width: 17px; height: 17px; }
  .kpi__value { font-size: 1.875rem; }
  .kpi__hint { font-size: .75rem; line-height: 1.4; }
}
.kpi--warn .kpi__icon { background: var(--orange-bg); color: var(--orange); }
.kpi--danger .kpi__icon { background: var(--red-bg); color: var(--red); }
.kpi--ok .kpi__icon { background: var(--green-bg); color: var(--green); }

.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.category {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
  transition: background-color .2s;
}
.category:hover { background: var(--bg-soft); color: var(--ink); }
.category__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--white); }
.category__label { flex: 1; font-weight: 500; }
.category__count { font-size: 1.5rem; font-weight: 500; }
@media (min-width: 640px) {
  .category { border-bottom: 0; border-right: 1px solid var(--line-soft); }
  .category:last-child { border-right: 0; }
}

/* --- Status, Fälligkeiten ------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: var(--pill);
  background: var(--bg);
  color: var(--ink-2);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.45;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { background: var(--green-bg); color: var(--green); }
.badge--warn { background: var(--orange-bg); color: var(--orange); }
.badge--danger { background: var(--red-bg); color: var(--red); }
.badge--info { background: var(--blue-bg); color: var(--blue); }

.due { font-weight: 500; white-space: nowrap; }
.due--ok { color: var(--ink-2); }
.due--warn { color: var(--orange); }
.due--danger { color: var(--red); }

.meter { display: inline-block; width: 120px; height: 8px; margin-right: 10px; vertical-align: middle; background: var(--line-soft); border-radius: var(--pill); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--red); border-radius: inherit; }

/* --- Tabellen & Filter ---------------------------------------------------- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th {
  padding: 12px 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); vertical-align: middle; }
.table tbody tr { transition: background-color .15s; }
.table tbody tr:hover { background: var(--bg-soft); }
.table tbody tr:last-child td { border-bottom: 0; }
.table a { font-weight: 500; text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table .num { text-align: right; }
@media (min-width: 768px) {
  .table th:first-child, .table td:first-child { padding-left: 24px; }
  .table th:last-child, .table td:last-child { padding-right: 24px; }
}
@media (max-width: 719px) {
  .table--stack thead { display: none; }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table--stack tbody tr:last-child { border-bottom: 0; }
  .table--stack td { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; border: 0; text-align: right; }
  .table--stack td::before { content: attr(data-label); color: var(--muted); font-size: .8125rem; font-weight: 500; text-align: left; }
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.filters .field { flex: 1 1 180px; }
.filters--single .field { flex: 0 1 280px; }
@media (min-width: 768px) { .filters { padding: 18px 24px; } }

/* --- Detailangaben & Reiter ----------------------------------------------- */

.dl { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; }
.dl dt { padding-top: 12px; font-size: .8125rem; font-weight: 500; color: var(--muted); }
.dl dd { margin: 0; padding: 2px 0 12px; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.dl dd:last-child { border-bottom: 0; }
@media (min-width: 560px) {
  .dl { grid-template-columns: minmax(140px, 38%) minmax(0, 1fr); }
  .dl dt, .dl dd { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .dl dt:last-of-type, .dl dd:last-child { border-bottom: 0; }
}

.tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 20px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs__item {
  flex: none;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .2s, background-color .2s, color .2s;
}
.tabs__item:hover { border-color: var(--ink); color: var(--ink); }
.tabs__item.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* --- Formulare ------------------------------------------------------------ */

.form-grid { display: grid; gap: 18px 24px; }
@media (min-width: 768px) {
  .form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid__full { grid-column: 1 / -1; }
}
.form-section + .form-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.form-section h3 { margin-bottom: 16px; font-size: 1rem; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: .875rem; font-weight: 500; color: var(--ink); }
.req { color: var(--red); }
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1rem/1.4 var(--font);
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
  -webkit-appearance: none;
}
.field select {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23151314' 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 14px center;
  background-size: 16px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--subtle); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--subtle); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21, 19, 20, .08); }
.field--error input, .field--error select, .field--error textarea { border-color: var(--red) !important; }
.field__help { margin: 0; font-size: .8125rem; color: var(--muted); }
.field__help ul { margin: 4px 0 0; padding-left: 18px; }
.field__error { margin: 0; font-size: .8125rem; font-weight: 500; color: var(--red); }
.field--check { justify-content: center; }
.field--check label { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-2); cursor: pointer; }
.field--check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); }

/* --- Meldungen ------------------------------------------------------------ */

.messages { margin-bottom: 20px; }
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink);
  font-size: .9375rem;
  color: var(--ink-2);
}
.alert > div, .alert > p { flex: 1; }
.alert p { margin: 0; }
.alert .icon { margin-top: 1px; }
.alert--success { border-left-color: var(--green); background: var(--green-bg); border-color: var(--green-bg); border-left-color: var(--green); }
.alert--success > .icon { color: var(--green); }
.alert--warning { background: var(--orange-bg); border-color: var(--orange-bg); border-left-color: var(--orange); }
.alert--warning > .icon { color: var(--orange); }
.alert--error { background: var(--red-bg); border-color: var(--red-bg); border-left-color: var(--red); }
.alert--error > .icon { color: var(--red); }
.alert--info { background: var(--blue-bg); border-color: var(--blue-bg); border-left-color: var(--blue); }
.alert--info > .icon { color: var(--blue); }
.alert__close { flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin: -3px -6px -3px 0; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.alert__close:hover { color: var(--ink); }
.alert__close .icon { width: 16px; height: 16px; margin: 0; }

/* --- Leerzustände --------------------------------------------------------- */

.empty { display: flex; flex-direction: column; align-items: center; padding: 40px 20px; text-align: center; color: var(--muted); }
.empty--large { padding: 72px 24px; }
.empty__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 14px; border-radius: 50%; background: var(--bg); color: var(--ink); }
.empty__icon--ok { background: var(--green-bg); color: var(--green); }
.empty h3 { margin-bottom: 4px; }
.empty p { max-width: 46ch; margin: 0; font-size: .9375rem; }

/* --- Schritt 4: Listen, Artikel, Werte, Galerie ---------------------------- */

.nav__badge {
  margin-left: auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: var(--pill);
  background: var(--red);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  text-align: center;
}
.icon-btn { position: relative; }
.icon-btn__badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--pill);
  background: var(--red);
  color: var(--white);
  font-size: .6875rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.with-icon { display: inline-flex; align-items: center; gap: 6px; }
.with-icon .icon { width: 16px; height: 16px; }
.pre { white-space: pre-line; }
code { font-size: .875em; padding: 1px 6px; background: var(--bg); border-radius: 4px; color: var(--ink); }
code.secret { font-size: 1.05rem; padding: 4px 10px; letter-spacing: .03em; user-select: all; }
.section-title { margin: 24px 0 8px; font-size: 1rem; }

.card__body--tight { padding-top: 12px; padding-bottom: 0; }
.card__body--divided { border-top: 1px solid var(--line); }
.card__body--divided h3 { margin-bottom: 16px; }
.form-actions { margin-top: 18px; }
.card--form { max-width: 1000px; }

/* Zeilenlisten */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li + li { border-top: 1px solid var(--line-soft); }
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  color: inherit;
  text-decoration: none;
}
a.row, .row__link { transition: background-color .15s; }
a.row:hover { background: var(--bg-soft); color: inherit; }
.row__main { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.4; color: inherit; text-decoration: none; }
.row__main strong { overflow-wrap: anywhere; }
.row__main .muted { font-size: .8125rem; }
.row__side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; flex: none; }
.row__side form { margin: 0; }
.row__count { font-size: 1.25rem; font-weight: 500; }
.row__thumb { flex: none; width: 52px; height: 52px; object-fit: cover; background: var(--bg); border: 1px solid var(--line-soft); }
.row__thumb--empty { display: grid; place-items: center; color: var(--subtle); }
.rows--plain .row { padding-left: 0; padding-right: 0; }
@media (min-width: 768px) { .row { padding: 14px 24px; } }
@media (max-width: 559px) {
  .row { flex-wrap: wrap; }
  .row__side { justify-content: flex-start; }
}

/* Artikelkopf */
.article-head { margin-bottom: 20px; }
.article-head__back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; font-size: .875rem; font-weight: 500; text-decoration: none; color: var(--muted); }
.article-head__back .icon { width: 16px; height: 16px; }
.article-head .page-head { margin-bottom: 20px; }
.article-head__title { display: flex; align-items: flex-start; gap: 16px; min-width: 0; }
.article-head__icon { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--white); }
.article-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: .875rem; }
.tabs--page { margin-bottom: 20px; }
.avatar--large { width: 52px; height: 52px; font-size: 1rem; background: var(--ink); color: var(--white); flex: none; }
@media (max-width: 559px) { .article-head__icon { display: none; } }

.results-meta { padding: 10px 20px; font-size: .8125rem; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
@media (min-width: 768px) { .results-meta { padding: 10px 24px; } }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px; border-top: 1px solid var(--line-soft); }
.table__actions { white-space: nowrap; text-align: right; }
.table__actions .btn { margin-left: 2px; }
.due-cell { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
@media (max-width: 719px) {
  .table--stack td.table__actions { justify-content: flex-end; padding-top: 8px; }
  .table--stack td.table__actions::before { content: none; }
}

.category-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.category-grid--2 .category { border-right: 0; border-bottom: 1px solid var(--line-soft); }

/* Statuswerte */
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.value-tile { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); }
.value-tile__label { font-size: .8125rem; font-weight: 500; color: var(--muted); }
.value-tile__value { font-size: 1.625rem; font-weight: 500; line-height: 1.2; color: var(--ink); }
.value-tile__time { font-size: .75rem; color: var(--subtle); }

/* Fotos */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.gallery__item { position: relative; margin: 0; aspect-ratio: 1; background: var(--bg); border: 1px solid var(--line-soft); overflow: hidden; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.gallery__item a:hover img { transform: scale(1.04); }
.gallery__item form { position: absolute; top: 6px; right: 6px; margin: 0; }
.gallery__delete { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(21, 19, 20, .7); color: var(--white); cursor: pointer; }
.gallery__delete .icon { width: 16px; height: 16px; }
.upload-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.upload-row .field { flex: 1 1 260px; }
.field input[type="file"] { padding: 9px 10px; background: var(--bg-soft); cursor: pointer; }

/* Datumsfeld mit Kalender */
.date-input { position: relative; display: flex; }
.date-input input:not([type="date"]) { padding-right: 48px; }
.date-input__btn { position: absolute; top: 0; right: 0; bottom: 0; width: 46px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; }
.date-input__btn:hover { color: var(--ink); }
/* Selektor spezifischer als die allgemeine Regel für .field input */
.date-input > input.date-input__native[type="date"] { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
/* Touch (Handy/Tablet): natives Datumsfeld unsichtbar über dem Kalender-Knopf – Tippen öffnet den Kalender des Geräts */
@media (pointer: coarse) {
  .date-input > input.date-input__native[type="date"] { top: 0; bottom: auto; display: block; width: 46px; height: 100%; font-size: 16px; pointer-events: auto; z-index: 1; cursor: pointer; }
}

/* Mehrfachauswahl (Checkboxen) */
.field ul, .field div[id$="categories"] { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.field ul label, .field div[id$="categories"] label { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.field ul input[type="checkbox"], .field div[id$="categories"] input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ink); }

/* --- Anmeldung ------------------------------------------------------------ */

.auth-body { background: var(--ink); }
.auth { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; min-height: 100dvh; }
.auth__brand {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: calc(28px + env(safe-area-inset-top)) 24px 36px;
  background: var(--ink);
  color: var(--on-dark);
}
.auth__logo { display: block; width: 120px; height: auto; }
.auth__claim h1 { margin: 0 0 16px; color: var(--white); font-size: clamp(2.25rem, 1.5rem + 3.5vw, 4.5rem); line-height: 1.05; letter-spacing: -.02em; }
.auth__claim p { max-width: 42ch; margin: 0; }
.auth__foot { display: none; margin: 0; font-size: .8125rem; color: var(--muted); }
.auth__form { display: flex; align-items: flex-start; justify-content: center; padding: 28px 16px 48px; background: var(--bg); }
.auth__card { width: 100%; max-width: 440px; padding: 28px 22px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.auth__card h2 { margin-bottom: 4px; font-size: 1.625rem; }
.auth__card form { display: grid; gap: 18px; margin-top: 22px; }
.auth__card .alert { margin: 18px 0 0; }
.auth__hint { margin: 20px 0 0; font-size: .875rem; color: var(--muted); }
@media (min-width: 960px) {
  .auth { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: none; }
  .auth__brand { justify-content: space-between; padding: 48px 64px; border-right: 1px solid rgba(255, 255, 255, .12); }
  .auth__logo { width: 150px; }
  .auth__foot { display: block; }
  .auth__form { align-items: center; padding: 48px; }
  .auth__card { padding: 40px; }
}

/* --- Fehlerseiten --------------------------------------------------------- */

.error-page {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  max-width: 640px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 48px 24px;
  color: var(--on-dark);
}
.error-page__logo { width: 120px; margin-bottom: 48px; }
.error-page__code { margin: 0 0 8px; font-size: .8125rem; font-weight: 500; letter-spacing: .12em; color: var(--subtle); }
.error-page h1 { color: var(--white); }
.error-page p { margin-bottom: 28px; }

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

/* Kennzeichen-Schild */
.plate {
  display: inline-block;
  margin-right: 8px;
  padding: 0 7px 0 12px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: linear-gradient(to right, #1d4ed8 0 6px, var(--white) 6px);
  color: var(--ink);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: 1px;
}

/* --- Kioskmodus ----------------------------------------------------------- */
/* Der Kiosk passt immer genau auf den Bildschirm – ohne Maus/Tastatur wird nie gescrollt.
   Größen richten sich nach Breite UND Höhe (--k). app.js verteilt die Höhe auf die Listen,
   blendet Zeilen ohne Platz aus („+ N weitere“) und schaltet bei sehr kleinen Bildschirmen
   schrittweise Nebeninfos ab (.kiosk--compact-1 … -3). */

.kiosk-body { overflow: hidden; background: var(--ink); color: var(--on-dark); }
.kiosk { --k: min(1vw, 1.8vh); display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; padding: clamp(8px, 1.5 * var(--k), 32px); gap: clamp(8px, 1.2 * var(--k), 24px); }
.kiosk__head { flex: none; display: flex; align-items: center; gap: clamp(10px, 1.5 * var(--k), 32px); padding-bottom: clamp(6px, var(--k), 20px); border-bottom: 1px solid rgba(255, 255, 255, .12); }
.kiosk__logo { width: clamp(56px, 7 * var(--k), 140px); height: auto; }
.kiosk__title { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.2; }
.kiosk__app { color: var(--white); font-size: clamp(1rem, .8rem + var(--k), 2.25rem); font-weight: 500; }
.kiosk__sub { font-size: clamp(.7rem, .6rem + .3 * var(--k), 1.1rem); letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kiosk__clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.kiosk__clock span { color: var(--white); font-size: clamp(1.25rem, .8rem + 2 * var(--k), 3.25rem); font-weight: 500; }
.kiosk__clock small { font-size: clamp(.7rem, .6rem + .3 * var(--k), 1rem); color: var(--subtle); white-space: nowrap; }
.kiosk__actions { display: flex; gap: 6px; }
.kiosk__btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; background: transparent; color: var(--on-dark); cursor: pointer; opacity: .5; transition: opacity .2s, background-color .2s; }
.kiosk__btn:hover { opacity: 1; background: rgba(255, 255, 255, .08); color: var(--white); }

.kiosk__content { display: flex; flex-direction: column; flex: 1; gap: clamp(8px, 1.2 * var(--k), 24px); min-height: 0; }
.kiosk__kpis { flex: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(6px, var(--k), 20px); }
.kiosk-kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: clamp(8px, 1.2 * var(--k), 24px); background: #1f1c1e; border: 1px solid rgba(255, 255, 255, .1); border-top: 4px solid rgba(255, 255, 255, .25); }
.kiosk-kpi--warn { border-top-color: var(--orange); }
.kiosk-kpi--danger { border-top-color: var(--red); background: #2a1719; }
.kiosk-kpi__label { display: flex; align-items: center; gap: 8px; font-size: clamp(.72rem, .62rem + .35 * var(--k), 1.15rem); font-weight: 500; color: var(--on-dark); }
.kiosk-kpi__label .icon { flex: none; width: 1.1em; height: 1.1em; }
.kiosk-kpi__value { color: var(--white); font-size: clamp(1.5rem, 1rem + 3.2 * var(--k), 5rem); font-weight: 500; line-height: 1.05; }
.kiosk-kpi--warn .kiosk-kpi__value { color: #ffb45c; }
.kiosk-kpi--danger .kiosk-kpi__value { color: #ff6b6b; }
.kiosk-kpi__hint { font-size: clamp(.65rem, .55rem + .25 * var(--k), .95rem); color: var(--subtle); }

.kiosk__grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-rows: minmax(0, 1fr); gap: clamp(8px, 1.2 * var(--k), 24px); }
.kiosk-panel { display: flex; flex-direction: column; gap: clamp(10px, 1.5 * var(--k), 28px); min-height: 0; padding: clamp(10px, 1.2 * var(--k), 24px); background: #1f1c1e; border: 1px solid rgba(255, 255, 255, .1); overflow: hidden; }
.kiosk__side { display: flex; flex-direction: column; gap: clamp(8px, 1.2 * var(--k), 24px); min-height: 0; }
.kiosk__side > .kiosk-panel { flex: 1 1 0; }
.kiosk-block { flex: none; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.kiosk-panel h2 { flex: none; margin: 0 0 clamp(4px, .6 * var(--k), 10px); color: var(--white); font-size: clamp(.95rem, .8rem + .6 * var(--k), 1.6rem); }
.kiosk-rows { min-height: 0; margin: 0; padding: 0; list-style: none; overflow: hidden; }
.kiosk-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: clamp(5px, .7 * var(--k), 14px) 0; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: clamp(.8rem, .65rem + .45 * var(--k), 1.3rem); }
.kiosk-row:last-child { border-bottom: 0; }
.kiosk-row[hidden] { display: none; }
.kiosk-row__main { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.kiosk-row__main strong { color: var(--white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kiosk-row__main span { color: var(--subtle); font-size: .85em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kiosk-row__side { display: flex; align-items: center; gap: 10px; flex: none; }
.kiosk-row--danger strong { color: #ff8a8a; }
.kiosk-more { padding-top: clamp(4px, .5 * var(--k), 10px); color: var(--subtle); font-size: clamp(.75rem, .6rem + .35 * var(--k), 1.1rem); font-weight: 500; }
.kiosk .badge { font-size: .8em; }
.kiosk .due--ok { color: var(--white); }
.kiosk .due--warn { color: #ffb45c; }
.kiosk .due--danger { color: #ff6b6b; }
.kiosk-row__main span .due { font-size: inherit; }
.kiosk .plate { font-size: .8em; }

.kiosk__foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; font-size: clamp(.7rem, .6rem + .3 * var(--k), 1.05rem); }
/* höchstens eine Zeile – was nicht passt, rutscht in eine unsichtbare zweite Zeile */
.kiosk__cats { display: flex; flex-wrap: wrap; flex: 1; min-width: 0; gap: 0 22px; max-height: 1.8em; line-height: 1.8em; overflow: hidden; }
.kiosk-cat { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.kiosk-cat .icon { width: 1.1em; height: 1.1em; }
.kiosk-cat strong { color: var(--white); }
.kiosk__updated { flex: none; color: var(--muted); white-space: nowrap; }
.kiosk--offline .kiosk__updated::after { content: " · Verbindung unterbrochen"; color: #ff6b6b; font-weight: 500; }

/* Hochformat und schmale Bildschirme: Listen untereinander */
@media (orientation: portrait), (max-width: 700px) {
  .kiosk__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 3fr) minmax(0, 2fr); }
  .kiosk__grid.kiosk__grid--single { grid-template-rows: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .kiosk__kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kiosk__kpis > * { grid-column: span 2; }
  .kiosk__kpis > :nth-child(-n+2) { grid-column: span 3; }
  .kiosk__updated { display: none; }
}

/* Stufenweise verdichten (setzt app.js, wenn der Platz nicht reicht) */
.kiosk--compact-1 .kiosk-kpi__hint, .kiosk--compact-1 .kiosk__sub, .kiosk--compact-1 .kiosk__clock small { display: none; }
.kiosk--compact-2 .kiosk__logo, .kiosk--compact-2 .kiosk__foot, .kiosk--compact-2 .kiosk-kpi__label .icon { display: none; }
.kiosk--compact-2 .kiosk-kpi { padding: 6px 10px; }
.kiosk--compact-2 .kiosk-kpi__value { font-size: clamp(1.25rem, .9rem + 2 * var(--k), 2.5rem); }
.kiosk--compact-2 .kiosk-row { padding: 3px 0; line-height: 1.25; }
.kiosk--compact-3 .kiosk__head { display: none; }
.kiosk--compact-3 .kiosk-kpi__label { font-size: .7rem; }
.kiosk--compact-3 .kiosk-panel h2 { margin-bottom: 2px; font-size: .9rem; }

/* Kopierfeld, kleine Formulare in Tabellen */
.copy-field { display: flex; gap: 8px; }
.copy-field input { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: .875rem !important; }
.inline-form { display: inline; margin: 0; }

/* To-Dos */
.todo-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; }
.todo-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.todo-toggle:has(input:checked) { color: var(--ink); }
.rows > li.row-split { display: flex; align-items: center; }
.row-split > .row { flex: 1; min-width: 0; }
.row-split > .todo-toggle { flex: none; padding: 0 20px 0 4px; }
.table__actions .todo-toggle { margin-right: 6px; }
.status-select { min-height: 36px; padding: 6px 8px; border: 1px solid var(--line); border-left-width: 4px; background: var(--white); color: var(--ink); font: 500 .875rem/1.2 var(--font); cursor: pointer; }
.status-select--warn { border-left-color: var(--orange); }
.status-select--info { border-left-color: var(--blue); }
.status-select--ok { border-left-color: var(--green); }
.todo--done .todo__title { color: var(--muted); text-decoration: line-through; }
.todo__note { margin-top: 4px; font-size: .8125rem; color: var(--text); }
.todo-quick__grid { display: grid; gap: 12px; }
.todo-quick__submit { display: flex; align-items: flex-end; }
.todo-quick__submit .btn { width: 100%; min-height: 48px; }
@media (min-width: 768px) {
  .todo-quick__grid { grid-template-columns: minmax(0, 1fr) 200px auto; align-items: start; }
  .todo-quick__note { grid-column: 1 / 3; }
  .todo-quick__submit { align-self: stretch; padding-top: 26px; }
}
.todo-inline { display: flex; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--line-soft); }
.todo-inline input { flex: 1; min-width: 0; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font: 400 1rem/1.4 var(--font); }
.todo-inline input:focus { outline: none; border-color: var(--ink); }
@media (min-width: 768px) { .todo-inline { padding: 12px 24px; } }
.todo-done { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1.5px solid var(--line); border-radius: 50%; background: var(--white); color: transparent; cursor: pointer; transition: border-color .15s, color .15s; }
.todo-done svg { width: 16px; height: 16px; }
.todo-done:hover, .todo-done:focus-visible { border-color: var(--green); color: var(--green); }
.row > form { margin: 0; }

/* Reservierungen: Belegungsplan */
.card__foot-start { margin-right: auto; }
.plan-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.plan-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.plan-nav .btn { min-width: 40px; }
.plan-range { margin-left: 6px; color: var(--ink); white-space: nowrap; }
.plan-filters { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.plan-filters .field { min-width: 160px; }
.plan { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: .8125rem; }
.plan--14 { min-width: 900px; }
.plan--28 { min-width: 1200px; }
.plan th, .plan td { border-bottom: 1px solid var(--line-soft); }
.plan .plan__article { position: sticky; left: 0; z-index: 1; width: 210px; padding: 8px 14px; border-right: 1px solid var(--line); background: var(--white); text-align: left; vertical-align: middle; font-weight: 400; }
.plan thead .plan__article { color: var(--muted); font-weight: 500; }
.plan__article a { display: block; font-weight: 600; text-decoration: none; }
.plan__article > span { display: block; overflow: hidden; color: var(--muted); font-size: .75rem; white-space: nowrap; text-overflow: ellipsis; }
.plan__day { padding: 6px 2px; border-bottom-color: var(--line) !important; color: var(--muted); font-size: .72rem; font-weight: 500; line-height: 1.25; text-align: center; }
.plan__day span { display: block; color: var(--ink); font-weight: 600; }
.plan__day.is-today { box-shadow: inset 0 -3px var(--orange); color: var(--ink); }
.plan .is-weekend { background: var(--bg-soft); }
.plan td.is-today { background: var(--orange-bg); }
.plan__cell { position: relative; height: 42px; padding: 5px 1px; border-left: 1px solid var(--line-soft); }
.plan__free { position: absolute; inset: 0; display: grid; place-items: center; color: transparent; text-decoration: none; }
.plan__free::after { content: "+"; font-size: 1.1rem; font-weight: 500; }
.plan__free:hover, .plan__free:focus-visible { background: var(--blue-bg); color: var(--blue); }
.plan__bar { display: flex; align-items: center; height: 30px; padding: 0 8px; overflow: hidden; border-radius: 6px; background: var(--ink); color: var(--white); font-weight: 500; text-decoration: none; }
.plan__bar span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.plan__bar:hover, .plan__bar:focus-visible { background: var(--ink-2); color: var(--white); }
.plan__bar.is-cut-left { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.plan__bar.is-cut-right { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.plan-agenda { display: none; }
@media (max-width: 767px) {
  .plan-wrap { display: none; }
  .plan-agenda { display: block; }
  .plan-filters, .plan-filters .field { flex: 1 1 140px; min-width: 0; }
}

/* Ersatz für Inline-Styles (Content-Security-Policy ohne 'unsafe-inline') */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.meter__fill--18 { width: 18%; }
.kiosk__grid--single { grid-template-columns: minmax(0, 1fr); }

/* --- Kennzeichnung Testinstanz (INSTANCE_LABEL) --------------------------- */

.instance-banner {
  position: sticky;
  top: 0;
  z-index: 70;
  padding: 4px 16px;
  background: var(--orange);
  color: var(--white);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-align: center;
}
