:root {
  /* Base Color Palette - Festgelegte Gralax-Farben */
  --background-image: none;
  --gralax-gold: #cbb16e;
  --gralax-black: #0a0a0a;
  --gralax-white: #f2f5fc;
  --gralax-blue: #3260ab;
  --gralax-darkgray: #3b3c3c;
  --gralax-gray: #7a7b7b;
  /* Mittlerer Grauton zwischen darkgray und lightgray */
  --gralax-lightgray: #d4d5d6;
  /* Heller Grauton für subtile Hintergründe */
  --gralax-error: #e53e3e;
  /* Fehlerfarbe */

  /* RGB-Werte für transparente Überlagerungen */
  --color-primary-rgb: 203, 177, 110;
  --color-secondary-rgb: 50, 96, 171;
  --text-muted-rgb: 122, 123, 123;

  /* Theme Colors - Semantic Grouping */
  /* Branding */
  --color-primary: var(--gralax-gold);
  --color-secondary: var(--gralax-blue);
  --color-accent: var(--gralax-gold);
  /* Text Colors - Angepasst an Gralax-Farben */
  --text-primary: var(--gralax-black);
  /* Dunkler Haupttext */
  --text-secondary: var(--gralax-darkgray);
  /* Sekundärer Text */
  --text-muted: var(--gralax-gray);
  /* Gedämpfter Text für weniger wichtige Inhalte */
  --text-light: var(--gralax-white);
  /* Weißer Text auf dunklen Hintergründen */
  --text-link: var(--gralax-blue);
  /* Link-Farbe */
  /* UI Element Colors - Basierend auf Gralax-Farben */
  --button-bg: var(--gralax-blue);
  --button-text: var(--gralax-white);
  --button-hover-bg: var(--gralax-gold);
  --button-hover-text: var(--gralax-black);
  --button-disabled-bg: var(--gralax-lightgray);
  --button-disabled-text: var(--gralax-gray);
  /* Background Colors - Basierend auf Gralax-Farben */
  --bg-page: var(--gralax-white);
  /* Weißer Seitenhintergrund */
  --bg-panel: var(--gralax-white);
  /* Weiße Panel-Hintergründe */
  --bg-table: var(--gralax-white);
  /* Weiße Tabellen-Hintergründe */
  --bg-table-alt: #fafbfc;
  /* Sehr heller alternativer Hintergrund (aufgehellt von gralax-white) */
  --bg-table-hover: var(--gralax-lightgray);
  /* Hover-Zustand für Tabellenzeilen */
  --bg-field: var(--gralax-white);
  /* Weiße Eingabefelder */
  --bg-field-focus: #f8faff;
  /* Leicht bläulicher Focus-Zustand (aufgehellt von gralax-white) */
  --bg-editable: #fefcf5;
  /* Leicht gelblicher editierbarer Hintergrund (gold-tint) */
  --bg-editable-hover: #fdf9ed;
  /* Hover für editierbare Felder */
  --bg-modal: rgba(242, 245, 252, 0.95);
  /* Semi-transparenter Modal-Hintergrund basierend auf gralax-white */

  /* Border Colors - Basierend auf Gralax-Farben */
  --border-table: var(--gralax-gold);
  --border-field: var(--gralax-lightgray);
  /* Sanfte Feldrahmen */
  --border-field-focus: var(--gralax-gold);
  /* Gold für Focus-Zustand */
  --border-light: var(--gralax-lightgray);
  /* Helle Trennlinien */
  --border-medium: var(--gralax-gray);
  /* Mittlere Trennlinien */
  /* Status Colors - Erweitert um Gralax-Blue für Info */
  --color-error: var(--gralax-error);
  --color-success: #38a169;
  /* Grün für Erfolg (komplementär zu Gralax-Farben) */
  --color-warning: #d69e2e;
  /* Orange für Warnungen */
  --color-info: var(--gralax-blue);
  /* Gralax-Blue für Informationen */

  /* Status Background Colors */
  --bg-error-light: #fed7d7;
  --bg-success-light: #c6f6d5;
  --bg-warning-light: #faf089;
  --bg-info-light: #bee3f8;

  /* Shadow Variables für Tiefe */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
  font-family: Arial, sans-serif;
  margin: 0.5em;
  background-color: var(--bg-page);

  /* Angebotsergebnisse Styles */
  .offer-info {
    background: linear-gradient(135deg, #f8faff 0%, #e8f2ff 100%);
    border-left: 4px solid var(--gralax-blue);
    margin-bottom: 1em;
  }

  .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1em;
    margin-top: 1em;
  }

  .offer-number {
    font-family: 'Courier New', monospace;
    background: var(--gralax-gold);
    color: var(--gralax-black);
    padding: 0.2em 0.5em;
    border-radius: 3px;
    font-weight: bold;
  }

  .schild-id {
    font-family: 'Courier New', monospace;
    background: var(--gralax-lightgray);
    color: var(--gralax-darkgray);
    padding: 0.2em 0.5em;
    border-radius: 3px;
    font-size: 0.9em;
  }

  .status-saved {
    color: var(--color-success);
    font-weight: bold;
  }

  .component-summary {
    display: flex;
    justify-content: space-around;
    gap: 1em;
    margin-top: 1em;
  }

  .component-item {
    text-align: center;
    padding: 1em;
    background: var(--bg-field);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    flex: 1;
  }

  .component-count {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: var(--gralax-blue);
    margin-bottom: 0.2em;
  }

  .component-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9em;
  }

  .success-message {
    background: var(--bg-success-light);
    color: var(--color-success);
    padding: 1em;
    border-radius: 6px;
    border-left: 4px solid var(--color-success);
    margin-top: 1em;
    font-weight: 500;
  }

  /* Detaillierte Berechnungsvergleichstabellen */
  .comparison-table {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1px;
    background: var(--border-light);
    border-radius: 6px;
    overflow: hidden;
    margin: 1em 0;
  }

  .comparison-header {
    display: contents;
  }

  .comparison-header > div {
    background: var(--gralax-gold);
    color: var(--gralax-black);
    padding: 0.8em;
    font-weight: bold;
    text-align: center;
  }

  .comparison-row {
    display: contents;
  }

  .comparison-row.highlight > div {
    background: var(--bg-warning-light);
    font-weight: bold;
  }

  .comparison-label {
    background: var(--bg-field);
    padding: 0.6em;
    font-weight: 500;
    border-right: 1px solid var(--border-light);
  }

  .comparison-value {
    background: var(--bg-panel);
    padding: 0.6em;
    text-align: right;
    font-family: 'Courier New', monospace;
  }

  .comparison-value-merged {
    background: var(--bg-panel);
    padding: 0.6em;
    text-align: center;
    font-family: 'Courier New', monospace;
    grid-column: 2 / 4;
  }

  .results-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
  }

  .detail-section {
    margin: 1em 0;
    padding: 1em;
    background: var(--bg-field);
    border-radius: 6px;
    border: 1px solid var(--border-light);
  }

  .detail-section h4 {
    margin: 0 0 1em 0;
    color: var(--gralax-blue);
    border-bottom: 2px solid var(--gralax-gold);
    padding-bottom: 0.5em;
  }
  font-size: 16px;
  /* Base font size for the body */
}

h1,
h2 {
  color: var(--text-primary);
}

/* Table Styles */
table {
  border-collapse: collapse;
  margin: 1.5em 0;
  background-color: var(--bg-table);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  table-layout: fixed;
  /* Fixed layout for consistent column widths */
  border: 2px solid var(--border-table);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  overflow-x: auto;
  margin-top: 2em;
}

.rotated th {
  padding-bottom: 2em 0;
}

.rotated th div {
  transform: rotate(30deg);
  text-align: center;
}

th,
td {
  border: 1px solid var(--border-light);
  padding: 10px 12px;
  text-align: left;
}

td {
  vertical-align: top;
  /* Align content to the top */
  color: var(--text-primary);
  background-color: var(--bg-table);
}

th {
  background-color: var(--bg-table-alt);
  color: var(--text-primary);
  font-weight: 600;
  text-align: center;
  height: 99px;
  /* Fixed height for header cells */
  padding: 0;
  border-bottom: 2px solid var(--border-medium);
}

tr:nth-child(even) td {
  background-color: var(--bg-table-alt);
}

tr:hover td {
  background-color: var(--bg-table-hover);
}

/* Button Styles */
button {
  background-color: var(--button-bg);
  color: var(--button-text);
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 3px;
}

button:hover {
  background-color: var(--button-hover-bg);
}

button.save-btn {
  width: 80px;
  /* Consistent width for save buttons */
  padding: 5px;
  font-size: 14px;
}

button.save-btn:disabled {
  background-color: var(--button-disabled-bg);
  cursor: not-allowed;
}

.edit-materials-button {
  background-color: var(--color-secondary);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 5px;
}

.edit-materials-button:hover {
  background-color: var(--button-hover-bg);
}

/* Form Elements */
table select,
table input {
  width: 100%;
  /* Make inputs fill the cell width */
  box-sizing: border-box;
  /* Include padding and border in width */
  padding: 2px;
  font-size: 1em;
  background-color: var(--bg-field);
  border: 1px solid var(--border-field);
  border-radius: 3px;
}

.data-table input,
.data-table select {
  width: 100%;
  box-sizing: border-box;
  padding: 5px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
}

.data-table input:focus,
.data-table select:focus {
  border-color: var(--color-success);
  outline: none;
}

/* Table Width Classes */
table .breit {
  width: 16em;
  /* Full width for text inputs */
}

table .normal {
  width: 12em;
  /* Medium width for numeric inputs */
}

table .schmal {
  width: 7em;
  /* Small width for compact numeric inputs */
}

table .mini {
  width: 2.5em;
  /* Keep checkboxes compact */
}

/* ============================================
   MODERNE NAVIGATION STYLES
   ============================================ */

/* Header-Container für Navigation */
header {
  background: linear-gradient(135deg, var(--gralax-blue) 0%, var(--color-secondary) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--gralax-gold);
}

/* Hauptnavigation - Moderne Flexbox */
nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  background: transparent;
}

/* Menüpunkte mit modernem Design */
nav ul li {
  position: relative;
}

/* Hauptmenü-Links mit runden Ecken */
nav ul li > a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  font-size: 0.95rem;
}

/* Hover-Effekt für Hauptmenü */
nav ul li > a:hover {
  background: var(--gralax-gold);
  color: var(--gralax-darkgray);
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(203, 177, 110, 0.4);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Aktiver Menüpunkt */
nav ul li.active > a {
  background: var(--gralax-white);
  color: var(--gralax-blue);
  border-color: var(--gralax-gold);
}

/* Untermenü - Modernes Grid-Layout */
nav ul li ul {
  display: none;
  position: absolute;
  left: 0;
  min-width: 280px;
  background: var(--bg-modal);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-light);
  padding: 1rem;
  z-index: 1001;

  /* Grid-Layout für Untermenü */
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;

  /* Versteckt standardmäßig */
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Untermenü-Einblendung */
nav ul li:hover ul {
  display: grid;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Untermenü-Links (button: Logout-POST-Formular, #471) */
nav ul li ul li a,
nav ul li ul li button {
  display: block;
  width: 100%;
  padding: 0.7rem 1rem;
  color: var(--text-primary);
  background: none;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

/* Untermenü-Hover-Effekt */
nav ul li ul li a:hover,
nav ul li ul li button:hover {
  background: var(--gralax-gold);
  color: var(--gralax-darkgray);
  border-left-color: var(--gralax-blue);
  transform: translateX(5px);
}

/* Spezial-Link-Styling (Debug Toggle) */
nav ul li ul li a[href*='debug'] {
  background: rgba(255, 193, 7, 0.1);
  border-left-color: #ffc107;
  font-style: italic;
}

nav ul li ul li a[href*='debug']:hover {
  background: #ffc107;
  color: #212529;
}

/* Animation für sanfte Übergänge */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

nav ul li ul li {
  animation: fadeInUp 0.3s ease forwards;
}

nav ul li ul li:nth-child(1) {
  animation-delay: 0.05s;
}
nav ul li ul li:nth-child(2) {
  animation-delay: 0.1s;
}
nav ul li ul li:nth-child(3) {
  animation-delay: 0.15s;
}
nav ul li ul li:nth-child(4) {
  animation-delay: 0.2s;
}
nav ul li ul li:nth-child(5) {
  animation-delay: 0.25s;
}

/* ============================================
   ENDE MODERNE NAVIGATION
   ============================================ */

/* Validation Styles */
.invalid-row {
  background-color: var(--bg-error-light);
  /* Light red background for invalid rows */
}

.invalid-icon {
  color: var(--color-error);
  /* Red color for invalid icon */
  font-size: 1.2em;
  margin-left: 5px;
  cursor: help;
}

/* Settings Styles */
.settings-table {
  /* Ensure settings tables inherit global table styles */
  all: unset;
  display: table;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.settings-table th,
.settings-table td {
  border: 1px solid var(--border-light);
  padding: 8px;
  text-align: left;
}

.settings-table th {
  background-color: #f4f4f4;
  font-weight: bold;
}

.settings-table tr:nth-child(even) {
  background-color: var(--bg-table-alt);
}

.settings-table tr:hover {
  background-color: var(--bg-table-hover);
}

/* Editable cell styles */
.editable {
  background-color: var(--bg-editable);
  cursor: pointer;
  position: relative;
}

.editable:hover {
  background-color: var(--bg-editable-hover);
}

.value-edit {
  width: 100%;
  box-sizing: border-box;
  padding: 5px;
}

/* Settings Container Styles */
.settings-container {
  margin-top: 20px;
}

.settings-category {
  margin-bottom: 30px;
  background-color: var(--bg-table-alt);
  padding: 15px;
  border-radius: 5px;
}

.settings-explanation {
  margin-bottom: 20px;
  padding: 10px;
  background-color: var(--bg-info-light);
  border-left: 4px solid #0099cc;
  border-radius: 3px;
}

/* Message Styles */
.success-message {
  padding: 10px;
  background-color: var(--bg-success-light);
  border-left: 4px solid var(--color-success);
  border-radius: 3px;
  margin-bottom: 15px;
}

.error-message {
  padding: 10px;
  background-color: var(--bg-error-light);
  border-left: 4px solid var(--color-error);
  border-radius: 3px;
  margin-bottom: 15px;
}

/* Additional styles for Veredelungen page */
.text-center {
  text-align: center;
}

.filter-controls {
  margin-bottom: 15px;
}

.filter-controls label {
  margin-right: 10px;
}

/* Toast notification styles - consolidated */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 20px;
  border-radius: 4px;
  color: white;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1000;
}

.toast.success {
  background-color: var(--color-success);
}

.toast.error {
  background-color: var(--color-error);
}

.toast.show {
  opacity: 1;
}

/* Form Group Styles - Verbesserte Lesbarkeit */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border-field);
  border-radius: 4px;
  box-sizing: border-box;
  background-color: var(--bg-field);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--border-field-focus);
  background-color: var(--bg-field-focus);
  box-shadow: 0 0 0 2px rgba(203, 177, 110, 0.15);
}

.form-group input:hover,
.form-group select:hover {
  border-color: var(--border-medium);
}

.form-group small {
  display: block;
  color: var(--text-muted);
  margin-top: 4px;
  font-size: 0.8rem;
  line-height: 1.4;
}

/* Zusätzliche Formular-Stile für Kalkulations-Layout */
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.form-group.half {
  flex: 1;
}

/* Material Panel Styles */
.materials-panel td {
  padding: 10px;
  background-color: var(--bg-table-alt);
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.material-item {
  padding: 5px;
  border: 1px solid #eee;
  border-radius: 4px;
}

.material-item label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.material-item input[type='checkbox'] {
  margin-right: 8px;
}

.material-item small {
  display: block;
  color: var(--text-secondary);
  font-size: 0.8em;
  margin-left: 20px;
}

/* Kalkulations-Tab-Komponente */
.tab-container {
  margin-top: 20px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.tab-buttons {
  display: flex;
  background-color: var(--bg-table-alt);
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
  white-space: nowrap;
}

.tab-button {
  padding: 10px 15px;
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
  font-weight: bold;
  color: var(--text-secondary);
}

.tab-button:hover {
  background-color: var(--bg-table-hover);
  color: var(--text-primary);
}

.tab-button.active {
  border-bottom: 2px solid var(--color-primary);
  color: var(--color-primary);
  background-color: #fff;
}

.tab-pane {
  display: none;
  padding: 20px;
  background-color: #fff;
}

.tab-pane.active {
  display: block;
}

/* Ergebnis-Container für Kalkulationen */
.result-container {
  margin-top: 30px;
  padding: 20px;
  background-color: var(--bg-table-alt);
  border: 1px solid var(--border-light);
  border-radius: 5px;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  box-shadow: none;
  background: transparent;
  border: none;
}

.result-table th,
.result-table td {
  padding: 10px 15px;
  border-bottom: 1px solid var(--border-light);
}

.result-table th {
  width: 40%;
  color: var(--text-secondary);
  background-color: transparent;
  height: auto;
  text-align: left;
}

.total-row {
  background-color: var(--bg-info-light);
  font-weight: bold;
}

/* Staffelpreis-Layout für Kalkulationen */
.staffel-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.no-results {
  padding: 20px;
  text-align: center;
  color: var(--text-secondary);
}

/* Stil für nicht verfügbare Werte */
.not-available {
  color: var(--color-error);
  font-style: italic;
  font-weight: normal;
}

/* Filter Form Styles */
.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

.filter-group label {
  margin-bottom: 5px;
  font-weight: bold;
}

.filter-buttons {
  display: flex;
  gap: 10px;
}

/* Sortable Table Headers */
.sortable a {
  color: inherit;
  text-decoration: none;
  display: block;
  position: relative;
}

.sortable a:hover {
  background-color: #f0f0f0;
}

/* Inline Form Elements */
.inline-form {
  display: inline-block;
  margin-left: 5px;
}

/* Button Variants */
.btn-danger {
  background-color: var(--color-error);
  color: white;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
}

.btn-danger:hover {
  background-color: #c82333;
}

.btn-primary {
  background-color: var(--button-bg);
  color: var(--button-text);
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 6px;
  border: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--button-hover-bg);
  color: var(--button-hover-text);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background-color: var(--button-disabled-bg);
  color: var(--button-disabled-text);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Befestigungskarten Stile */
.hinweis-box {
  margin-top: 10px;
  padding: 8px;
  background-color: #fffde7;
  border-left: 3px solid #ffd600;
  font-size: 0.9em;
  line-height: 1.4;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background-color: transparent;
  box-shadow: none;
  border: none;
}

.mini-table th,
.mini-table td {
  padding: 5px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.mini-table th {
  width: 40%;
  background-color: transparent;
  height: auto;
}

.artikel-nr {
  margin-bottom: 10px;
  color: #666;
  font-size: 0.9em;
}

.berechnungs-details {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

/* ============================================
   GRID-LAYOUT FÜR SCHILDBERECHNUNG (MONITOR-OPTIMIERT)
   ============================================ */

.calculation-form,
.calculation-results,
.main-layout {
  /* Das Grid wird jetzt vom main-layout übernommen */
  max-width: 85%;
  margin: 0 auto;
  padding: 1rem;
}

/* === Layout für Formular mit Live-Preview === */
.form-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1rem;
}

/* Linke Spalte - Hauptformular */
.form-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Rechte Spalte - Live Preview & Erweiterte Optionen */
.form-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Panel-Design für visuell getrennte Bereiche */
.form-panel,
.form-panel.live-preview {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all 0.3s ease;
  height: fit-content;
}

.form-panel:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-medium);
}

.form-panel h2 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 0.5rem;
  display: flex;
  align-items: center;
  font-weight: 600;
}

.form-panel h2::before {
  content: '';
  width: 4px;
  height: 1.2rem;
  background: linear-gradient(135deg, var(--color-primary), #b8a55c);
  margin-right: 0.5rem;
  border-radius: 2px;
}

/* Kompaktes Grid für Formularfelder */
.field-grid {
  display: grid;
  gap: 0.5rem;
}
.field-grid > * {
  min-width: 0;
}

.field-grid.cols-1 {
  grid-template-columns: repeat(1, minmax(12rem, 1fr));
}
.field-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(12rem, 1fr));
}
.field-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(12rem, 1fr));
}
.field-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(12rem, 1fr));
}
.field-grid.cols-5 {
  grid-template-columns: repeat(5, minmax(12rem, 1fr));
}

.advanced-options .field-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(6rem, 1fr));
}

/* Kompakte Formularfelder */
.form-field {
  margin-bottom: 0;
}
.form-field.span-2 {
  grid-column: span 2;
}
.form-field.span-3 {
  grid-column: span 3;
}
.form-field.full-width {
  grid-column: 1 / -1;
}

/* Erweiterte Parameter in rechter Spalte */
.extended-parameters {
  margin-top: 1rem;
}

.parameter-section {
  background: var(--bg-field);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
  display: none; /* Initial eingeklappt */
}

.parameter-section h4 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
  display: flex;
  align-items: center;
  font-weight: 500;
}

.parameter-section .field-grid {
  margin-top: 0.5rem;
}

.machine-selection {
  margin-top: 1rem;
}

.machine-selection select[multiple] {
  min-height: 100px;
  resize: vertical;
}

.machine-selection small {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.3;
}

.toggle-section {
  text-align: center;
  margin-top: 1rem;
}

.btn.small {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: #2d3748;
  font-size: 0.9rem;
}

.form-field input,
.form-field select {
  width: 100%;
  padding: 0.2rem;
  border: 1px solid var(--border-field);
  border-radius: 0.4rem;
  box-sizing: border-box;
  font-size: 0.9rem;
  transition: all 0.5s ease;
  background: var(--bg-field);
  color: var(--text-primary);
}
.form-field select.veredelung-maschine-select {
  width: 9.5rem;
}

.form-field input[type='checkbox'] {
  width: auto;
  margin-right: 0.5rem;
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--border-field-focus);
  box-shadow: 0 0 0 2px rgba(203, 177, 110, 0.15);
  background: var(--bg-field-focus);
}

.form-field input:hover,
.form-field select:hover {
  border-color: var(--border-medium);
}

.form-field small {
  color: #718096;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  font-style: italic;
}

/* Spezielle Breiten für bestimmte Felder */
.form-field.full-width {
  grid-column: 1 / -1;
}

.form-field.span-2 {
  grid-column: span 2;
}

/* Dimensions-Bereich mit visueller Schildflächen-Anzeige */
.dimensions-section {
  position: relative;
  align-self: start;
}

.dimensions-visual {
  background: linear-gradient(135deg, var(--bg-table), var(--bg-table-alt));
  border: 2px dashed var(--color-primary);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1rem;
  text-align: center;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: all 0.3s ease;
}

.dimensions-visual:hover {
  background: linear-gradient(135deg, #edf2f7, #e2e8f0);
  border-color: #b8a55c;
}

.dimensions-display {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.area-display {
  font-size: 0.9rem;
  color: #4a5568;
  font-weight: 500;
}

/* Submit-Bereich */
.submit-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  background: linear-gradient(135deg, #f7fafc, #ffffff);
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.submit-button {
  background: linear-gradient(135deg, var(--button-bg), #0d47a1);
  color: var(--button-text);
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(21, 21, 201, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.submit-button:hover {
  background: linear-gradient(135deg, var(--button-hover-bg), #c5a572);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(203, 177, 110, 0.3);
}

.submit-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(21, 21, 201, 0.2);
}

/* Spezielle Styles für die zwei Angebots-Buttons */
.submit-section {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.submit-new-offer {
  background: linear-gradient(135deg, #28a745, #20c997);
}

.submit-new-offer:hover {
  background: linear-gradient(135deg, #20c997, #17a2b8);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.submit-add-to-offer {
  background: linear-gradient(135deg, #fd7e14, #e83e8c);
}

.submit-add-to-offer:hover {
  background: linear-gradient(135deg, #e83e8c, #6f42c1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(253, 126, 20, 0.3);
}

.submit-amicron-export {
  background: linear-gradient(135deg, #007bff, #6610f2);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.submit-amicron-export:hover {
  background: linear-gradient(135deg, #6610f2, #e83e8c);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.3);
}

.submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Addons-Bereich - Verschlankt */
.addons-container {
  margin-top: 1rem;
}

.addons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.4rem;
  max-height: 200px;
  overflow-y: auto;
  padding: 0.4rem;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-table-alt);
}

.addon-item {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 2em;
  padding: 0.1rem;
  display: flex;
  align-items: center;
}

.addon-item:hover {
  border-color: var(--color-primary);
  background: var(--bg-field-focus);
}

.addon-item input[type='checkbox']:checked ~ .addon-name,
.addon-item input[type='checkbox']:checked + .addon-name {
  color: var(--color-primary);
  font-weight: 600;
}

.addon-item:has(input[type='checkbox']:checked) {
  border-color: var(--color-primary);
  background: rgba(203, 177, 110, 0.08);
}

.addon-item label {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.2;
  flex: 1;
}

.addon-item input[type='checkbox'] {
  margin-right: 0.3rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
  transform: scale(1);
}

/* Smooth Transitions */
.calculation-form * {
  transition: all 0.2s ease;
}

/* Zusätzliche UI-Verbesserungen */
.form-field input:invalid {
  border-color: var(--color-error);
}

.form-field input:valid {
  border-color: var(--color-success);
}

/* Verbessertes Multi-Select */
.form-field select[multiple] {
  min-height: 100px;
  background: white;
}

.form-field select[multiple] option:checked {
  background: var(--color-primary);
  color: white;
}

/* Oberflächenstruktur - Robuste Lösung mit background-image */
#oberflaeche_id {
  font-family: 'Segoe UI', Arial, sans-serif;
}

#oberflaeche_id option {
  padding: 8px 12px 8px 70px;
  line-height: 1.6;
  font-weight: 500;
  position: relative;
  background-repeat: no-repeat;
  background-position: 8px center;
  background-size: 40px 16px;
}

/* Spezifische Farb-Kombinationen für HG-Farben */
#oberflaeche_id option[data-hgfarbe='#E0E0E0'] {
  background-image: linear-gradient(
    to right,
    #e0e0e0 0,
    #e0e0e0 16px,
    transparent 16px,
    transparent 20px,
    #f0f0f0 20px,
    #f0f0f0 36px,
    transparent 36px
  );
}

#oberflaeche_id option[data-hgfarbe='#C0C0C0'] {
  background-image: linear-gradient(
    to right,
    #c0c0c0 0,
    #c0c0c0 16px,
    transparent 16px,
    transparent 20px,
    #f0f0f0 20px,
    #f0f0f0 36px,
    transparent 36px
  );
}

#oberflaeche_id option[data-hgfarbe='#FFFFFF'] {
  background-image: linear-gradient(
    to right,
    #ffffff 0,
    #ffffff 16px,
    transparent 16px,
    transparent 20px,
    #f0f0f0 20px,
    #f0f0f0 36px,
    transparent 36px
  );
  border-left: 1px solid #ccc; /* Weiß besser sichtbar machen */
}

#oberflaeche_id option[data-hgfarbe='#B0B0B0'] {
  background-image: linear-gradient(
    to right,
    #b0b0b0 0,
    #b0b0b0 16px,
    transparent 16px,
    transparent 20px,
    #f0f0f0 20px,
    #f0f0f0 36px,
    transparent 36px
  );
}

#oberflaeche_id option[data-hgfarbe='#F0F0F0'] {
  background-image: linear-gradient(
    to right,
    #f0f0f0 0,
    #f0f0f0 16px,
    transparent 16px,
    transparent 20px,
    #f0f0f0 20px,
    #f0f0f0 36px,
    transparent 36px
  );
}

#oberflaeche_id option[data-hgfarbe='#CD7F32'] {
  background-image: linear-gradient(
    to right,
    #cd7f32 0,
    #cd7f32 16px,
    transparent 16px,
    transparent 20px,
    #f0f0f0 20px,
    #f0f0f0 36px,
    transparent 36px
  );
}

#oberflaeche_id option[data-hgfarbe='#808080'] {
  background-image: linear-gradient(
    to right,
    #808080 0,
    #808080 16px,
    transparent 16px,
    transparent 20px,
    #f0f0f0 20px,
    #f0f0f0 36px,
    transparent 36px
  );
}

#oberflaeche_id option[data-hgfarbe='#A0A0A0'] {
  background-image: linear-gradient(
    to right,
    #a0a0a0 0,
    #a0a0a0 16px,
    transparent 16px,
    transparent 20px,
    #f0f0f0 20px,
    #f0f0f0 36px,
    transparent 36px
  );
}

/* Spezielle Kombinationen für HG + VG */
#oberflaeche_id option[data-hgfarbe='#ff0000'][data-vgfarbe='#ffffff'] {
  background-image: linear-gradient(
    to right,
    #ff0000 0,
    #ff0000 16px,
    transparent 16px,
    transparent 20px,
    #ffffff 20px,
    #ffffff 36px,
    transparent 36px
  );
}

#oberflaeche_id option[data-hgfarbe='#000000'][data-vgfarbe='#ffffff'] {
  background-image: linear-gradient(
    to right,
    #000000 0,
    #000000 16px,
    transparent 16px,
    transparent 20px,
    #ffffff 20px,
    #ffffff 36px,
    transparent 36px
  );
}

/* === Toggle-Verhalten für Erweiterte Optionen === */

/* Toggle-Checkbox unsichtbar machen */
#show-advanced-options {
  display: none;
}

/* Alle Aufklapp-Bereiche zunächst geschlossen */
.advanced-options {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 1rem;
  background: var(--bg-table-alt);
  border-radius: 0 0 6px 6px;
  border: 1px solid var(--border-light);
  border-top: none;
}

/* Label als klickbarer Header (Haupt-Header & Unter-Header) */
.advanced-section label[for='show-advanced-options'],
.advanced-section > .toggle-label {
  cursor: pointer;
  display: block;
  margin: 0;
  padding: 0;
}

.advanced-section label[for='show-advanced-options'] h2,
.advanced-section > .toggle-label h3 {
  margin: 0;
  padding: 0.2rem 0.5rem;
  background: var(--bg-table-alt);
  border-radius: 6px;
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  position: relative;
  font-weight: 400;
}

.advanced-section label[for='show-advanced-options'] h2::after,
.advanced-section > .toggle-label h3::after {
  content: '▼';
  position: absolute;
  right: 1rem;
  transition: transform 0.3s ease;
}

.advanced-section label[for='show-advanced-options'] h2:hover,
.advanced-section > .toggle-label h3:hover {
  background: var(--bg-table-hover);
  border-color: var(--border-medium);
}

/* Haupt-„Erweiterte Optionen“-Block aufklappen (falls verwendet) */
#show-advanced-options:checked ~ .advanced-options {
  max-height: 1000px;
  opacity: 1;
  transform: translateY(0);
  padding: 1rem;
  margin-top: 0;
}

/* Einzelne Unter-Sektionen aufklappen (Material / Veredelung / Addon / Handling / Adresse) */
#toggle-material-parameters:checked ~ #material-parameters,
#toggle-veredelung-parameters:checked ~ #veredelung-parameters,
#toggle-addon-parameters:checked ~ #addon-parameters,
#toggle-handling-parameters:checked ~ #handling-parameters,
#toggle-address-section:checked ~ #address-fields,
#toggle-ship-address:checked ~ #ship-address-parameters {
  max-height: 1000px;
  opacity: 1;
  transform: translateY(0);
  padding: 1rem;
  margin-top: 0;
}

/* Inhalte in .advanced-options etwas kompakter stylen */
.advanced-options .field-grid {
  gap: 0.75rem;
}

.advanced-options .form-field label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.advanced-options .form-field input,
.advanced-options .form-field select {
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
}

.advanced-options h4 {
  color: var(--text-primary);
  margin: 0.75rem 0 0.5rem 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.25rem;
  font-weight: 600;
}

.advanced-options h4:first-child {
  margin-top: 0;
}

/* Pfeil drehen wenn geöffnet */
#show-advanced-options:checked ~ label[for='show-advanced-options'] h2::after,
#show-advanced-options:checked + label[for='show-advanced-options'] h2::after,
.toggle-checkbox:checked + .toggle-label h3::after,
.toggle-checkbox:checked ~ .toggle-label h3::after {
  transform: rotate(180deg);
}
/* ============================================
   LIVE-PREISVORSCHAU & BERECHNUNGSERGEBNIS
   ============================================ */

/* === Live-Preview Styles === */
.live-preview h2 {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 18px;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 0.5rem;
  display: flex;
  align-items: center;
  font-weight: 600;
}

.live-preview h2::before {
  content: '';
  width: 4px;
  height: 1.2rem;
  background: linear-gradient(135deg, var(--color-primary), #b8a55c);
  margin-right: 0.5rem;
  border-radius: 2px;
}

.live-preview.placeholder {
  border: 2px dashed var(--border-light);
  background: var(--bg-table-alt);
}

/* === Preview Content === */
.preview-content {
  display: grid;
  gap: 8px;
}

.preview-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid #e9ecef;
}

.preview-item:last-child {
  border-bottom: none;
}

.preview-label {
  font-weight: 500;
  color: #495057;
}

.preview-value {
  color: #212529;
}

.preview-total {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  font-size: 1.1rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 2px solid var(--color-primary);
}

.preview-total .preview-value {
  color: var(--color-primary);
}

.preview-empty {
  color: #6c757d;
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

/* === Preview Breakdown === */
.preview-breakdown {
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
  margin-top: 1rem;
}

.preview-breakdown h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* === Preview Placeholder === */
.preview-placeholder {
  margin-top: 1rem;
}

/* Live-Preview Error Styles */
.preview-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-error);
  background: var(--bg-error-light);
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.preview-error-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.preview-error-message {
  flex: 1;
}

.live-preview-content {
  padding: 0.5rem 0;
}

.preview-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 1rem;
}

.preview-hint {
  margin-bottom: 1rem;
  font-style: italic;
}

.required-fields-info {
  background: var(--bg-info-light);
  padding: 0.75rem;
  border-radius: 4px;
  border-left: 4px solid var(--color-info);
}

.required-fields-info ul {
  margin: 0.5rem 0 0 1rem;
  padding: 0;
}

/* Live-Preis-Display */
.live-price-display {
  background: var(--bg-success-light);
  border: 2px solid var(--color-success);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.price-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.price-item:last-child {
  border-bottom: none;
  font-weight: bold;
  font-size: 1.1rem;
  background: rgba(203, 177, 110, 0.1);
  margin: 0.5rem -1rem 0 -1rem;
  padding: 0.75rem 1rem;
  border-radius: 0 0 6px 6px;
}

.price-label {
  color: var(--text-secondary);
}

.price-value {
  font-weight: 600;
  color: var(--color-primary);
}

/* Berechnungsergebnis-Container */
.result-card {
  background: linear-gradient(135deg, var(--bg-panel) 0%, rgba(var(--color-white-rgb), 0.98) 100%);
  border: 1px solid rgba(var(--border-light-rgb), 0.3);
  border-radius: 16px;
  padding: 2rem;
  box-shadow:
    var(--shadow-sm),
    0 0 20px rgba(var(--color-primary-rgb), 0.03);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  margin: 2rem 0;
}

.result-card:hover {
  box-shadow:
    var(--shadow-lg),
    0 0 30px rgba(var(--color-primary-rgb), 0.08);
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(var(--color-primary-rgb), 0.4);
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-secondary),
    var(--gralax-gold)
  );
  box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.3);
}

.result-card h3 {
  margin: 0 0 1.5rem 0;
  font-size: 1.3rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(var(--text-primary-rgb), 0.1);
}

.result-card .icon {
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 1px 2px rgba(var(--color-primary-rgb), 0.2));
}

/* Preis-Zusammenfassung */
.price-summary {
  padding: 1.5rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(var(--border-light-rgb), 0.3);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.summary-item:hover {
  background: rgba(var(--color-primary-rgb), 0.02);
  padding-left: 0.5rem;
  border-radius: 6px;
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-item.total {
  border-top: 3px solid var(--color-primary);
  margin-top: 1rem;
  padding: 1.5rem 1rem;
  font-weight: bold;
  font-size: 1.2rem;
  background: linear-gradient(
    135deg,
    rgba(var(--color-primary-rgb), 0.05),
    rgba(var(--color-secondary-rgb), 0.03)
  );
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.1);
}

.summary-label {
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.summary-value {
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.summary-value.highlight {
  color: var(--color-primary);
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(var(--color-primary-rgb), 0.1);
}

.summary-value.large {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Info-Grid für Details */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.5rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: rgba(var(--bg-panel-rgb), 0.5);
  border: 1px solid rgba(var(--border-light-rgb), 0.3);
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s ease;
}

.info-item:hover {
  background: rgba(var(--color-primary-rgb), 0.03);
  border-color: rgba(var(--color-primary-rgb), 0.2);
  transform: translateY(-1px);
}

.info-label {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.1rem;
}

/* Format-Hilfsfunktionen für Währung */
.currency {
  font-weight: 600;
  color: var(--color-primary);
}

.currency::after {
  content: ' €';
  font-weight: normal;
}

/* === Material-Grid Layout (3-Spalten-System) === */
/*DEPRECATED: Nutze stattdessen .field-grid mit .span-X Klassen*/
.material-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  align-items: end;
}

/* Zeile 1: Kategorie (1 Spalte) + Unterkategorie (2 Spalten) */
.material-grid .kategorie-field {
  grid-column: 1;
}

.material-grid .unterkategorie-field {
  grid-column: 2 / 4;
  /* Spanning über 2 Spalten */
}

/* Zeile 2: Material-Dropdown (2 Spalten) + Oberflächenstruktur (1 Spalte) */
.material-grid .material-field {
  grid-column: 1 / 3;
  /* Spanning über 2 Spalten */
}

.material-grid .oberflaeche-field {
  grid-column: 3;
  /* Oberflächenstruktur in der 3. Spalte */
}

/* Zeile 3: Dimensionen (je 1 Spalte) */
.material-grid .dimension-field.schild-x {
  grid-column: 1;
  /* Schildbreite */
}

.material-grid .dimension-field.schild-y {
  grid-column: 2;
  /* Schildhöhe */
}

.material-grid .dimension-field.anzahl {
  grid-column: 3;
  /* Anzahl */
}

/* Responsive: Bei schmaleren Bildschirmen auf 1 Spalte umschalten */
@media (max-width: 1023px) {
  .price-breakdown {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .price-main {
    font-size: 2rem;
  }

  .result-card {
    padding: 1rem;
  }

  .main-layout {
    grid-template-columns: 1fr;
  }

  .form-right {
    position: static;
  }

  .live-preview {
    position: static;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  /* Responsive Anpassungen für Berechnungsergebnis */
  .comparison-header,
  .comparison-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .comparison-header > div,
  .comparison-row > div {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }

  .comparison-value-merged {
    grid-column: 1;
  }

  .price-breakdown {
    flex-direction: column;
    gap: 0.75rem;
  }

  .price-main {
    font-size: 2rem;
  }

  .veredelung-option {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .veredelung-price {
    align-self: flex-end;
  }
}

/* ============================================
   BERECHNUNGSERGEBNIS TABELLEN
   ============================================ */

/* Hauptcontainer für Berechnungsergebnisse */

.calculation-results h2 {
  color: var(--text-primary);
  border-bottom: 3px solid var(--color-primary);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

/* Preis-Display im Ergebnis */
.price-display {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--bg-success-light), #e8f5e8);
  border-radius: 12px;
  border: 2px solid var(--color-success);
}

.price-main {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.price-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.price-breakdown {
  display: flex;
  justify-content: space-around;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  gap: 1rem;
  margin-top: 1.5rem;
}

.price-component {
  text-align: center;
  flex: 1;
}

.price-component-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.price-component-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Results Stack für mehrere Ergebniskarten */
.results-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Comparison Table für Material/Veredelung Details */
.comparison-table {
  margin: 1rem 0;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-panel);
}

.comparison-header {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr;
  background: var(--bg-table-alt);
  border-bottom: 2px solid var(--border-light);
  font-weight: 600;
  color: var(--text-secondary);
}

.comparison-header > div {
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  border-right: 1px solid var(--border-light);
}

.comparison-header > div:first-child {
  text-align: left;
}

.comparison-header > div:last-child {
  border-right: none;
}

/* Spezielle Styling für die Header-Spalten */
.comparison-col-label {
  text-align: left !important;
}

.comparison-col-current {
  background: rgba(var(--color-primary-rgb), 0.1) !important;
}

.comparison-col-next {
  background: rgba(var(--color-secondary-rgb), 0.1) !important;
}

.comparison-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr;
  border-bottom: 1px solid var(--border-light);
  border-left: 4px solid transparent;
  align-items: center;
  transition: all 0.2s ease;
}

.comparison-row:last-child {
  border-bottom: none;
}

.comparison-row:hover {
  background: var(--bg-table-hover);
  border-left-color: var(--color-primary);
}

.comparison-row.highlight {
  background: rgba(var(--color-primary-rgb), 0.05);
  border-left: 4px solid var(--color-primary);
  font-weight: 600;
}

.comparison-row > div {
  padding: 0.75rem 1rem;
  border-right: 1px solid var(--border-light);
}

.comparison-row > div:last-child {
  border-right: none;
}

.comparison-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.comparison-value {
  color: var(--text-primary);
  text-align: center;
}

.comparison-value.highlight {
  color: var(--color-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.comparison-value.staffel-better {
  color: var(--color-secondary);
  position: relative;
}

.comparison-value.staffel-better::before {
  content: '↗ ';
  font-size: 0.8rem;
}

.comparison-value-merged {
  grid-column: 2 / 4;
  text-align: center;
  color: var(--text-primary);
  background: rgba(122, 123, 123, 0.05);
  font-weight: 600;
}

/* Staffel-Tabellen */
.staffel-table-container {
  margin: 1.5rem 0;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
}

.staffel-table-header {
  background: var(--color-primary);
  color: var(--gralax-darkgray);
  padding: 1rem;
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
}

.staffel-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  background: var(--bg-table);
}

.staffel-table th {
  background: var(--bg-table-alt);
  color: var(--text-primary);
  padding: 0.75rem;
  font-weight: 600;
  text-align: center;
  border-bottom: 2px solid var(--border-medium);
}

.staffel-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}

.staffel-table tr:hover td {
  background: var(--bg-table-hover);
}

.staffel-table tr.current-qty {
  background: var(--bg-success-light);
  font-weight: 600;
}

.staffel-table tr.current-qty td {
  background: var(--bg-success-light);
  color: var(--color-success);
}

/* Veredelungsoptionen */
.veredelung-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}

.veredelung-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 2px solid rgba(var(--border-light-rgb), 0.3);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--bg-table) 0%, rgba(var(--bg-table-rgb), 0.95) 100%);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.veredelung-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.veredelung-option:hover {
  background: var(--bg-table-hover);
  border-color: rgba(var(--color-primary-rgb), 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--border-medium-rgb), 0.15);
}

.veredelung-option:hover::before {
  transform: scaleX(1);
}

.veredelung-option.selected {
  border-color: var(--color-primary);
  background: linear-gradient(
    135deg,
    var(--bg-success-light),
    rgba(var(--color-primary-rgb), 0.05)
  );
  box-shadow: 0 0 20px rgba(var(--color-primary-rgb), 0.1);
}

.veredelung-option.selected::before {
  transform: scaleX(1);
  background: var(--color-primary);
}

.veredelung-info {
  flex: 1;
}

.veredelung-machine {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
}

.veredelung-material {
  font-size: 0.9rem;
  color: var(--text-secondary);
  opacity: 0.8;
}

.veredelung-price {
  font-weight: 700;
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 1px 2px rgba(var(--color-primary-rgb), 0.1);
}

/* Ergebnis-Tabellen */
.result-card table {
  width: 100%;
  margin: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.result-card table th {
  background: var(--bg-table-alt);
  color: var(--text-primary);
  padding: 0.75rem;
  font-weight: 600;
  height: auto;
  border-bottom: 2px solid var(--border-medium);
}

.result-card table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.result-card table tr:last-child td {
  border-bottom: none;
}

.result-card table tr:hover td {
  background: var(--bg-table-hover);
}

/* Spezielle Tabellenklassen für Ergebnisse */
.result-table {
  width: 100%;
  border-collapse: collapse;
}

.result-table .label-col {
  width: 40%;
  font-weight: 600;
  color: var(--text-secondary);
}

.result-table .value-col {
  width: 60%;
  text-align: right;
  font-weight: 500;
}

.result-table .total-row {
  background: var(--bg-info-light);
  font-weight: bold;
}

.result-table .total-row td {
  border-top: 2px solid var(--color-primary);
  padding: 1rem 0.75rem;
}

/* Best-Value Hervorhebung */
.best-value {
  background: var(--bg-success-light) !important;
  color: var(--color-success) !important;
  font-weight: bold;
}

.best-value td {
  background: var(--bg-success-light) !important;
}

/* Nicht verfügbare Werte */
.not-available {
  color: var(--color-error);
  font-style: italic;
  font-weight: normal;
}

/* Preisanzeige-Klassen */
.price-display {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  text-align: right;
}

.price-per-piece {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.price-total {
  color: var(--color-primary);
  font-size: 1.1rem;
  font-weight: bold;
}

/* === HANDLING UI STYLES === */

/* Klassenwechsel abfangen neue Zeile beginnen*/
.handling-list > .mandatory + .optional,
.handling-list > .mandatory + .recommended,
.handling-list > .optional + .mandatory,
.handling-list > .optional + .recommended,
.handling-list > .recommended + .mandatory,
.handling-list > .recommended + .optional {
  grid-column: 1; /* neue Zeile starten */
}

.handling-item {
  border-left: 3px solid transparent;
  border-top: 1px solid transparent;
  border-right: 1px solid var(--gralax-lightgray);
  border-bottom: 1px solid var(--gralax-lightgray);
  border-radius: 4px;
  padding: 8px 12px;
  background: var(--bg-panel);
}

.handling-item:hover,
.handling-item:active {
  border-top: 1px solid var(--gralax-lightgray);
  border-right: 1px solid transparent;
  border-bottom: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Status-basierte linke Randfarbe */
.handling-item.mandatory {
  border-left: 3px solid #dc3545;
}

.handling-item.recommended {
  border-left: 3px solid #ffc107;
}

.handling-item.optional {
  border-left: 3px solid #6c757d;
}

/* Hauptzeile: Checkbox - Anzahl x Name pro Bezugsgröße */
.handling-main-line {
  font-size: 0.9rem;
}

.handling-checkbox {
  flex-shrink: 0;
}

.handling-checkbox:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.handling-menge-input,
.addon-menge-input {
  width: 50px;
  padding: 2px 4px;
  border: 1px solid var(--gralax-lightgray);
  border-radius: 3px;
  font-size: 0.85rem;
  text-align: center;
  flex-shrink: 0;
}

.handling-menge-input:readonly {
  background: var(--gralax-lightgray);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.handling-multiplier {
  flex-shrink: 0;
  color: var(--text-secondary);
  font-weight: 500;
}

.status-indicator {
  flex-shrink: 0;
  font-size: 0.75rem;
}

.handling-name {
  font-weight: 500;
  color: var(--text-primary);
}

.handling-unit {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* Beschreibung (zweite Zeile) */
.handling-description {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.3;
  font-style: italic;
}

.info-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: var(--bg-info-light);
  border: 1px solid var(--gralax-lightgray);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.info-message .icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.placeholder-text {
  color: var(--text-muted);
  font-style: italic;
  padding: 10px 0;
  text-align: center;
}

/* === CALCULATION RESULTS STYLES === */
.calculation-results {
  margin-top: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.result-card {
  background: var(--bg-panel);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  overflow: hidden;
}

.result-card h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-card .icon {
  font-size: 1.3rem;
}

.price-display {
  text-align: center;
  padding: 1rem 0;
}

.price-main {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.price-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.price-breakdown {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.price-component {
  text-align: center;
}

.price-component-value {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.price-component-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.price-breakdown-detail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.breakdown-item:last-child {
  border-bottom: none;
}

.breakdown-item.total {
  font-weight: bold;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}

.breakdown-item.highlight .breakdown-value {
  color: var(--color-primary);
  font-size: 1.25rem;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.info-value {
  font-weight: 500;
}

.addon-price {
  font-weight: bold;
}

.handling-item.info-display {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
}

/* ======================================================
   HANDLINGS PRODUKTKATEGORIE STYLES
   ====================================================== */

.handling-items {
  margin: 15px 0;
  padding: 0;
}

/* Removed redundant handling classes - using existing styles instead */

.handling-item.required {
  background-color: rgba(var(--color-secondary-rgb), 0.05);
}

.handling-item input[type='checkbox'] {
  margin-top: 3px;
}

.handling-item label {
  display: flex;
  flex-direction: column;
  margin-left: 8px;
  cursor: pointer;
}

.handling-item label .description {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.info-text {
  color: var(--text-muted);
  font-style: italic;
  padding: 10px;
  text-align: center;
}

.error-message {
  color: var(--color-error);
  padding: 10px;
  background-color: rgba(var(--color-error-rgb), 0.05);
  border: 1px solid rgba(var(--color-error-rgb), 0.2);
  border-radius: 4px;
  text-align: center;
}

.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.handling-legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
}

/* Handling: Kategorien-Controls Layout */
.kategorie-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kategorie-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin: 0;
  font-size: 0.9em;
  transition: opacity 0.2s ease;
}

.kategorie-controls input[type='checkbox'] {
  margin-right: 5px;
  width: auto;
}

.mindestmenge-field {
  gap: 6px;
}

.kategorie-controls .mindestmenge-input {
  width: 80px;
  min-width: 70px;
  padding: 4px 6px;
  border: 1px solid var(--border-field);
  border-radius: 4px;
  box-sizing: border-box;
}

/* Zuschnitt-Detailansicht */
.page-nav {
  margin-bottom: 1rem;
}

.info-note {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background-color: var(--bg-panel);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 4px 4px 0;
}

.info-note p {
  margin: 0.25rem 0;
}

.detail-link {
  margin-left: 0.5rem;
  font-size: 0.8em;
  white-space: nowrap;
}

/* ============================================================
   Expandable offer table + action menus + selection bar
   (Angebots-Verwaltung rework, issue #147 - generic classes)
   ============================================================ */

/* Filter bar (GET form) */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar input[type="text"] {
  flex: 1;
  min-width: 220px;
}

.filter-bar select {
  padding: 8px 10px;
  border: 1px solid var(--border-field);
  border-radius: 5px;
  background: var(--bg-field);
}

/* Main expandable table (one row per offer) */
table.expandable-table {
  width: 100%;
  table-layout: auto;
  margin-top: 1em;
}

table.expandable-table th,
table.expandable-table td {
  height: auto;
  padding: 10px 12px;
  text-align: left;
  border: none;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

table.expandable-table thead th {
  border-bottom: 2px solid var(--border-table);
  background: var(--bg-table-alt);
  font-weight: 600;
  font-size: 0.85rem;
}

.expandable-table tr.offer-row {
  cursor: pointer;
}

.expandable-table tr.offer-row:hover td,
.expandable-table tr.offer-row.open td {
  background: #eef3fb;
}

/* Status stripe on the left edge of each offer row */
.expandable-table tr.offer-row > td:first-child {
  border-left: 4px solid var(--gralax-gray);
  width: 30px;
  text-align: center;
  color: var(--text-muted);
}

.expandable-table tr.row-stripe-success > td:first-child {
  border-left-color: var(--color-success);
}

.expandable-table tr.row-stripe-error > td:first-child {
  border-left-color: var(--color-error);
}

.expandable-table td.num-cell,
.expandable-table th.num-cell,
.runs-table td.num-cell,
.runs-table th.num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Status badges (offer level) */
.status-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge.angebot {
  background: var(--bg-info-light);
  color: var(--gralax-blue);
}

.status-badge.auftrag {
  background: var(--bg-success-light);
  color: var(--color-success);
}

.status-badge.locked {
  background: var(--bg-error-light);
  color: var(--color-error);
}

/* Expanded run rows area */
.expandable-table tr.runs-row > td {
  padding: 0 12px 14px 34px;
  background: var(--bg-table-alt);
  cursor: default;
}

table.runs-table {
  width: 100%;
  table-layout: auto;
  margin: 6px 0 0;
  border: none;
  box-shadow: none;
}

table.runs-table th,
table.runs-table td {
  height: auto;
  padding: 7px 10px;
  font-size: 0.85rem;
  border: none;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  background: transparent;
  vertical-align: middle;
}

table.runs-table thead th {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.runs-table tr.run-row.is-selected td {
  background: #f3fbf5;
}

.runs-table .actions-cell {
  white-space: nowrap;
}

.runs-table tr.run-details-row > td {
  background: var(--bg-table);
  border: 1px dashed var(--border-light);
  padding: 10px 14px;
}

.runs-empty {
  color: var(--text-muted);
  font-style: italic;
  margin: 8px 0;
}

/* Dropdown action menu (⋮) for offer and run rows */
.action-menu-wrap {
  position: relative;
  display: inline-block;
}

.action-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 110%;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  min-width: 190px;
  padding: 4px;
  z-index: 100;
  text-align: left;
}

.action-menu.open {
  display: block;
}

.action-menu > button,
.action-menu > span,
.action-menu > form {
  display: block;
  width: 100%;
  margin: 2px 0;
  text-align: left;
  box-sizing: border-box;
}

/* Sticky selection action bar (bulk actions) */
.selection-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: -80px;
  transition: bottom 0.2s;
  background: #212529;
  color: white;
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  z-index: 900;
}

.selection-bar.visible {
  bottom: 18px;
}

.selection-bar .selection-count-label {
  font-size: 0.85rem;
  margin-right: 6px;
  white-space: nowrap;
}

/* "Ältere anzeigen" pagination link */
.load-more {
  text-align: center;
  padding: 14px;
}
