/* ============================================================
   style.css – Globales Stylesheet – Stefanie Portal
   ============================================================ */

/* ── 1. Schriften ─────────────────────────────────────────── */

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/roboto-latin-300-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/roboto-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/roboto-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/roboto-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/roboto-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/roboto-latin-700-normal.woff2') format('woff2');
}

/* ── 2. CSS-Variablen ─────────────────────────────────────── */

:root {
  /* Farben */
  --color-bg:             #f4f2ef;
  --color-surface:        #ffffff;
  --color-border:         #dbd7d0;
  --color-border-focus:   #5c7c6f;

  --color-primary:        #5c7c6f;
  --color-primary-dark:   #3d5a50;
  --color-primary-light:  #e8f0ed;

  --color-text:           #1a1a1a;
  --color-text-muted:     #6b6b6b;
  --color-text-light:     #9b9b9b;

  --color-success:        #2a6041;
  --color-success-bg:     #edf7f1;
  --color-success-border: #b2d9c2;

  --color-error:          #b5343d;
  --color-error-bg:       #fdf0f0;
  --color-error-border:   #e8b4b8;

  --color-warning:        #7a5c00;
  --color-warning-bg:     #fef8e8;
  --color-warning-border: #f0d990;

  /* Schrift */
  --font-family:    'Roboto', system-ui, -apple-system, sans-serif;
  --font-size-sm:   0.875rem;
  --font-size-base: 1rem;
  --font-size-lg:   1.125rem;
  --font-size-xl:   1.25rem;
  --font-size-2xl:  1.5rem;
  --font-size-3xl:  1.875rem;

  /* Abstände */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Radii */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* Schatten */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,.05), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 20px rgba(0,0,0,.06), 0 4px 8px rgba(0,0,0,.04);

  /* Layout */
  --max-width:     1100px;
  --header-height: 60px;
}

/* ── 3. Reset & Basis ─────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

textarea {
  resize: vertical;
}

/* ── 4. Layout ───────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.site-main {
  padding-block: var(--space-10);
  min-height: calc(100vh - var(--header-height));
}

.page-header {
  margin-bottom: var(--space-8);
}

.page-title {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

/* ── 5. Header & Navigation ──────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-4);
}

.site-logo {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-primary-dark);
  text-decoration: none;
  white-space: nowrap;
}

.site-logo:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-user {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.nav-logout {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}

.nav-logout:hover {
  color: var(--color-error);
  text-decoration: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.back-link:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* ── 6. Login-Seite ──────────────────────────────────────── */

.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: var(--space-6);
  background: var(--color-bg);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-8);
  box-shadow: var(--shadow-lg);
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: var(--space-8);
  text-align: center;
}

.login-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-primary-dark);
  letter-spacing: -0.01em;
}

.login-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ── 7. Dashboard ────────────────────────────────────────── */

.tool-groups {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.tool-group-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

@media (max-width: 640px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.tool-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--color-text);
}

.tool-card-icon {
  font-size: 2rem;
  line-height: 1;
}

.tool-card-body {
  flex: 1;
}

.tool-card-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.tool-card-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.tool-card-action {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-primary);
  margin-top: auto;
}

/* ── 8. Tool-Seiten ──────────────────────────────────────── */

.tool-page {
  max-width: 680px;
}

/* ── 9. Formular-Elemente ────────────────────────────────── */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.form-label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
}

.form-label .required {
  color: var(--color-error);
  margin-left: var(--space-1);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(92, 124, 111, 0.15);
}

.form-textarea {
  min-height: 120px;
  line-height: 1.6;
}

.form-hint {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.form-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-primary-light);
  border: 1px solid var(--color-border-focus);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.form-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.form-checkbox-label {
  font-size: var(--font-size-sm);
  color: var(--color-text);
  line-height: 1.5;
  cursor: pointer;
}

.form-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-6);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

/* ── 10. Buttons ─────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

.btn-outline:hover {
  background: var(--color-bg);
  color: var(--color-text);
  border-color: var(--color-text-muted);
  text-decoration: none;
}

.btn-lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-size-lg);
}

.w-full {
  width: 100%;
}

/* ── 11. Meldungen (Alerts) ──────────────────────────────── */

.alert {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  margin-bottom: var(--space-5);
  border: 1px solid transparent;
}

.alert-success {
  background: var(--color-success-bg);
  border-color: var(--color-success-border);
  color: var(--color-success);
}

.alert-error {
  background: var(--color-error-bg);
  border-color: var(--color-error-border);
  color: var(--color-error);
}

.alert-warning {
  background: var(--color-warning-bg);
  border-color: var(--color-warning-border);
  color: var(--color-warning);
}

/* ── 12. Utility-Klassen ─────────────────────────────────── */

.text-sm   { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg   { font-size: var(--font-size-lg); }
.text-xl   { font-size: var(--font-size-xl); }
.text-2xl  { font-size: var(--font-size-2xl); }

.font-light    { font-weight: 300; }
.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }

.text-muted { color: var(--color-text-muted); }
.text-light { color: var(--color-text-light); }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

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

.rounded    { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.hidden { display: none !important; }

.no-print { }

/* ── 13. Print-Styles ────────────────────────────────────── */

@media print {
  .no-print,
  .site-header,
  .back-link,
  .form-actions,
  .btn,
  .alert {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    line-height: 1.5;
  }

  .site-main {
    padding: 0;
    min-height: unset;
  }

  .container {
    max-width: 100%;
    padding-inline: 0;
  }

  .tool-page {
    max-width: 100%;
  }

  .page-header {
    margin-bottom: 16pt;
  }

  .page-title {
    font-size: 16pt;
    font-weight: bold;
  }

  .print-only {
    display: block !important;
  }

  .form-group {
    margin-bottom: 14pt;
    break-inside: avoid;
  }

  .form-label {
    font-size: 9pt;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #555;
    margin-bottom: 3pt;
  }

  .form-input,
  .form-textarea {
    border: none;
    border-bottom: 1px solid #ccc;
    border-radius: 0;
    background: transparent;
    padding: 2pt 0;
    font-size: 11pt;
    color: #000;
    min-height: unset;
    box-shadow: none;
  }

  .form-textarea {
    min-height: 60pt;
  }

  .form-hint,
  .form-checkbox-row,
  .form-divider {
    display: none !important;
  }

  .print-header {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20pt;
    padding-bottom: 10pt;
    border-bottom: 2px solid #000;
  }

  .print-header-title {
    font-size: 18pt;
    font-weight: bold;
  }

  .print-header-meta {
    font-size: 9pt;
    color: #555;
    text-align: right;
  }
}

.print-only {
  display: none;
}

.print-header {
  display: none;
}

/* ── 14. Tool: Dokumentation ─────────────────────────────── */

:root {
  --dok-border-light: #e8e4de;
}

/* Sticky Toolbar (Tabs + Buttons) */
.dok-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: var(--header-height);
  z-index: 90;
}

.dok-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-2);
}

.dok-tabs {
  display: flex;
}

.dok-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 0.75rem 1.1rem;
  font-family: var(--font-family);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.dok-tab-btn:hover {
  color: var(--color-text);
}

.dok-tab-btn.active {
  color: var(--color-text);
  border-bottom-color: var(--color-primary);
}

.dok-toolbar {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) 0;
}

.dok-meta {
  padding: 0.2rem var(--space-6) 0.45rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.dok-meta-label {
  font-weight: 500;
}

/* Gefahren-Button-Variante */
.btn-danger {
  background: transparent;
  color: #9b3a3a;
  border-color: #d4a0a0;
}

.btn-danger:hover {
  background: #f9f0f0;
  border-color: #c07070;
  color: #7a2a2a;
  text-decoration: none;
}

/* Print-only Header (auf Bildschirm unsichtbar) */
#print-header {
  display: none;
}

/* Haupt-Inhaltsbereich */
.dok-main {
  max-width: 860px;
  margin: 2rem auto;
  padding: 0 var(--space-6);
}

/* Modus-Panels */
.mode-panel        { display: none; }
.mode-panel.active { display: block; }

/* Sektionen */
.dok-tool .section {
  background: var(--color-surface);
  border: 1px solid var(--dok-border-light);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.dok-tool .section-title {
  font-size: 0.72rem;
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--dok-border-light);
}

/* Felder */
.dok-tool .field {
  margin-bottom: 1.25rem;
}

.dok-tool label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.dok-tool input[type=text],
.dok-tool input[type=date],
.dok-tool input[type=number],
.dok-tool textarea {
  width: 100%;
  font-family: var(--font-family);
  font-size: 0.9rem;
  color: var(--color-text);
  background: #fafaf9;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.dok-tool input:focus,
.dok-tool textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(92, 124, 111, 0.12);
}

.dok-tool textarea {
  resize: vertical;
  min-height: 80px;
}

.dok-tool textarea.large {
  min-height: 140px;
}

/* Raster */
.dok-tool .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.dok-tool .grid-4 { display: grid; grid-template-columns: 1fr auto auto auto; gap: 1rem; align-items: end; }

/* Checklisten-Items */
.dok-tool .cl-item {
  margin-bottom: 0.75rem;
  padding: 0.85rem;
  background: #fafaf9;
  border: 1px solid var(--dok-border-light);
  border-radius: var(--radius-sm);
}

.dok-tool .cl-sub {
  margin-top: 0.6rem;
  padding-left: 1.65rem;
}

/* Checkbox-/Radio-Zeilen */
.dok-tool .cb-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-height: 44px;
  cursor: pointer;
}

.dok-tool .cb-row input[type=checkbox],
.dok-tool .cb-row input[type=radio] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 3px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.dok-tool .cb-row label {
  margin-bottom: 0;
  font-weight: 400;
  cursor: pointer;
  flex: 1;
}

.dok-tool .radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin-top: 0.35rem;
}

.dok-tool .r-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  cursor: pointer;
}

.dok-tool .r-row input[type=radio] {
  width: 17px;
  height: 17px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.dok-tool .r-row label {
  margin-bottom: 0;
  font-weight: 400;
  cursor: pointer;
}

/* Checkbox-Raster (Mehrfachauswahl) */
.dok-tool .cb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.dok-tool .cb-grid .cb-row {
  background: #fafaf9;
  border: 1px solid var(--dok-border-light);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  min-height: 40px;
}

/* Befund-Zeilen */
.dok-tool .bf-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  align-items: start;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--dok-border-light);
}

.dok-tool .bf-item:last-child { border-bottom: none; }

.dok-tool .bf-label {
  font-size: 0.88rem;
  padding-top: 0.3rem;
}

/* Hinweistexte */
.dok-tool .hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0.35rem 0 0 1.65rem;
  font-style: italic;
}

@media (max-width: 640px) {
  .dok-tool .grid-2 { grid-template-columns: 1fr; }
  .dok-tool .grid-4 { grid-template-columns: 1fr 1fr; }
  .dok-header-top   { flex-direction: column; align-items: flex-start; }
  .dok-tabs         { flex-wrap: wrap; }
}

/* ── 14a. Tool: Dokumentation – Druckstyles ──────────────── */

@media print {
  @page {
    margin: 1.2cm 1.5cm;
  }

  /* Print-only Header einblenden */
  #print-header {
    display: block !important;
    border-bottom: 2px solid #000;
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    column-span: all;
  }

  #print-header h2 {
    font-size: 12pt;
    font-weight: 700;
    margin-bottom: 0.15rem;
  }

  .ph-meta {
    font-size: 8.5pt;
    color: #333;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  /* 2-spaltiges Layout für das Formular */
  .dok-main {
    margin: 0;
    max-width: 100%;
    padding: 0;
    column-count: 2;
    column-gap: 1.5rem;
  }

  /* Inaktive Modus-Panels ausblenden */
  .mode-panel        { display: block !important; }
  .mode-panel:not(.active) { display: none !important; }

  .dok-tool {
    font-size: 9pt;
    color: #000;
    line-height: 1.4;
  }

  /* Sektionen kompakt */
  .dok-tool .section {
    border: none;
    border-top: 1.5px solid #000;
    padding: 0.4rem 0 0.2rem;
    margin-bottom: 0.5rem;
    break-inside: avoid;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  .dok-tool .section.allow-break {
    break-inside: auto;
  }

  .dok-tool .section-title {
    font-size: 7.5pt;
    letter-spacing: 0.15em;
    color: #000;
    border-bottom: none;
    margin-bottom: 0.45rem;
    padding-bottom: 0;
  }

  /* Felder */
  .dok-tool .field {
    margin-bottom: 0.35rem;
    break-inside: avoid;
  }

  .dok-tool label {
    font-size: 7.5pt;
    font-weight: 700;
    color: #444;
    margin-bottom: 0.05rem;
  }

  .dok-tool .hint { display: none !important; }

  /* Eingabefelder ohne Rahmen, nur Unterstrich */
  .dok-tool input[type=text],
  .dok-tool input[type=date],
  .dok-tool input[type=number] {
    border: none;
    border-bottom: 1px solid #999;
    border-radius: 0;
    background: transparent;
    padding: 0;
    font-size: 9pt;
    box-shadow: none;
    min-height: 1.3em;
  }

  /* Textareas (werden per JS ersetzt, Fallback falls JS fehlt) */
  .dok-tool textarea {
    border: none;
    border-bottom: 1px solid #999;
    border-radius: 0;
    background: transparent;
    padding: 0;
    resize: none;
    font-size: 9pt;
    min-height: 1.8em;
    overflow: hidden;
    box-shadow: none;
  }

  .dok-tool textarea.large { min-height: 3.5em; }

  /* Textarea-Ersatz-Divs (von JS erzeugt) */
  .dok-print-text {
    font-size: 9pt;
    color: #000;
    min-height: 1.5em;
    padding: 0;
    border-bottom: 1px solid #999;
    width: 100%;
    display: block;
    white-space: pre-wrap;
  }

  .dok-print-empty { color: #777; }

  /* Checklisten-Items */
  .dok-tool .cl-item {
    background: transparent;
    border: none;
    border-bottom: 1px dotted #ccc;
    padding: 0.2rem 0;
    break-inside: avoid;
    margin-bottom: 0;
  }

  .dok-tool .cl-item:last-child { border-bottom: none; }

  .dok-tool .cl-sub {
    padding-left: 1rem;
    margin-top: 0.15rem;
  }

  /* Checkbox-/Radio-Zeilen */
  .dok-tool .cb-row {
    gap: 0.4rem;
    min-height: auto;
  }

  .dok-tool .cb-row input[type=checkbox] {
    width: 11px;
    height: 11px;
    min-width: 11px;
    margin-top: 2px;
    flex-shrink: 0;
  }

  .dok-tool .cb-row label {
    display: inline;
    font-size: 9pt;
    font-weight: 400;
    color: #000;
    margin-bottom: 0;
  }

  .dok-tool .r-row {
    gap: 0.35rem;
    min-height: auto;
  }

  .dok-tool .r-row input[type=radio] {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
  }

  .dok-tool .r-row label {
    display: inline;
    font-size: 9pt;
    font-weight: 400;
    color: #000;
    margin-bottom: 0;
  }

  .dok-tool .radio-group { gap: 0.2rem 0.9rem; margin-top: 0.15rem; }

  /* Checkbox-Raster: 3 Spalten */
  .dok-tool .cb-grid { grid-template-columns: repeat(3, 1fr); gap: 0.1rem; }
  .dok-tool .cb-grid .cb-row { background: transparent; border: none; padding: 0.05rem 0; min-height: auto; }

  /* Befund-Zeilen */
  .dok-tool .bf-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    break-inside: avoid;
    padding: 0.2rem 0;
    gap: 0.3rem;
  }

  .dok-tool .bf-label { font-size: 9pt; }
  .dok-tool .bf-item .radio-group { flex-wrap: nowrap; }

  /* Raster */
  .dok-tool .grid-2 { grid-template-columns: 1fr 1fr; gap: 0.4rem; }
  .dok-tool .grid-4 { grid-template-columns: 2fr 1fr 0.7fr 0.7fr; gap: 0.4rem; align-items: end; }

  /* Per Inline-Style ausgeblendete Felder bleiben ausgeblendet */
  [style*="display:none"], [style*="display: none"] { display: none !important; }

  /* Doc-Block: abgehakte Sektionen mit ✓ kennzeichnen */
  .dok-tool .doc-block.is-checked .section-title::before {
    content: '✓ ';
  }

  .dok-tool .block-check { display: none !important; }
}

/* ── 15. Tool: Dokumentation – Toolbar ohne Tabs ─────────── */

.dok-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0.2rem 0;
}

.dok-back {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
}

.dok-back:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.dok-tool-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
}

/* ── 16. Doc-Block (Formular-Abschnitt mit Status-Checkbox) ─ */

.dok-tool .doc-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--dok-border-light);
}

.dok-tool .doc-block-header .section-title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.dok-tool .block-check {
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.dok-tool .doc-block.is-checked {
  background: #f2f8f5;
  border-color: #bdd8cc;
}

@media (max-width: 640px) {
  .dok-tool .doc-block-header { flex-wrap: wrap; gap: 0.4rem; }
}
