/* ============================================================================
   FAHRZEUGBEWERTUNG | KLASSIKER GUTACHTEN
   Comprehensive CSS for classic car appraisal application
   ============================================================================ */

/* --------------------------------------------------------------------------
   IMPORTS
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Mono:wght@400;500&family=DM+Sans:wght@300;400;500;600&display=swap');

/* --------------------------------------------------------------------------
   DESIGN TOKENS & VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* T4 Light Theme — professionell hell */
  --bg: #F2F2F0;
  --surface: #FFFFFF;
  --surface2: #F5F5F3;
  --border: #D8D8D4;
  --gold: #9A7B2D;
  --gold-light: #B8922A;
  --gold-dim: #C6AD5C;
  --text: #1A1A18;
  --text-muted: #6B6860;
  --text-dim: #9E9A92;
  --note1: #3A8A5E;
  --note2: #5A9A3E;
  --note3: #B8940A;
  --note4: #D06A10;
  --note5: #B02A1E;
  --radius: 4px;
  --transition: 0.2s ease;
}

/* --------------------------------------------------------------------------
   GLOBAL STYLES
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   HEADER
   -------------------------------------------------------------------------- */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 8px;
}

.logo {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--gold);
  white-space: nowrap;
}

.logo span {
  color: var(--text-muted);
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  margin-left: 6px;
}

.header-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   BUTTONS & CONTROLS
   -------------------------------------------------------------------------- */
.btn {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.btn-primary {
  background: var(--gold);
  color: var(--bg);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--gold-light);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 11px;
}

.btn-add {
  background: rgba(201, 168, 76, 0.1);
  color: var(--gold);
  border: 1px dashed var(--gold-dim);
  padding: 4px 10px;
  font-size: 11px;
}

.btn-add:hover {
  background: rgba(201, 168, 76, 0.2);
}

/* Modal buttons - semantic classes for modal button patterns */
.modal-btn-save {
  background: var(--gold);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 5px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
}

.modal-btn-save:hover {
  background: var(--gold-light);
}

.modal-btn-cancel {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
}

.modal-btn-cancel:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.modal-btn-danger {
  background: transparent;
  color: #c0392b;
  border: 1px solid #c0392b;
  border-radius: 5px;
  padding: 9px 16px;
  cursor: pointer;
  font-size: 13px;
}

.modal-btn-danger:hover {
  background: rgba(192, 57, 43, 0.1);
}

/* --------------------------------------------------------------------------
   LAYOUT
   -------------------------------------------------------------------------- */
.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  height: calc(100vh - 56px);
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   SIDEBAR
   -------------------------------------------------------------------------- */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 12px 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  padding: 9px 16px;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  gap: 8px;
  font-size: 13px;
  border-left: 2px solid transparent;
}

.sidebar-item:hover {
  color: var(--text);
  background: var(--surface2);
}

.sidebar-item.active {
  color: var(--gold);
  background: rgba(201, 168, 76, 0.08);
  border-left-color: var(--gold);
}

.sidebar-item .item-icon {
  font-size: 15px;
  flex-shrink: 0;
}

.sidebar-item .item-label {
  flex: 1;
}

.sidebar-item .item-badge {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  background: var(--surface2);
  color: var(--text-dim);
  padding: 2px 5px;
  border-radius: 8px;
}

.sidebar-item.active .item-badge {
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold-dim);
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 14px;
}

.sidebar-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 6px 16px 3px;
}

/* --------------------------------------------------------------------------
   MAIN CONTENT
   -------------------------------------------------------------------------- */
.main {
  overflow-y: auto;
  padding: 20px;
  background: var(--bg);
}

.page-title {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  color: var(--gold);
  margin-bottom: 3px;
  break-after: avoid;
  page-break-after: avoid;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 20px;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

.printing .section {
  display: block !important;
}

.section-header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  break-after: avoid;
  page-break-after: avoid;
}

.fortschritt-text {
  font-size: 11px;
  color: var(--text-dim);
  font-family: 'DM Mono', monospace;
  white-space: nowrap;
  margin-top: 6px;
}

/* --------------------------------------------------------------------------
   FORMS
   -------------------------------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
  overflow: visible;
}

.form-grid.three {
  grid-template-columns: 1fr 1fr 1fr;
  overflow: visible;
}

.form-full {
  grid-column: 1 / -1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.form-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 500;
}

.form-input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 10px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  transition: var(--transition);
  outline: none;
  width: 100%;
}

input[type="date"].form-input {
  -webkit-appearance: auto;
  appearance: auto;
  color-scheme: light;
}

.form-input:focus {
  border-color: var(--gold-dim);
}

.form-input::placeholder {
  color: var(--text-dim);
}

select.form-input {
  cursor: pointer;
}

textarea.form-input {
  resize: vertical;
}

/* Form row - inline form groups */
.form-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.form-row > * {
  flex: 1;
  min-width: 120px;
}

/* --------------------------------------------------------------------------
   CUSTOM DROPDOWN
   -------------------------------------------------------------------------- */
.dropdown-wrapper {
  position: relative;
}

.dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  z-index: 500;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.dropdown-item {
  padding: 7px 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: var(--surface2);
  color: var(--gold);
}

.dropdown-item.add-custom {
  color: var(--gold-dim);
  font-style: italic;
  border-top: 1px solid var(--border);
}

.dropdown-search {
  padding: 6px 10px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text);
  outline: none;
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  font-family: inherit;
}

/* --------------------------------------------------------------------------
   CARDS
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.card-header {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.card-count {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
}

.card-chevron {
  color: var(--text-dim);
  transition: transform 0.2s;
  font-size: 11px;
}

.card.collapsed .card-chevron {
  transform: rotate(-90deg);
}

.card.collapsed .card-body {
  display: none;
}

/* Gutachten cards in list */
.gv-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  position: relative;
  transition: border-color 0.2s;
  margin-bottom: 12px;
}

.gv-card:hover {
  border-color: var(--gold-dim);
}

.gv-card-active {
  background: var(--surface);
  border: 2px solid var(--gold);
}

/* --------------------------------------------------------------------------
   PRÜFPUNKT ROWS
   -------------------------------------------------------------------------- */
.pruef-row {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

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

.pruef-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

.pruef-row.graded {
  background: rgba(201, 168, 76, 0.04);
}

.pruef-row.skipped {
  opacity: 0.35;
}

.pruef-top {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pruef-label {
  font-size: 13px;
  color: var(--text);
  line-height: 1.3;
}

.pruef-hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 1px;
}

.pruef-beschr {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
  font-style: italic;
}

/* --------------------------------------------------------------------------
   BEMERKUNG (NOTES)
   -------------------------------------------------------------------------- */
.bemerkung-row {
  padding: 4px 14px 8px;
  display: none;
}

.bemerkung-row.visible {
  display: block;
}

.bemerkung-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 8px;
  border-radius: var(--radius);
  font-size: 11px;
  font-family: inherit;
  outline: none;
  resize: none;
}

.bemerkung-input:focus {
  border-color: var(--gold-dim);
  color: var(--text);
}

/* --------------------------------------------------------------------------
   NOTE BUTTONS
   -------------------------------------------------------------------------- */
.note-buttons {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.note-btn {
  min-width: 32px;
  height: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 10px;
  font-family: 'DM Mono', monospace;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  padding: 0 4px;
}

.note-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.note-btn.selected-1 {
  background: var(--note1);
  border-color: var(--note1);
  color: #fff;
}

.note-btn.selected-2 {
  background: var(--note2);
  border-color: var(--note2);
  color: #fff;
}

.note-btn.selected-3 {
  background: var(--note3);
  border-color: var(--note3);
  color: #000;
}

.note-btn.selected-4 {
  background: var(--note4);
  border-color: var(--note4);
  color: #fff;
}

.note-btn.selected-5 {
  background: var(--note5);
  border-color: var(--note5);
  color: #fff;
}

.note-btn.skip-btn {
  min-width: 24px;
  font-size: 13px;
}

.note-btn.skip-btn.active {
  background: var(--surface2);
  border-color: var(--text-dim);
  color: var(--text-dim);
}

.note-btn.bem-btn {
  min-width: 24px;
  font-size: 11px;
  color: var(--text-dim);
}

.note-btn.bem-btn.has-text {
  color: var(--gold);
  border-color: var(--gold-dim);
}

/* --------------------------------------------------------------------------
   CATEGORY SUMMARY
   -------------------------------------------------------------------------- */
.cat-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  background: rgba(201, 168, 76, 0.05);
  border-top: 1px solid var(--border);
}

.cat-note-display {
  font-family: 'DM Mono', monospace;
  font-size: 18px;
  font-weight: 500;
  min-width: 30px;
  text-align: center;
}

.cat-note-label {
  font-size: 10px;
  color: var(--text-dim);
}

.cat-progress {
  flex: 1;
}

.cat-progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.cat-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.cat-progress-text {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 2px;
  font-family: 'DM Mono', monospace;
}

/* --------------------------------------------------------------------------
   MEASUREMENT TABLES (Spaltmaße / Lack)
   -------------------------------------------------------------------------- */
.mess-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.mess-table th {
  text-align: left;
  padding: 7px 10px;
  background: var(--surface2);
  color: var(--text-dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.mess-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

.mess-table tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

.mess-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 7px;
  border-radius: 3px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  width: 70px;
  outline: none;
  text-align: right;
}

.mess-input:focus {
  border-color: var(--gold-dim);
}

.mess-diff {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  min-width: 60px;
  text-align: right;
}

.mess-beurt {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 3px;
  display: inline-block;
}

.beurt-ok {
  background: rgba(74, 156, 111, 0.2);
  color: var(--note1);
}

.beurt-warn {
  background: rgba(212, 172, 13, 0.2);
  color: var(--note3);
}

.beurt-bad {
  background: rgba(192, 57, 43, 0.2);
  color: var(--note5);
}

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

/* --------------------------------------------------------------------------
   TOGGLE SWITCHES
   -------------------------------------------------------------------------- */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(201, 168, 76, 0.04);
}

.toggle-label {
  font-size: 12px;
  color: var(--text-muted);
}

.toggle {
  width: 34px;
  height: 18px;
  background: var(--border);
  border-radius: 9px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle.on {
  background: var(--gold);
}

.toggle::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: left 0.2s;
}

.toggle.on::after {
  left: 18px;
}

/* --------------------------------------------------------------------------
   RIGHT PANEL
   -------------------------------------------------------------------------- */
.right-panel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 16px;
}

.panel-title {
  font-family: 'DM Serif Display', serif;
  font-size: 15px;
  color: var(--gold);
  margin-bottom: 12px;
}

.gesamtnote-display {
  text-align: center;
  padding: 16px;
  background: var(--surface2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.gesamtnote-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
}

.gesamtnote-value {
  font-family: 'DM Serif Display', serif;
  font-size: 48px;
  line-height: 1;
  margin-bottom: 3px;
}

.gesamtnote-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.gesamtnote-beschreibung {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 16px;
}

.stat-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  text-align: center;
}

.stat-value {
  font-family: 'DM Mono', monospace;
  font-size: 16px;
  font-weight: 500;
  color: var(--gold);
}

.stat-label {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 1px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.baugruppe-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--surface2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 6px;
}

.baugruppe-note {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  min-width: 28px;
  text-align: center;
}

.baugruppe-info {
  flex: 1;
}

.baugruppe-name {
  font-size: 11px;
  font-weight: 500;
}

.baugruppe-bar {
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  overflow: hidden;
  margin-top: 3px;
}

.baugruppe-fill {
  height: 100%;
  border-radius: 1px;
  transition: width 0.3s ease;
}

/* --------------------------------------------------------------------------
   TOAST NOTIFICATIONS
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--surface);
  border: 1px solid var(--gold-dim);
  color: var(--text);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  z-index: 999;
  animation: slideIn 0.3s ease;
  display: none;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   PRINT STYLES
   -------------------------------------------------------------------------- */
@media print {
  /* Top margin 0 suppresses browser header. Small bottom margin for browser page numbers only. */
  @page {
    margin: 0 0 12mm 0;
  }

  /* Hide everything except print container */
  body > * {
    display: none !important;
  }

  body {
    margin: 0;
    padding: 0;
  }

  #PRINT-CONTAINER {
    display: block !important;
    width: 100% !important;
    font-family: 'DM Sans', sans-serif;
    font-size: 11pt;
    color: #000;
    background: #fff;
    padding: 10mm 14mm 6mm 14mm;
  }

  #PRINT-CONTAINER .pb {
    page-break-before: always !important;
    break-before: page !important;
    display: block !important;
  }

  #PRINT-CONTAINER table {
    width: 100% !important;
    border-collapse: collapse;
  }

  #PRINT-CONTAINER td,
  #PRINT-CONTAINER th {
    border: 1px solid #ccc;
    padding: 4px 6px;
    font-size: 10pt;
    word-break: break-word;
  }

  #PRINT-CONTAINER .sec-title {
    font-size: 18pt;
    font-weight: bold;
    margin: 0 0 4px 0;
  }

  #PRINT-CONTAINER .sec-sub {
    font-size: 10pt;
    color: #666;
    margin-bottom: 12px;
  }

  #PRINT-CONTAINER .gruppe-title {
    font-size: 12pt;
    font-weight: bold;
    margin: 12px 0 4px 0;
    border-bottom: 1px solid #ccc;
    padding-bottom: 3px;
  }

  #PRINT-CONTAINER .pruef-item {
    display: flex;
    padding: 4px 0;
    border-bottom: 1px solid #eee;
    break-inside: avoid;
  }

  /* Punkteübersicht page-break hint */
  #PRINT-CONTAINER .pb-pu {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Suppress footer in Punkteübersicht (no print-page-footer injected there) */
  #PRINT-CONTAINER .pruef-lbl {
    flex: 1;
    font-size: 10pt;
  }

  #PRINT-CONTAINER .pruef-note {
    font-weight: bold;
    font-size: 10pt;
    width: 30px;
    text-align: center;
  }

  #PRINT-CONTAINER .pruef-desc {
    flex: 1;
    font-size: 10pt;
    color: #444;
  }

  #PRINT-CONTAINER .pruef-gew {
    font-size: 9pt;
    color: #888;
    width: 80px;
  }

  #PRINT-CONTAINER .pruef-bem {
    font-size: 9pt;
    color: #555;
    font-style: italic;
  }

  #PRINT-CONTAINER .field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
    margin-bottom: 8px;
  }

  #PRINT-CONTAINER .field-item label {
    font-size: 8pt;
    text-transform: uppercase;
    color: #888;
    display: block;
  }

  #PRINT-CONTAINER .field-item span {
    font-size: 10pt;
    color: #000;
    border-bottom: 1px solid #ddd;
    display: block;
    padding: 2px 0;
  }

  /* System Magin footer – inline, appears at end of each section before page break */
  #PRINT-CONTAINER .print-page-footer {
    margin-top: 14px;
    padding: 5px 0 3px;
    border-top: 1px solid #d4a832;
    text-align: center;
    font-size: 8.5pt;
    color: #999;
    font-family: 'Georgia', serif;
    letter-spacing: 0.5px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  #PRINT-CONTAINER .print-page-footer span {
    color: #b8922a;
    font-weight: 600;
  }

  .zus-table {
    border: 1px solid #ccc !important;
  }

  .zus-table th,
  .zus-table td {
    border-color: #ccc !important;
    color: #333 !important;
  }

  .zus-section {
    border: 1px solid #ccc !important;
    margin-bottom: 12px !important;
  }

  .zus-section-title {
    color: #000 !important;
    background: #f5f5f5 !important;
  }

  .zus-p-label,
  .zus-p-beschr {
    color: #333 !important;
  }

  .zus-fz {
    color: #000 !important;
  }

  .zus-meta {
    color: #555 !important;
  }
}

.print-note {
  display: none;
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid #ccc;
  vertical-align: middle;
}

.print-gewicht {
  display: none;
  font-size: 11px;
  color: #666;
  margin-left: 4px;
  font-style: italic;
}

/* --------------------------------------------------------------------------
   DEFINITION BUTTON
   -------------------------------------------------------------------------- */
.def-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid var(--gold-dim);
  color: var(--gold-dim);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1;
  transition: var(--transition);
  font-family: 'DM Mono', monospace;
}

.def-btn:hover {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

.def-btn-ext {
  font-size: 12px;
  border-radius: 3px;
  width: auto;
  padding: 0 4px;
  letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   MODAL STYLES
   -------------------------------------------------------------------------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--gold-dim);
  border-radius: 6px;
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.modal-title {
  font-family: 'DM Serif Display', serif;
  font-size: 16px;
  color: var(--gold);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 16px;
}

.modal-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 10px;
  margin-top: 14px;
  font-weight: 600;
}

.modal-section-title:first-child {
  margin-top: 0;
}

/* Modal box - common container pattern */
.modal-box {
  background: var(--surface);
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Modal title bar */
.modal-title-bar {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Modal body section with padding */
.modal-content-section {
  padding: 14px;
}

.def-row {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

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

.def-note {
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  text-align: center;
}

.def-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   ZUSAMMENFASSUNG (SUMMARY) SECTION
   -------------------------------------------------------------------------- */
.zus-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.zus-fz {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 6px;
}

.zus-meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.zus-gesamt-box {
  text-align: center;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 20px;
}

.zus-gesamt-note {
  font-family: 'DM Serif Display', serif;
  font-size: 64px;
  line-height: 1;
}

.zus-gesamt-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.zus-gesamt-beschr {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
}

.zus-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.zus-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.zus-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  vertical-align: top;
}

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

.zus-gruppe {
  display: inline-block;
  margin: 2px 8px 2px 0;
  font-size: 12px;
  white-space: nowrap;
}

.zus-details {
  /* empty, available for extensions */
}

.zus-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 16px;
  overflow: hidden;
}

.zus-section-title {
  padding: 12px 16px;
  font-family: 'DM Serif Display', serif;
  font-size: 16px;
  color: var(--gold);
  border-bottom: 1px solid var(--border);
  background: rgba(201, 168, 76, 0.05);
}

.zus-gruppe-block {
  padding: 0 16px 12px;
}

.zus-gruppe-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 0 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.zus-detail-table {
  width: 100%;
  border-collapse: collapse;
}

.zus-p-label {
  padding: 5px 8px 5px 0;
  font-size: 13px;
  color: var(--text);
  width: 40%;
  vertical-align: top;
}

.zus-p-note {
  padding: 5px 12px 5px 0;
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  vertical-align: top;
}

.zus-p-beschr {
  padding: 5px 0;
  font-size: 12px;
  color: var(--text-muted);
  vertical-align: top;
}

/* --------------------------------------------------------------------------
   SYNC & STATUS INDICATORS
   -------------------------------------------------------------------------- */
.spin {
  display: inline-block;
  animation: spin 1s linear infinite;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}

.sync-dot.ok {
  background: #4a9c6f;
}

.sync-dot.busy {
  background: #f39c12;
  animation: spin 0.8s linear infinite;
}

.sync-dot.err {
  background: #c0392b;
}

.sync-dot.off {
  background: #555;
}

#sync-status {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --------------------------------------------------------------------------
   CLOUD / PWA MODAL
   -------------------------------------------------------------------------- */
#cloud-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9995;
  align-items: center;
  justify-content: center;
}

.cloud-box {
  background: var(--surface);
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  width: 540px;
  max-width: 95vw;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.cloud-step {
  background: var(--surface2);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 10px 0;
  border-left: 3px solid var(--gold);
}

.cloud-step a {
  color: var(--gold);
  text-decoration: none;
}

.cloud-step a:hover {
  text-decoration: underline;
}

.cloud-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
  margin-top: 6px;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   PWA INSTALL BAR
   -------------------------------------------------------------------------- */
#pwa-install-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 8888;
  background: linear-gradient(135deg, #FFFFFF, #F8F4EC);
  border-top: 2px solid #9A7B2D;
  padding: 12px 20px;
  align-items: center;
  gap: 14px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

#pwa-install-bar img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

#pwa-install-bar .pwa-text {
  flex: 1;
}

#pwa-install-bar .pwa-title {
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
}

#pwa-install-bar .pwa-sub {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
}

#pwa-install-bar .pwa-btn {
  background: var(--gold);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  padding: 9px 20px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}

#pwa-install-bar .pwa-btn:hover {
  background: var(--gold-light);
}

#pwa-install-bar .pwa-dismiss {
  background: transparent;
  color: #666;
  border: none;
  cursor: pointer;
  font-size: 20px;
  padding: 4px 8px;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   PHOTOS
   -------------------------------------------------------------------------- */
.photo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
}

.photo-thumb {
  position: relative;
  display: inline-block;
}

.photo-thumb img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.photo-thumb .del-photo {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.photo-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 12px;
  cursor: pointer;
}

.photo-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.vehicle-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.vehicle-photo-thumb {
  position: relative;
}

.vehicle-photo-thumb img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.vehicle-photo-thumb .del-photo {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   VIDEOS
   -------------------------------------------------------------------------- */
.video-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 12px;
  cursor: pointer;
}

.video-btn:hover {
  border-color: #e06030;
  color: #e06030;
}

.video-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
}

.video-thumb {
  position: relative;
  width: 120px;
  height: 80px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  background: #000;
}

.video-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.video-thumb .play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  font-size: 28px;
  color: #fff;
  transition: background 0.2s;
}

.video-thumb:hover .play-icon {
  background: rgba(0, 0, 0, 0.15);
}

.video-thumb .del-video {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(192, 57, 43, 0.85);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.video-thumb:hover .del-video {
  opacity: 1;
}

.video-thumb .video-duration {
  position: absolute;
  bottom: 2px;
  right: 4px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 2px;
  font-family: 'DM Mono', monospace;
}

.vehicle-video-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* Section with video bar */
.section-video-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   SIGNATURE CANVAS WRAPPER
   -------------------------------------------------------------------------- */
.sig-canvas-wrapper {
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: crosshair;
  touch-action: none;
  width: 100%;
  max-width: 470px;
  display: block;
}

/* --------------------------------------------------------------------------
   UTILITY CLASSES
   -------------------------------------------------------------------------- */

/* Flex center - centered flex layout */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Info text - small hint/info text */
.info-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* --------------------------------------------------------------------------
   SCROLLBAR STYLING
   -------------------------------------------------------------------------- */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ==========================================================================
   FELD-MODUS (Hochkontrast für Außeneinsatz bei Sonnenlicht)
   Toggle per .feld-modus Klasse auf <body>
   ========================================================================== */
body.feld-modus {
  --bg: #EDEAE5;
  --surface: #FFFFFF;
  --surface2: #E5E2DC;
  --border: #B8B0A4;
  --gold: #705A10;
  --gold-light: #8B6914;
  --gold-dim: #4A3C0A;
  --text: #000000;
  --text-muted: #3A3530;
  --text-dim: #6A6560;
  --note1: #1B7A3D;
  --note2: #4A8C2A;
  --note3: #9A7A00;
  --note4: #C05A10;
  --note5: #A02020;
  --radius: 6px;
  color-scheme: light;
}

body.feld-modus header {
  background: #FFFFFF;
  border-bottom: 2px solid #8B6914;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body.feld-modus .sidebar {
  background: #FAFAF7;
  border-right: 1px solid #C8C0B4;
}

body.feld-modus .right-panel {
  background: #FAFAF7;
  border-left: 1px solid #C8C0B4;
}

body.feld-modus .form-input {
  background: #FFFFFF;
  border-color: #B8B0A4;
  color: #1A1A1A;
}

body.feld-modus .form-input::placeholder {
  color: #999;
}

body.feld-modus .card {
  background: #FFFFFF;
  border-color: #C8C0B4;
}

body.feld-modus .card-header {
  border-bottom-color: #C8C0B4;
}

body.feld-modus .note-btn {
  background: #EDE9E3;
  border-color: #B8B0A4;
  color: #4A4540;
}

body.feld-modus .note-btn:hover {
  background: #DDD8D0;
  color: #1A1A1A;
}

body.feld-modus .note-btn.selected-1 { background: #1B7A3D; border-color: #1B7A3D; color: #fff; }
body.feld-modus .note-btn.selected-2 { background: #4A8C2A; border-color: #4A8C2A; color: #fff; }
body.feld-modus .note-btn.selected-3 { background: #C9A000; border-color: #C9A000; color: #000; }
body.feld-modus .note-btn.selected-4 { background: #D06A1A; border-color: #D06A1A; color: #fff; }
body.feld-modus .note-btn.selected-5 { background: #C02020; border-color: #C02020; color: #fff; }

body.feld-modus .pruef-row {
  border-bottom-color: #D0C8BC;
}

body.feld-modus .pruef-row.graded {
  background: rgba(139,105,20,0.08);
}

body.feld-modus .gesamtnote-display {
  background: #FFFFFF;
  border-color: #C8C0B4;
}

body.feld-modus .stat-item {
  background: #FFFFFF;
  border-color: #C8C0B4;
}

body.feld-modus .baugruppe-item {
  background: #FFFFFF;
  border-color: #C8C0B4;
}

body.feld-modus .mess-table th {
  background: #EDE9E3;
  color: #4A4540;
}

body.feld-modus .mess-input {
  background: #FFFFFF;
  border-color: #B8B0A4;
  color: #1A1A1A;
}

body.feld-modus .bemerkung-input {
  background: #FFFFFF;
  border-color: #B8B0A4;
  color: #1A1A1A;
}

body.feld-modus input[type="date"].form-input {
  color-scheme: light;
}

/* Feld-Modus Toggle Button */
.feld-modus-toggle {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--gold-dim);
  background: rgba(201,168,76,0.1);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
}

.feld-modus-toggle:hover {
  background: rgba(201,168,76,0.2);
}

body.feld-modus .feld-modus-toggle {
  background: #8B6914;
  color: #FFFFFF;
  border-color: #8B6914;
}

/* ==========================================================================
   MOBILE BOTTOM NAV (Klassiker)
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
}

/* ==========================================================================
   RESPONSIVE: TABLET (< 1024px)
   ========================================================================== */
@media screen and (max-width: 1024px) {
  .app-layout {
    grid-template-columns: 200px 1fr;
  }

  .right-panel {
    display: none;
  }

  .page-title { font-size: 20px; }
  .form-grid.three { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   RESPONSIVE: SMARTPHONE / S25 Ultra (< 640px, ~412 CSS-px breit)
   ========================================================================== */
@media screen and (max-width: 640px) {

  /* --- Layout: Einspaltiger Modus --- */
  .app-layout {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 50px);
    padding-bottom: 76px;
  }

  /* Sidebar verstecken – Bottom-Nav übernimmt */
  .sidebar {
    display: none;
  }

  .right-panel {
    display: none;
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: var(--surface);
    border-top: 2px solid var(--gold);
    z-index: 500;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  }

  body.feld-modus .mobile-bottom-nav {
    background: #FFFFFF;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.12);
  }

  .mob-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 2px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    min-width: 48px;
    transition: all 0.2s;
    font-family: inherit;
  }

  .mob-nav-btn.active {
    color: var(--gold);
    background: rgba(201,168,76,0.12);
  }

  body.feld-modus .mob-nav-btn.active {
    background: rgba(139,105,20,0.12);
  }

  .mob-nav-btn .mob-icon {
    font-size: 22px;
    line-height: 1;
  }

  .mob-nav-btn .mob-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.04em;
  }

  /* --- Header: Kompakt für Smartphone --- */
  header {
    height: 50px;
    padding: 0 10px;
    gap: 4px;
  }

  header .logo {
    font-size: 14px;
    gap: 6px !important;
  }

  header .logo a {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }

  /* "System Magin" Label ausblenden */
  header .logo > span[style*="letter-spacing"] {
    display: none;
  }

  header .logo > span[style*="font-family:'DM Serif"] {
    font-size: 13px !important;
  }

  .header-actions {
    gap: 3px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .header-actions .btn {
    padding: 6px 8px;
    font-size: 11px;
  }

  /* Auf Handy nur Speichern, Drucken und Feld-Modus zeigen */
  .header-actions #btn-cloud,
  .header-actions .btn[onclick*="export"],
  .header-actions .btn[onclick*="import"],
  .header-actions .btn[onclick*="reset"],
  .header-actions .btn[onclick*="Punkteuebersicht"],
  .header-actions .btn[onclick*="printPunkteUebersicht"],
  .header-actions #sync-status {
    display: none !important;
  }

  /* --- Hauptinhalt: Größere Elemente --- */
  .main {
    padding: 14px 12px;
    overflow-y: auto;
  }

  .page-title {
    font-size: 20px;
    margin-bottom: 2px;
  }

  .page-subtitle {
    font-size: 13px;
    margin-bottom: 14px;
  }

  /* --- Formulare: Einspaltig --- */
  .form-grid,
  .form-grid.three {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-label {
    font-size: 12px;
    margin-bottom: 2px;
  }

  .form-input {
    font-size: 16px;
    padding: 12px 14px;
    border-radius: 6px;
  }

  select.form-input {
    font-size: 16px;
    padding: 12px 14px;
  }

  textarea.form-input {
    font-size: 15px;
    padding: 12px 14px;
  }

  /* --- Cards: Größere Touch-Bereiche --- */
  .card {
    border-radius: 10px;
    margin-bottom: 14px;
  }

  .card-header {
    padding: 14px 16px;
    min-height: 52px;
  }

  .card-title {
    font-size: 15px;
    font-weight: 700;
  }

  .card-chevron {
    font-size: 16px;
    padding: 4px 8px;
  }

  /* --- Prüfpunkt-Zeilen: Touch-freundlich --- */
  .pruef-row {
    padding: 14px;
  }

  .pruef-top {
    gap: 8px;
  }

  .pruef-label {
    font-size: 16px;
    line-height: 1.4;
    font-weight: 500;
  }

  .pruef-hint {
    font-size: 13px;
  }

  .pruef-beschr {
    font-size: 13px;
  }

  /* --- Noten-Buttons: 48×48px Touch-Targets --- */
  .note-buttons {
    gap: 6px;
    justify-content: flex-start;
    margin-top: 10px;
  }

  .note-btn {
    min-width: 48px;
    height: 48px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    border-width: 2px;
  }

  .note-btn.skip-btn {
    min-width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .note-btn.bem-btn {
    min-width: 48px;
    height: 48px;
    font-size: 16px;
  }

  /* --- Bemerkungen --- */
  .bemerkung-row {
    padding: 8px 14px 12px;
  }

  .bemerkung-input {
    font-size: 15px;
    padding: 10px 12px;
    min-height: 50px;
    border-radius: 6px;
  }

  /* --- Kategorie-Zusammenfassung --- */
  .cat-summary {
    padding: 14px;
    gap: 12px;
  }

  .cat-note-display {
    font-size: 26px;
    min-width: 44px;
  }

  .cat-note-label {
    font-size: 12px;
  }

  .cat-progress-bar {
    height: 6px;
    border-radius: 3px;
  }

  .cat-progress-text {
    font-size: 12px;
    margin-top: 4px;
  }

  /* --- Messtabellen: Horizontal scrollbar --- */
  .card-body:has(.mess-table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mess-table {
    font-size: 14px;
    min-width: 600px;
  }

  .mess-table th,
  .mess-table td {
    padding: 10px 8px;
    white-space: nowrap;
  }

  .mess-input {
    font-size: 16px;
    padding: 8px 10px;
    width: 80px;
  }

  /* --- Sektion-Header --- */
  .section-header-bar {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
  }

  .fortschritt-text {
    font-size: 13px;
  }

  /* --- Toggle-Switches --- */
  .toggle-row {
    padding: 14px;
  }

  .toggle-label {
    font-size: 15px;
  }

  .toggle {
    width: 48px;
    height: 26px;
    border-radius: 13px;
  }

  .toggle::after {
    width: 20px;
    height: 20px;
    top: 3px;
    left: 3px;
  }

  .toggle.on::after {
    left: 25px;
  }

  /* --- Gutachten-Karten --- */
  .gv-card {
    padding: 16px;
    border-radius: 12px;
  }

  /* --- Ergebnis als Bottom-Sheet --- */
  .mobile-result-sheet {
    position: fixed;
    bottom: 72px;
    left: 0;
    right: 0;
    max-height: 70vh;
    z-index: 490;
    background: var(--surface);
    border-top: 2px solid var(--gold);
    border-radius: 16px 16px 0 0;
    overflow-y: auto;
    padding: 20px 16px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.1);
  }

  body.feld-modus .mobile-result-sheet {
    background: #FFFFFF;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
  }

  .mobile-result-sheet.open {
    transform: translateY(0);
  }

  .mobile-result-sheet .panel-title {
    font-size: 18px;
  }

  .mobile-result-sheet .gesamtnote-value {
    font-size: 56px;
  }

  .mobile-result-sheet .gesamtnote-label {
    font-size: 13px;
  }

  .mobile-result-sheet .gesamtnote-beschreibung {
    font-size: 14px;
  }

  .mobile-result-sheet .stat-value {
    font-size: 20px;
  }

  .mobile-result-sheet .stat-label {
    font-size: 12px;
  }

  .mobile-result-sheet .baugruppe-name {
    font-size: 14px;
  }

  .mobile-result-sheet .baugruppe-note {
    font-size: 18px;
  }

  .mobile-result-sheet .stats-grid {
    gap: 10px;
  }

  /* --- Toast: Oben anzeigen --- */
  .toast {
    top: 56px;
    bottom: auto;
    left: 12px;
    right: 12px;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 8px;
  }

  /* --- Fotos & Videos --- */
  .photo-btn, .video-btn {
    padding: 10px 14px !important;
    font-size: 14px !important;
  }

  /* --- Unterschrift & 2-Spalten Inline-Styles überschreiben --- */
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* --- Dropdown --- */
  .dropdown-list {
    max-height: 260px;
  }

  .dropdown-item {
    padding: 12px 14px;
    font-size: 15px;
  }

  .dropdown-search {
    padding: 10px 14px;
    font-size: 15px;
  }
}
