:root {
  --fp-bg: #edf1f4;
  --fp-ink: #1a2332;
  --fp-accent: #e67a12;
  --fp-accent-hover: #c9650c;
  --fp-secondary: #3d4450;
  --fp-secondary-hover: #5a6472;
  --fp-muted: #5c6b7a;
  --fp-surface: #ffffff;
  --fp-border: #d5dde5;
  --fp-shadow: 0 1px 2px rgba(26, 35, 50, 0.05), 0 10px 28px rgba(26, 35, 50, 0.07);
  --fp-radius: 0.85rem;
  --fp-glass-blur: 14px;
  --fp-glass-border: rgba(255, 255, 255, 0.42);
  --fp-glass-shine: linear-gradient(165deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.06) 42%, transparent 70%);

  /* Bootstrap Primary = Orange */
  --bs-primary: #e67a12;
  --bs-primary-rgb: 230, 122, 18;
  --bs-primary-text-emphasis: #7a3d06;
  --bs-primary-bg-subtle: #fff4e8;
  --bs-primary-border-subtle: #f5c48a;

  /* Bootstrap Secondary = dunkles Grau (Hover etwas heller) */
  --bs-secondary: #3d4450;
  --bs-secondary-rgb: 61, 68, 80;
  --bs-secondary-text-emphasis: #1f2329;
  --bs-secondary-bg-subtle: #eef0f2;
  --bs-secondary-border-subtle: #b8bdc5;

  --bs-link-color: #e67a12;
  --bs-link-hover-color: #c9650c;
  --bs-link-color-rgb: 230, 122, 18;
  --bs-link-hover-color-rgb: 201, 101, 12;
  --bs-focus-ring-color: rgba(230, 122, 18, 0.25);
}

*,
*::before,
*::after { box-sizing: border-box; }

body.fp-body {
  margin: 0;
  min-height: 100vh;
  color: var(--fp-ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(230, 122, 18, 0.12), transparent 42%),
    radial-gradient(circle at 100% 0%, rgba(61, 68, 80, 0.08), transparent 40%),
    linear-gradient(165deg, #e7eef2 0%, var(--fp-bg) 48%, #f3ebe3 100%);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--fp-accent); text-decoration: none; }
a:hover { color: var(--fp-accent-hover); text-decoration: underline; }
a.btn,
a.btn:hover,
a.btn:focus,
a.btn:active {
  text-decoration: none !important;
}

/* Header */
.fp-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--fp-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.fp-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.fp-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  justify-self: end;
  min-width: 0;
}

.fp-nav-toggle {
  display: none;
  appearance: none;
  -webkit-appearance: none;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid var(--fp-border);
  border-radius: 0.45rem;
  background: #fff;
  color: var(--fp-ink);
  cursor: pointer;
  line-height: 0;
}

.fp-nav-toggle:hover,
.fp-nav-toggle:focus-visible {
  color: var(--fp-accent);
  border-color: color-mix(in srgb, var(--fp-accent) 40%, var(--fp-border));
  outline: none;
}

.fp-nav-toggle[aria-expanded="true"] {
  color: var(--fp-accent);
  border-color: color-mix(in srgb, var(--fp-accent) 45%, var(--fp-border));
  background: color-mix(in srgb, var(--fp-accent) 8%, #fff);
}

.fp-logo {
  display: inline-flex;
  align-items: center;
  color: var(--fp-ink) !important;
  text-decoration: none !important;
  justify-self: start;
  line-height: 0;
}

/* Volles Wordmark-Logo — nie als Quadrat/Icon zuschneiden */
.fp-logo img {
  display: block;
  height: 3.63rem !important;
  width: auto !important;
  max-width: min(18.5rem, 60vw) !important;
  object-fit: contain !important;
  object-position: left center;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent;
}

/* Metric cards (Dashboard) */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 992px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-grid--driver {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


.metric {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(6.5rem, 0.85fr);
  align-items: stretch;
  min-height: 9.75rem;
  overflow: hidden;
  border-radius: var(--fp-radius);
  box-shadow: var(--fp-shadow);
}

.metric__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.1rem 1.15rem 1rem;
  min-width: 0;
}

.metric__media {
  position: relative;
  align-self: stretch;
  display: grid;
  min-height: 9.75rem;
  overflow: hidden;
  background: #e8eef4;
}

.metric__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.metric__media-img {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 9.75rem;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.metric__label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric__value {
  margin: 0.4rem 0 0;
  font-size: 2.15rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.metric__hint {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.35;
}

.metric__bar {
  margin-top: 0.9rem;
  height: 0.35rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(18 32 51 / 0.1);
}

.metric__bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
}

.metric__bar--ghost { opacity: 0.35; }

.metric--free {
  color: var(--fp-accent);
  border: 1px solid color-mix(in srgb, var(--fp-accent) 28%, transparent);
  background: linear-gradient(160deg, #f3faf6 0%, #ffffff 70%);
}
.metric--free .metric__value,
.metric--free .metric__hint { color: var(--fp-ink); }
.metric--free .metric__media::before {
  background: linear-gradient(90deg, #f7fbf8 0%, transparent 42%);
}

.metric--busy {
  color: #8a5608;
  border: 1px solid color-mix(in srgb, #c48a2a 36%, transparent);
  background: linear-gradient(160deg, #fff8ec 0%, #ffffff 70%);
}
.metric--busy .metric__value,
.metric--busy .metric__hint { color: var(--fp-ink); }
.metric--busy .metric__media::before {
  background: linear-gradient(90deg, #fffaf0 0%, transparent 42%);
}

.metric--drivers {
  color: #9eb6d4;
  border: 1px solid #173a5f;
  background: linear-gradient(155deg, #173a5f 0%, #0f2744 70%);
}
.metric--drivers .metric__value { color: #fff; }
.metric--drivers .metric__hint { color: rgb(255 255 255 / 0.72); }
.metric--drivers .metric__media::before {
  background: linear-gradient(90deg, #122c4a 0%, transparent 48%);
}
.metric--drivers .metric__bar { background: rgb(255 255 255 / 0.14); }
.metric--drivers .metric__bar > span { background: var(--fp-accent); }

@media (max-width: 420px) {
  .metric {
    grid-template-columns: minmax(0, 1.25fr) minmax(5.25rem, 0.7fr);
  }
  .metric__value { font-size: 1.9rem; }
}

.fp-header-panel {
  display: contents;
}

.fp-nav-profile {
  display: none;
}

.fp-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  justify-content: center;
  justify-self: center;
}

.fp-nav-links a {
  color: var(--fp-ink);
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.fp-nav-links a:hover { color: var(--fp-accent); }

.fp-nav-links a.is-active {
  color: var(--fp-accent);
  border-bottom-color: var(--fp-accent);
  font-weight: 650;
}

.fp-header-user {
  display: flex;
  align-items: center;
  min-width: 0;
}

.fp-header-user-toggle {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fp-header-user .fp-header-user-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fp-ink);
  font: inherit;
  font-weight: 500;
  padding: 0.25rem 0;
  cursor: pointer;
}

.fp-header-user-toggle:hover,
.fp-header-user-toggle:focus-visible {
  color: var(--fp-accent);
  outline: none;
}

.fp-header-dropdown {
  min-width: 11rem;
  border-color: var(--fp-border, #dde1e6);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.fp-header-dropdown .dropdown-item {
  font-size: 0.95rem;
  text-align: center;
  color: var(--fp-ink);
}

.fp-header-dropdown .dropdown-item:hover,
.fp-header-dropdown .dropdown-item:focus,
.fp-header-dropdown .dropdown-item:active,
.fp-header-dropdown .dropdown-item.active {
  color: var(--fp-accent);
  background-color: var(--bs-primary-bg-subtle, #fff4e8);
}

.fp-header-dropdown .fp-dropdown-logout {
  color: #b42318;
}

.fp-header-dropdown .fp-dropdown-logout:hover,
.fp-header-dropdown .fp-dropdown-logout:focus,
.fp-header-dropdown .fp-dropdown-logout:active {
  color: #912018;
  background-color: #fef3f2;
}

.fp-logout-toast {
  position: fixed;
  top: 5.25rem;
  left: 50%;
  z-index: 400;
  max-width: min(26rem, calc(100vw - 2rem));
  padding: 0.85rem 1.1rem;
  border-radius: 0.65rem;
  border: 1px solid color-mix(in srgb, #c48a2a 40%, var(--fp-border));
  background: #fff8ec;
  color: var(--fp-ink);
  box-shadow: 0 10px 28px rgba(26, 35, 50, 0.14);
  font-size: 0.95rem;
  font-weight: 550;
  line-height: 1.35;
  text-align: center;
  transform: translate(-50%, -0.5rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.fp-logout-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Main */
.fp-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

.fp-page-title {
  font-size: 1.75rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
}

.fp-lead {
  color: var(--fp-muted);
  margin: 0 0 1.35rem;
}

.fp-detail-header .fp-lead {
  margin-bottom: 0.35rem;
}

.fp-vehicle-last-location {
  margin: 0;
  color: var(--fp-muted);
  font-size: 0.92rem;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

/* Cards */
.fp-card {
  background: var(--fp-surface);
  border: 1px solid var(--fp-border);
  border-radius: var(--fp-radius);
  box-shadow: var(--fp-shadow);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.15rem;
}

.fp-card h2,
.fp-card .fp-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
}

.fp-booked-drivers {
  max-width: none;
  width: 100%;
  padding: 0.7rem 0.9rem;
  margin-bottom: 1rem;
}

.fp-booked-drivers .fp-card-title {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

.fp-slim-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fp-slim-list__row {
  display: grid;
  align-items: center;
  column-gap: 0.85rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--fp-border);
  font-size: 0.86rem;
  line-height: 1.25;
}

.fp-slim-list__row.is-with-location {
  grid-template-columns:
    minmax(6.5rem, 1fr)
    minmax(5rem, 0.75fr)
    minmax(5rem, 0.9fr)
    minmax(8rem, 1.4fr)
    auto
    auto;
}

/* Fahrer-Dashboard: Name | Kennzeichen | Phone | Badge (eine Zeile) */
.fp-slim-list__row.is-call-only {
  grid-template-columns:
    minmax(0, 1.3fr)
    minmax(0, 1fr)
    auto
    auto;
  column-gap: 0.55rem;
}

.fp-slim-list__row.is-call-only .fp-slim-list__vehicle {
  display: none;
}

@media (min-width: 992px) {
  .fp-slim-list__row.is-call-only {
    grid-template-columns:
      minmax(7rem, 1.2fr)
      minmax(5.5rem, 0.9fr)
      minmax(6rem, 1fr)
      auto
      auto;
    column-gap: 0.85rem;
  }

  .fp-slim-list__row.is-call-only .fp-slim-list__vehicle {
    display: block;
  }
}

.fp-slim-list__row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.fp-slim-list__row:first-child {
  padding-top: 0;
}

.fp-slim-list__who {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fp-slim-list__name {
  font-weight: 650;
  min-width: 0;
}

.fp-slim-list__call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

button.fp-slim-list__name.is-map-link {
  appearance: none;
  -webkit-appearance: none;
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fp-ink);
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

button.fp-slim-list__name.is-map-link:hover,
button.fp-slim-list__name.is-map-link:focus-visible {
  color: var(--fp-accent);
  text-decoration: underline;
  outline: none;
}

.fp-slim-list__meta {
  color: var(--fp-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.fp-slim-list__location {
  display: flex;
  align-items: baseline;
  min-width: 0;
  max-width: 100%;
  color: var(--fp-muted);
  font-size: 0.82rem;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fp-slim-list__location-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fp-slim-list__location-time {
  flex: 0 0 auto;
  white-space: nowrap;
}

.fp-slim-list__location.is-empty .fp-slim-list__location-text {
  color: var(--fp-muted);
}

.fp-slim-list__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  justify-self: end;
  flex-wrap: nowrap;
}

.fp-booked-drivers .badge {
  font-size: 0.72rem;
  padding: 0.22rem 0.45rem;
  margin-left: 0;
}

.fp-slim-list__checkout {
  margin: 0;
  display: inline-flex;
}

.fp-badge-checkout {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.28rem 0.55rem;
  border-radius: 0.375rem;
  color: #fff;
  background: #dc3545;
}

.fp-badge-checkout:hover,
.fp-badge-checkout:focus-visible {
  background: #bb2d3b;
  color: #fff;
  outline: none;
}

.fp-booked-drivers .fp-empty {
  margin: 0;
  font-size: 0.86rem;
}

.fp-tcx-call {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  vertical-align: middle;
  flex: 0 0 auto;
}

.fp-booked-drivers .fp-tcx-call .fp-icon-btn {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.3rem;
  color: #2563eb;
  border-color: color-mix(in srgb, #2563eb 35%, transparent);
  background: color-mix(in srgb, #2563eb 8%, #fff);
}

.fp-booked-drivers .fp-tcx-call .fp-icon-btn svg {
  width: 12px;
  height: 12px;
}

.fp-booked-drivers .fp-tcx-call .fp-icon-btn:hover,
.fp-booked-drivers .fp-tcx-call .fp-icon-btn:focus-visible {
  color: #1d4ed8;
  border-color: color-mix(in srgb, #2563eb 55%, transparent);
  background: color-mix(in srgb, #2563eb 14%, #fff);
  outline: none;
}

.fp-vehicle-tcx {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.15rem 0 0.35rem;
  color: var(--fp-muted);
  font-size: 0.92rem;
}

.fp-vehicle-tcx__label {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  /* Admin mit Standort: kompakter Stapel */
  .fp-slim-list__row.is-with-location {
    grid-template-columns: 1fr auto auto;
    row-gap: 0.2rem;
  }

  .fp-slim-list__row.is-with-location .fp-slim-list__who {
    grid-column: 1;
  }

  .fp-slim-list__row.is-with-location .fp-slim-list__call {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }

  .fp-slim-list__row.is-with-location .fp-slim-list__actions {
    grid-column: 3;
    grid-row: 1 / span 3;
    align-self: center;
  }

  .fp-slim-list__row.is-with-location .fp-slim-list__meta,
  .fp-slim-list__row.is-with-location .fp-slim-list__location {
    grid-column: 1;
  }

  .fp-slim-list__row.is-with-location .fp-slim-list__vehicle {
    display: none;
  }
}

/* Tables */
.fp-table-wrap { overflow-x: auto; }

.fp-table {
  width: 100%;
  border-collapse: collapse;
}

.fp-table th,
.fp-table td {
  text-align: left;
  padding: 0.75rem 0.65rem;
  border-bottom: 1px solid var(--fp-border);
  vertical-align: middle;
}

.fp-table th {
  color: var(--fp-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  font-weight: 700;
}

.fp-table tr:last-child td { border-bottom: 0; }

.fp-empty {
  color: var(--fp-muted);
  padding: 1.25rem 0.25rem 0.5rem;
  margin: 0;
}

.fp-status-free { color: var(--fp-accent); font-weight: 650; }
.fp-status-busy { color: #a33b2b; font-weight: 650; }
.fp-status-inactive { color: var(--fp-muted); font-weight: 650; }

.fp-appt-overdue {
  color: #a33b2b;
  font-size: 0.9rem;
  font-weight: 600;
}

.fp-appt-soon {
  color: #8a5608;
  font-size: 0.9rem;
  font-weight: 600;
}

.fp-detail-header {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

@media (min-width: 640px) {
  .fp-detail-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.fp-back-link {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--fp-accent);
  text-decoration: underline;
}

.fp-hub-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 992px) {
  .fp-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fp-hub-span-2 {
    grid-column: 1 / -1;
  }
}

.fp-dl {
  display: grid;
  gap: 0.75rem 1.5rem;
  margin: 0.85rem 0 0;
}

@media (min-width: 576px) {
  .fp-dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .fp-dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.fp-dl dt {
  margin: 0;
  color: var(--fp-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.fp-dl dd {
  margin: 0.2rem 0 0;
  font-weight: 550;
}

.fp-hub-booking {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--fp-border);
}

.fp-hub-note {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--fp-muted);
}

.fp-panel-list {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
}

.fp-panel-list > li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--fp-border);
}

.fp-panel-list > li:last-child {
  border-bottom: 0;
}

/* Bootstrap overrides / forms — Glass + Primary/Secondary */
.btn {
  position: relative;
  border-radius: 0.65rem;
  text-decoration: none !important;
  backdrop-filter: blur(var(--fp-glass-blur));
  -webkit-backdrop-filter: blur(var(--fp-glass-blur));
  box-shadow: 0 2px 6px rgba(26, 35, 50, 0.08);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.btn:hover,
.btn:focus {
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(26, 35, 50, 0.14);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: rgba(230, 122, 18, 0.92);
  --bs-btn-border-color: rgba(201, 101, 12, 0.85);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: rgba(201, 101, 12, 0.96);
  --bs-btn-hover-border-color: rgba(180, 90, 10, 0.9);
  --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: rgba(201, 101, 12, 0.98);
  --bs-btn-active-border-color: rgba(180, 90, 10, 0.95);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: rgba(230, 122, 18, 0.45);
  --bs-btn-disabled-border-color: rgba(201, 101, 12, 0.35);
}

.btn-secondary {
  --bs-btn-color: #fff;
  --bs-btn-bg: rgba(61, 68, 80, 0.95);
  --bs-btn-border-color: rgba(45, 50, 58, 0.9);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: rgba(90, 100, 114, 0.98);
  --bs-btn-hover-border-color: rgba(55, 62, 72, 0.95);
  --bs-btn-focus-shadow-rgb: var(--bs-secondary-rgb);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: rgba(106, 116, 130, 1);
  --bs-btn-active-border-color: rgba(60, 68, 78, 0.95);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: rgba(61, 68, 80, 0.45);
  --bs-btn-disabled-border-color: rgba(45, 50, 58, 0.35);
}

.btn-outline-primary {
  --bs-btn-color: var(--bs-primary);
  --bs-btn-bg: rgba(255, 255, 255, 0.28);
  --bs-btn-border-color: rgba(230, 122, 18, 0.55);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: rgba(230, 122, 18, 0.92);
  --bs-btn-hover-border-color: rgba(201, 101, 12, 0.85);
  --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: rgba(201, 101, 12, 0.95);
  --bs-btn-active-border-color: rgba(180, 90, 10, 0.9);
  --bs-btn-disabled-color: var(--bs-primary);
  --bs-btn-disabled-bg: rgba(255, 255, 255, 0.15);
  --bs-btn-disabled-border-color: rgba(230, 122, 18, 0.3);
}

.btn-outline-secondary {
  --bs-btn-color: #fff;
  --bs-btn-bg: rgba(61, 68, 80, 0.95);
  --bs-btn-border-color: rgba(45, 50, 58, 0.9);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: rgba(90, 100, 114, 0.98);
  --bs-btn-hover-border-color: rgba(55, 62, 72, 0.95);
  --bs-btn-focus-shadow-rgb: var(--bs-secondary-rgb);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: rgba(106, 116, 130, 1);
  --bs-btn-active-border-color: rgba(60, 68, 78, 0.95);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: rgba(61, 68, 80, 0.45);
  --bs-btn-disabled-border-color: rgba(45, 50, 58, 0.35);
  color: #fff !important;
  background-color: rgba(61, 68, 80, 0.95) !important;
  border-color: rgba(45, 50, 58, 0.9) !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active,
.btn-outline-secondary.active {
  color: #fff !important;
  background-color: rgba(90, 100, 114, 0.98) !important;
  border-color: rgba(55, 62, 72, 0.95) !important;
}

.btn-outline-danger {
  --bs-btn-bg: rgba(255, 255, 255, 0.28);
  --bs-btn-border-color: rgba(220, 53, 69, 0.5);
}

.btn-outline-warning {
  --bs-btn-bg: rgba(255, 255, 255, 0.28);
  --bs-btn-border-color: rgba(255, 193, 7, 0.55);
}

.badge {
  border: 1px solid transparent;
  box-shadow: 0 1px 3px rgba(26, 35, 50, 0.1);
  font-weight: 600;
}

.badge.text-bg-primary,
.bg-primary.badge {
  background-color: rgba(230, 122, 18, 0.95) !important;
  border-color: rgba(201, 101, 12, 0.85);
}

.badge.text-bg-secondary,
.bg-secondary.badge {
  background-color: rgba(61, 68, 80, 0.95) !important;
  border-color: rgba(45, 50, 58, 0.9);
}

.form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.form-check-input:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

.form-control,
.form-select {
  border-color: var(--fp-border);
  border-radius: 0.55rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem var(--bs-focus-ring-color);
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: var(--bs-primary);
}

.page-link {
  color: var(--bs-primary);
}

.page-item.active .page-link {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.alert {
  border-radius: var(--fp-radius);
  border: 1px solid var(--fp-border);
  box-shadow: var(--fp-shadow);
}

/* Login */
.fp-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.fp-brand-logo {
  display: block;
  height: 3.5rem;
  width: auto;
  max-width: min(16rem, 80vw);
  margin: 0 auto;
  object-fit: contain;
}

.fp-brand {
  font-size: 2rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--fp-accent);
  margin: 0;
}

.fp-login {
  width: min(100%, 420px);
  background: var(--fp-surface);
  border: 1px solid var(--fp-border);
  border-radius: var(--fp-radius);
  box-shadow: var(--fp-shadow);
  padding: 1.75rem;
}

.fp-ctrack-panel .fp-card-title { margin-bottom: 0; }

.fp-ctrack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.fp-poi-search {
  position: relative;
  flex: 1 1 12rem;
  min-width: 11rem;
  max-width: min(18rem, 100%);
}

.fp-poi-search__input {
  display: block;
  width: 100%;
  height: 2.25rem;
  padding: 0 0.9rem;
  -webkit-appearance: none;
  appearance: none;
  border: 1.5px solid #173a5f;
  border-radius: 0.55rem;
  background: #fff;
  color: var(--fp-ink);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow:
    inset 0 2px 6px rgba(23, 58, 95, 0.45),
    inset 0 0 0 1px rgba(23, 58, 95, 0.12);
}

.fp-poi-search__input::-webkit-search-decoration,
.fp-poi-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.fp-poi-search__input::placeholder {
  color: color-mix(in srgb, #173a5f 55%, var(--fp-muted));
  font-weight: 500;
}

.fp-poi-search__input:focus {
  outline: none;
  border-color: #173a5f;
  box-shadow:
    inset 0 2px 8px rgba(23, 58, 95, 0.55),
    inset 0 0 0 1px rgba(23, 58, 95, 0.18),
    0 0 0 3px rgba(23, 58, 95, 0.16);
}

.fp-poi-search__results {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  right: 0;
  z-index: 40;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  max-height: 16rem;
  overflow-y: auto;
  border: 1px solid var(--fp-border);
  border-radius: 0.55rem;
  background: #fff;
  box-shadow: 0 8px 22px rgba(26, 35, 50, 0.14);
}

.fp-poi-search__item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.4rem;
  cursor: pointer;
}

.fp-poi-search__item:hover,
.fp-poi-search__item:focus {
  background: color-mix(in srgb, var(--fp-accent) 10%, #fff);
  outline: none;
}

.fp-poi-search__name {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--fp-ink);
  line-height: 1.25;
}

.fp-poi-search__addr {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--fp-muted);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fp-poi-search__empty {
  padding: 0.55rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fp-muted);
}

.fp-ctrack-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.fp-map-toggles {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  height: 2.25rem;
  padding: 0 0.8rem;
  border: 1px solid var(--fp-border);
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--fp-surface) 92%, var(--fp-bg));
}

.fp-map-toggles .form-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 0;
  padding-left: 2.05em;
  margin: 0;
}

.fp-map-toggles .form-check-input {
  width: 2rem;
  height: 1.1rem;
  margin-top: 0;
  margin-left: -2.05em;
  cursor: pointer;
}

.fp-map-toggles .form-check-label {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  color: var(--fp-ink);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.fp-ctrack-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.25rem;
  padding: 0 0.7rem;
  border-radius: 0.55rem;
  border: 1px solid var(--fp-border);
  background: color-mix(in srgb, var(--fp-surface) 92%, var(--fp-bg));
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--fp-ink);
  white-space: nowrap;
  user-select: none;
}

.fp-ctrack-status__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #8a93a3;
  flex-shrink: 0;
}

.fp-ctrack-status.is-ok .fp-ctrack-status__dot {
  background: #2f8f5b;
}

.fp-ctrack-status.is-empty .fp-ctrack-status__dot,
.fp-ctrack-status.is-loading .fp-ctrack-status__dot,
.fp-ctrack-status.is-unknown .fp-ctrack-status__dot {
  background: #c48a1a;
}

.fp-ctrack-status.is-dead .fp-ctrack-status__dot,
.fp-ctrack-status.is-error .fp-ctrack-status__dot {
  background: #c0392b;
}

.fp-ctrack-status.is-loading .fp-ctrack-status__dot {
  animation: fp-ctrack-spin 0.9s linear infinite;
  border-radius: 50%;
  box-shadow: 0 0 0 2px color-mix(in srgb, #c48a1a 25%, transparent);
}

.fp-ctrack-reconnect {
  height: 2.25rem;
  padding: 0 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  border: 1px solid var(--fp-border);
  background: #fff;
  color: var(--fp-ink);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1;
}

.fp-ctrack-reconnect:hover,
.fp-ctrack-reconnect:focus-visible {
  border-color: color-mix(in srgb, var(--fp-secondary) 40%, var(--fp-border));
  background: color-mix(in srgb, var(--fp-secondary) 6%, #fff);
}

.fp-ctrack-reconnect.is-emphasis {
  border-color: color-mix(in srgb, #c0392b 45%, var(--fp-border));
  background: color-mix(in srgb, #c0392b 10%, #fff);
  color: #8f2a20;
}

.fp-ctrack-reconnect:disabled {
  opacity: 0.65;
  cursor: wait;
}

.fp-live-map-wrap {
  position: relative;
  overflow: hidden;
  height: min(85vh, 52rem);
  border-radius: 0.65rem;
  border: 1px solid var(--fp-border);
  background: #fff;
}

.fp-live-map {
  width: 100%;
  height: 100%;
  min-height: min(85vh, 52rem);
  z-index: 1;
}

.fp-live-map-error {
  color: #a33b2b;
  font-size: 0.9rem;
  font-weight: 600;
}

.fp-map-marker-wrap {
  background: transparent !important;
  border: 0 !important;
}

.fp-map-marker-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  pointer-events: auto;
  /* Anker unten: unterer Rand der Icon-Slot = LatLng */
}

/* Kennzeichen + Fahrer gleich breit (Breite vom Kennzeichen) */
.fp-map-marker-labels {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: max-content;
  max-width: 100%;
  gap: 0.1rem;
}

.fp-map-marker__icon-slot {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  line-height: 0;
}

.fp-map-marker__icon {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 1px 2px rgba(26, 35, 50, 0.35));
  user-select: none;
  -webkit-user-drag: none;
}

.fp-map-marker__fallback {
  display: block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--fp-secondary);
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(26, 35, 50, 0.35);
  /* Spitze des gedrehten Karos liegt unten mittig im Slot */
  margin: 0 0 0.05rem;
}

.fp-map-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.4rem;
  border-radius: 0.35rem;
  /* Frei / kein Fahrer eingebucht */
  background: var(--fp-secondary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(26, 35, 50, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Fahrer eingebucht → orange */
.fp-map-marker.is-booked {
  background: var(--fp-accent);
}

.fp-map-marker__driver {
  display: block;
  box-sizing: border-box;
  /* Breite vom Kennzeichen: nicht selbst aufweiten */
  width: 0;
  min-width: 100%;
  padding: 0.08rem 0.25rem;
  border-radius: 0.25rem;
  background: #7eb8d9;
  color: #123048;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 2px rgba(26, 35, 50, 0.18);
}

.fp-map-marker.is-alert {
  background: #c0392b;
  border-color: rgba(255, 255, 255, 0.35);
}

.fp-map-marker.is-alert.is-moving {
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.35), 0 1px 4px rgba(26, 35, 50, 0.28);
}

.fp-map-poi {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  max-width: 11rem;
  pointer-events: auto;
  /* Anker unten: Pin-Spitze = LatLng (Overlay transform translate(-50%, -100%)) */
}

.fp-map-poi__pin {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #c45c26;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(26, 35, 50, 0.35);
  /* Spitze nach unten — Overlay-Anker am unteren Rand des Markers */
  margin-bottom: 0.05rem;
}

.fp-map-poi__label {
  display: inline-block;
  max-width: 9.5rem;
  padding: 0.12rem 0.35rem;
  border-radius: 0.3rem;
  background: color-mix(in srgb, var(--fp-surface) 92%, #fff);
  color: var(--fp-ink);
  border: 1px solid var(--fp-border);
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 3px rgba(26, 35, 50, 0.12);
}

/* Firmenstandorte (Live-Karte) — Teal, klar von POI-Orange getrennt */
.fp-map-site {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  max-width: 11rem;
  pointer-events: auto;
}

.fp-map-site__pin {
  width: 0.85rem;
  height: 0.85rem;
  flex-shrink: 0;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #0d7a6f;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(26, 35, 50, 0.35);
  margin-bottom: 0.05rem;
}

.fp-map-site__label {
  display: inline-block;
  max-width: 9.5rem;
  padding: 0.12rem 0.35rem;
  border-radius: 0.3rem;
  background: color-mix(in srgb, #0d7a6f 12%, #fff);
  color: #0a5c54;
  border: 1px solid color-mix(in srgb, #0d7a6f 35%, #fff);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 3px rgba(26, 35, 50, 0.12);
}

.fp-map-popup__badge.is-site {
  background: rgba(13, 122, 111, 0.12);
  color: #0d7a6f;
}

/* Karten-InfoWindow (POI / Fahrzeug) */
.fp-live-map .gm-style-iw-c {
  padding: 0 !important;
  border-radius: 0.65rem !important;
  box-shadow: 0 6px 22px rgba(26, 35, 50, 0.2) !important;
}

.fp-live-map .gm-style-iw-d {
  overflow: hidden !important;
  max-height: none !important;
}

.fp-live-map .gm-style-iw-chr {
  display: none !important;
}

.fp-live-map .gm-style-iw-tc::after {
  background: #fff;
}

.fp-map-popup {
  position: relative;
  box-sizing: border-box;
  min-width: 11rem;
  max-width: 17rem;
  padding: 0.7rem 1.9rem 0.75rem 0.85rem;
  color: var(--fp-ink, #1a2332);
  font-family: inherit;
  line-height: 1.35;
}

.fp-map-popup__close {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border: none;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--fp-muted, #6c757d);
  cursor: pointer;
  line-height: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.fp-map-popup__close:hover {
  background: rgba(26, 35, 50, 0.08);
  color: var(--fp-ink, #1a2332);
}

.fp-map-popup__badge {
  display: inline-block;
  margin-bottom: 0.3rem;
  padding: 0.12rem 0.4rem;
  border-radius: 0.25rem;
  background: rgba(196, 92, 38, 0.12);
  color: #c45c26;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.fp-map-popup__badge.is-vehicle {
  background: rgba(13, 110, 253, 0.12);
  color: #0d6efd;
}

.fp-map-popup__title {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}

.fp-map-popup__meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--fp-muted, #6c757d);
  word-break: break-word;
}

.fp-map-popup__meta + .fp-map-popup__meta {
  margin-top: 0.15rem;
}

.fp-map-popup__meta.is-nearby {
  margin-top: 0.35rem;
  color: #2f6fad;
  font-weight: 650;
}

.fp-map-popup__link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--fp-primary, #0d6efd);
  text-decoration: none;
}

.fp-map-popup__link:hover {
  text-decoration: underline;
}

.fp-ctrack-loading {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--fp-muted);
  font-size: 0.95rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--fp-surface) 92%, var(--fp-bg));
}

.fp-live-map-wrap[data-loading="1"] .fp-ctrack-loading {
  display: flex;
}

.fp-ctrack-loading__spinner {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid color-mix(in srgb, var(--fp-accent) 25%, transparent);
  border-top-color: var(--fp-accent);
  border-radius: 50%;
  animation: fp-ctrack-spin 0.7s linear infinite;
}

@keyframes fp-ctrack-spin {
  to { transform: rotate(360deg); }
}

.fp-refresh-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.25rem;
  padding: 0 0.55rem 0 0.3rem;
  border: 1px solid var(--fp-border);
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--fp-surface) 92%, var(--fp-bg));
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  line-height: inherit;
}

.fp-refresh-badge:hover,
.fp-refresh-badge:focus-visible {
  border-color: color-mix(in srgb, var(--fp-accent) 45%, var(--fp-border));
  background: color-mix(in srgb, var(--fp-accent) 8%, #fff);
  outline: none;
}

.fp-refresh-ring {
  transform: rotate(-90deg);
  flex-shrink: 0;
  width: 1.55rem;
  height: 1.55rem;
}

.fp-refresh-ring__track {
  stroke: color-mix(in srgb, var(--fp-accent) 18%, transparent);
}

.fp-refresh-ring__progress {
  stroke: var(--fp-accent);
  transition: stroke-dashoffset 1s linear;
}

.fp-refresh-badge__text {
  min-width: 2.7rem;
  line-height: 1.05;
}

.fp-refresh-badge__label {
  display: block;
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fp-accent);
}

.fp-refresh-badge__value {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--fp-ink);
}

.fp-settings-hub-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 9.5rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--fp-border);
  border-radius: 0.75rem;
  background: var(--fp-surface);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(26, 35, 50, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.fp-settings-hub-card:hover {
  border-color: color-mix(in srgb, var(--fp-accent) 45%, var(--fp-border));
  box-shadow: 0 4px 14px rgba(26, 35, 50, 0.08);
  transform: translateY(-1px);
  color: inherit;
  text-decoration: none;
}

.fp-settings-hub-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.fp-settings-hub-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.3;
  color: var(--fp-ink);
}

.fp-settings-hub-card__text {
  flex: 1;
  margin: 0 0 0.85rem;
  color: var(--fp-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.fp-settings-hub-card__cta {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fp-accent);
}

.fp-meta-box {
  border: 1px solid var(--fp-border);
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--fp-bg) 65%, white);
  padding: 0.65rem 0.8rem;
}

.fp-meta-label {
  display: block;
  color: var(--fp-muted);
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}

.fp-inline-edit {
  display: inline-block;
}

.fp-icon-actions .fp-inline-edit {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
}

.fp-inline-edit > summary {
  list-style: none;
  cursor: pointer;
}

.fp-inline-edit > summary::-webkit-details-marker { display: none; }

.fp-inline-edit__form {
  margin-top: 0.65rem;
  padding: 0.75rem;
  border: 1px solid var(--fp-border);
  border-radius: 0.55rem;
  background: var(--fp-surface);
  box-shadow: 0 8px 22px rgba(26, 35, 50, 0.12);
  min-width: 16rem;
  max-width: min(20rem, 85vw);
  text-align: left;
}

/* Einteilung — Wochentags-Karten (Tage farbig, Gap/Heute als Zustand) */
.fp-day-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.15rem;
}

@media (min-width: 720px) {
  .fp-day-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.fp-day-card {
  --day-color: var(--fp-secondary);
  --day-soft: color-mix(in srgb, var(--day-color) 12%, #fff);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 7.6rem;
  padding: 1rem 1.05rem 0.95rem 1.15rem;
  border: 1px solid color-mix(in srgb, var(--day-color) 22%, var(--fp-border));
  border-radius: 0.9rem;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--day-color) 16%, transparent), transparent 55%),
    linear-gradient(160deg, var(--day-soft) 0%, var(--fp-surface) 58%);
  box-shadow:
    0 1px 2px rgba(26, 35, 50, 0.04),
    0 10px 22px color-mix(in srgb, var(--day-color) 10%, transparent);
  overflow: hidden;
}

.fp-day-card.is-day-1 { --day-color: #3d5a73; } /* Mo — Stahlblau */
.fp-day-card.is-day-2 { --day-color: #0d7a6f; } /* Di — Teal */
.fp-day-card.is-day-3 { --day-color: #e67a12; } /* Mi — Accent */
.fp-day-card.is-day-4 { --day-color: #c48a2a; } /* Do — Amber */
.fp-day-card.is-day-5 { --day-color: #b85c38; } /* Fr — Terracotta */

.fp-day-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0.32rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--day-color) 85%, #fff), var(--day-color));
}

.fp-day-card__cal {
  position: absolute;
  right: 0.55rem;
  top: 0.55rem;
  width: 2.6rem;
  height: 2.6rem;
  color: var(--day-color);
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
}

.fp-day-card__cal svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

.fp-day-card.is-gap .fp-day-card__cal {
  color: #a33b2b;
  opacity: 0.14;
}

.fp-day-card.is-today .fp-day-card__cal {
  opacity: 0.22;
}

.fp-day-card.is-gap {
  border-color: color-mix(in srgb, #a33b2b 35%, var(--fp-border));
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--day-color) 10%, transparent), transparent 50%),
    linear-gradient(160deg, color-mix(in srgb, #a33b2b 8%, #fff) 0%, var(--fp-surface) 62%);
}

.fp-day-card.is-today {
  border-color: color-mix(in srgb, var(--day-color) 55%, var(--fp-border));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--day-color) 30%, transparent),
    0 1px 2px rgba(26, 35, 50, 0.04),
    0 12px 26px color-mix(in srgb, var(--day-color) 18%, transparent);
}

.fp-day-card.is-today::before {
  width: 0.38rem;
}

.fp-day-card__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.fp-day-card__dow {
  font-size: 0.84rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--day-color);
}

.fp-day-card__heute {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--day-color);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--day-color) 35%, transparent);
}

.fp-day-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  margin-top: auto;
}

.fp-day-card__count {
  font-size: 2.05rem;
  font-weight: 800;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  color: var(--day-color);
  letter-spacing: -0.03em;
}

.fp-day-card.is-gap .fp-day-card__count {
  color: #a33b2b;
}

.fp-day-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  padding-bottom: 0.12rem;
}

.fp-day-card__label {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--fp-muted);
  line-height: 1.2;
}

.fp-day-card.is-gap .fp-day-card__label {
  color: #a33b2b;
}

.fp-day-card__status {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--day-color);
}

.fp-day-card.is-gap .fp-day-card__status {
  color: #a33b2b;
}

.fp-schedule-matrix th.is-today,
.fp-schedule-matrix td.is-today-col {
  background: color-mix(in srgb, var(--fp-accent) 8%, transparent);
}

.fp-schedule-matrix th.is-today { color: var(--fp-accent); }

.fp-schedule-short {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--fp-muted);
}

.fp-slot-badge {
  display: inline-flex;
  padding: 0.2rem 0.5rem;
  border-radius: 0.4rem;
  font-size: 0.75rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(230, 122, 18, 0.28);
  background: rgba(230, 122, 18, 0.14);
  color: var(--fp-accent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.fp-slot-badge.is-today {
  background: rgba(230, 122, 18, 0.28);
  color: var(--fp-accent-hover);
  border-color: rgba(230, 122, 18, 0.4);
}

.fp-plan-grid {
  display: grid;
  gap: 0.75rem;
}

.fp-plan-day {
  border: 1px solid var(--fp-border);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--fp-bg) 55%, white);
  padding: 0.85rem 1rem;
}

/* Journal — Filter-Card: kompakt, horizontal */
.fp-journal-filter-card {
  overflow: visible;
}

.fp-journal-filters {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fp-journal-filters__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.75rem;
  align-items: flex-end;
}

.fp-journal-filters__field {
  flex: 1 1 8.5rem;
  min-width: 8.5rem;
  max-width: 14rem;
}

.fp-journal-filters__actions-inline {
  flex: 0 0 auto;
}

.fp-journal-filters__submit-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.fp-journal-filters__submit-btns .btn {
  min-width: 6.5rem;
}

/* Zeitraum-Kalender */
.fp-daterange {
  position: relative;
  flex: 1 1 16rem;
  min-width: 15rem;
  max-width: 22rem;
}

.fp-daterange__controls {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.4rem;
  align-items: stretch;
}

.fp-daterange__trigger {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  min-height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--fp-border);
  border-radius: 0.375rem;
  background: var(--fp-surface);
  color: var(--fp-ink);
  font-size: 1rem;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}

.fp-daterange__trigger:hover,
.fp-daterange__trigger[aria-expanded='true'] {
  border-color: var(--fp-accent);
}

.fp-daterange__trigger [data-drp-label] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fp-daterange__panel {
  box-sizing: border-box;
  padding: 0.8rem;
  border: 1px solid var(--fp-border);
  border-radius: 0.65rem;
  background: var(--fp-surface);
  box-shadow: 0 10px 28px rgba(26, 35, 50, 0.14);
}

.fp-daterange__panel[hidden] {
  display: none !important;
}

.fp-daterange__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.fp-daterange__nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.fp-daterange__month {
  flex: 1 1 auto;
  text-align: center;
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--fp-ink);
}

.fp-daterange__nav-btn {
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--fp-border);
  border-radius: 0.4rem;
  background: #f4f6f8;
  color: var(--fp-ink);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.fp-daterange__nav-btn:hover {
  border-color: var(--fp-accent);
  color: var(--fp-accent);
}

.fp-daterange__weekdays,
.fp-daterange__days {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.2rem;
}

.fp-daterange__weekdays {
  margin-bottom: 0.3rem;
}

.fp-daterange__weekdays span {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--fp-muted);
  padding: 0.15rem 0;
}

.fp-daterange__day {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  font-size: 0.85rem;
  color: var(--fp-ink);
  cursor: pointer;
}

.fp-daterange__day.is-empty {
  pointer-events: none;
  visibility: hidden;
}

.fp-daterange__day:hover:not(.is-empty) {
  background: color-mix(in srgb, var(--fp-accent) 12%, transparent);
}

.fp-daterange__day.is-in-range {
  background: color-mix(in srgb, var(--fp-accent) 16%, transparent);
}

.fp-daterange__day.is-edge {
  background: var(--fp-accent);
  color: #fff;
  font-weight: 650;
}

.fp-daterange__day.is-today:not(.is-edge) {
  box-shadow: inset 0 0 0 1px var(--fp-accent);
}

.fp-daterange__hint {
  margin-top: 0.55rem;
  font-size: 0.75rem;
  color: var(--fp-muted);
  text-align: center;
}

.fp-journal-table td,
.fp-journal-table th {
  vertical-align: top;
}

.fp-journal-segments-inline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fp-journal-segments-inline__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--fp-border) 65%, transparent);
}

.fp-journal-segments-inline__item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.fp-journal-segments-inline__driver {
  font-weight: 650;
  min-width: 6.5rem;
}

.fp-journal-segments-inline__times {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.fp-journal-table th a.fp-th-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: inherit;
  text-decoration: none;
  font-weight: 650;
  white-space: nowrap;
}

.fp-journal-table th a.fp-th-sort:hover {
  color: var(--fp-accent);
  text-decoration: none;
}

.fp-journal-table th a.fp-th-sort::after {
  content: '⇅';
  font-size: 0.7em;
  opacity: 0.35;
}

.fp-journal-table th a.fp-th-sort.is-asc::after {
  content: '↑';
  opacity: 1;
  color: var(--fp-accent);
}

.fp-journal-table th a.fp-th-sort.is-desc::after {
  content: '↓';
  opacity: 1;
  color: var(--fp-accent);
}

.fp-status-pill {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 0.4rem;
  font-size: 0.75rem;
  font-weight: 650;
}

.fp-status-pill.is-handover {
  background: color-mix(in srgb, #3b6d9a 24%, transparent);
  color: #2a4f72;
}

.fp-journal-pager {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--fp-border);
}

@media (min-width: 640px) {
  .fp-journal-pager {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.fp-journal-pager__meta {
  color: var(--fp-muted);
  font-size: 0.9rem;
}

/* Journal-Export */
.fp-export-card {
  overflow: visible;
}

.fp-export-filters__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.75rem;
  align-items: flex-end;
}

.fp-export-filters__field {
  flex: 1 1 8.5rem;
  min-width: 8.5rem;
  max-width: 14rem;
}

.fp-export-filters__actions {
  flex: 0 0 auto;
}

.fp-export-preview__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.95rem;
}

.fp-export-preview__meta {
  color: var(--fp-muted);
  font-size: 0.9rem;
}

.fp-export-preview-table td,
.fp-export-preview-table th {
  vertical-align: middle;
}

/* Tablet + Mobile: Hamburger-Overlay (schiebt Seite nicht) */
@media (max-width: 991.98px) {
  .fp-header {
    z-index: 200;
  }

  .fp-header-inner {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
    padding: 0.7rem 1rem;
  }

  .fp-logo img {
    height: 2.75rem !important;
    max-width: min(12.5rem, 52vw) !important;
  }

  .fp-nav-toggle {
    display: inline-flex;
  }

  .fp-header-user {
    display: none;
  }

  .fp-header-panel {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0.75rem;
    right: 0.75rem;
    z-index: 210;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    max-height: min(70vh, 28rem);
    overflow-y: auto;
    padding: 0.65rem 0.75rem 0.75rem;
    border: 1px solid var(--fp-border);
    border-radius: 0.65rem;
    background: #fff;
    box-shadow: 0 12px 32px rgba(26, 35, 50, 0.16);
  }

  .fp-header.is-nav-open .fp-header-panel {
    display: flex;
  }

  .fp-header.is-nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 190;
    background: rgba(26, 35, 50, 0.28);
  }

  .fp-nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.15rem;
    width: 100%;
  }

  .fp-nav-links a {
    padding: 0.65rem 0.35rem;
    border-bottom: 0;
    border-radius: 0.4rem;
  }

  .fp-nav-links a.is-active {
    background: color-mix(in srgb, var(--fp-accent) 10%, transparent);
    border-bottom: 0;
  }

  .fp-nav-profile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.1rem;
    margin-top: 0.35rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--fp-border);
  }

  .fp-nav-profile__name {
    margin: 0 0 0.35rem;
    padding: 0 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--fp-muted);
  }

  .fp-nav-profile a {
    color: var(--fp-ink);
    text-decoration: none;
    font-weight: 500;
    padding: 0.65rem 0.35rem;
    border-radius: 0.4rem;
  }

  .fp-nav-profile a:hover,
  .fp-nav-profile a:focus-visible {
    color: var(--fp-accent);
    background: color-mix(in srgb, var(--fp-accent) 8%, transparent);
    outline: none;
  }

  .fp-nav-profile__logout {
    color: #b42318 !important;
  }

  .fp-nav-profile__logout:hover,
  .fp-nav-profile__logout:focus-visible {
    color: #912018 !important;
    background: #fef3f2 !important;
  }
}

/* Tabellen-Icon-Aktionen — Icons oben; Formular darunter, nicht neben dem Mülleimer */
.fp-icon-actions {
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.fp-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid rgba(26, 35, 50, 0.15);
  border-radius: 0.4rem;
  background: #fff;
  color: var(--fp-secondary, #1a2332);
  cursor: pointer;
  text-decoration: none;
  line-height: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fp-icon-btn:hover {
  background: rgba(26, 35, 50, 0.06);
  border-color: rgba(26, 35, 50, 0.28);
  color: var(--fp-secondary, #1a2332);
}

.fp-icon-btn.is-danger {
  color: #c0392b;
}

.fp-icon-btn.is-danger:hover {
  background: rgba(192, 57, 43, 0.08);
  border-color: rgba(192, 57, 43, 0.35);
  color: #c0392b;
}

.fp-icon-btn.is-primary {
  background: var(--fp-primary, #0d6efd);
  border-color: var(--fp-primary, #0d6efd);
  color: #fff;
}

.fp-icon-btn.is-primary:hover {
  filter: brightness(0.95);
  color: #fff;
}

.fp-icon-btn.is-warning {
  color: #9a6b00;
  border-color: rgba(154, 107, 0, 0.35);
}

.fp-icon-btn.is-warning:hover {
  background: rgba(154, 107, 0, 0.1);
  border-color: rgba(154, 107, 0, 0.5);
  color: #9a6b00;
}

details.fp-inline-edit[open] > summary.fp-icon-btn {
  background: rgba(26, 35, 50, 0.08);
  border-color: rgba(26, 35, 50, 0.28);
}

#fp-pois-table tbody tr[data-poi-id] {
  cursor: default;
}

.fp-pois-list-card {
  position: relative;
}

.fp-pois-bulk-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(2px);
}

.fp-pois-bulk-overlay[hidden] {
  display: none !important;
}

.fp-pois-bulk-overlay__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 22rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--fp-border);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 10px 28px rgba(26, 35, 50, 0.12);
  text-align: center;
}

.fp-pois-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
}

.fp-pois-spinner__ring {
  display: block;
  box-sizing: border-box;
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid color-mix(in srgb, var(--fp-accent) 22%, #e8eef4);
  border-top-color: var(--fp-accent);
  border-radius: 50%;
  animation: fp-pois-spin 0.75s linear infinite;
}

@keyframes fp-pois-spin {
  to {
    transform: rotate(360deg);
  }
}

.fp-pois-bulk-overlay__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  color: var(--fp-ink);
}

.fp-pois-bulk-overlay__hint {
  color: var(--fp-muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.fp-pois-list-card.is-bulk-processing {
  pointer-events: none;
}

body.fp-pois-bulk-running {
  cursor: progress;
}

