/* ─── KN DESIGN TOKENS ──────────────────────────────────────────────────── */
:root {
  --kn-blue:   #002060;
  --kn-navy:   #001847;
  --kn-orange: #F28C00;
  --kn-light:  #E8EFF8;
  --bg:        #F0F4F9;
  --white:     #FFFFFF;
  --text:      #0F172A;
  --muted:     #64748B;
  --border:    #D1DCE8;
  --success:   #0B7A43;
  --danger:    #C0392B;
  --warn:      #B45309;
  --shadow-sm: 0 1px 4px rgba(0,32,96,.08);
  --shadow:    0 4px 18px rgba(0,32,96,.10);
  --radius:    14px;
  --radius-sm: 8px;
  --font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Safe area für iPhone Notch/Dynamic Island */
  --safe-top:  env(safe-area-inset-top, 0px);
  --safe-bot:  env(safe-area-inset-bottom, 0px);
}

/* ─── RESET + BASE ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  overflow-x: hidden;
}
a  { color: var(--kn-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
svg { fill: currentColor; }

/* ─── TOPBAR ─────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--kn-blue);
  padding-top: var(--safe-top);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .7rem 1.25rem;
  height: 60px;
}
.brand-logo {
  height: 26px;
  width: auto;
  max-width: 180px;
  flex-shrink: 0;
  /* KN Schutzzone: Abstand rechts vom Logo */
  padding-right: 1rem;
  border-right: 1px solid rgba(255,255,255,.25);
}
.topbar-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar-main {
  font-size: .95rem;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: .01em;
}
.topbar-sub {
  font-size: .72rem;
  color: rgba(255,255,255,.7);
  white-space: nowrap;
}

/* ─── HAMBURGER BUTTON ──────────────────────────────────────────────────── */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s;
  padding: 0 10px;
}
.hamburger:active { background: rgba(255,255,255,.2); }
.hamburger span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── DRAWER ────────────────────────────────────────────────────────────── */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  transition: opacity .25s;
}
.drawer-overlay.active { display: block; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(280px, 80vw);
  background: var(--white);
  z-index: 300;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,.18);
  padding-bottom: var(--safe-bot);
}
.drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--kn-blue);
  padding: .9rem 1rem;
  padding-top: calc(.9rem + var(--safe-top));
  min-height: 60px;
}
.drawer-logo { height: 24px; width: auto; max-width: 140px; }
.drawer-close {
  background: rgba(255,255,255,.15);
  border: none;
  color: var(--white);
  font-size: 1.1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: grid; place-items: center;
}

.drawer-nav {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  padding: .75rem 0;
}
.drawer-nav li a {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .9rem 1.25rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  border-left: 3px solid transparent;
  transition: background .15s, border-color .15s;
}
.drawer-nav li a:hover,
.drawer-nav li a.active {
  background: var(--kn-light);
  border-left-color: var(--kn-blue);
  color: var(--kn-blue);
  text-decoration: none;
}
.drawer-nav svg { width: 20px; height: 20px; flex-shrink: 0; }

.badge-count {
  margin-left: auto;
  background: var(--kn-orange);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}

.drawer-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}
.drawer-logout {
  display: block;
  font-size: .85rem;
  color: var(--muted);
  text-align: center;
}
.drawer-logout:hover { color: var(--danger); text-decoration: none; }

/* ─── CONTAINER ─────────────────────────────────────────────────────────── */
.container {
  max-width: 720px;  /* Desktop Chrome/Edge: breiteres Layout */
  margin: 0 auto;
  padding: .75rem .875rem calc(2rem + var(--safe-bot));
}

/* ─── CARDS ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
  margin-bottom: .75rem;
}
.card-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--kn-blue);
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--kn-orange);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.card-hint {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: .75rem;
}
.submit-card {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  position: sticky;
  bottom: var(--safe-bot);
  z-index: 10;
  margin-bottom: 0;
  box-shadow: 0 -4px 20px rgba(0,32,96,.10);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* ─── GRID ───────────────────────────────────────────────────────────────── */
.grid { display: grid; gap: .65rem; }
.two-col { grid-template-columns: 1fr 1fr; }
.full-col { grid-column: 1 / -1; }

/* ─── FORM ELEMENTS ──────────────────────────────────────────────────────── */
fieldset {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}
label span, legend {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .3rem;
  padding: 0;
}
input[type="text"],
input[type="email"],
input[type="date"],
input[type="time"],
input[type="password"],
textarea,
select {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem .875rem;
  font-size: 1rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  -webkit-appearance: none;
  transition: border-color .2s, box-shadow .2s;
  /* Touch-freundlich: min 44px */
  min-height: 48px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--kn-blue);
  box-shadow: 0 0 0 3px rgba(0,32,96,.12);
}
input[readonly] { background: #F8FAFC; color: var(--muted); }
textarea { resize: vertical; min-height: 90px; }

/* ─── RADIO BUTTONS ──────────────────────────────────────────────────────── */
.radio-group {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
  user-select: none;
}
.radio-label input[type="radio"] { display: none; }
.radio-label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--white);
  transition: all .18s;
  min-width: 56px;
  min-height: 40px;
}
.radio-label input:checked + span {
  background: var(--kn-blue);
  border-color: var(--kn-blue);
  color: var(--white);
}

/* Assessment Buttons mit Farb-Semantik */
.assessment-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .65rem .75rem;
  margin-bottom: .5rem;
}
.assessment-group { gap: .5rem; }
.radio-label.io- input:checked + span    { background: var(--success); border-color: var(--success); }
.radio-label.nio- input:checked + span   { background: var(--danger); border-color: var(--danger); }
.radio-label.na- input:checked + span { background: #64748B; border-color: #64748B; }

/* ─── CHECKBOXEN ─────────────────────────────────────────────────────────── */
.check-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 0;
  cursor: pointer;
  font-size: .95rem;
  min-height: 44px;
}
.check-label input[type="checkbox"] {
  width: 22px; height: 22px;
  border-radius: 5px;
  accent-color: var(--kn-blue);
  flex-shrink: 0;
}

/* ─── RESULT BOX ─────────────────────────────────────────────────────────── */
.result-box {
  margin-top: .75rem;
  padding: .75rem;
  background: rgba(242,140,0,.06);
  border: 1.5px dashed var(--kn-orange);
  border-radius: var(--radius-sm);
}

/* ─── FOTO UPLOAD ────────────────────────────────────────────────────────── */
.file-label {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--kn-blue);
  font-weight: 600;
  transition: border-color .2s;
}
.file-label:hover { border-color: var(--kn-blue); }
.file-label svg { width: 28px; height: 28px; flex-shrink: 0; }
.file-label input { display: none; }
.photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .5rem;
}
.photo-thumb {
  width: calc(50% - .25rem);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ─── SIGNATURE ──────────────────────────────────────────────────────────── */
.signature-wrap {
  border: 2px dashed var(--kn-blue);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--white);
  touch-action: none;
}
#signaturePad {
  width: 100%;
  height: 180px;
  display: block;
  touch-action: none;
}

/* ─── EMPFÄNGER ──────────────────────────────────────────────────────────── */
.recipient-row {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-bottom: .4rem;
}
.recipient-input { flex: 1; min-height: 44px; }
.btn-icon {
  display: grid;
  place-items: center;
  width: 40px; height: 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--danger);
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
}
.btn-icon:hover { background: #fee2e2; border-color: var(--danger); }

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: .8rem 1.1rem;
  font-size: .95rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
  text-decoration: none;
  min-height: 48px;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-full { width: 100%; }
.btn-primary  { background: var(--kn-blue);   color: var(--white); box-shadow: 0 3px 10px rgba(0,32,96,.25); }
.btn-secondary{ background: var(--kn-light);  color: var(--kn-blue); }
.btn-ghost    { background: transparent; color: var(--kn-blue); border: 1.5px solid var(--border); }
.btn-danger   { background: #fee2e2; color: var(--danger); }
.btn-sm       { padding: .5rem .85rem; font-size: .85rem; min-height: 36px; }

/* ─── BADGES ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .25rem .7rem;
  border-radius: 99px;
  font-size: .82rem;
  font-weight: 700;
}
.badge-ok  { background: rgba(11,122,67,.12); color: var(--success); }
.badge-bad { background: rgba(192,57,43,.12); color: var(--danger); }
.badge-na  { background: rgba(100,116,139,.12); color: #64748B; }
.badge-status {
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 99px;
}
.badge-status.draft { background: rgba(180,83,9,.12); color: var(--warn); }
.badge-status.sent  { background: rgba(11,122,67,.12); color: var(--success); }

/* ─── LIST VIEW ──────────────────────────────────────────────────────────── */
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
  padding: .25rem 0;
}
.list-title { font-size: 1.15rem; font-weight: 700; color: var(--kn-blue); }
.list-cards { display: grid; gap: .65rem; }
.list-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border-left: 4px solid var(--kn-orange);
}
.list-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem .85rem .4rem;
  background: #FAFCFF;
  border-bottom: 1px solid var(--border);
}
.list-date { font-size: .8rem; color: var(--muted); font-weight: 600; }
.list-card-body { padding: .65rem .85rem; display: flex; flex-direction: column; gap: .2rem; }
.list-info { font-size: .85rem; color: var(--text); }
.list-card-actions {
  display: flex;
  gap: .5rem;
  padding: .65rem .85rem;
  border-top: 1px solid var(--border);
  background: #FAFCFF;
  flex-wrap: wrap;
}

/* ─── DETAIL VIEW ────────────────────────────────────────────────────────── */
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--bg);
  font-size: .9rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
  max-width: 45%;
}
.detail-val { text-align: right; word-break: break-word; }

/* ─── EMPTY STATE ────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.empty-state svg { width: 56px; height: 56px; margin: 0 auto 1rem; opacity: .35; }
.empty-state p { font-size: .95rem; margin-bottom: 1.25rem; }

/* ─── NOTICES ────────────────────────────────────────────────────────────── */
.notice {
  border-radius: var(--radius-sm);
  padding: .65rem .875rem;
  font-size: .85rem;
  margin-bottom: .65rem;
  font-weight: 600;
}
.notice-info { background: var(--kn-light); color: var(--kn-blue); border-left: 3px solid var(--kn-blue); }
.alert { border-radius: var(--radius-sm); padding: .65rem .875rem; font-size: .9rem; margin-bottom: .75rem; }
.alert-error { background: #fee2e2; color: var(--danger); }

/* ─── LOGIN PAGE ─────────────────────────────────────────────────────────── */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 1rem;
  background: linear-gradient(155deg, var(--kn-navy) 0%, var(--kn-blue) 50%, #004080 100%);
}
.login-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-logo-wrap { text-align: center; margin-bottom: 1.25rem; }
.login-logo { height: 42px; margin: 0 auto; }
.login-title { font-size: 1.35rem; font-weight: 800; color: var(--kn-blue); text-align: center; margin-bottom: .25rem; }
.login-sub { font-size: .85rem; color: var(--muted); text-align: center; margin-bottom: 1.5rem; }
.login-form { display: flex; flex-direction: column; gap: .75rem; }
.login-form label { display: flex; flex-direction: column; gap: .25rem; }
.login-form label span { font-size: .82rem; font-weight: 600; color: var(--muted); }
.login-hint { font-size: .75rem; color: var(--muted); text-align: center; margin-top: 1.25rem; }

/* ─── SUCCESS/WARN RESULT ICON ───────────────────────────────────────────── */
.result-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.75rem;
  font-weight: 900;
  margin: 0 auto .75rem;
}
.result-ok   { background: rgba(11,122,67,.12); color: var(--success); }
.result-warn { background: rgba(180,83,9,.12); color: var(--warn); }

/* ─── RESPONSIVE: Breiter als iPhone ─────────────────────────────────────── */
@media (min-width: 520px) {
  .container { padding: 1rem 1.25rem 2.5rem; }
  .topbar-inner { padding: .6rem 1.5rem; }
  .card { padding: 1.25rem; }
  .submit-card { position: relative; border-radius: var(--radius); margin-bottom: .75rem; }
  .submit-card .btn { width: auto; }
  .submit-card { flex-direction: row; justify-content: flex-end; gap: .75rem; }
}

/* Desktop: Chrome / Edge ≥ 768px -------------------------------- */
@media (min-width: 768px) {
  body { background: #f0f2f5; }

  .topbar { position: sticky; top: 0; z-index: 100; }
  .topbar-inner { padding: .6rem 2rem; max-width: 800px; margin: 0 auto; }

  .container {
    margin: 1.5rem auto;
    padding: 0 1rem 2rem;
  }

  .card { padding: 1.5rem; margin-bottom: 1rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); }

  /* Zwei-Spalten-Grid für Allgemeine Angaben, Prüfobjekt */
  .grid.two-col { grid-template-columns: 1fr 1fr; }

  /* Submit-Card: rechtsbündig, keine sticky-Positionierung */
  .submit-card {
    position: relative;
    flex-direction: row;
    justify-content: flex-end;
    gap: .75rem;
    background: transparent;
    box-shadow: none;
    padding: .5rem 0 0;
  }
  .submit-card .btn { width: auto; min-width: 200px; }

  /* Drawer: auf Desktop verstecken (Navigation ist überflüssig) */
  /* Hamburger bleibt für Nutzer sichtbar */

  /* Foto-Grid auf Desktop größer */
  .photo-preview { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .photo-thumb img { height: 110px; }

  /* Unterschrift-Canvas auf Desktop volle Breite */
  .signature-wrap { max-width: 100%; }
}

/* ----------------------------------------------------------
   TOAST
   ---------------------------------------------------------- */
.lasi-toast {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom) + 80px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #222;
    color: #fff;
    padding: .75rem 1.25rem;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 500;
    max-width: 88vw;
    text-align: center;
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0,0,0,.35);
}
.lasi-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.lasi-toast--error   { background: #c0392b; }
.lasi-toast--warn    { background: #e67e22; }
.lasi-toast--success { background: #27ae60; }
.lasi-toast--info    { background: #002060; }

/* ----------------------------------------------------------
   SPINNER (Button Loading State)
   ---------------------------------------------------------- */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ----------------------------------------------------------
   RESULT-BOX STATES
   ---------------------------------------------------------- */
#gesamtbewertung.result-ok   { color: #27ae60; font-weight: 600; }
#gesamtbewertung.result-nio  { color: #c0392b; font-weight: 600; }
#gesamtbewertung.result-na   { color: #7f8c8d; font-weight: 600; }
#gesamtbewertung.result-open { color: #95a5a6; }

/* ----------------------------------------------------------
   FIELD ERROR
   ---------------------------------------------------------- */
.field-error {
    border-color: #c0392b !important;
    box-shadow: 0 0 0 2px rgba(192,57,43,.2) !important;
}

/* ----------------------------------------------------------
   FOTO THUMBNAIL – neue Fotos
   ---------------------------------------------------------- */
.photo-thumb--new {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
}
.photo-filename {
    font-size: .7rem;
    color: var(--gray-500, #6b7280);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80px;
}

/* ----------------------------------------------------------
   RECIPIENT ROW
   ---------------------------------------------------------- */
.recipient-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .5rem;
}
.recipient-input {
    flex: 1;
    min-width: 0;
}
.btn-icon {
    flex-shrink: 0;
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: .85rem;
    color: #c0392b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.btn-icon:hover { background: #fdf0ef; }

/* ----------------------------------------------------------
   ASSESSMENT LABEL SELECTED STATE
   ---------------------------------------------------------- */
.assessment-label.io.selected    { background: #d4edda; border-color: #27ae60; color: #1a7a3e; }
.assessment-label.nio.selected   { background: #fde8e8; border-color: #c0392b; color: #922b21; }
.assessment-label.na.selected    { background: #e9ecef; border-color: #adb5bd; color: #495057; }

/* ----------------------------------------------------------
   NOTICE / FLASH
   ---------------------------------------------------------- */
.notice {
    padding: .75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: .9rem;
    font-weight: 500;
}
.notice-info    { background: #e8f4fd; border-left: 4px solid #2980b9; color: #1a5276; }
.notice-success { background: #d4edda; border-left: 4px solid #27ae60; color: #1a7a3e; }
.notice-error   { background: #fde8e8; border-left: 4px solid #c0392b; color: #922b21; }

/* ----------------------------------------------------------
   FOTO REMOVE-BUTTON
   ---------------------------------------------------------- */
.photo-thumb--removable {
  position: relative;
}
.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(192,57,43,.9);
  color: #fff;
  border: none;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  z-index: 2;
  transition: background .15s;
}
.photo-remove:hover { background: #922b21; }

/* Foto-Zähler Badge */
.foto-count {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--kn-blue);
  margin-bottom: .4rem;
}

/* FOTO AJAX-Status */
.foto-upload-status { font-size:.82rem; margin:.3rem 0; min-height:1.2em; }
.foto-status-loading { color: var(--kn-blue); }
.foto-status-error   { color: var(--danger);  }

/* ----------------------------------------------------------
   LÖSCH-MODAL
   ---------------------------------------------------------- */
.delete-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.delete-modal {
  background: #fff;
  border-radius: 14px;
  padding: 2rem 1.5rem 1.5rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
  animation: modalIn .2s ease;
}
@keyframes modalIn {
  from { transform: scale(.92); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.delete-modal-icon {
  font-size: 2.5rem;
  color: var(--danger);
  margin-bottom: .5rem;
  line-height: 1;
}
.delete-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--kn-blue);
  margin: 0 0 .6rem;
}
.delete-modal-text {
  font-size: .9rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 .5rem;
}
.delete-modal-warn {
  font-size: .8rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}
.delete-modal-actions {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.delete-modal-actions .btn { min-width: 130px; }

/* ----------------------------------------------------------
   LOGO – klickbar
   ---------------------------------------------------------- */
.topbar-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  padding-right: 1rem;
  border-right: 1px solid rgba(255,255,255,.25);
  transition: opacity .15s;
}
.topbar-logo-link:hover { opacity: .82; }
.topbar-logo-link .brand-logo {
  padding-right: 0;
  border-right: none;
}

/* ----------------------------------------------------------
   VIEW – Zurück-Button
   ---------------------------------------------------------- */
.view-topbar {
  padding: .75rem 0 .25rem;
}

/* ----------------------------------------------------------
   LIGHTBOX
   ---------------------------------------------------------- */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#lightboxImg {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 4px 40px rgba(0,0,0,.6);
}
#lightboxClose {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  z-index: 801;
}
#lightboxClose:hover { background: rgba(255,255,255,.3); }

/* ----------------------------------------------------------
   SECTION DISABLED (Vorprüfung = Nein)
   ---------------------------------------------------------- */
.section-disabled {
  opacity: .45;
  pointer-events: none;
  user-select: none;
  filter: grayscale(40%);
  transition: opacity .25s, filter .25s;
}
.section-disabled * {
  cursor: not-allowed !important;
}

/* Keine Maßnahmen erforderlich – optisch hervorgehoben */
.check-label--none {
  border: 1.5px solid var(--kn-orange);
  border-radius: 8px;
  padding: .4rem .6rem;
  margin-bottom: .5rem;
  background: rgba(242,140,0,.06);
}

/* Statischer Anzeigewert (kein Eingabefeld) */
.field-static {
  margin: 0;
  padding: .45rem 0;
  font-size: .95rem;
  font-weight: 600;
  color: var(--kn-blue);
}
