/* ============================================================
   JANNING GROUP – Betriebs-Gefährdungsbeurteilung  |  Verdant Theme (Light & Dark)
   ============================================================ */

/* Verdant Color System - Light Mode */
:root {
    --primary: #2e7d32;
    --primary-foreground: #ffffff;
    --background: #f8f5f0;
    --foreground: #3e2723;
    --card: #f8f5f0;
    --card-foreground: #3e2723;
    --secondary: #e8f5e9;
    --secondary-foreground: #1b5e20;
    --accent: #c8e6c9;
    --accent-foreground: #1b5e20;
    --muted: #f0e9e0;
    --muted-foreground: #6d4c41;
    --border: #e0d6c9;
    --destructive: #c62828;
    --destructive-foreground: #ffffff;
    --ring: #2e7d32;
    --sidebar: #f0e9e0;

    --font-sans: Montserrat, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: Merriweather, serif;
    --font-mono: 'Source Code Pro', monospace;
}

/* Verdant Color System - Dark Mode */
:root.dark {
    --primary: #4caf50;
    --primary-foreground: #0a1f0c;
    --background: #1c2a1f;
    --foreground: #f0ebe5;
    --card: #2d3a2e;
    --card-foreground: #f0ebe5;
    --secondary: #3e4a3d;
    --secondary-foreground: #d7e0d6;
    --accent: #388e3c;
    --accent-foreground: #f0ebe5;
    --muted: #2d3a2e;
    --muted-foreground: #d7cfc4;
    --border: #3e4a3d;
    --destructive: #c62828;
    --destructive-foreground: #f0ebe5;
    --ring: #4caf50;
    --sidebar: #1c2a1f;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }
body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  line-height: 1.55;
  padding-top: 80px;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ---- HEADER ---- */
.site-header {
  background: var(--card);
  border-bottom: 4px solid var(--primary);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0,0,0,0.1);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease-in-out;
}

.site-header.header-hidden {
  transform: translateY(-100%);
}

.header-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 70px;
  position: relative;
}

.header-stripe {
  width: 2px;
  height: 36px;
  background: var(--primary);
  opacity: 0.5;
  flex-shrink: 0;
}

.form-title-block { flex: 1; }
.form-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  color: var(--foreground);
  text-transform: uppercase;
}

.theme-toggle-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.theme-toggle-btn:hover {
  background: var(--muted);
}

/* ---- MAIN ---- */
.form-container {
  max-width: 1040px;
  margin: 36px auto 60px;
  padding: 0 24px;
}

/* ---- SECTION ---- */
.form-section {
  background: var(--card);
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  margin-bottom: 28px;
  overflow: hidden;
  animation: fadeUp 0.4s ease both;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.form-section:nth-child(1) { animation-delay: 0.05s; }
.form-section:nth-child(2) { animation-delay: 0.1s; }
.form-section:nth-child(3) { animation-delay: 0.15s; }
.form-section:nth-child(4) { animation-delay: 0.2s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  background: var(--card);
  border-bottom: 2px solid var(--primary);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.section-num {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.65rem;
  color: var(--primary);
  letter-spacing: 0.02em;
  line-height: 1;
  min-width: 36px;
}
.section-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--foreground);
  text-transform: uppercase;
  flex: 1;
}
.section-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 2px 10px;
  border-radius: 20px;
  transition: background 0.3s ease, color 0.3s ease;
}
.section-hint {
  padding: 8px 24px 0;
  font-size: 0.82rem;
  color: var(--muted-foreground);
  font-style: italic;
}

/* ---- FIELDS GRID ---- */
.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 24px;
}
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group.full-width { grid-column: 1 / -1; }

.field-label {
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
  text-transform: uppercase;
}
.field-label.required::after {
  content: " *";
  color: var(--primary);
  font-weight: 700;
}

.field-input, .field-textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 9px 13px;
  font-family: var(--font-sans);
  font-size: 0.93rem;
  color: var(--foreground);
  background: var(--background);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.3s ease, color 0.3s ease;
  outline: none;
}
.field-input:focus, .field-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.15);
}
:root.dark .field-input:focus, :root.dark .field-textarea:focus {
  box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
}
.field-input:read-only {
  background: var(--muted);
  cursor: default;
}
.field-textarea { resize: vertical; }

/* MAP field */
.map-field-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.map-field-row .field-input { flex: 1; }
.map-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: var(--muted);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.3s ease;
  flex-shrink: 0;
}
.map-btn:hover { background: var(--border); border-color: var(--primary); color: var(--primary); }
.map-btn svg { flex-shrink: 0; }

/* CHECKBOX GROUP */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 0;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.93rem;
  user-select: none;
  color: var(--foreground);
}
.check-item input[type="checkbox"] { display: none; }
.check-box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 3px;
  flex-shrink: 0;
  background: var(--background);
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}
.check-item input[type="checkbox"]:checked + .check-box {
  background: rgba(46,125,50,0.1);
  border-color: var(--primary);
}
:root.dark .check-item input[type="checkbox"]:checked + .check-box {
  background: rgba(76,175,80,0.1);
}
.check-item input[type="checkbox"]:checked + .check-box::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 6px; height: 10px;
  border: 2px solid var(--primary);
  border-top: none; border-left: none;
  transform: rotate(45deg);
}

/* RADIO GROUP */
.radio-group {
  display: flex;
  gap: 16px;
  padding: 4px 0;
}
.radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.93rem;
  user-select: none;
  color: var(--foreground);
}
.radio-item input[type="radio"] { display: none; }
.radio-btn {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--background);
  transition: border-color 0.15s;
  position: relative;
}
.radio-item input[type="radio"]:checked + .radio-btn {
  border-color: var(--primary);
  background: rgba(46,125,50,0.1);
}
:root.dark .radio-item input[type="radio"]:checked + .radio-btn {
  background: rgba(76,175,80,0.1);
}
.radio-item input[type="radio"]:checked + .radio-btn::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
}

/* ---- TABLES ---- */
.table-wrapper {
  padding: 20px 24px 24px;
  overflow-x: auto;
}
.check-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  table-layout: auto;
}
.check-table th {
  background: var(--muted);
  color: var(--muted-foreground);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 6px 8px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  line-height: 1.3;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.check-table td {
  padding: 8px 10px;
  border: 1px solid var(--border);
  vertical-align: middle;
  line-height: 1.35;
  font-size: 0.72rem;
  color: var(--foreground);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.check-table tr:nth-child(even) td { background: rgba(46,125,50,0.02); }
:root.dark .check-table tr:nth-child(even) td { background: rgba(76,175,80,0.02); }
.check-table tr:hover td { background: rgba(46,125,50,0.05); }
:root.dark .check-table tr:hover td { background: rgba(76,175,80,0.05); }

.th-frage { min-width: 150px; max-width: 180px; }
.th-option {
  width: 40px;
  text-align: center !important;
  padding: 5px 3px !important;
}
.th-bemerkung { min-width: 80px; max-width: 100px; }

.center {
  text-align: center;
  vertical-align: middle !important;
  padding: 5px 3px !important;
}
.center input[type="radio"],
.center input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--primary);
  margin: 0;
}

.table-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  padding: 6px 9px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--foreground);
  background: var(--background);
  outline: none;
  transition: border-color 0.15s, background 0.3s ease, color 0.3s ease;
}
.table-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(46,125,50,0.15);
}
:root.dark .table-input:focus {
  box-shadow: 0 0 0 2px rgba(76,175,80,0.15);
}

.inline-input {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 0.83rem;
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--background);
  outline: none;
  width: 110px;
  transition: border-color 0.15s, background 0.3s ease, color 0.3s ease;
}
.inline-input:focus {
  border-color: var(--primary);
}

/* Gefahr Table */
.gefahr-table .th-frage { min-width: 320px; }

/* Legal Notice */
.legal-notice {
  margin: 0 24px 20px;
  padding: 14px 18px;
  border-left: 3px solid var(--primary);
  background: rgba(46,125,50,0.07);
  border-radius: 0 6px 6px 0;
  font-size: 0.83rem;
  color: var(--foreground);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
:root.dark .legal-notice {
  background: rgba(76,175,80,0.07);
}
.legal-notice p + p { margin-top: 8px; }

/* ---- SUBMIT ---- */
.submit-area {
  display: flex;
  justify-content: flex-end;
  padding: 8px 0 24px;
}
.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 32px;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.12s, box-shadow 0.18s, background 0.3s ease, color 0.3s ease;
  box-shadow: 0 4px 14px rgba(46,125,50,0.25);
}
:root.dark .submit-btn {
  box-shadow: 0 4px 14px rgba(76,175,80,0.25);
}
.submit-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(46,125,50,0.35);
}
:root.dark .submit-btn:hover {
  box-shadow: 0 6px 20px rgba(76,175,80,0.35);
}
.submit-btn:active { transform: translateY(0); }
.submit-btn.sm { padding: 9px 20px; font-size: 0.9rem; }
.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---- FORM MESSAGE ---- */
.form-message {
  padding: 16px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 8px;
  animation: fadeUp 0.3s ease;
}
.form-message.success {
  background: rgba(46,125,50,0.1);
  border: 1.5px solid rgba(46,125,50,0.3);
  color: var(--primary);
}
:root.dark .form-message.success {
  background: rgba(76,175,80,0.1);
  border: 1.5px solid rgba(76,175,80,0.3);
  color: var(--primary);
}
.form-message.error {
  background: rgba(198,40,40,0.1);
  border: 1.5px solid rgba(198,40,40,0.3);
  color: var(--destructive);
}

/* ---- MAP MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
  padding: 16px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--card);
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 740px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--muted);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--primary);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.modal-close {
  background: none;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--primary); }

.map-search-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s ease;
}
.map-search-row .field-input { flex: 1; }
.map-search-btn {
  padding: 9px 16px;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.87rem;
  cursor: pointer;
  transition: opacity 0.15s, background 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}
.map-search-btn:hover { opacity: 0.85; }

#leafletMap {
  flex: 1;
  min-height: 360px;
  width: 100%;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  gap: 12px;
  transition: border-color 0.3s ease;
}
.selected-addr {
  font-size: 0.85rem;
  color: var(--muted-foreground);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.selected-addr.has-addr { color: var(--foreground); font-weight: 600; }

/* ---- UTILITIES ---- */
.hidden { display: none !important; }
.mt-sm { margin-top: 8px; }

/* ---- VALIDATION HIGHLIGHT ---- */
.field-input.invalid,
.field-textarea.invalid {
  border-color: var(--destructive);
  background: rgba(198,40,40,0.05);
}
.invalid-msg {
  font-size: 0.78rem;
  color: var(--destructive);
  margin-top: 3px;
}

/* ---- LOADING SPINNER ---- */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(46,125,50,0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
:root.dark .spinner {
  border: 2px solid rgba(76,175,80,0.3);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- VORLAGEN BUTTONS ---- */
.template-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 28px;
  padding: 20px;
  background: var(--card);
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.template-label {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
  text-transform: uppercase;
  margin-right: 6px;
}

.template-btn {
  padding: 10px 20px;
  background: var(--background);
  border: 2px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s;
}
.template-btn:hover {
  background: rgba(46,125,50,0.1);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}
:root.dark .template-btn:hover {
  background: rgba(76,175,80,0.1);
}
.template-btn:active { transform: translateY(0); }

/* ---- RISK INFO SECTION ---- */
.risk-info-section {
  margin: 2rem 0;
  padding: 2rem;
  background: rgba(46,125,50,0.05);
  border: 2px solid var(--primary);
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  transition: background 0.3s ease, border-color 0.3s ease;
}
:root.dark .risk-info-section {
  background: rgba(76,175,80,0.05);
}

.risk-info-title {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.risk-info-text {
  font-size: 1rem;
  color: var(--foreground);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.risk-matrix-wrapper {
  overflow-x: auto;
  margin: 0 auto;
  max-width: 100%;
}

.risk-matrix {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.85rem;
  transition: background 0.3s ease;
}

.risk-matrix th,
.risk-matrix td {
  padding: 0.75rem 0.5rem;
  text-align: center;
  border: 1px solid var(--border);
  font-weight: 500;
  color: var(--foreground);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.risk-matrix thead th {
  background: var(--muted);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.corner-cell {
  background: var(--muted) !important;
}

.header-consequence {
  background: var(--muted);
  color: var(--foreground);
  padding: 1rem 0.5rem;
}

.severity-col {
  background: var(--border);
  color: var(--foreground);
  font-size: 0.8rem;
  min-width: 80px;
}

.header-group,
.header-potential,
.header-measures {
  background: var(--border);
  color: var(--foreground);
  font-size: 0.85rem;
}

.frequency-label {
  background: var(--card);
  color: var(--foreground);
  font-weight: 600;
  text-align: left;
  padding-left: 1rem;
  min-width: 120px;
}

.risk-1 {
  background: #c62828;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
}

.risk-2 {
  background: #f57c00;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
}

.risk-3 {
  background: #2e7d32;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
}

.group-cell {
  background: var(--border);
  color: var(--foreground);
  font-weight: 700;
  font-size: 1rem;
}

.potential-cell {
  background: var(--border);
  color: var(--foreground);
  font-weight: 600;
}

.measure-cell {
  background: var(--border);
  color: var(--foreground);
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

.empty-cell {
  background: var(--card);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 680px) {
  .fields-grid { grid-template-columns: 1fr; }
  .field-group.full-width { grid-column: 1; }
  .header-inner { height: auto; padding: 14px 16px; flex-wrap: wrap; gap: 12px; }
  .form-container { padding: 0 12px; margin-top: 20px; }
  .table-wrapper {
    padding: 14px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .fields-grid { padding: 16px; gap: 14px; }
  .check-table {
    font-size: 0.68rem;
    min-width: 900px;
  }
  .check-table th {
    font-size: 0.65rem;
    padding: 5px 6px;
    line-height: 1.2;
  }
  .check-table .th-frage { min-width: 130px; max-width: 150px; }
  .check-table .th-option {
    width: 38px;
    padding: 4px 2px !important;
  }
  .check-table td {
    padding: 6px 5px;
    font-size: 0.68rem;
    line-height: 1.3;
  }
  .check-table .center { padding: 4px 2px !important; }
  .check-table .center input[type="radio"],
  .check-table .center input[type="checkbox"] {
    width: 14px;
    height: 14px;
  }
  .inline-input {
    width: 80px;
    font-size: 0.68rem;
    padding: 2px 4px;
  }
  .template-buttons {
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
  }
  .template-label { width: 100%; margin-bottom: 8px; }
  .template-btn { width: 100%; }
  .risk-info-section { padding: 1.5rem; }
  .risk-info-title { font-size: 1.3rem; }
  .risk-info-text { font-size: 0.95rem; }
  .risk-matrix { font-size: 0.65rem; }
  .risk-matrix th, .risk-matrix td { padding: 0.4rem 0.2rem; }
}

@media (min-width: 1400px) {
  .form-container { max-width: 1400px; }
  .check-table { font-size: 0.75rem; }
  .check-table th { font-size: 0.72rem; }
  .check-table td { font-size: 0.75rem; }
}

@media (max-width: 1200px) {
  .risk-matrix { font-size: 0.75rem; }
  .risk-matrix th, .risk-matrix td { padding: 0.5rem 0.3rem; }
  .severity-col { font-size: 0.7rem; min-width: 70px; }
  .measure-cell { font-size: 0.7rem; }
}
