/* ==========================================================
   PART PILOT - Application Stylesheet
   ----------------------------------------------------------
   Bereinigte, unminifizierte CSS-Datei.

   Hinweise zur Pflege:
   - Neue Regeln bitte möglichst im passenden Abschnitt ergänzen.
   - Galerie-Regeln bitte ausschließlich im Abschnitt "Card Gallery" ändern.
   - Bei Background-SVGs nie die Kurzform "background" im Hover nutzen,
     sondern gezielt "background-color", sonst verschwinden die Icons.
========================================================== */

:root {
  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --ink: #101828;
  --text: #1f2937;
  --muted: #667085;
  --soft: #98a2b3;
  --line: #e6e8ec;
  --nav: #0f172a;
  --nav-2: #111c33;
  --accent: #84cc16;
  --accent-dark: #4d7c0f;
  --blue: #2563eb;
  --orange: #f97316;
  --red: #ef4444;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.05);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar: 292px;
  --bottom: 76px;
}
* {
  box-sizing: border-box;
}
html {
  font-size: 16px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter,
    "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  letter-spacing: 0;
}
h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  line-height: 1.15;
  font-weight: 760;
}
h2 {
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 720;
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--nav);
  color: #e5e7eb;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 100;
}
.brand-block {
  display: block;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.brand {
  display: block;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 4px 4px;
}
.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
}
.logo-mark span {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--accent);
  box-shadow:
    12px 0 0 #fff,
    0 12px 0 #fff,
    12px 12px 0 var(--accent);
}
.brand-text b {
  display: block;
  font-size: 0.92rem;
  color: #fff;
  letter-spacing: 0.08em;
}
.brand-text small {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 2px;
}
.sidebar-close {
  display: none;
}
.tenant-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  margin: 4px 0 22px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.tenant-card b,
.sidebar-user b {
  display: block;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 205px;
}
.tenant-card small,
.sidebar-user small {
  display: block;
  color: #94a3b8;
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 205px;
}
.tenant-icon {
  color: var(--accent);
  font-size: 1.15rem;
}
.side-nav {
  display: grid;
  gap: 4px;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 12px;
  text-decoration: none;
  color: #a8b3c7;
  font-size: 0.94rem;
  font-weight: 560;
  transition:
    background 0.15s,
    color 0.15s,
    transform 0.15s;
}
.side-nav a span {
  width: 21px;
  color: #7d89a3;
}
.side-nav a:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}
.side-nav a.active {
  background: #263247;
  color: #fff;
}
.side-nav a.active span {
  color: var(--accent);
}
.sidebar-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--accent);
  color: #163300;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.content {
  min-width: 0;
  padding: 26px 28px 108px;
}
.topbar {
  height: 56px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 560;
  text-transform: none;
}
.top-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  margin-bottom: 16px;
}
.card.hero {
  background: linear-gradient(180deg, #fff, #fbfcfd);
  border-color: #e9ecf1;
}
.hero h1 {
  max-width: 850px;
}
.muted {
  color: var(--muted);
  margin: 0.25rem 0;
}
.split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.stack,
.list {
  display: grid;
  gap: 12px;
}
.grid {
  display: grid;
  gap: 16px;
}
.grid2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.metric {
  padding: 18px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.metric b {
  display: inline-block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 760;
  letter-spacing: 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475467;
  font-size: 0.76rem;
  font-weight: 650;
  white-space: nowrap;
    margin-bottom:0.75rem;
    margin-right:0.25rem;
}
.btn,
button {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 11px 15px;
  background: var(--nav);
  color: #fff;
  text-decoration: none;
  font: inherit;
  font-weight: 680;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition:
    transform 0.12s,
    box-shadow 0.12s,
    background 0.12s;
}
.btn:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}
.btn.secondary,
button.secondary,
.secondary {
  background: #eef4e6;
  color: #31570f;
}
.btn.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.compact {
  padding: 9px 12px;
  font-size: 0.9rem;
}
.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
}
.row-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.12s,
    box-shadow 0.12s,
    transform 0.12s;
}
.row-card:hover {
  border-color: #d1d6df;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.row-card h2 {
  font-size: 1.02rem;
}
.form-card {
  max-width: 1180px;
}
.form-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin: 0 0 16px;
  background: #fff;
}
legend {
  padding: 0 8px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 720;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
label {
  display: block;
  font-size: 0.82rem;
  font-weight: 640;
  color: #344054;
  margin: 0 0 7px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #d7dce4;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition:
    border-color 0.12s,
    box-shadow 0.12s,
    background 0.12s;
}
input::placeholder,
textarea::placeholder {
  color: #98a2b3;
}
textarea {
  min-height: 118px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #9dbb6b;
  box-shadow: 0 0 0 4px rgba(132, 204, 22, 0.16);
}
.select-search {
  display: grid;
  gap: 7px;
  margin: 0;
}
.select-search input {
  background: #f8fafc;
}
.notice {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 14px;
  padding: 13px 14px;
  margin: 14px 0;
}
.searchbar {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.search-input-group input {
  padding-right: 56px;
}
.scan-icon-btn {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #eef4e6;
  color: #31570f;
  border: 1px solid #d9e8c8;
  text-decoration: none;
  transition:
    background 0.12s,
    transform 0.12s,
    box-shadow 0.12s;
}
.scan-icon-btn:hover {
  background: #e2efd3;
  transform: translateY(-50%) scale(1.02);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}
.scan-icon-btn svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.searchbar-with-scan {
  grid-template-columns: minmax(0, 1fr) auto;
}
@media (max-width: 860px) {
  .searchbar-with-scan {
    grid-template-columns: 1fr;
  }
  .searchbar-with-scan button {
    width: 100%;
  }
  .scan-icon-btn {
    width: 42px;
    height: 42px;
  }
}
.result-card {
  transition:
    transform 0.12s,
    box-shadow 0.12s,
    border-color 0.12s;
}
.result-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: #d1d6df;
}
.meta-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
th {
  color: #667085;
  background: #f8fafc;
  font-weight: 680;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.photo-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}
.bottom-nav,
.mobile-menu-btn,
.backdrop {
  display: none;
}
body.dark {
  --bg: #0b1220;
  --surface: #111827;
  --surface-2: #0f172a;
  --ink: #f8fafc;
  --text: #d0d5dd;
  --muted: #98a2b3;
  --soft: #667085;
  --line: #263244;
  --nav: #070d18;
  --nav-2: #0d1525;
}
.dark .card,
.dark .form-section,
.dark input,
.dark select,
.dark textarea,
.dark table {
  background: #111827;
  color: var(--text);
}
.dark input:focus,
.dark select:focus,
.dark textarea:focus {
  box-shadow: 0 0 0 4px rgba(132, 204, 22, 0.18);
}
.dark .metric,
.dark th {
  background: #0f172a;
}
.dark .btn.ghost {
  background: #111827;
  color: #f8fafc;
}
.dark .btn.secondary,
.dark button.secondary,
.dark .secondary {
  background: #1f3116;
  color: #bef264;
}
@media (max-width: 1100px) {
  .grid3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .field-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 860px) {
  .app-shell {
    display: block;
  }
  .content {
    padding: 16px 14px 96px;
  }
  .topbar {
    height: auto;
    margin-bottom: 16px;
  }
  .top-actions {
    display: none;
  }
  .mobile-menu-btn {
    position: fixed;
    display: grid;
    gap: 4px;
    left: 14px;
    top: 14px;
    z-index: 140;
    width: 44px;
    height: 44px;
    padding: 12px;
    border-radius: 13px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
  }
  .mobile-menu-btn span {
    display: block;
    height: 2px;
    background: #111827;
    border-radius: 999px;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(86vw, 320px);
    height: auto;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 26px 0 70px rgba(15, 23, 42, 0.25);
  }
  body.menu-open .sidebar {
    transform: translateX(0);
  }
  .backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    z-index: 90;
  }
  body.menu-open .backdrop {
    display: block;
  }
  .sidebar-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
  }
  .split {
    display: grid;
  }
  .grid2,
  .grid3,
  .field-grid,
  .field-grid.three {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 12px;
  }
  .searchbar {
    grid-template-columns: 1fr;
  }
  .row-card {
    grid-template-columns: 1fr;
  }
  .actions .btn,
  .actions button {
    width: 100%;
  }
  .bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 7px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(16px);
    z-index: 80;
  }
  .bottom-nav a {
    display: grid;
    place-items: center;
    gap: 2px;
    text-align: center;
    text-decoration: none;
    color: #667085;
    font-size: 0.72rem;
    font-weight: 650;
    padding: 8px 4px;
    border-radius: 13px;
  }
  .bottom-nav a span {
    font-size: 1rem;
  }
  .bottom-nav a.active {
    background: #eef4e6;
    color: #31570f;
  }
  .dark .mobile-menu-btn,
  .dark .bottom-nav {
    background: #111827;
  }
  .dark .mobile-menu-btn span {
    background: #f8fafc;
  }
}

/* QR scanner stage scaling fix
   Keeps the camera area inside the available viewport width while preserving a stable aspect ratio. */
.scan-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 18px;
  align-items: start;
  overflow: hidden;
}
.scan-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  isolation: isolate;
}
.scan-stage video,
.scan-stage canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: cover;
}
.scan-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(68%, 320px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border: 3px solid rgba(132, 204, 22, 0.92);
  border-radius: 22px;
  box-shadow:
    0 0 0 999px rgba(2, 6, 23, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  pointer-events: none;
  z-index: 2;
}
.scan-panel {
  min-width: 0;
}
.inline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

@media (max-width: 860px) {
  .scan-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    overflow: hidden;
  }
  .scan-stage {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
  }
  .scan-frame {
    width: min(70%, 260px);
    border-radius: 18px;
  }
  .inline-fields {
    grid-template-columns: 1fr;
  }
  .inline-fields .btn,
  .inline-fields button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .scan-stage {
    aspect-ratio: 1 / 1;
  }
  .scan-frame {
    width: 72%;
  }
}

/* Part Pilot global branding update */
.logo-mark.logo-image {
  overflow: hidden;
  background: #fff;
  padding: 4px;
}
.logo-mark.logo-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 9px;
}
.brand-text b {
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
  line-height: 1.08;
}
.brand-text small {
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #b7c0d4;
}
.brand-preview {
  margin: 14px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}
.brand-preview img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
}
.brand-preview span {
  font-weight: 760;
  color: var(--ink);
}
.inline-admin-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}
.inline-admin-form select {
  min-width: 145px;
}
.inline-admin-form button {
  white-space: nowrap;
}
@media (max-width: 860px) {
  .brand {
    gap: 10px;
    min-width: 0;
  }
  .brand-text {
    min-width: 0;
  }
  .brand-text b {
    font-size: 0.98rem;
  }
  .brand-text small {
    max-width: 180px;
  }
  .tenant-card {
    display: none;
  }
  .inline-admin-form {
    display: grid;
    grid-template-columns: 1fr;
  }
  .inline-admin-form button {
    width: 100%;
  }
}

/* Search filter 500-fix + responsive filter UI */
.search-filter-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}
.search-main-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px) auto;
  gap: 12px;
  align-items: end;
}
.field-grow {
  min-width: 0;
}
.search-submit {
  height: 44px;
}
.filter-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 14px;
}
.filter-panel summary {
  cursor: pointer;
  font-weight: 760;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-panel summary::-webkit-details-marker {
  display: none;
}
.filter-panel summary:after {
  content: "›";
  margin-left: auto;
  transform: rotate(90deg);
  color: var(--muted);
  font-size: 1.2rem;
}
.filter-panel:not([open]) summary:after {
  transform: rotate(0);
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.custom-filter-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.custom-filter-block h3 {
  margin: 0;
  font-size: 1rem;
}
.filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.filter-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
@media (max-width: 1100px) {
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .search-main-row {
    grid-template-columns: 1fr;
  }
  .filter-grid {
    grid-template-columns: 1fr;
  }
  .filter-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .filter-actions .button,
  .filter-actions button,
  .search-submit {
    width: 100%;
  }
}

/* Part Pilot: Shop-Ansicht Ersatzteile + Detailseite */
.parts-hero {
  overflow: hidden;
}
.parts-actions {
  justify-content: flex-end;
}
.empty-state {
  display: grid;
  gap: 12px;
  align-items: start;
}
.parts-shop-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(260px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.part-product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.part-product-card.is-reserved {
  border-color: rgba(249, 115, 22, 0.55);
}
.reservation-ribbon {
  position: absolute;
  right: -38px;
  top: 20px;
  z-index: 5;
  width: 150px;
  transform: rotate(35deg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  background: var(--orange);
  color: #fff;
  font-size: 0.5rem;
  font-weight: 850;
  letter-spacing: 0em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.24);
  pointer-events: none;
}
.reservation-list-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
  font-size: 0.7rem;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.parts-table tr.is-reserved td:first-child {
  position: relative;
}

.part-product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #cfd6df;
}
.part-product-image {
  position: relative;
  display: block;
  aspect-ratio: 4/3;
  background: #f1f5f9;
  overflow: hidden;
  text-decoration: none;
}
.part-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.part-product-card:hover .part-product-image img {
  transform: scale(1.025);
}
.part-image-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f3f4f6, #e9edf2);
  color: #7b8494;
  font-weight: 720;
}
.part-image-placeholder.large {
  min-height: 360px;
  border-radius: 18px;
}
.part-status-badge {
  position: absolute;
  left: 13px;
  top: 13px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-size: 0.78rem;
  font-weight: 760;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
}
.part-product-body {
  padding: 16px;
  display: grid;
  gap: 12px;
  flex: 1;
}
.part-product-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.83rem;
}
.part-product-topline b {
  color: var(--ink);
  font-size: 1rem;
}
.part-product-body h2 {
  font-size: 1.05rem;
  line-height: 1.25;
  margin: 0;
}
.part-product-body h2 a {
  text-decoration: none;
}
.part-no {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.part-card-specs {
  display: grid;
  gap: 8px;
  margin: 0;
}
.part-card-specs div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
}
.part-card-specs dt {
  color: var(--muted);
  font-size: 0.78rem;
}
.part-card-specs dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.part-product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: auto;
}
.compact-list-card {
  padding: 0;
  overflow: hidden;
}
.parts-table-wrap {
  border: 0;
  border-radius: 18px;
}
.parts-table th {
  white-space: nowrap;
}
.parts-table td {
  vertical-align: middle;
}
.parts-table td small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.table-main-link {
  display: inline-block;
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
}
.table-main-link:hover {
  text-decoration: underline;
}
.table-actions {
  text-align: right;
  white-space: nowrap;
}
.part-detail-shop {
  display: grid;
  grid-template-columns: minmax(280px, 520px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.part-gallery-card,
.part-info-card {
  margin-bottom: 0;
}
.main-product-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 18px;
  background: #f1f5f9;
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid var(--line);
}
.main-product-photo.is-empty {
  cursor: default;
}
.main-product-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}
.thumb-strip {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.thumb-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 13px;
  padding: 0;
  width: 76px;
  height: 62px;
  flex: 0 0 auto;
  overflow: hidden;
  box-shadow: none;
}
.thumb-btn:hover {
  transform: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.part-detail-head {
  display: grid;
  gap: 8px;
}
.part-detail-badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.product-price-box {
  margin: 18px 0;
  padding: 16px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
}
.product-price-box span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 640;
}
.product-price-box strong {
  color: var(--ink);
  font-size: 2rem;
  line-height: 1.1;
}
.product-price-box small {
  color: var(--muted);
}
.detail-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.detail-spec-grid div,
.clean-definition-list div {
  padding: 12px;
  border-radius: 13px;
  background: #f8fafc;
  border: 1px solid var(--line);
  min-width: 0;
}
.detail-spec-grid dt,
.clean-definition-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  margin-bottom: 4px;
}
.detail-spec-grid dd,
.clean-definition-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 690;
  word-break: break-word;
}
.part-detail-actions {
  margin-top: 18px;
}
.detail-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.clean-definition-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 0;
}
.custom-field-list {
  grid-template-columns: 1fr;
}
.qr-detail-box {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}
.qr-detail-box .qr-preview {
  width: 132px;
  height: 132px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.long-text {
  margin: 0.5rem 0 0;
  color: var(--text);
  white-space: normal;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 12, 24, 0.86);
  padding: 22px;
}
.lightbox.is-open {
  display: flex;
}
.lightbox img {
  max-width: min(1100px, 96vw);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.45);
}
.lightbox-close {
  position: fixed;
  right: 18px;
  top: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}
.dark .part-product-image,
.dark .part-image-placeholder,
.dark .main-product-photo,
.dark .product-price-box,
.dark .detail-spec-grid div,
.dark .clean-definition-list div {
  background: #0f172a;
}
.dark .thumb-btn {
  background: #111827;
}
.dark .part-status-badge {
  background: rgba(17, 24, 39, 0.88);
  color: #f8fafc;
}
.dark .qr-detail-box .qr-preview {
  background: #fff;
}
@media (max-width: 1180px) {
  .part-detail-shop {
    grid-template-columns: 1fr;
  }
  .part-gallery-card {
    max-width: 760px;
  }
  .detail-content-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 860px) {
  .parts-actions {
    justify-content: stretch;
  }
  .parts-actions .btn {
    flex: 1;
  }
  .parts-shop-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .part-product-card {
    border-radius: 18px;
  }
  .part-product-actions {
    grid-template-columns: 1fr;
  }
  .part-detail-shop {
    gap: 12px;
  }
  .part-image-placeholder.large {
    min-height: 250px;
  }
  .detail-spec-grid,
  .clean-definition-list {
    grid-template-columns: 1fr;
  }
  .product-price-box strong {
    font-size: 1.65rem;
  }
  .qr-detail-box {
    align-items: flex-start;
  }
  .parts-table {
    min-width: 820px;
  }
  .zoom-hint {
    font-size: 0.74rem;
  }
  .lightbox {
    padding: 10px;
  }
  .lightbox img {
    max-width: 96vw;
    max-height: 84vh;
    border-radius: 12px;
  }
}

/* Part Pilot: stabile Shop-Übersichten für Teile und Spenderfahrzeuge */
.vehicle-shop-grid .part-product-image {
  aspect-ratio: 16/10;
}
.vehicle-product-card .part-card-specs div {
  grid-template-columns: 76px minmax(0, 1fr);
}
.detail-accordion {
  display: block;
}
.detail-accordion summary {
  cursor: pointer;
  font-weight: 780;
  font-size: 1.05rem;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.detail-accordion summary::-webkit-details-marker {
  display: none;
}
.detail-accordion summary:after {
  content: "+";
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}
.detail-accordion[open] summary:after {
  content: "–";
}
.detail-accordion > .clean-definition-list,
.detail-accordion > p {
  margin-top: 14px;
}
@media (max-width: 860px) {
  .vehicle-shop-grid .part-product-image {
    aspect-ratio: 4/3;
  }
  .detail-accordion summary {
    font-size: 1rem;
  }
}

/* Overview filters for parts and vehicles */
.overview-filter-card {
  padding: 16px 18px;
}
.overview-filter-form {
  margin-top: 0;
}
.overview-filter-form .filter-panel {
  background: #fbfcfd;
}
.overview-filter-form .search-main-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.overview-result-head {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 4px 0 14px;
}
.check-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 650;
}
.check-filter input {
  width: auto;
  margin: 0;
}
.button.secondary {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 11px 15px;
  text-decoration: none;
  font: inherit;
  font-weight: 680;
  line-height: 1;
  cursor: pointer;
  background: #eef4e6;
  color: #31570f;
}
.dark .overview-filter-form .filter-panel,
.dark .check-filter {
  background: #111827;
}
@media (max-width: 720px) {
  .overview-filter-card {
    padding: 14px;
  }
  .overview-filter-form .search-main-row {
    grid-template-columns: 1fr;
  }
  .overview-result-head {
    margin-top: 2px;
  }
  .check-filter {
    width: 100%;
  }
}

/* Vehicle upgrade: Baujahr, Karosserieform, zugeordnete Teile */
.related-parts-section {
  margin-top: 22px;
}
.vehicle-parts-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.mini-part-card {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 18px;
  background: var(--surface, #fff);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}
.mini-part-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.09);
  border-color: rgba(15, 23, 42, 0.18);
}
.mini-part-image {
  width: 74px;
  height: 74px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 12px;
  text-align: center;
}
.mini-part-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mini-part-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mini-part-content strong {
  font-size: 15px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-part-content small {
  color: var(--muted, #6b7280);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-part-content em {
  font-style: normal;
  color: var(--muted, #6b7280);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-part-price {
  font-weight: 800;
  white-space: nowrap;
  color: var(--text, #111827);
  font-size: 14px;
}
.empty-state.compact {
  padding: 18px;
  border: 1px dashed var(--border, #e5e7eb);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.025);
}
@media (max-width: 640px) {
  .vehicle-parts-mini-grid {
    grid-template-columns: 1fr;
  }
  .mini-part-card {
    grid-template-columns: 62px 1fr;
  }
  .mini-part-image {
    width: 62px;
    height: 62px;
  }
  .mini-part-price {
    grid-column: 2;
    justify-self: start;
  }
  .detail-spec-grid {
    grid-template-columns: 1fr;
  }
}

/* Part Pilot Lagerplatz/WMS Update */
.side-nav a[href="/locations"] span {
  color: #b8d47a;
}
.bottom-nav {
  grid-template-columns: repeat(6, 1fr) !important;
}
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 7px;
}
.label-row label {
  margin: 0;
}
.mini-inline-button {
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 0.78rem;
  background: #eef4e6;
  color: #31570f;
  box-shadow: none;
  white-space: nowrap;
}
.quick-modal[hidden] {
  display: none;
}
.quick-modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: grid;
  place-items: center;
  padding: 18px;
}
.quick-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(6px);
}
.quick-modal-panel {
  position: relative;
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 30px 120px rgba(15, 23, 42, 0.36);
  padding: 22px;
}
.quick-modal-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  padding: 0;
  background: #f2f4f7;
  color: #111827;
  font-size: 1.4rem;
}
.quick-modal-message {
  min-height: 24px;
  color: #9a3412;
  font-weight: 650;
}
.modal-open {
  overflow: hidden;
}
.compact-grid {
  gap: 12px;
}
.locations-hero {
  overflow: hidden;
}
.warehouse-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(250px, 1fr));
  gap: 18px;
}
.warehouse-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  transition:
    transform 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}
.warehouse-card:hover {
  transform: translateY(-2px);
  border-color: #cfd6df;
  box-shadow: var(--shadow);
}
.warehouse-card-main {
  display: grid;
  gap: 14px;
  padding: 18px;
  text-decoration: none;
  min-width: 0;
}
.warehouse-code {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.warehouse-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.warehouse-specs div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8fafc;
}
.warehouse-specs dt {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
}
.warehouse-specs dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-weight: 760;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.warehouse-card-actions {
  border-left: 1px solid var(--line);
  background: #fbfcfd;
  padding: 14px;
  display: grid;
  align-content: space-between;
  gap: 12px;
}
.qr-mini {
  width: 88px;
  height: 88px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  justify-self: center;
}
.warehouse-usage {
  display: grid;
  gap: 7px;
}
.usage-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.usage-bar {
  height: 9px;
  background: #e9eef5;
  border-radius: 999px;
  overflow: hidden;
}
.usage-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #b8d47a, #5d7c2e);
  border-radius: inherit;
}
.warehouse-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  margin-top: 20px;
}
.warehouse-qr-box {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcfd;
  text-align: center;
}
.warehouse-qr-box .qr-preview {
  width: 160px;
  height: 160px;
}
.warehouse-usage.big {
  margin-top: 16px;
}
.history-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.history-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8fafc;
  display: grid;
  gap: 3px;
}
.history-row small {
  color: var(--muted);
}
.dark .quick-modal-panel,
.dark .warehouse-card,
.dark .warehouse-card-actions,
.dark .warehouse-specs div,
.dark .warehouse-qr-box,
.dark .history-row {
  background: #111827;
}
.dark .usage-bar {
  background: #263247;
}
.dark .quick-modal-close {
  background: #263247;
  color: #fff;
}
@media (max-width: 1280px) {
  .warehouse-grid {
    grid-template-columns: repeat(3, minmax(240px, 1fr));
  }
}
@media (max-width: 980px) {
  .warehouse-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
  .warehouse-detail-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .bottom-nav a {
    font-size: 0.66rem;
    padding: 7px 2px;
  }
  .warehouse-grid {
    grid-template-columns: 1fr;
  }
  .warehouse-card {
    grid-template-columns: 1fr;
  }
  .warehouse-card-actions {
    border-left: 0;
    border-top: 1px solid var(--line);
    grid-template-columns: auto 1fr;
    align-items: center;
  }
  .warehouse-card-actions .actions {
    justify-content: flex-end;
  }
  .quick-modal {
    padding: 10px;
    place-items: end center;
  }
  .quick-modal-panel {
    width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
  }
  .label-row {
    align-items: flex-start;
  }
  .mini-inline-button {
    padding: 8px 10px;
  }
  .warehouse-specs {
    grid-template-columns: 1fr 1fr;
  }
}
.mini-move-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin: -6px 0 10px 76px;
  padding: 0 10px 10px;
}
.mini-move-form select {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 0.86rem;
}
.mini-move-form .btn {
  height: 38px;
}
.vehicle-parts-mini-grid .select-search {
  margin: 0;
}
.vehicle-parts-mini-grid .select-search input {
  display: none;
}
@media (max-width: 720px) {
  .mini-move-form {
    grid-template-columns: 1fr;
    margin: 0 0 12px 0;
    padding: 0 0 12px;
  }
  .mini-move-form .btn {
    width: 100%;
  }
}

/* Part Pilot: kompakte Filter auf Übersichtsseiten */
.overview-collapsible-filter summary {
  min-height: 46px;
  padding: 0 2px;
}
.overview-collapsible-filter summary em {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 800;
  color: #355b1d;
  background: #e7f2da;
  border: 1px solid #d5e7c5;
  border-radius: 999px;
  padding: 5px 9px;
  margin-left: 8px;
}
.dark .overview-collapsible-filter summary em {
  color: #d7f1bd;
  background: #1f331d;
  border-color: #34542d;
}
.overview-filter-card .search-main-row {
  position: relative;
  z-index: 1;
}
@media (max-width: 720px) {
  .overview-filter-card {
    margin-bottom: 12px;
  }
  .overview-filter-form .filter-panel {
    margin-top: 10px;
    padding: 11px 12px;
    border-radius: 16px;
  }
  .overview-filter-form .filter-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
  }
  .overview-filter-form .custom-filter-block {
    margin-top: 12px;
    padding-top: 12px;
  }
  .overview-filter-form .filter-actions {
    position: sticky;
    bottom: 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding-top: 10px;
    margin-top: 12px;
    justify-content: stretch;
  }
  .overview-filter-form .filter-actions .button,
  .overview-filter-form .filter-actions button {
    flex: 1;
  }
  .overview-filter-form details:not([open]) {
    padding-bottom: 11px;
  }
  .parts-shop-grid {
    margin-top: 12px;
  }
}

/* Suche: gleiche Ergebnisdarstellung wie Ersatzteile/Spenderfahrzeuge */
.search-overview-card {
  margin-bottom: 14px;
}
.search-result-head {
  margin-top: 0;
}
.search-section-block {
  margin-top: 22px;
}
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 14px;
}
.section-title-row h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0;
  color: var(--ink);
}
.text-link {
  font-weight: 750;
  color: #31570f;
  text-decoration: none;
}
.text-link:hover {
  text-decoration: underline;
}
.dark .text-link {
  color: #b8d47a;
}
.search-section-block .parts-shop-grid {
  margin-top: 0;
}
.search-filter-details:not([open]) {
  padding-bottom: 11px;
}
@media (max-width: 720px) {
  .section-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .section-title-row h2 {
    font-size: 1.15rem;
  }
  .search-hero .actions {
    width: 100%;
  }
  .search-hero .actions .btn {
    width: 100%;
    justify-content: center;
  }
  .search-filter-details {
    margin-top: 10px;
  }
  .search-filter-details:not([open]) .filter-grid,
  .search-filter-details:not([open]) .custom-filter-block,
  .search-filter-details:not([open]) .filter-actions {
    display: none;
  }
}

/* Detail links to filtered search */
.detail-filter-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
  border-bottom: 0px solid rgba(15, 23, 42, 0.22);
  transition:
    color 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}
.detail-filter-link:hover {
  color: #0f766e;
  border-color: currentColor;
}
.detail-filter-link::after {
  content: "↗";
  font-size: 0.78em;
  opacity: 0.55;
  line-height: 1;
}
.filter-pill {
  border-bottom: 0 !important;
}
.filter-pill::after {
  font-size: 0.72em;
  opacity: 0.7;
}
.clean-definition-list dd .detail-filter-link {
  max-width: 100%;
  overflow-wrap: anywhere;
}
@media (hover: none) {
  .detail-filter-link {
    padding: 0.08rem 0;
  }
}

/* Part Pilot: Löschdialoge */
.btn.danger,
button.danger {
  background: #b42318;
  color: #fff;
  border: 1px solid #b42318;
}
.btn.danger:hover,
button.danger:hover {
  background: #912018;
  border-color: #912018;
}
.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: #fecdca;
  background: #fffafa;
}
.danger-zone h2 {
  color: #7a271a;
  margin-bottom: 4px;
}
.danger-zone .muted {
  max-width: 720px;
}
.confirm-dialog {
  width: min(560px, calc(100vw - 28px));
  border: 0;
  border-radius: 22px;
  padding: 0;
  background: transparent;
  color: var(--text);
}
.confirm-dialog::backdrop {
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(6px);
}
.confirm-dialog-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 32px 110px rgba(15, 23, 42, 0.35);
}
.confirm-dialog-box h2 {
  font-size: 1.35rem;
  color: #7a271a;
  margin: 0 0 8px;
}
.confirm-dialog-box p {
  margin: 0.25rem 0 18px;
  color: var(--text);
}
.confirm-dialog-box .actions {
  justify-content: flex-end;
}
.dark .danger-zone {
  background: #1f1111;
  border-color: #7f1d1d;
}
.dark .confirm-dialog-box {
  background: #111827;
}
@media (max-width: 720px) {
  .danger-zone {
    display: grid;
  }
  .danger-zone .btn {
    width: 100%;
  }
  .confirm-dialog-box .actions {
    display: grid;
  }
  .confirm-dialog-box .actions .btn,
  .confirm-dialog-box .actions button {
    width: 100%;
  }
}

/* Part Pilot Login Refresh */
.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 18% 12%,
      rgba(68, 211, 138, 0.16),
      transparent 30rem
    ),
    linear-gradient(135deg, #06101a 0%, #0a1826 48%, #101d2d 100%) !important;
  color: #eef6f5;
}
.auth-page .app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: transparent !important;
}
.auth-page .content {
  width: 100%;
  max-width: 520px;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}
.auth-page main {
  width: 100%;
  display: grid;
  place-items: center;
}
.login-shell {
  width: 100%;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1rem;
}
.login-card {
  width: min(100%, 480px);
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.65rem;
  text-align: center;
  color: #fff;
}
.login-logo-image {
  max-width: min(320px, 100%);
  max-height: 82px;
  object-fit: contain;
  display: block;
}
.login-brand .partpilot-signet {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(145deg, #12314b, #0b1d2e);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.login-brand .partpilot-signet span {
  width: 24px;
  height: 24px;
  border: 5px solid #44d38a;
  border-left-color: transparent;
  border-radius: 50%;
  display: block;
  transform: rotate(-20deg);
}
.login-brand b {
  font-size: 1.3rem;
  letter-spacing: 0.01em;
}
.login-copy {
  text-align: center;
  margin-bottom: 1.25rem;
}
.login-copy .eyebrow {
  color: #44d38a;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin: 0 0 0.65rem;
}
.login-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 6vw, 3.1rem);
  line-height: 1;
  letter-spacing: -0.035em;
}
.login-form label {
  display: block;
  color: #d8e3ec;
  font-weight: 750;
  margin-bottom: 0.45rem;
}
.login-form input {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  padding: 0.9rem 1rem;
  font: inherit;
  outline: none;
}
.login-form input:focus {
  border-color: rgba(68, 211, 138, 0.65);
  box-shadow: 0 0 0 4px rgba(68, 211, 138, 0.13);
}
.login-form input::placeholder {
  color: rgba(224, 233, 240, 0.48);
}
.login-submit {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #44d38a, #9cf2bc);
  color: #03120d;
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
}
.login-error {
  background: rgba(255, 86, 86, 0.13);
  border: 1px solid rgba(255, 86, 86, 0.28);
  color: #ffd8d8;
  border-radius: 16px;
  padding: 0.9rem 1rem;
}
.login-foot {
  text-align: center;
  margin-top: 1rem;
}
.login-foot a {
  color: #9cf2bc;
  font-weight: 800;
}
@media (max-width: 620px) {
  .auth-page .app-shell {
    padding: 0.75rem;
  }
  .login-shell {
    padding: 0.75rem;
  }
  .login-card {
    border-radius: 24px;
  }
  .login-logo-image {
    max-height: 68px;
  }
  .login-copy h1 {
    font-size: 2.15rem;
  }
}

/* Login centering refinement for dark-logo branding */
.auth-page,
.auth-page body {
  min-height: 100vh;
}
.auth-page .app-shell {
  min-height: 100svh;
  align-items: center;
  justify-items: center;
}
.auth-page .content {
  display: grid;
  place-items: center;
  min-height: 100svh;
}
.login-shell {
  min-height: auto;
}
.login-card {
  margin: auto;
}
.login-logo-image {
  filter: none;
}
@media (max-width: 620px) {
  .auth-page .content {
    min-height: 100svh;
  }
  .login-card {
    width: min(100%, 440px);
  }
}

/* ==========================================================
   Uploads, CSV Export und Etiketten-Einstellungen
   ----------------------------------------------------------
   Galerie-Styles wurden bewusst in den eigenen Abschnitt
   "Card Gallery" ausgelagert.
========================================================== */
.multi-upload-stack {
  display: grid;
  gap: 0.75rem;
  margin: 0.35rem 0 0.5rem;
}
.upload-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.upload-row input[type="file"] {
  width: 100%;
  min-width: 0;
}
.upload-remove {
  width: 2.45rem;
  height: 2.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.photo-upload-field small {
  display: block;
  margin-top: 0.25rem;
}
.label-settings-card .label-type-box {
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  padding: 1rem;
  background: var(--surface-soft, rgba(248, 250, 252, 0.8));
  margin-bottom: 1rem;
}
.label-type-box h3 {
  margin: 0.1rem 0 0.75rem;
}
.label-size-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.csv-note {
  font-size: 0.82rem;
  color: var(--muted);
}
@media (max-width: 720px) {
  .label-size-inline {
    grid-template-columns: 1fr;
  }
  .upload-row {
    align-items: stretch;
    flex-direction: column;
  }
  .upload-remove {
    align-self: flex-end;
  }
  .parts-actions {
    flex-wrap: wrap;
  }
}

/* Part Pilot user account management */
.user-admin-card .section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.admin-users-table td,
.admin-users-table th {
  vertical-align: middle;
}
.table-actions {
  white-space: nowrap;
}
.readonly-input {
  background: rgba(15, 23, 42, 0.04);
  color: #64748b;
  cursor: not-allowed;
}
.user-edit-grid {
  align-items: start;
}
.split-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}
.danger-card {
  border-color: rgba(220, 38, 38, 0.24) !important;
  background: linear-gradient(
    180deg,
    rgba(254, 242, 242, 0.92),
    rgba(255, 255, 255, 0.98)
  ) !important;
  color: #7f1d1d;
}
.danger-zone {
  border-color: rgba(220, 38, 38, 0.18) !important;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(254, 242, 242, 0.7)
  ) !important;
}
.btn.danger,
button.danger {
  background: #b91c1c !important;
  color: #fff !important;
  border-color: #b91c1c !important;
  box-shadow: 0 12px 26px rgba(185, 28, 28, 0.18);
}
.btn.danger:hover,
button.danger:hover {
  background: #991b1b !important;
  border-color: #991b1b !important;
}
.modal-backdrop[hidden] {
  display: none !important;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.confirm-modal {
  width: min(520px, 100%);
  border-radius: 24px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.28);
  padding: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.confirm-modal h2 {
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
  letter-spacing: 0 !important;
}
.confirm-modal p {
  line-height: 1.55;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
body.modal-open {
  overflow: hidden;
}
@media (max-width: 720px) {
  .user-admin-card .section-head {
    display: block;
  }
  .modal-actions .btn,
  .modal-actions button {
    width: 100%;
    justify-content: center;
  }
  .split-actions .btn,
  .split-actions button {
    width: 100%;
  }
  .admin-users-table {
    min-width: 760px;
  }
}

/* Systemverwaltungsbereich */
.superadmin-hero {
  background: linear-gradient(135deg, #0f172a, #1f2937);
  color: #fff;
  border: 0;
}
.superadmin-hero .muted {
  color: rgba(255, 255, 255, 0.72);
}
.superadmin-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 18px;
}
.sa-stat {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}
.sa-stat b {
  display: block;
  font-size: 28px;
  line-height: 1;
  color: #0f172a;
}
.sa-stat span {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 13px;
}
.sa-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 16px;
}
.sa-tabs a {
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: #334155;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}
.sa-tabs a.active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}
.sa-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(150px, 0.8fr));
  gap: 12px;
  align-items: end;
}
.sa-filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.sa-table-card .table-wrap {
  max-height: none;
}
.sa-table td {
  vertical-align: middle;
}
.sa-inline-edit {
  display: contents;
}
.table-actions {
  display: flex !important;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.table-actions form {
  display: inline;
}
.btn.danger,
button.danger {
  background: #991b1b !important;
  color: #fff !important;
  border-color: #991b1b !important;
}
.btn.success,
button.success {
  background: #047857 !important;
  color: #fff !important;
  border-color: #047857 !important;
}
.pill.ok {
  background: #dcfce7;
  color: #166534;
}
.pill.warn {
  background: #fee2e2;
  color: #991b1b;
}
@media (max-width: 900px) {
  .superadmin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sa-filter-form {
    grid-template-columns: 1fr;
  }
  .sa-tabs {
    overflow: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .sa-tabs a {
    white-space: nowrap;
  }
  .table-actions {
    min-width: 220px;
  }
}

/* ==========================================================
   Card Gallery
   ----------------------------------------------------------
   Galerie für Ersatzteil- und Spenderfahrzeug-Karten.

   Diese Regeln sind bewusst zentralisiert. Frühere doppelte
   Definitionen von .gallery-arrow, .gallery-prev und .gallery-next
   wurden entfernt, damit Hover-Zustände die SVG-Pfeile nicht mehr
   überschreiben.
========================================================== */

.card-gallery {
  position: relative;
  overflow: hidden;
}

.card-gallery-link {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.card-gallery-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition:
    opacity 0.18s ease,
    transform 0.25s ease;
}

.card-gallery-img.is-active {
  opacity: 1;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  width: 30px;
  height: 30px;
  padding: 0 !important;
  border: 0;
  border-radius: 999px;
  background-color: rgba(15, 23, 42, 0.78);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  color: transparent !important;
  cursor: pointer;
  font-size: 0 !important;
  line-height: 0 !important;
  transform: translateY(-50%);
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.gallery-arrow:hover,
.gallery-arrow:focus-visible {
  background-color: rgba(15, 23, 42, 0.92);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  transform: translateY(-50%) scale(1.04);
}

.gallery-arrow:focus-visible {
  outline: 3px solid rgba(132, 204, 22, 0.45);
  outline-offset: 2px;
}

.gallery-prev {
  left: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18L9 12L15 6'/%3E%3C/svg%3E");
}

.gallery-next {
  right: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6L15 12L9 18'/%3E%3C/svg%3E");
}

.gallery-count {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 8;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
}

@media (max-width: 720px) {
  .gallery-arrow {
    width: 34px;
    height: 34px;
    background-size: 17px 17px;
  }
}

/* ==========================================================
   Warehouse Grid Override
   ----------------------------------------------------------
   Hält die Lagerplatzübersicht auf breiten Desktop-Layouts
   bewusst bei drei Spalten.
========================================================== */

.warehouse-grid {
  grid-template-columns: repeat(3, minmax(250px, 1fr));
}

/* ==========================================================
   Admin Cockpit Refresh
   ----------------------------------------------------------
   Gliedert den Administrationsbereich und die Systemverwaltung
   in ein modernes zweispaltiges Cockpit mit Untermenü.
   Bestehende globale Navigation bleibt unverändert.
========================================================== */
.admin-layout{
  display:grid;
  grid-template-columns:minmax(240px,300px) minmax(0,1fr);
  gap:20px;
  align-items:start;
}
.admin-sidebar{
  position:sticky;
  top:24px;
  display:grid;
  gap:16px;
}
.admin-sidebar h1{
  font-size:1.45rem;
}
.admin-subnav{
  display:grid;
  gap:8px;
}
.admin-subnav a{
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  grid-template-areas:"icon label" "icon hint";
  column-gap:10px;
  align-items:center;
  padding:12px;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--surface-2);
  color:var(--text);
  text-decoration:none;
  transition:background .14s ease,border-color .14s ease,transform .14s ease,box-shadow .14s ease;
}
.admin-subnav a:hover{
  transform:translateY(-1px);
  border-color:#cfd6df;
  box-shadow:var(--shadow-soft);
}
.admin-subnav a.active{
  background:#0f172a;
  border-color:#0f172a;
  color:#fff;
}
.admin-subnav a span{
  grid-area:icon;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:rgba(132,204,22,.14);
  color:#4d7c0f;
  font-weight:800;
}
.admin-subnav a.active span{
  background:rgba(132,204,22,.18);
  color:#bef264;
}
.admin-subnav a b{
  grid-area:label;
  font-size:.94rem;
  line-height:1.15;
}
.admin-subnav a small{
  grid-area:hint;
  color:var(--muted);
  font-size:.76rem;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.admin-subnav a.active small{
  color:#cbd5e1;
}
.admin-main{
  min-width:0;
}
.admin-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.admin-hero-card{
  margin-bottom:18px;
}
.admin-metric-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-bottom:16px;
}
.admin-metric-grid .metric span{
  display:block;
  color:var(--muted);
  font-size:.82rem;
  font-weight:700;
}
.admin-action-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.admin-action{
  display:grid;
  gap:5px;
  min-height:96px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:17px;
  background:linear-gradient(180deg,#fff,#fbfcfd);
  text-decoration:none;
  transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease;
}
.admin-action:hover{
  transform:translateY(-2px);
  border-color:#cfd6df;
  box-shadow:var(--shadow);
}
.admin-action b{
  color:var(--ink);
  font-size:1rem;
}
.admin-action span{
  color:var(--muted);
  font-size:.88rem;
}
.plan-limit-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(260px,1fr));
  gap:16px;
  margin:16px 0;
}
.plan-limit-card{
  min-width:0;
  padding:18px;
  border:1px solid var(--line);
  border-radius:20px;
  background:var(--surface);
}
.plan-limit-card legend{
  padding:0 8px;
  color:var(--ink);
  font-size:1rem;
  font-weight:800;
}
.plan-limit-card .field-grid{
  grid-template-columns:1fr;
}
.plan-feature-grid{
  display:grid;
  gap:8px;
  margin-top:14px;
}
.plan-feature-grid .check-filter{
  width:100%;
  justify-content:flex-start;
}
.superadmin-layout .superadmin-hero{
  margin-bottom:16px;
}
.dark .admin-subnav a,
.dark .admin-action,
.dark .plan-limit-card{
  background:#111827;
}
.dark .admin-subnav a.active{
  background:#263247;
}
.dark .admin-action:hover{
  border-color:#334155;
}
@media(max-width:1180px){
  .admin-layout{
    grid-template-columns:1fr;
  }
  .admin-sidebar{
    position:relative;
    top:auto;
  }
  .admin-subnav{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .plan-limit-grid{
    grid-template-columns:1fr;
  }
}
@media(max-width:720px){
  .admin-subnav,
  .admin-metric-grid,
  .admin-action-grid{
    grid-template-columns:1fr;
  }
  .admin-section-head{
    display:grid;
  }
}

/* ==========================================================
   Paket-/Feature-Hinweise
   ----------------------------------------------------------
   Visuelle Kennzeichnung für Admin-Kacheln, deren Funktion im
   aktuellen Tarif nicht enthalten ist. Die eigentliche Sperre erfolgt
   serverseitig über TenantLimits.
========================================================== */
.admin-action.is-disabled {
  cursor: not-allowed;
  opacity: .62;
  pointer-events: none;
}

/* ==========================================================
   Detail-Galerie
   ----------------------------------------------------------
   Ergänzt die Detailseiten von Ersatzteilen und Spenderfahrzeugen
   um eine echte Bildnavigation. Die Galerie nutzt dieselben SVG-
   Pfeile wie die Shop-Karten, damit das UI konsistent bleibt.
========================================================== */

.detail-gallery {
  isolation: isolate;
}

.detail-gallery .gallery-arrow {
  z-index: 12;
}

.detail-gallery .gallery-prev {
  left: 12px;
}

.detail-gallery .gallery-next {
  right: 12px;
}

.detail-gallery-count {
  top: 12px;
  right: 12px;
  bottom: auto;
  z-index: 12;
}

.thumb-btn {
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease,
    transform 0.15s ease;
}

.thumb-btn.is-active {
  border-color: rgba(132, 204, 22, 0.85);
  box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.18);
}

.thumb-btn:not(.is-active) {
  opacity: 0.78;
}

.thumb-btn:not(.is-active):hover {
  opacity: 1;
}

@media (max-width: 720px) {
  .detail-gallery .gallery-prev {
    left: 10px;
  }

  .detail-gallery .gallery-next {
    right: 10px;
  }

  .detail-gallery-count {
    top: 10px;
    right: 10px;
  }
}

/* ==========================================================
   PART PILOT: Mobile Detailtitel sicher umbrechen
   ----------------------------------------------------------
   Lange Ersatzteilnummern, FINs, interne Nummern oder
   zusammenhängende Titel ohne Leerzeichen dürfen die mobile
   Detailseite nicht mehr sprengen.
========================================================== */

.part-detail-shop,
.part-detail-shop .card,
.part-info-card,
.part-detail-head,
.part-detail-head h1,
.part-detail-head h2,
.detail-spec-grid,
.clean-definition-list,
.detail-spec-grid dd,
.clean-definition-list dd {
  min-width: 0;
  max-width: 100%;
}

.part-detail-head h1,
.part-detail-head h2,
.part-detail-head .part-no,
.detail-spec-grid dd,
.clean-definition-list dd,
.long-text {
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.part-detail-head h1 {
  display: block;
  max-width: 100%;
  font-size: clamp(1.45rem, 4.6vw, 2.15rem);
  line-height: 1.1;
}

.part-detail-head .part-no {
  max-width: 100%;
}

@media (max-width: 720px) {
  .part-detail-head h1 {
    font-size: clamp(1.28rem, 7.2vw, 1.85rem);
    line-height: 1.12;
  }

  .part-detail-head h2 {
    font-size: clamp(1.05rem, 5.4vw, 1.35rem);
    line-height: 1.15;
  }

  .part-detail-head .pill,
  .part-detail-badges .pill {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

@media (max-width: 420px) {
  .part-detail-head h1 {
    font-size: clamp(1.18rem, 8vw, 1.55rem);
  }
}

/* ==========================================================
   Mobile Menübutton: rechts positioniert + SVG-Burger
   ----------------------------------------------------------
   Ergänzung ohne HTML-Änderung.
   Die vorhandenen <span>-Linien werden ausgeblendet.
========================================================== */

@media (max-width: 860px) {
  .mobile-menu-btn {
    left: auto !important;
    right: 14px !important;
    top: 14px !important;

    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;

    padding: 0 !important;

    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7H20M4 12H20M4 17H20' stroke='%23111827' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 24px 24px;

    border: 1px solid var(--line);
    border-radius: 13px;

    box-shadow: var(--shadow-soft);
  }

  .mobile-menu-btn span {
    display: none !important;
  }

  body.dark .mobile-menu-btn {
    background-color: #111827;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7H20M4 12H20M4 17H20' stroke='%23F8FAFC' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  }
}


/* ==========================================================
   Mobile Optimierung: Lagerplatz-Kacheln
   ----------------------------------------------------------
   Betrifft explizit:
   <section class="warehouse-grid"> ... </section>

   Ziel:
   - mobil immer einspaltig
   - lange Lagerplatzcodes umbrechen
   - QR und Buttons sauber unter den Infos
   - keine horizontalen Überläufe
========================================================== */

@media (max-width: 720px) {
  .warehouse-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    width: 100%;
    max-width: 100%;
  }

  .warehouse-card {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .warehouse-card-main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 16px;
  }

  .warehouse-code {
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
  }

  .warehouse-specs {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .warehouse-specs div,
  .warehouse-specs dd,
  .warehouse-specs dt {
    min-width: 0;
    max-width: 100%;
  }

  .warehouse-specs dd {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .warehouse-card-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-items: center;
    gap: 14px;
    width: 100%;
    max-width: 100%;
    padding: 16px;
    border-left: 0 !important;
    border-top: 1px solid var(--line);
  }

  .warehouse-card-actions .actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px;
    width: 100%;
  }

  .warehouse-card-actions .btn {
    width: 100%;
  }

  .qr-mini {
    width: 112px;
    height: 112px;
    max-width: 45vw;
    max-height: 45vw;
  }
}
/* ==========================================================
   Mobile Off-Canvas Toggle: Burger wird zu Kreuz
   ----------------------------------------------------------
   Das mobile Menü wird weiterhin über denselben Button oben
   rechts geöffnet. Im geöffneten Zustand wird das Burger-Icon
   per SVG durch ein Schließen-Kreuz ersetzt.

   Der alte Close-Button innerhalb des Off-Canvas wird mobil
   ausgeblendet, damit es nur noch einen klaren Bedienpunkt gibt.
========================================================== */

@media (max-width: 860px) {
  .mobile-menu-btn {
    left: auto !important;
    right: 14px !important;
    top: 14px !important;
    z-index: 180;

    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;

    padding: 0 !important;

    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7H20M4 12H20M4 17H20' stroke='%23111827' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 24px 24px;

    border: 1px solid var(--line);
    border-radius: 13px;

    box-shadow: var(--shadow-soft);

    transform: none !important;
    transition:
      background-color 0.15s ease,
      background-image 0.15s ease,
      box-shadow 0.15s ease;
  }

  .mobile-menu-btn:hover,
  .mobile-menu-btn:focus-visible {
    transform: none !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  }

  .mobile-menu-btn span {
    display: none !important;
  }

  body.menu-open .mobile-menu-btn {
    background-color: #0f172a;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 6L18 18M18 6L6 18' stroke='%23FFFFFF' stroke-width='2.35' stroke-linecap='round'/%3E%3C/svg%3E");
    border-color: rgba(255, 255, 255, 0.12);
  }

  body.dark .mobile-menu-btn {
    background-color: #111827;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7H20M4 12H20M4 17H20' stroke='%23F8FAFC' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  }

  body.dark.menu-open .mobile-menu-btn {
    background-color: #f8fafc;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 6L18 18M18 6L6 18' stroke='%23111827' stroke-width='2.35' stroke-linecap='round'/%3E%3C/svg%3E");
    border-color: rgba(15, 23, 42, 0.12);
  }

  .sidebar-close {
    display: none !important;
  }
}


/* Part Pilot: Reservierungen */
.btn.reservation-btn,
button.reservation-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #d97706;
  color: #fff;
  box-shadow: 0 10px 26px rgba(217, 119, 6, 0.24);
}
.btn.reservation-btn:hover,
button.reservation-btn:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
}
.btn.reservation-release,
button.reservation-release {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  border-color: #991b1b;
  color: #fff;
  box-shadow: 0 10px 26px rgba(153, 27, 27, 0.22);
}
.part-detail-actions form {
  display: inline-flex;
  margin: 0;
}
.reservation-modal-panel h2 {
  margin-top: 0;
}
.reservation-form .modal-actions {
  margin-top: 16px;
}

.reservation-no-auto-expire {
  margin-top: 12px;
  align-items: center;
  gap: 8px;
}
.reservation-no-auto-expire input {
  width: auto;
}

/* ==========================================================
   Adminbereich: Abstände in Grid-Karten vereinheitlicht
   ----------------------------------------------------------
   Betrifft u. a.:
   .admin-layout .admin-main .grid.grid3

   Ziel:
   - Suchfelder/Formulare, Buttons und Pills stehen sauber in einer Linie.
   - Karten wirken nicht mehr wie zufällig zusammengewürfelte Ersatzteilkisten.
   - Keine Auswirkungen auf normale Übersichtsfilter außerhalb des Adminbereichs.
========================================================== */

.admin-main .grid.grid3 {
  align-items: stretch;
}

.admin-main .grid.grid3 > .card,
.admin-main .grid.grid3 > form.card,
.admin-main .grid.grid3 > fieldset.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.admin-main .grid.grid3 > .card > h2,
.admin-main .grid.grid3 > form.card > h2,
.admin-main .grid.grid3 > fieldset.card > h2,
.admin-main .grid.grid3 > .card > h3,
.admin-main .grid.grid3 > form.card > h3,
.admin-main .grid.grid3 > fieldset.card > h3 {
  margin: 0;
}

.admin-main .grid.grid3 > .card > .muted,
.admin-main .grid.grid3 > form.card > .muted,
.admin-main .grid.grid3 > fieldset.card > .muted {
  margin: -6px 0 0;
}

.admin-main .grid.grid3 .actions,
.admin-main .grid.grid3 .top-actions,
.admin-main .grid.grid3 .filter-actions,
.admin-main .grid.grid3 .modal-actions,
.admin-main .grid.grid3 .sa-filter-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 0;
}

.admin-main .grid.grid3 .actions:empty,
.admin-main .grid.grid3 .top-actions:empty,
.admin-main .grid.grid3 .filter-actions:empty,
.admin-main .grid.grid3 .modal-actions:empty,
.admin-main .grid.grid3 .sa-filter-actions:empty {
  display: none;
}

.admin-main .grid.grid3 form:not(.overview-filter-form):not(.search-filter-form):not(.inline-admin-form) {
  display: grid;
  gap: 12px;
  margin: 0;
}

.admin-main .grid.grid3 .inline-admin-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  width: 100%;
  margin: 0;
}

.admin-main .grid.grid3 .inline-admin-form select,
.admin-main .grid.grid3 .inline-admin-form input {
  min-width: 0;
}

.admin-main .grid.grid3 .inline-admin-form button,
.admin-main .grid.grid3 .inline-admin-form .btn,
.admin-main .grid.grid3 .inline-admin-form .button {
  min-height: 44px;
  white-space: nowrap;
}

.admin-main .grid.grid3 label + input,
.admin-main .grid.grid3 label + select,
.admin-main .grid.grid3 label + textarea,
.admin-main .grid.grid3 label + .select-search {
  margin-top: 0;
}

.admin-main .grid.grid3 .pill {
  margin: 0;
  align-self: flex-start;
}

.admin-main .grid.grid3 .meta-row,
.admin-main .grid.grid3 .pill-row,
.admin-main .grid.grid3 .feature-pills,
.admin-main .grid.grid3 .part-detail-badges {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0;
}

.admin-main .grid.grid3 .meta-row .pill,
.admin-main .grid.grid3 .pill-row .pill,
.admin-main .grid.grid3 .feature-pills .pill,
.admin-main .grid.grid3 .part-detail-badges .pill {
  margin: 0;
}

.admin-main .grid.grid3 .btn,
.admin-main .grid.grid3 button,
.admin-main .grid.grid3 .button {
  min-height: 44px;
}

.admin-main .grid.grid3 .button.secondary,
.admin-main .grid.grid3 a.button.secondary,
.admin-main .grid.grid3 a.btn,
.admin-main .grid.grid3 .btn {
  text-align: center;
}

.admin-main .grid.grid3 .check-filter {
  margin: 0;
}

.admin-main .grid.grid3 .field-grid,
.admin-main .grid.grid3 .filter-grid,
.admin-main .grid.grid3 .compact-grid {
  gap: 12px;
  margin-top: 0;
}

.admin-main .grid.grid3 .select-search {
  gap: 7px;
}

.admin-main .grid.grid3 .card-spacer,
.admin-main .grid.grid3 .form-actions {
  margin-top: auto;
}

@media (max-width: 1100px) {
  .admin-main .grid.grid3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-main .grid.grid3 {
    grid-template-columns: 1fr;
  }

  .admin-main .grid.grid3 .inline-admin-form,
  .admin-main .grid.grid3 .actions,
  .admin-main .grid.grid3 .top-actions,
  .admin-main .grid.grid3 .filter-actions,
  .admin-main .grid.grid3 .modal-actions,
  .admin-main .grid.grid3 .sa-filter-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .admin-main .grid.grid3 .inline-admin-form button,
  .admin-main .grid.grid3 .inline-admin-form .btn,
  .admin-main .grid.grid3 .inline-admin-form .button,
  .admin-main .grid.grid3 .actions .btn,
  .admin-main .grid.grid3 .actions button,
  .admin-main .grid.grid3 .actions .button,
  .admin-main .grid.grid3 .filter-actions .btn,
  .admin-main .grid.grid3 .filter-actions button,
  .admin-main .grid.grid3 .filter-actions .button {
    width: 100%;
  }
}


/* ==========================================================
   PartPilot Tariflimit Modal
   ----------------------------------------------------------
   Professionelle Tarifkommunikation statt technischer Fehlerseite.
========================================================== */
.plan-limit-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(132, 204, 22, 0.16), transparent 30rem),
    linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
}
.plan-limit-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.plan-limit-modal {
  width: min(760px, 100%);
  margin: 0;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 28px;
  box-shadow: 0 32px 110px rgba(15, 23, 42, 0.16);
}
.plan-limit-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  margin-bottom: 14px;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  font-weight: 900;
  font-size: 1.35rem;
}
.plan-limit-modal h1 {
  margin-bottom: 10px;
}
.plan-limit-lead {
  max-width: 660px;
  margin: 0 0 18px;
  color: var(--text);
  font-size: 1rem;
}
.plan-limit-focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(249, 115, 22, 0.28);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff7ed, #fff);
  margin: 18px 0;
}
.plan-limit-focus > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}
.plan-limit-focus > strong {
  grid-column: 1;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.1;
}
.plan-limit-usage {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 170px;
  padding: 14px 16px;
  border-radius: 17px;
  background: #fff;
  border: 1px solid #fed7aa;
  text-align: right;
}
.plan-limit-usage b {
  display: block;
  color: #b42318;
  font-size: 1.35rem;
  line-height: 1.05;
}
.plan-limit-usage small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-weight: 700;
}
.plan-limit-details {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fbfcfd;
  padding: 14px 16px;
  margin: 18px 0;
}
.plan-limit-details summary {
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.plan-limit-details summary::-webkit-details-marker {
  display: none;
}
.plan-limit-details summary::after {
  content: "+";
  margin-left: auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
}
.plan-limit-details[open] summary::after {
  content: "–";
}
.plan-limit-table {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.plan-limit-table h2 {
  margin: 4px 0 2px;
  font-size: 0.95rem;
}
.plan-limit-table div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid var(--line);
}
.plan-limit-table span {
  color: var(--muted);
  font-weight: 650;
}
.plan-limit-table b {
  color: var(--ink);
  text-align: right;
}
.plan-limit-table b.ok {
  color: #166534;
}
.plan-limit-table b.no {
  color: #991b1b;
}
.plan-limit-note {
  padding: 16px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.plan-limit-note b {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}
.plan-limit-note p {
  margin: 0;
  color: var(--muted);
}
.plan-limit-actions {
  margin-top: 18px;
  justify-content: flex-end;
}
.dark .plan-limit-page,
body.dark.plan-limit-page {
  background: linear-gradient(135deg, #0b1220 0%, #111827 100%);
}
.dark .plan-limit-focus,
.dark .plan-limit-usage,
.dark .plan-limit-details,
.dark .plan-limit-table div,
.dark .plan-limit-note,
body.dark.plan-limit-page .plan-limit-focus,
body.dark.plan-limit-page .plan-limit-usage,
body.dark.plan-limit-page .plan-limit-details,
body.dark.plan-limit-page .plan-limit-table div,
body.dark.plan-limit-page .plan-limit-note {
  background: #111827;
}
@media (max-width: 720px) {
  .plan-limit-shell {
    padding: 12px;
    place-items: end center;
  }
  .plan-limit-modal {
    border-radius: 24px 24px 0 0;
  }
  .plan-limit-focus {
    grid-template-columns: 1fr;
  }
  .plan-limit-usage {
    grid-column: auto;
    grid-row: auto;
    min-width: 0;
    text-align: left;
  }
  .plan-limit-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .plan-limit-actions .btn,
  .plan-limit-actions button {
    width: 100%;
  }
}

/* Part Pilot: Theme toggle in top actions */
.theme-toggle-btn {
  width: 40px;
  min-width: 40px;
  padding-left: 0;
  padding-right: 0;
}
.theme-toggle-btn i {
  font-size: 0.98rem;
  line-height: 1;
}
@media (max-width: 860px) {
  .top-actions .theme-toggle-btn {
    width: 100%;
  }
}


.auth-page .app-shell{
    display:block;
}

.auth-page .content{
    width:100%;
    max-width:none;
    padding:0;
    display:grid;
    place-items:center;
    min-height:100vh;
}

/* Part Pilot: abgelaufene Testphase */
.trial-expired-shell {
  min-height: min(720px, calc(100vh - 160px));
  display: grid;
  place-items: center;
  padding: 24px;
}
.trial-expired-card {
  width: min(760px, 100%);
  text-align: center;
  padding: clamp(24px, 4vw, 42px);
}
.trial-expired-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: #eef4e6;
  color: #31570f;
  font-size: 1.65rem;
}
.trial-expired-card h1 {
  max-width: 620px;
  margin: 0 auto 12px;
}
.trial-expired-card p {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.trial-expired-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}
.trial-expired-info div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}
.trial-expired-info span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.trial-expired-info b {
  color: var(--ink);
}
.trial-expired-actions {
  justify-content: center;
  margin-top: 20px;
}
.dark .trial-expired-info div,
.dark .trial-expired-icon {
  background: #0f172a;
}
@media (max-width: 720px) {
  .trial-expired-shell { padding: 12px; }
  .trial-expired-info { grid-template-columns: 1fr; }
  .trial-expired-actions { display: grid; }
  .trial-expired-actions .btn { width: 100%; }
}

/* ==========================================================
   PartPilot: professionelle Systemfehlerseite
   ----------------------------------------------------------
   Ersetzt rohe technische Fehlermeldungen durch eine zentrale
   Meldung im Corporate Design. Details bleiben ausschließlich
   im serverseitigen Log.
========================================================== */
.error-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(132, 204, 22, 0.18), transparent 28rem),
    linear-gradient(135deg, #f6f7f8 0%, #eef2f7 45%, #ffffff 100%);
}
.system-error-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 42px);
}
.system-error-card {
  width: min(100%, 720px);
  margin: 0;
  padding: clamp(24px, 4vw, 40px);
  border-radius: 28px;
  text-align: center;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.12);
}
.system-error-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: #eef4e6;
  color: #4d7c0f;
  font-size: 1.9rem;
  border: 1px solid #d9e8c8;
}
.system-error-card h1 {
  max-width: 620px;
  margin: 0 auto 12px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.08;
}
.system-error-lead {
  max-width: 620px;
  margin: 0 auto 20px;
  font-size: 1rem;
}
.system-error-reference {
  display: inline-grid;
  gap: 5px;
  min-width: min(100%, 260px);
  margin: 8px auto 22px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}
.system-error-reference span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.system-error-reference b {
  color: var(--ink);
  font-size: 1.05rem;
  letter-spacing: .08em;
}
.system-error-actions {
  justify-content: center;
  margin: 0 auto 18px;
}
.system-error-footnote {
  margin: 0 auto;
  max-width: 560px;
  font-size: .9rem;
}
.dark.error-page,
body.dark.error-page {
  background:
    radial-gradient(circle at 18% 12%, rgba(132, 204, 22, 0.12), transparent 28rem),
    linear-gradient(135deg, #0b1220 0%, #0f172a 55%, #111827 100%);
}
.dark .system-error-reference,
.dark .system-error-icon {
  background: #0f172a;
}
@media (max-width: 720px) {
  .system-error-card {
    border-radius: 22px;
  }
  .system-error-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .system-error-actions .btn {
    width: 100%;
  }
}
