/* FL-COCKPIT – Anwendungsstile auf Basis von Bootstrap 5.3
   Gestaltung im Stil eines Fahrschul-Portals: weiße Kopfzeile, schmale Symbolleiste,
   helle Arbeitsfläche, Karten mit weichem Schatten, Listen mit Farbbalken und Status-Badges.
   Die Hausfarbe kommt aus den Layout-Einstellungen (--fd-primary). */

:root {
  --fc-header-h: 92px;
  --fc-rail-w: 112px;
  --fc-bg: #f2f3f5;
  --fc-surface: #ffffff;
  --fc-line: #e3e6ea;
  --fc-text: #2f343b;
  --fc-muted: #6b7380;
  --fc-zebra: #f3f4f6;
  --fc-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 14px rgba(16, 24, 40, .06);
  --fc-radius: calc(var(--fd-radius, 8px) + 2px);

  --bs-primary: var(--fd-primary);
  --bs-primary-rgb: var(--fd-primary-rgb);
  --bs-link-color: var(--fd-primary);
  --bs-link-color-rgb: var(--fd-primary-rgb);
  --bs-link-hover-color: color-mix(in srgb, var(--fd-primary) 80%, #000);
  --bs-border-radius: var(--fd-radius);
  --bs-border-radius-lg: calc(var(--fd-radius) * 1.25);
  --bs-border-radius-sm: calc(var(--fd-radius) * .75);
  --bs-focus-ring-color: rgba(var(--fd-primary-rgb), .25);
  --bs-body-font-family: Roboto, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --bs-body-color: var(--fc-text);
}
[data-bs-theme="dark"] {
  --fc-bg: #14171c;
  --fc-surface: #1d2127;
  --fc-line: #2e343c;
  --fc-text: #e3e6ea;
  --fc-muted: #9aa3ae;
  --fc-zebra: #232830;
  --fc-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
  --bs-body-bg: #1d2127;
  --bs-link-color: color-mix(in srgb, var(--fd-primary) 60%, #fff);
  --bs-link-hover-color: color-mix(in srgb, var(--fd-primary) 40%, #fff);
}
html { font-size: calc(16px * var(--fd-font-scale, 1)); }
body.fd-app { background: var(--fc-bg); color: var(--fc-text); }

/* ---------- Schaltflächen & Formulare ---------- */
.btn { --bs-btn-border-radius: 4px; font-weight: 500; }
.btn-primary {
  --bs-btn-bg: var(--fd-primary); --bs-btn-border-color: var(--fd-primary);
  --bs-btn-hover-bg: color-mix(in srgb, var(--fd-primary) 85%, #000); --bs-btn-hover-border-color: color-mix(in srgb, var(--fd-primary) 85%, #000);
  --bs-btn-active-bg: color-mix(in srgb, var(--fd-primary) 75%, #000); --bs-btn-active-border-color: color-mix(in srgb, var(--fd-primary) 75%, #000);
  --bs-btn-disabled-bg: var(--fd-primary); --bs-btn-disabled-border-color: var(--fd-primary); --bs-btn-focus-shadow-rgb: var(--fd-primary-rgb);
  padding-inline: 1.4rem;
}
.btn-outline-primary {
  --bs-btn-color: var(--fd-primary); --bs-btn-border-color: var(--fd-primary);
  --bs-btn-hover-bg: var(--fd-primary); --bs-btn-hover-border-color: var(--fd-primary);
  --bs-btn-active-bg: var(--fd-primary); --bs-btn-active-border-color: var(--fd-primary); --bs-btn-focus-shadow-rgb: var(--fd-primary-rgb);
}
[data-bs-theme="dark"] .btn-outline-primary { --bs-btn-color: color-mix(in srgb, var(--fd-primary) 60%, #fff); }
.form-control, .form-select { border-radius: 4px; border-color: #cfd4da; }
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select { border-color: #3a414b; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: rgba(var(--fd-primary-rgb), .6); box-shadow: 0 0 0 .2rem rgba(var(--fd-primary-rgb), .18); }
.form-check-input:checked { background-color: var(--fd-primary); border-color: var(--fd-primary); }
.form-label { font-weight: 500; color: var(--fc-text); }
.text-primary { color: var(--fd-primary) !important; }
.bg-primary { background-color: var(--fd-primary) !important; }
.progress-bar { background-color: var(--fd-primary); }
.progress-bar.bg-success { background-color: var(--bs-success) !important; }

/* ---------- Kopfzeile ---------- */
.fc-header {
  position: sticky; top: 0; z-index: 1030; height: var(--fc-header-h); display: flex; align-items: center; gap: 1.25rem;
  padding: 0 1.75rem; background: var(--fc-surface); box-shadow: 0 2px 10px rgba(16, 24, 40, .07);
}
.fc-brand { color: inherit; text-decoration: none; flex-shrink: 0; }
.fc-appname { flex: 1; text-align: center; line-height: 1.35; font-size: 1.05rem; letter-spacing: .02em; color: var(--fc-text); }
.fc-version { font-size: 1.05rem; }
.fc-school { align-items: center; gap: .7rem; max-width: 300px; margin-left: auto; color: var(--fc-text); }
.fc-appname + .fc-school { margin-left: 0; }
.fc-school > .bi { font-size: 1.7rem; color: var(--fc-muted); }
.fc-school-logo { max-height: 40px; max-width: 70px; object-fit: contain; }
.fc-school-name { font-size: 1.02rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fc-icon-btn { position: relative; border: 0; font-size: 1.5rem; color: var(--fc-muted); padding: .35rem .55rem; }
.fc-icon-btn:hover { color: var(--fd-primary); }
.fc-alerts .fc-icon-btn.has-alerts { color: #d6334a; }
.fc-alert-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; border-radius: 9px; background: #d6334a; color: #fff; font-size: .68rem; font-weight: 700; line-height: 18px; padding: 0 4px; }
.fc-alert-menu { width: 340px; max-width: calc(100vw - 24px); max-height: 70vh; overflow: auto; }
.fc-alert-item { display: flex; gap: .7rem; align-items: flex-start; white-space: normal; padding-block: .55rem; border-top: 1px solid var(--fc-line); }
.fc-alert-item > .bi { font-size: 1.1rem; margin-top: 1px; }
.fc-alert-item small { display: block; color: var(--fc-muted); }
.fc-user-btn { display: flex; align-items: center; gap: .55rem; border: 0; padding: .3rem .4rem; color: var(--fc-text); }
.fc-user-icon { font-size: 1.6rem; color: var(--fc-muted); }
.fc-user-name { font-size: 1.02rem; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-user-chev { font-size: 1rem; color: var(--fc-muted); margin-left: .35rem; }

/* Logo */
.fc-logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--fd-primary); }
.fc-logo-mark { width: 46px; height: 46px; flex-shrink: 0; }
.fc-logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.fc-logo-name { font-weight: 800; font-size: 1.45rem; letter-spacing: .02em; color: var(--fc-text); }
.fc-logo-name::first-letter { color: var(--fd-primary); }
.fc-logo-tag { font-size: .85rem; color: var(--fc-muted); margin-top: 3px; }
.fc-logo-sm .fc-logo-mark { width: 34px; height: 34px; }
.fc-logo-sm .fc-logo-name { font-size: 1.15rem; }
.fc-logo-sm .fc-logo-tag { font-size: .75rem; }
.fc-logo-lg .fc-logo-mark { width: 64px; height: 64px; }
.fc-logo-lg .fc-logo-name { font-size: 2rem; }

/* ---------- Symbolleiste links ---------- */
.fc-shell { display: flex; min-height: calc(100vh - var(--fc-header-h)); }
.fc-rail { --bs-offcanvas-width: 270px; background: var(--fc-surface); }
.fc-rail-inner { display: flex; flex-direction: column; align-items: stretch; gap: .35rem; padding: 2.4rem .9rem 1.5rem; }
.fc-nav-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; min-height: 72px; border-radius: 12px;
  color: var(--fd-primary); text-decoration: none; transition: background-color .15s;
}
.fc-nav-link .bi { font-size: 2rem; line-height: 1; }
.fc-nav-label { display: none; font-size: .72rem; line-height: 1.15; text-align: center; color: var(--fc-text); }
.fc-labels .fc-nav-label { display: block; }
.fc-labels .fc-nav-link .bi { font-size: 1.6rem; }
.fc-nav-link:hover { background: rgba(var(--fd-primary-rgb), .08); color: var(--fd-primary); }
.fc-nav-link.active { background: rgba(var(--fd-primary-rgb), .13); }
.fc-nav-link.active .fc-nav-label { color: var(--fd-primary); font-weight: 600; }
.fc-nav-sep { height: 1px; background: var(--fc-line); margin: .8rem .6rem; }
@media (min-width: 992px) {
  .fc-rail { position: sticky; top: var(--fc-header-h); height: calc(100vh - var(--fc-header-h)); width: var(--fc-rail-w); flex-shrink: 0;
    border-right: 1px solid var(--fc-line); overflow-y: auto; background: var(--fc-surface) !important; }
}
@media (max-width: 991.98px) {
  :root { --fc-header-h: 62px; }
  .fc-header { padding: 0 .6rem; gap: .5rem; }
  .fc-header .fc-logo-mark { width: 34px; height: 34px; }
  .fc-header .fc-logo-name { font-size: 1.15rem; }
  .fc-header .fc-logo-tag { display: none; }
  .fc-school { margin-left: auto; max-width: 200px; }
  .fc-school-name { font-size: .9rem; }
  .fc-alerts { margin-left: auto; }
  .fc-school + .fc-alerts { margin-left: 0; }
  .fc-rail-inner { padding: .5rem .75rem calc(1.5rem + env(safe-area-inset-bottom)); gap: 2px;
    flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .fc-rail.offcanvas-lg { height: 100vh; height: 100dvh; }
  .fc-nav-link { flex-shrink: 0; }
  .fc-nav-link { flex-direction: row; justify-content: flex-start; min-height: 48px; padding: 0 .9rem; gap: .9rem; border-radius: 8px; }
  .fc-nav-link .bi { font-size: 1.35rem; width: 1.6rem; }
  .fc-nav-label { display: block; font-size: 1rem; text-align: left; }
}

/* ---------- Arbeitsfläche ---------- */
.fc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fd-content { padding: 2.4rem 2.6rem 1.5rem; flex: 1; width: 100%; max-width: 1680px; }
.fd-footer { padding: .5rem 2.6rem 1.5rem; font-size: .85rem; color: var(--fc-muted); }
.fd-footer a { color: inherit; }
@media (max-width: 767.98px) { .fd-content { padding: 1.1rem .9rem; } .fd-footer { padding: .5rem .9rem 1.2rem; } }
.fd-compact .fd-content { padding: 1.2rem 1.4rem; }
.fd-compact .table > :not(caption) > * > * { padding: .4rem .55rem; }
.fd-compact .card-body { padding: .85rem; }

/* Titelleiste (wie „Prüfungen“) */
.fd-page-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1rem; margin-bottom: 1.4rem; padding: 1.15rem 1.6rem; min-height: 84px;
  background: var(--fc-surface); border-radius: var(--fc-radius); box-shadow: var(--fc-shadow);
}
.fd-page-head h1 { font-size: 1.55rem; font-weight: 600; margin: 0; color: var(--fc-text); letter-spacing: 0; }
.fd-page-head .small a, .fd-page-head > div > .small { font-size: .85rem; }
.fd-page-head .fd-actions { margin-left: auto; display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
/* Werkzeug-Kacheln neben dem Titel (Liste, Kalender, Suche …) */
.fd-actions .btn-outline-secondary, .fd-actions .btn-outline-primary {
  --bs-btn-bg: var(--fc-surface); --bs-btn-border-color: var(--fc-line); --bs-btn-color: var(--fd-primary);
  --bs-btn-hover-bg: rgba(var(--fd-primary-rgb), .08); --bs-btn-hover-border-color: rgba(var(--fd-primary-rgb), .35); --bs-btn-hover-color: var(--fd-primary);
  --bs-btn-active-bg: rgba(var(--fd-primary-rgb), .14); --bs-btn-active-color: var(--fd-primary); --bs-btn-active-border-color: rgba(var(--fd-primary-rgb), .35);
  min-height: 46px; padding-inline: 1rem; box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}
.fd-actions .btn-primary { min-height: 46px; }
.fd-actions .btn .bi { font-size: 1.15rem; vertical-align: -2px; }

/* Karten */
.card { border: 0; border-radius: var(--fc-radius); box-shadow: var(--fc-shadow); background: var(--fc-surface); --bs-card-bg: var(--fc-surface); }
.card-header { background: transparent; font-weight: 600; font-size: 1.05rem; padding: .95rem 1.25rem; border-bottom: 1px solid var(--fc-line); }
.card-footer { background: transparent; border-top: 1px solid var(--fc-line); }
.card-body { padding: 1.1rem 1.25rem; }
.list-group { --bs-list-group-bg: transparent; }
.dropdown-menu { border: 0; border-radius: 8px; }

/* Reiter als Kartenleiste (wie „Praxis | Theorie | …“) */
.nav-tabs {
  display: inline-flex; max-width: 100%; gap: .4rem; border: 0; padding: .55rem 1rem; margin-bottom: 1.4rem !important;
  background: var(--fc-surface); border-radius: var(--fc-radius); box-shadow: var(--fc-shadow);
}
.nav-tabs .nav-link {
  border: 0; border-radius: 6px; color: var(--fc-text); font-size: 1.05rem; padding: .7rem 1rem; display: flex; align-items: center; gap: .45rem; white-space: nowrap;
}
.nav-tabs .nav-link .bi { font-size: 1.3rem; color: var(--fc-muted); }
.nav-tabs .nav-link:hover { background: rgba(var(--fd-primary-rgb), .06); color: var(--fd-primary); }
.nav-tabs .nav-link.active { background: transparent; color: var(--fd-primary); font-weight: 600; }
.nav-tabs .nav-link.active .bi { color: var(--fd-primary); }
.nav-pills .nav-link { border-radius: 6px; }
.nav-pills .nav-link.active, .page-item.active .page-link { background-color: var(--fd-primary); border-color: var(--fd-primary); }

/* Listen: fette Kopfzeile, Zebrastreifen, Farbbalken links */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .9rem .9rem; border-bottom-color: var(--fc-line); }
.table > thead > tr > th { font-weight: 600; color: var(--fc-text); border-bottom: 2px solid var(--fc-line); white-space: nowrap; background: transparent; }
.table-hover > tbody > tr:nth-child(even) > *, .fc-zebra > tbody > tr:nth-child(even) > * { background-color: var(--fc-zebra); }
.table-hover > tbody > tr > *, .fc-zebra > tbody > tr > * { border-bottom: 0; }
.table-hover > tbody > tr > td:first-child, .fc-bar > tbody > tr > td:first-child { position: relative; padding-left: 1.6rem; }
.table-hover > tbody > tr > td:first-child::before, .fc-bar > tbody > tr > td:first-child::before {
  content: ""; position: absolute; left: .55rem; top: .5rem; bottom: .5rem; width: 5px; border-radius: 1px; background: var(--fd-primary); z-index: 1;
}
.table-sm > :not(caption) > * > * { padding: .45rem .55rem; }
.table-hover tbody tr[data-href] { cursor: pointer; }

/* Status-Badges: helle Flächen mit dunkler Schrift */
.badge { font-weight: 500; border-radius: 4px; padding: .42em .75em; letter-spacing: 0; }
.badge.text-bg-primary { background: #c9dff3 !important; color: #1d3f66 !important; }
.badge.text-bg-success { background: #cfe9d6 !important; color: #1b5430 !important; }
.badge.text-bg-warning { background: #fae6b3 !important; color: #6b4900 !important; }
.badge.text-bg-danger { background: #f6cfd3 !important; color: #7d1a26 !important; }
.badge.text-bg-info { background: #cdecf3 !important; color: #0f4b5b !important; }
.badge.text-bg-secondary { background: #e2e5e9 !important; color: #39414c !important; }
.badge.text-bg-dark { background: #cfd5de !important; color: #1f2a37 !important; }
.badge.text-bg-light { background: #f0f2f4 !important; color: #39414c !important; border: 0 !important; }
[data-bs-theme="dark"] .badge.text-bg-primary { background: rgba(var(--fd-primary-rgb), .3) !important; color: #d6e6f7 !important; }
[data-bs-theme="dark"] .badge.text-bg-success { background: rgba(25, 135, 84, .3) !important; color: #c9ecd6 !important; }
[data-bs-theme="dark"] .badge.text-bg-warning { background: rgba(255, 193, 7, .25) !important; color: #fbe6ad !important; }
[data-bs-theme="dark"] .badge.text-bg-danger { background: rgba(220, 53, 69, .3) !important; color: #f7cdd2 !important; }
[data-bs-theme="dark"] .badge.text-bg-info { background: rgba(13, 202, 240, .22) !important; color: #c8eef6 !important; }
[data-bs-theme="dark"] .badge.text-bg-secondary, [data-bs-theme="dark"] .badge.text-bg-light { background: #2f353e !important; color: #d4d9df !important; }
.fs-6.badge, .badge.fs-6 { font-size: .9rem !important; }

/* Seitenwechsel wie im Portal */
.fc-pager { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; padding: 1.1rem 1.25rem; }
.fc-pager-info { color: var(--fc-text); }
.fc-pager .pagination { margin: 0 0 0 auto; }
.fc-pager .page-link { min-width: 44px; height: 44px; display: grid; place-items: center; color: var(--fc-text); border-color: var(--fc-line); }
.fc-pager .page-item.active .page-link { background: var(--fc-surface); color: var(--fd-primary); border-color: var(--fd-primary); }
.fc-pager .form-select { width: auto; height: 44px; }

/* ---------- Bausteine ---------- */
.fd-stat { display: flex; align-items: center; gap: 1rem; }
.fd-stat-icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem; background: rgba(var(--fd-primary-rgb), .1); color: var(--fd-primary); flex-shrink: 0; }
.fd-stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.fd-stat-label { font-size: .88rem; color: var(--fc-muted); }
.fd-empty { text-align: center; padding: 2.5rem 1rem; color: var(--fc-muted); }
.fd-empty i { font-size: 2.5rem; display: block; margin-bottom: .5rem; opacity: .5; }
.fd-flash { border: 0; box-shadow: var(--fc-shadow); }
.fd-dl dt { font-weight: 500; color: var(--fc-muted); font-size: .85rem; }
.fd-dl dd { margin-bottom: .6rem; }
.fd-req::after { content: " *"; color: var(--bs-danger); }
.fd-avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-block; }
.fd-avatar-initials { display: inline-grid; place-items: center; background: rgba(var(--fd-primary-rgb), .14); color: var(--fd-primary); font-weight: 700; }
.fd-brand-mark { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--fd-primary); color: #fff; font-size: 1.2rem; }

/* Fortschritt Pflichtfahrten */
.fd-progress-row { display: grid; grid-template-columns: minmax(130px, 1fr) 2fr auto; gap: .75rem; align-items: center; margin-bottom: .55rem; }
.fd-progress-row .progress { height: .6rem; }
@media (max-width: 575.98px) { .fd-progress-row { grid-template-columns: 1fr auto; } .fd-progress-row .progress { grid-column: 1 / -1; order: 3; } }

/* Themenbewertung in der Fahrstunde */
.fd-topic { display: flex; align-items: center; gap: .5rem; padding: .45rem .25rem; border-bottom: 1px dashed var(--fc-line); }
.fd-topic:last-child { border-bottom: 0; }
.fd-topic-title { flex: 1; min-width: 0; }
.fd-rate .btn { --bs-btn-padding-y: .25rem; --bs-btn-padding-x: .6rem; --bs-btn-font-size: .8rem; }
.fd-rate .btn-check:checked + .btn.fd-r1 { background: var(--bs-warning); border-color: var(--bs-warning); color: #000; }
.fd-rate .btn-check:checked + .btn.fd-r2 { background: var(--bs-info); border-color: var(--bs-info); color: #000; }
.fd-rate .btn-check:checked + .btn.fd-r3 { background: var(--bs-success); border-color: var(--bs-success); color: #fff; }
@media (max-width: 575.98px) { .fd-topic { flex-wrap: wrap; } .fd-rate { width: 100%; } .fd-rate .btn { flex: 1; } }
.accordion { --bs-accordion-border-color: var(--fc-line); --bs-accordion-active-bg: rgba(var(--fd-primary-rgb), .07); --bs-accordion-active-color: var(--fd-primary); }

.fd-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--bs-secondary-bg); border: 1px solid var(--bs-border-color); vertical-align: middle; }
.fd-dot.s1 { background: var(--bs-warning); border-color: var(--bs-warning); }
.fd-dot.s2 { background: var(--bs-info); border-color: var(--bs-info); }
.fd-dot.s3 { background: var(--bs-success); border-color: var(--bs-success); }

/* Unterschriftenfeld */
.fd-signature { position: relative; border: 2px dashed var(--bs-border-color); border-radius: 6px; background: #fff; touch-action: none; }
.fd-signature canvas { width: 100%; height: 160px; display: block; cursor: crosshair; }
.fd-signature .fd-sig-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #adb5bd; pointer-events: none; font-size: .9rem; }
.fd-signature.has-ink .fd-sig-hint { display: none; }
.fd-sig-img { max-height: 90px; max-width: 100%; background: #fff; border-radius: 4px; }
.sticky-bottom.bg-body-tertiary { background: var(--fc-bg) !important; }

/* Anmeldung / leere Seiten */
.fd-blank { min-height: 100vh; background: var(--fc-bg); }
.fd-blank-main { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; }
.fd-login-card { width: 100%; max-width: 440px; }
.fd-error { max-width: 480px; }
.fd-blank-main > .alert { width: 100%; max-width: 440px; }
.fd-error-icon { width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1.9rem; margin-bottom: .6rem;
  background: rgba(var(--fd-primary-rgb, 47,109,181), .1); color: var(--fd-primary, #2f6db5); }
.fd-error-icon.fd-error-warn { background: #fff4de; color: #b26b00; }
.fd-error-icon.fd-error-danger { background: #fde8e8; color: #c0392b; }
.fd-error-code { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--bs-secondary-color); font-weight: 600; }

/* ---------- Tabellarische Ausbildungskarte & Druck ---------- */
.fd-card-grid { border-collapse: collapse; width: 100%; font-size: .78rem; }
.fd-card-grid th, .fd-card-grid td { border: 1px solid #9aa4b2; padding: 2px 4px; vertical-align: middle; }
.fd-card-grid thead th { background: #eef1f5; text-align: center; font-weight: 600; }
.fd-card-grid .fd-stage-row th { background: rgba(var(--fd-primary-rgb), .12); text-align: left; font-size: .8rem; }
.fd-card-grid td.fd-cell { width: 22px; min-width: 22px; text-align: center; padding: 0; height: 20px; }
.fd-card-grid td.fd-cell.r1 { background: #ffe08a; }
.fd-card-grid td.fd-cell.r2 { background: #9eeaf9; }
.fd-card-grid td.fd-cell.r3 { background: #75d39a; }
.fd-card-grid td.fd-status { width: 92px; text-align: center; }
.fd-card-grid .fd-status-btn { border: 0; background: transparent; width: 100%; padding: 2px; font-size: .75rem; cursor: pointer; border-radius: 4px; color: inherit; }
.fd-card-grid .fd-status-btn:hover { background: rgba(var(--fd-primary-rgb), .1); }
.fd-card-wrap { overflow-x: auto; }
.fd-print { background: #fff; color: #000; padding: 1rem; }
.fd-print-toolbar { position: sticky; top: 0; background: #fff; padding: .5rem 0 1rem; display: flex; gap: .5rem; z-index: 10; }
.fd-print-sheet { max-width: 1120px; margin: 0 auto; }
.fd-print-head { display: flex; gap: 1rem; align-items: flex-start; border-bottom: 2px solid #333; padding-bottom: .5rem; margin-bottom: .75rem; }
.fd-print-head img { max-height: 56px; max-width: 160px; }
.fd-sign-line { border-top: 1px solid #333; padding-top: 2px; font-size: .75rem; margin-top: 2.5rem; }

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .fd-print { padding: 0; }
  .fd-card-grid td.fd-cell.r1, .fd-card-grid td.fd-cell.r2, .fd-card-grid td.fd-cell.r3, .fd-card-grid thead th, .fd-card-grid .fd-stage-row th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .fd-card-grid { font-size: 9pt; }
  .fd-no-break { break-inside: avoid; }
  a[href]::after { content: none !important; }
}

/* Feinschliff: größere Status-Badges in Listen, kompakte Kacheln auf dem Smartphone */
.table .badge { font-size: .85rem; }
.table .badge.text-bg-light { font-size: .8rem; }
@media (max-width: 575.98px) {
  .fd-page-head { padding: 1rem; min-height: 0; }
  .fd-page-head h1 { font-size: 1.3rem; }
  .fd-page-head .fd-actions { margin-left: 0; width: 100%; }
  .fd-stat { gap: .7rem; }
  .fd-stat-icon { width: 40px; height: 40px; font-size: 1.15rem; border-radius: 10px; }
  .fd-stat-value { font-size: 1.3rem; }
  .fd-stat-label { font-size: .8rem; }
  .nav-tabs { padding: .35rem .5rem; }
  .nav-tabs .nav-link { padding: .55rem .7rem; font-size: .95rem; }
}
@media (min-width: 992px) { .fc-shell { background: linear-gradient(to right, var(--fc-surface) var(--fc-rail-w), transparent 0); } }

/* Synchronisierungs-Status */
.fc-sync .fc-icon-btn.is-pending { color: #e08a00; }
.fc-sync .fc-icon-btn.is-offline { color: #d6334a; }
.fc-sync-count { background: #e08a00; }
.fc-sync .fc-icon-btn.is-offline .fc-sync-count { background: #d6334a; }
@media (max-width: 991.98px) { .fc-sync { margin-left: auto; } .fc-school + .fc-sync { margin-left: 0; } .fc-sync + .fc-alerts { margin-left: 0; } }

/* Update-Hinweis in der Übersicht */
.fc-update-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; padding: 1.1rem 1.4rem; background: var(--fc-surface);
  border-radius: var(--fc-radius); box-shadow: var(--fc-shadow); border-left: 5px solid var(--fd-primary); }
.fc-update-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; color: #fff; background: var(--fd-primary); flex-shrink: 0; }

/* 1.5: geteilte Fahrstunde */
.fd-split { background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); border-radius: .5rem; padding: .75rem; }
.fd-part-no { flex: 0 0 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--fd-primary, #2f6db5); color: #fff; font-size: .8rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.fd-part .form-select { min-width: 0; }
.fd-part-min { flex: 0 0 7.5rem; }
.fd-signature-lg canvas { height: 220px; }
@media (max-width: 575.98px) { .fd-signature-lg canvas { height: 180px; } }

/* 1.5: Anforderungen je Klasse, Theorie, Fristen */
.fd-reqlist { list-style: none; padding: 0; margin: 0; }
.fd-reqlist li { display: flex; gap: .5rem; align-items: flex-start; padding: .35rem 0; border-bottom: 1px dashed var(--bs-border-color); }
.fd-reqlist li:last-child { border-bottom: 0; }
.fd-reqlist .bi { flex: 0 0 auto; margin-top: .1rem; }
.fd-reqlist .fd-req-val { margin-left: auto; white-space: nowrap; font-weight: 600; }
.fd-theory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.3rem, 1fr)); gap: .25rem; }
.fd-theory-cell { border: 1px solid var(--bs-border-color); border-radius: .35rem; text-align: center; font-size: .75rem; padding: .25rem 0; background: var(--bs-body-bg); }
.fd-theory-cell.done { background: var(--bs-success-bg-subtle); border-color: var(--bs-success-border-subtle); color: var(--bs-success-text-emphasis); font-weight: 600; }
.fd-faq .accordion-button { font-weight: 500; }
.fd-faq mark { padding: 0 .1em; }
.fd-cfg-card.ok { border-left: 4px solid var(--bs-success); }
.fd-cfg-card.later { border-left: 4px solid var(--bs-warning); }
.fd-cfg-card.no { border-left: 4px solid var(--bs-secondary-border-subtle); opacity: .85; }
.fd-doc-paper { background: #fff; color: #111; max-width: 820px; margin: 0 auto; padding: 2.5rem 3rem; box-shadow: 0 2px 12px rgba(0,0,0,.08); border-radius: .25rem; font-size: 11pt; line-height: 1.5; }
.fd-doc-paper table { width: 100%; border-collapse: collapse; margin: .5rem 0; font-size: 10pt; }
.fd-doc-paper th, .fd-doc-paper td { border: 1px solid #bbb; padding: .2rem .4rem; text-align: left; }
.fd-doc-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; font-size: 9pt; color: #444; }
.fd-doc-head img { max-height: 60px; max-width: 200px; }
@media print { .fd-doc-paper { box-shadow: none; padding: 0; max-width: none; } }
.fd-doc-paper .fd-addr { margin-bottom: 2rem; min-height: 4.5rem; }
.fd-doc-paper .fd-date { text-align: right; margin-bottom: 1.5rem; }
.fd-doc-paper h2 { font-size: 13pt; font-weight: 700; margin: 0 0 1rem; }
[hidden] { display: none !important; }
/* Symbolleiste kompakter, wenn viele Module aktiv sind und der Bildschirm niedrig ist */
@media (min-width: 992px) and (max-height: 1050px) {
  .fc-rail-inner { padding-top: 1rem; gap: .15rem; }
  .fc-nav-link { min-height: 58px; }
  .fc-nav-link .bi { font-size: 1.65rem; }
  .fc-nav-sep { margin: .4rem .6rem; }
}
@media (max-width: 575.98px) {
  .fd-part-min { flex-basis: 4.6rem; }
  .fd-part-min .input-group-text { display: none; }
  .fd-part { gap: .35rem !important; }
}
.fd-signlist td { height: 3.4rem; }
.fd-cert-sig { max-height: 60px; max-width: 100%; display: block; margin-bottom: 2px; }

/* ---------- Briefbogen (Letterhead) ---------- */
.lh-doc { position: relative; width: 210mm; min-height: 297mm; margin: 0 auto 1.5rem; background: #fff; color: #111; box-shadow: 0 2px 14px rgba(0,0,0,.12);
  font-size: 10.5pt; line-height: 1.45; overflow: hidden; }
.lh-doc .lh-bg { position: absolute; left: 0; top: 0; width: 210mm; height: 297mm; object-fit: fill; z-index: 0; pointer-events: none; }
.lh-doc .lh-head { position: absolute; left: var(--lh-l); right: var(--lh-r); z-index: 1; font-size: 8.5pt; line-height: 1.35; color: #333; }
.lh-doc .lh-split { display: flex; justify-content: space-between; align-items: flex-start; gap: 8mm; }
.lh-doc .lh-split .lh-right { text-align: right; }
.lh-doc .lh-stack { display: flex; flex-direction: column; gap: 2mm; }
.lh-doc .lh-stack.lh-center { align-items: center; text-align: center; }
.lh-doc .lh-stack.lh-right { align-items: flex-end; text-align: right; }
.lh-doc .lh-head-text b { color: var(--lh-c); font-size: 10pt; }
.lh-doc .lh-logo { max-width: 85mm; object-fit: contain; }
.lh-doc .lh-foot { position: absolute; left: var(--lh-l); right: var(--lh-r); bottom: 9mm; z-index: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6mm;
  font-size: 7pt; line-height: 1.35; color: #555; }
.lh-doc .lh-foot b { color: var(--lh-c); }
.lh-doc .lh-foot.lh-lined { border-top: .3mm solid var(--lh-c); padding-top: 2mm; }
.lh-doc .lh-flow { width: 100%; border-collapse: collapse; position: relative; z-index: 2; }
.lh-doc .lh-flow > thead td, .lh-doc .lh-flow > tfoot td { padding: 0; border: 0; }
.lh-doc .lh-body { padding: 0 var(--lh-r) 0 var(--lh-l); vertical-align: top; }
.lh-doc .lh-sender { font-size: 7pt; color: #555; text-decoration: underline; margin-bottom: 1.5mm; }
.lh-doc h1, .lh-doc h2 { color: var(--lh-c); }
.lh-doc h1 { font-size: 15pt; } .lh-doc h2 { font-size: 13pt; } .lh-doc h3 { font-size: 11pt; }
.lh-doc table.lh-grid { width: 100%; border-collapse: collapse; font-size: 9pt; margin: 2mm 0 4mm; }
.lh-doc table.lh-grid th, .lh-doc table.lh-grid td { border: .25mm solid #999; padding: 1mm 1.5mm; text-align: left; vertical-align: top; }
.lh-doc table.lh-grid thead th { background: #f0f0f0; }
.lh-doc table.lh-grid tr { break-inside: avoid; }
.lh-doc .lh-sigs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6mm; margin-top: 10mm; font-size: 8pt; break-inside: avoid; }
.lh-doc .lh-sigs.lh-sigs2 { grid-template-columns: 1fr 1fr; gap: 14mm; margin-top: 16mm; }
.lh-doc .lh-sigs.lh-sigs2 .lh-sig { min-height: 26mm; }
.lh-doc .lh-sigs .lh-sig { min-height: 18mm; display: flex; align-items: flex-end; }
.lh-doc .lh-sigs img { max-height: 16mm; max-width: 100%; }
.lh-doc .lh-sigs .lh-line { border-top: .25mm solid #333; padding-top: 1mm; }
.lh-preview { transform-origin: top left; }
@media print {
  .lh-doc { box-shadow: none; margin: 0; width: auto; min-height: 0; overflow: visible; }
  .lh-doc .lh-bg, .lh-doc .lh-head, .lh-doc .lh-foot { position: fixed; }
  .lh-doc .lh-bg { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.fd-print { padding: 0 !important; }
}
@media screen and (max-width: 900px) { .lh-doc:not(.lh-preview) { zoom: .45; } }

/* Dashboard: anstehende Prüfungen */
.fd-exams-hot { border-color: rgba(var(--bs-danger-rgb), .45); }
.fd-exams-hot > .card-header { background: rgba(var(--bs-danger-rgb), .09); color: var(--bs-danger-text-emphasis); border-bottom-color: rgba(var(--bs-danger-rgb), .25); font-weight: 600; }
.fd-exam-soon { border-left: 3px solid var(--bs-danger); }

/* Ausbildungszeit (§ 12 FahrlG) */
.fd-wl-bar { height: .6rem; }
.fd-wl-bar .fd-wl-planned { opacity: .35; }
.fd-wl-week { display: grid; grid-template-columns: repeat(6, 1fr); gap: .4rem; }
.fd-wl-day { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: inherit; border-radius: 6px; padding: .2rem 0; }
.fd-wl-day.is-today { background: rgba(var(--fd-primary-rgb), .08); }
.fd-wl-col { position: relative; width: 60%; max-width: 30px; height: 64px; background: var(--bs-tertiary-bg); border-radius: 4px; display: flex; align-items: flex-end; overflow: hidden; }
.fd-wl-fill { width: 100%; background: rgba(var(--fd-primary-rgb), .35); display: flex; align-items: flex-end; }
.fd-wl-done { width: 100%; background: var(--fd-primary); }
.lvl-warning .fd-wl-fill { background: rgba(var(--bs-warning-rgb), .45); } .lvl-warning .fd-wl-done { background: var(--bs-warning); }
.lvl-danger .fd-wl-fill { background: rgba(var(--bs-danger-rgb), .4); } .lvl-danger .fd-wl-done { background: var(--bs-danger); }
.fd-wl-limit { position: absolute; left: 0; right: 0; top: 0; border-top: 2px dashed rgba(var(--bs-danger-rgb), .6); }
.fd-wl-val { font-size: .8rem; font-weight: 600; margin-top: .15rem; }
.fd-wl-lbl { font-size: .72rem; color: var(--bs-secondary-color); }
.fd-wl-key { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; background: var(--fd-primary); vertical-align: -.05rem; }
.fd-wl-key-p { background: rgba(var(--fd-primary-rgb), .35); }
.fd-break-row td { background: var(--bs-tertiary-bg) !important; color: var(--bs-secondary-color); font-style: italic; }

/* Hinweise unten rechts (Unterschrift anfordern, Terminänderungen) */
.fd-toastbox { position: fixed; right: 1rem; bottom: 1rem; z-index: 1080; display: flex; flex-direction: column; gap: .5rem; max-width: min(420px, calc(100vw - 2rem)); }
.fd-toast { border-left: 4px solid var(--fd-primary); animation: fdToastIn .25s ease-out; }
@keyframes fdToastIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.fd-send-pref { box-shadow: 0 0 0 2px rgba(var(--fd-primary-rgb), .35); }
@media (max-width: 575.98px) { .fd-toastbox { left: .75rem; right: .75rem; bottom: .75rem; max-width: none; } }

/* Terminkalender */
.fd-cal-scroll { overflow-x: auto; }
.fd-cal { display: grid; grid-template-columns: 3.4rem repeat(var(--cols), minmax(110px, 1fr)); min-width: 720px; }
.fd-cal-head { position: sticky; top: 0; z-index: 2; background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color); padding: .45rem .4rem; font-size: .85rem; text-align: center; white-space: nowrap; }
.fd-cal-head.is-today { color: var(--fd-primary); font-weight: 700; }
.fd-cal-wd { font-weight: 600; }
.fd-cal-gutter { border-right: 1px solid var(--bs-border-color); }
.fd-cal-hour { height: var(--h); position: relative; font-size: .7rem; color: var(--bs-secondary-color); }
.fd-cal-hour span { position: absolute; top: -.5rem; right: .35rem; background: var(--bs-body-bg); padding: 0 .1rem; }
.fd-cal-hour:first-child span { top: .1rem; }
.fd-cal-col { position: relative; border-right: 1px solid var(--bs-border-color-translucent); cursor: copy; }
.fd-cal-col.is-today { background: rgba(var(--fd-primary-rgb), .035); }
.fd-cal-slot { height: var(--h); border-bottom: 1px solid var(--bs-border-color-translucent); }
.fd-cal-slot::after { content: ''; display: block; height: 50%; border-bottom: 1px dashed rgba(0,0,0,.04); }
.fd-cal-now { position: absolute; left: 0; right: 0; border-top: 2px solid var(--bs-danger); z-index: 3; pointer-events: none; }
.fd-cal-now::before { content: ''; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--bs-danger); }
.fd-cal-ev { position: absolute; z-index: 1; overflow: hidden; border-radius: 6px; padding: .15rem .35rem; font-size: .76rem; line-height: 1.25; text-decoration: none; cursor: pointer;
  color: #fff; background: var(--c, var(--fd-primary)); border: 1px solid rgba(0,0,0,.08); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.fd-cal-ev:hover { filter: brightness(1.08); color: #fff; z-index: 4; }
.fd-cal-ev .fd-cal-t { font-weight: 700; }
.fd-cal-ev .fd-cal-n { display: inline; }
.fd-cal-ev .fd-cal-s { display: block; opacity: .85; font-size: .7rem; }
.fd-cal-ev.st-geplant:not(.k-privat) { background: color-mix(in srgb, var(--c) 82%, white); }
.fd-cal-ev.st-abgesagt, .fd-cal-ev.st-storniert { background: repeating-linear-gradient(45deg, #f3d6d6, #f3d6d6 6px, #fbecec 6px, #fbecec 12px); color: #842029; text-decoration: line-through; }
.fd-cal-ev.st-erledigt { opacity: .7; }
.fd-cal-ev.k-privat { background: repeating-linear-gradient(45deg, #e9ecef, #e9ecef 6px, #f8f9fa 6px, #f8f9fa 12px); color: #495057; }
.fd-cal-lesson { background: repeating-linear-gradient(45deg, rgba(var(--fd-primary-rgb), .12), rgba(var(--fd-primary-rgb), .12) 5px, rgba(var(--fd-primary-rgb), .05) 5px, rgba(var(--fd-primary-rgb), .05) 10px);
  color: var(--bs-body-color); border: 1px dashed rgba(var(--fd-primary-rgb), .5); box-shadow: none; }
.fd-cal-lesson:hover { color: var(--bs-body-color); }
.fd-cal-key { display: inline-block; width: 1rem; height: .7rem; border: 1px dashed rgba(var(--fd-primary-rgb), .6); background: rgba(var(--fd-primary-rgb), .1); vertical-align: -.05rem; }
.fd-cal-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--c); flex: none; }

/* Karte (assets/js/map.js) */
.fd-map { position: relative; overflow: hidden; background: #e8eef3; border-radius: var(--fd-radius, 8px); touch-action: none; user-select: none; cursor: grab; min-height: 260px; }
.fd-map:active { cursor: grabbing; }
.fd-map-tiles, .fd-map-marks { position: absolute; inset: 0; }
.fd-map-tile { position: absolute; left: 0; top: 0; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.fd-map-svg { position: absolute; left: 0; top: 0; pointer-events: none; }
.fd-map-line-bg { fill: none; stroke: #fff; stroke-width: 8; stroke-linejoin: round; stroke-linecap: round; opacity: .9; }
.fd-map-line { fill: none; stroke: var(--fd-primary, #2f6db5); stroke-width: 4.5; stroke-linejoin: round; stroke-linecap: round; }
.fd-map-start { fill: #198754; stroke: #fff; stroke-width: 2.5; }
.fd-map-end { fill: #dc3545; stroke: #fff; stroke-width: 2.5; }
.fd-map-cursor { fill: #ffc107; stroke: #222; stroke-width: 2.5; }
.fd-map-marker { position: absolute; transform: translate(-50%, -100%); min-width: 26px; height: 26px; padding: 0 .35rem; border: 2px solid #fff; border-radius: 13px 13px 13px 2px;
  background: #c2410c; color: #fff; font-size: .75rem; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer; }
.fd-map-ctl { position: absolute; right: .5rem; top: .5rem; display: flex; flex-direction: column; gap: 4px; z-index: 5; }
.fd-map-ctl button { width: 34px; height: 34px; border: 1px solid rgba(0,0,0,.2); border-radius: 6px; background: #fff; color: #222; font-size: 1.15rem; line-height: 1; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.fd-map-attr { position: absolute; right: 0; bottom: 0; z-index: 5; font-size: .65rem; background: rgba(255,255,255,.8); padding: 1px 5px; color: #333; }
.fd-map-attr a { color: inherit; }

/* Streckenaufzeichnung */
.fd-trk-stats { font-size: 1.05rem; }
.fd-trk-rec { color: var(--bs-danger); }
.fd-trk-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--bs-danger); animation: fdBlink 1.2s infinite; vertical-align: .05rem; }
@keyframes fdBlink { 50% { opacity: .25; } }
.fd-trk-marks { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; }
.fd-trk-marks .btn { padding: .8rem .5rem; font-weight: 600; }
.fd-trk-marks .btn.active { background: var(--fd-primary); color: #fff; }
.fd-trk-panel .fd-map { height: 380px; }
.fd-trk-range { width: 100%; }

/* Statistik */
.fd-st-chart { display: flex; align-items: flex-end; gap: .5rem; height: 200px; padding-top: 1.2rem; }
.fd-st-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; min-width: 22px; }
.fd-st-bar { width: 70%; max-width: 42px; display: flex; flex-direction: column; border-radius: 4px 4px 0 0; overflow: hidden; min-height: 2px; }
.fd-st-ok { background: #2e9d6b; }
.fd-st-fail { background: #d9534f; }
.fd-st-val { font-size: .75rem; font-weight: 600; }
.fd-st-lbl { font-size: .72rem; color: var(--bs-secondary-color); margin-top: .2rem; }
.fd-st-key { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; vertical-align: -.05rem; }

/* Filialen-Umschalter in der Kopfzeile */
.fc-branch { margin-right: .5rem; }
.fc-branch .form-select { min-width: 9rem; max-width: 14rem; }
.fc-branch .fc-branch-on { border-color: var(--fd-primary); background-color: rgba(var(--fd-primary-rgb), .08); font-weight: 600; }

/* Auswahl der Fahrerlaubnisklassen (Benutzer) */
.fd-classpick { display: flex; flex-wrap: wrap; gap: .35rem; }
.fd-classpick .btn { min-width: 3.2rem; }
.fd-attempt { margin-left: .25rem; padding-left: .6rem; border-left: 3px solid var(--bs-warning); }
/* Nachrichtentexte */
.fd-msg-tools { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.fd-emoji-row { display: inline-flex; flex-wrap: wrap; gap: .15rem; }
.fd-emoji-row .btn { padding: .1rem .35rem; font-size: 1.05rem; line-height: 1.3; }
.fd-msg-bubble { white-space: pre-wrap; word-break: break-word; background: #dcf8c6; color: #111; border-radius: .75rem .75rem .75rem .2rem; padding: .7rem .85rem; font-size: .92rem; }
[data-bs-theme="dark"] .fd-msg-bubble { background: #1f4d36; color: #f1f1f1; }

/* Farbbalken je Fahrtart */
.fd-tbar { display: inline-block; width: 4px; height: 1.05em; border-radius: 2px; margin-right: .35em; vertical-align: -.15em; flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.fd-type { display: inline-flex; align-items: center; font-size: .82em; font-weight: 600; padding: .2em .5em .2em .35em; border-radius: .35rem;
  background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); white-space: nowrap; }
.fd-cal-ev .fd-tbar, .fd-cal-lesson .fd-tbar { height: .95em; margin-right: .25em; }
.fd-type-legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .8rem; color: var(--bs-secondary-color); }
.fd-ta-sig { display: inline-block; max-height: 26px; max-width: 90px; margin-left: .35rem; vertical-align: middle; background: #fff; border-radius: 3px; }
/* Themenauswahl theoretischer Unterricht (Lehrpraktikum) */
.fd-theory-pick { max-height: 22rem; overflow-y: auto; padding: .25rem .5rem; }
.fd-theory-pick summary { padding: .25rem 0; font-size: .875rem; cursor: pointer; }
.fd-theory-pick details + details { border-top: 1px solid var(--bs-border-color-translucent); }

/* Klassenauswahl beim Anlegen: Beschreibung umbrechen statt überlaufen */
.fd-class-pick .form-check-label { min-width: 0; }
.fd-class-pick .fd-class-name { display: block; font-size: .8rem; line-height: 1.25; color: var(--bs-secondary-color); overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
/* Übersicht: Heute / Morgen / Rest der Woche */
.fd-agenda-tabs { gap: .25rem; }
.fd-agenda-tabs .nav-link { padding: .35rem .6rem; font-size: .92rem; white-space: nowrap; }
.fd-agenda-tabs .nav-link:not(.active) { color: var(--bs-body-color); }
.fd-ag-row > .flex-grow-1 { flex: 1 1 11rem; min-width: 0; }
.fd-ag-row > .fw-semibold:first-child { min-width: 2.8rem; }
