/* Modern SaaS Design - Light Theme */
:root {
  /* Colors */
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --border: rgba(17, 24, 39, 0.12);
  --border-hover: rgba(17, 24, 39, 0.16);
  
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --text-label: #374151;
  
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-light: rgba(37, 99, 235, 0.15);
  
  --positive: #16A34A;
  --positive-light: rgba(22, 163, 74, 0.12);
  --negative: #DC2626;
  --negative-light: rgba(220, 38, 38, 0.12);
  
  --warning: #F59E0B;
  --info: #3B82F6;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 6px 20px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 10px 25px rgba(0, 0, 0, 0.08);
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--spacing-md) 0;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }

p {
  margin: 0 0 var(--spacing-md) 0;
}

.muted {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--spacing-lg);
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.nav a {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  text-decoration: none;
  color: var(--text-secondary);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav a:hover {
  color: var(--text-primary);
  background: rgba(17, 24, 39, 0.04);
}

.nav a.active {
  color: var(--accent);
  background: var(--accent-light);
}

.nav a svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.nav .badge {
  margin-left: auto;
  padding: var(--spacing-xs) var(--spacing-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-secondary);
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Buttons */
button, .btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(17, 24, 39, 0.04);
  border-color: var(--border-hover);
}

/* Danger Buttons - Destructive Actions */
.btn-danger {
  background: #DC2626;
  color: white;
  border: 1px solid #DC2626;
}

.btn-danger:hover {
  background: #B91C1C;
  border-color: #B91C1C;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.btn-danger:disabled {
  background: rgba(220, 38, 38, 0.5);
  border-color: rgba(220, 38, 38, 0.5);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Danger Outline - Secondary Destructive Actions (e.g. Deactivate) */
.btn-danger-outline {
  background: transparent;
  color: #DC2626;
  border: 1px solid #DC2626;
}

.btn-danger-outline:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: #B91C1C;
  color: #B91C1C;
}

.btn-sm {
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: 12px;
}

.btn-warning {
  background: #F59E0B;
  color: #FFFFFF;
  border: 1px solid #F59E0B;
}

.btn-warning:hover {
  background: #D97706;
  border-color: #D97706;
}

.btn-success {
  background: var(--positive);
  color: #FFFFFF;
  border: 1px solid var(--positive);
}

.btn-success:hover {
  background: #15803D;
  border-color: #15803D;
}

/* Inputs - Global Styling (ohne Ausnahmen) */
input[type="text"],
input[type="number"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input:not([type]),
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(17, 24, 39, 0.12) !important;
  border-radius: 12px !important;
  background: #FFFFFF !important;
  color: #111827 !important;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
  min-height: 44px;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Number Input Spinner entfernen */
input[type="number"] {
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Select Arrow (optional, falls gewünscht) */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23111827' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 36px;
}

/* Placeholder */
input::placeholder,
textarea::placeholder {
  color: #9CA3AF !important;
  opacity: 1;
}

/* Focus State */
input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  background: #FFFFFF !important;
  color: #111827 !important;
}

/* Checkboxen modernisiert */
input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  cursor: pointer;
  accent-color: var(--accent);
  border-radius: 4px;
  flex-shrink: 0;
}

input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Radio Buttons */
input[type="radio"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

input[type="radio"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Checkbox-Feld (inline mit Input-Höhe) */
.checkbox-field {
  display: flex;
  align-items: flex-end;
}

.checkbox-field .checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin: 0;
  min-height: 44px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  width: 100%;
}

.checkbox-field .checkbox-label:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.checkbox-field .checkbox-label input[type="checkbox"] {
  margin: 0;
}

.checkbox-field .checkbox-label span {
  white-space: nowrap;
}

/* Form Actions (CTA unter dem Grid) */
.form-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-start;
}

/* Options Stack (Checkboxen untereinander) */
.options-stack {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

/* Checkbox-Field Variante für options-stack */
.options-stack .checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
}

.options-stack .checkbox-field:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.options-stack .checkbox-field input[type="checkbox"] {
  margin: 0;
}

.options-stack .checkbox-field span {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Override für alte Klassen - entfernen oder neutralisieren */
.form-control {
  /* Diese Klasse überschreibt nichts mehr, da globales Styling greift */
}

/* Inputs in Tabellen - gleiches Styling */
table input,
table select,
table textarea {
  /* Erbt das globale Styling, keine Ausnahme */
}

/* Suchfelder - explizit */
input[type="search"] {
  /* Erbt das globale Styling */
}

/* Override für inline styles, die das Styling brechen könnten */
input[style*="border"],
select[style*="border"],
textarea[style*="border"] {
  border: 1px solid rgba(17, 24, 39, 0.12) !important;
  border-radius: 12px !important;
}

input[style*="background"],
select[style*="background"],
textarea[style*="background"] {
  background: #FFFFFF !important;
}

label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-label);
  letter-spacing: 0.01em;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: #FFFFFF !important;
}

thead {
  border-bottom: 1px solid var(--border);
  background: #FFFFFF !important;
}

th {
  text-align: left;
  padding: var(--spacing-md);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #FFFFFF !important;
}

td {
  padding: var(--spacing-md);
  border-bottom: 1px solid rgba(17, 24, 39, 0.04);
  background: #FFFFFF !important;
  color: var(--text-primary) !important;
}

tbody tr {
  transition: background 0.15s ease;
  background: #FFFFFF !important;
}

tbody tr:hover {
  background: rgba(17, 24, 39, 0.02) !important;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
}

.badge-laser {
  background: rgba(79, 70, 229, 0.1);
  color: #4F46E5;
}

.badge-plotter {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
}

.badge-positive {
  background: var(--positive-light);
  color: var(--positive);
}

.badge-negative {
  background: var(--negative-light);
  color: var(--negative);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #D97706;
}

.badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: #2563EB;
}

.badge-success {
  background: var(--positive-light);
  color: var(--positive);
}

.badge-danger {
  background: var(--negative-light);
  color: var(--negative);
}

.badge-secondary {
  background: rgba(107, 114, 128, 0.15);
  color: #4B5563;
}

/* Alerts */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  font-size: 14px;
}

.alert-error {
  background: var(--negative-light);
  color: var(--negative);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.alert-success {
  background: var(--positive-light);
  color: var(--positive);
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #B45309;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
  background: rgba(59, 130, 246, 0.15);
  color: #1D4ED8;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.kpi-label {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.kpi-value.positive {
  color: var(--positive);
}

.kpi-value.negative {
  color: var(--negative);
}

.kpi-value.accent {
  color: var(--accent);
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.form-group {
  margin-bottom: var(--spacing-md);
}

/* Details/Accordion */
details {
  margin-top: var(--spacing-md);
}

details summary {
  cursor: pointer;
  padding: var(--spacing-sm) var(--spacing-md);
  background: rgba(17, 24, 39, 0.02);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
  user-select: none;
  transition: all 0.2s ease;
}

details summary:hover {
  background: rgba(17, 24, 39, 0.04);
  color: var(--text-primary);
}

details[open] summary {
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

details > div {
  padding: var(--spacing-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-top: var(--spacing-sm);
}

/* Code/Formula */
code, .formula, pre {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  font-size: 13px;
  background: #FFFFFF !important;
  border: 1px solid var(--border) !important;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  color: var(--text-primary) !important;
  overflow: auto;
}

pre {
  margin: var(--spacing-sm) 0;
}

/* Utilities */
.text-right {
  text-align: right;
}

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

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.flex {
  display: flex;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* Chart Container */
.chart-container {
  position: relative;
  height: 300px;
  margin-top: var(--spacing-md);
}

/* Icon Styles */
.icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-lg {
  width: 20px;
  height: 20px;
}

/* Footer */
.footer {
  margin-top: var(--spacing-2xl);
  padding: var(--spacing-lg) 0;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
}

.footer .version {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  background: rgba(17, 24, 39, 0.04);
  border-radius: var(--radius-full);
  font-family: 'SF Mono', 'Monaco', monospace;
}

/* Form Control */
.form-control {
  width: 100%;
  background: #FFFFFF !important;
  color: #111827 !important;
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-md);
  border-left: 3px solid var(--accent);
}

.section-header h2,
.section-header h3 {
  margin: 0;
  color: var(--text-primary);
}

.section-header .icon {
  color: var(--accent);
}

/* Form Groups */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.form-group label .icon {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

/* Tabs */
.tab {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  background: rgba(17, 24, 39, 0.04);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.tab:hover {
  background: rgba(17, 24, 39, 0.06);
  color: var(--text-primary);
}

.tab.active {
  background: var(--accent) !important;
  color: #FFFFFF !important;
  border-color: var(--accent);
}

/* Override any dark backgrounds */
[style*="background:#0b0c0f"],
[style*="background: #0b0c0f"],
[style*="background:#121521"],
[style*="background: #121521"] {
  background: #FFFFFF !important;
  color: #111827 !important;
}

[style*="color:var(--text)"] {
  color: var(--text-primary) !important;
}

/* ============================================
   Demo Toast - Read-Only Notification
   ============================================ */
.demo-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlideIn 0.3s ease-out;
}

.demo-toast::before {
  content: "⚠️";
  font-size: 16px;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ============================================
   Responsive Design - Mobile First
   ============================================ */

/* Mobile (< 600px): 1-spaltig, alles full-width */
@media (max-width: 599px) {
  /* Verhindere horizontales Scrollen */
  body {
    overflow-x: hidden;
  }

  html, body {
    max-width: 100vw;
  }

  /* Container: weniger Padding auf Mobile */
  .container {
    padding: var(--spacing-md);
  }

  /* Navigation: flex-wrap für Mobile */
  .nav {
    flex-wrap: wrap;
    gap: var(--spacing-xs);
  }

  .nav a {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    padding: var(--spacing-xs) var(--spacing-sm);
  }

  /* Cards: weniger Padding auf Mobile */
  .card {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
  }

  /* Form Grids: 1-spaltig auf Mobile */
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: var(--spacing-sm);
  }

  /* Alle Form-Elemente: 100% Breite auf Mobile */
  .form-group {
    width: 100%;
    margin-bottom: var(--spacing-sm);
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* CTA Buttons: immer full-width auf Mobile */
  .form-actions {
    width: 100%;
  }

  .form-actions .btn,
  .form-actions button {
    width: 100% !important;
    min-height: 48px; /* Gut tappbar */
    font-size: 16px; /* Größere Schrift für Mobile */
  }

  /* Buttons in Form-Grid: full-width */
  .form-grid .btn,
  .form-grid button {
    width: 100% !important;
  }

  /* Checkbox-Felder: untereinander, full-width */
  .options-stack {
    grid-column: 1 / -1 !important;
    width: 100%;
  }

  .options-stack .checkbox-field {
    width: 100%;
    min-height: 48px; /* Gut tappbar */
  }

  /* Checkbox-Field in Form-Grid: full-width */
  .form-grid .checkbox-field {
    width: 100%;
    grid-column: 1 / -1 !important;
  }

  /* KPI Grid: 1-spaltig auf Mobile */
  .kpi-grid {
    grid-template-columns: 1fr !important;
    gap: var(--spacing-sm);
  }

  /* Section Header: flex-wrap auf Mobile */
  .section-header {
    flex-wrap: wrap;
    gap: var(--spacing-sm);
  }

  /* Tabellen: scrollbar auf Mobile (falls nötig) */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  /* Typography: kleinere Überschriften auf Mobile */
  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 18px;
  }

  /* Flex-Between: wrap auf Mobile */
  .flex-between {
    flex-wrap: wrap;
    gap: var(--spacing-sm);
  }

  /* Demo Toast: kleinerer Abstand oben auf Mobile */
  .demo-toast {
    top: 10px;
    left: 10px;
    right: 10px;
    transform: none;
    max-width: calc(100vw - 20px);
  }
}

/* Tablet (600px - 899px): 2-spaltig möglich */
@media (min-width: 600px) and (max-width: 899px) {
  /* Form Grids: 2-spaltig auf Tablet */
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  /* Full-width Elemente bleiben full-width */
  .form-group[style*="grid-column:1 / -1"] {
    grid-column: 1 / -1 !important;
  }

  .options-stack {
    grid-column: 1 / -1 !important;
  }

  /* KPI Grid: 2-spaltig auf Tablet */
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* CTA Buttons: können schmaler sein, aber gut tappbar */
  .form-actions .btn {
    min-width: 200px;
    min-height: 44px;
  }
}

/* Desktop (>= 900px): 2-spaltig oder mehr */
@media (min-width: 900px) {
  /* Form Grids: 2-spaltig oder mehr (auto-fit) */
  .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  /* KPI Grid: 3-spaltig oder mehr */
  .kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  /* CTA Buttons: normale Breite */
  .form-actions .btn {
    min-width: auto;
  }
}

/* Große Bildschirme (>= 1200px): mehr Spalten möglich */
@media (min-width: 1200px) {
  .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}
