/* =====================
   THW Einsatzdokumentation
   ===================== */
:root {
  --thw-blue:        #003087;
  --thw-blue-dark:   #001f5c;
  --thw-blue-light:  #1a4fa8;
  --thw-yellow:      #FFD100;
  --thw-yellow-dark: #e6bc00;
  --bg:              #f0f2f5;
  --white:           #ffffff;
  --border:          #d0d7e2;
  --muted:           #6b7280;
  --text:            #1a1a2e;
  --success:         #16a34a;
  --shadow-sm:       0 1px 4px rgba(0,0,0,.10);
  --shadow:          0 3px 12px rgba(0,0,0,.14);
  --radius:          6px;
  --header-h:        58px;
  --form-h:          86px;
}

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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
}

.hidden { display: none !important; }

/* ---- Views ---- */
.view { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ========== LOGIN ========== */
#view-login {
  justify-content: center;
  align-items: center;
  background: linear-gradient(160deg, var(--thw-blue-dark) 0%, var(--thw-blue) 60%, var(--thw-blue-light) 100%);
}

.login-card {
  background: var(--white);
  border-radius: 14px;
  padding: 2.5rem 2rem;
  width: min(420px, 92vw);
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
}

.thw-logo { text-align: center; margin-bottom: 2rem; }

.logo-badge {
  display: inline-block;
  background: var(--thw-blue);
  color: var(--thw-yellow);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 4px;
  padding: .45rem 1.4rem;
  border-radius: 8px;
  border-bottom: 5px solid var(--thw-yellow);
  margin-bottom: .5rem;
}

.logo-sub {
  font-size: .78rem;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: .6rem;
}

.thw-logo h1 { font-size: 1.25rem; color: var(--thw-blue); font-weight: 700; }

/* ========== APP HEADER ========== */
.app-header {
  height: var(--header-h);
  background: var(--thw-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  flex-shrink: 0;
  border-bottom: 3px solid var(--thw-yellow);
  box-shadow: var(--shadow);
  z-index: 20;
}

.header-left { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.header-right { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }

.logo-badge-sm {
  background: var(--thw-yellow);
  color: var(--thw-blue);
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: 2px;
  padding: .18rem .55rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.app-header h2 { font-size: 1rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.header-einsatz-info { min-width: 0; }
.header-einsatz-info h2 { font-size: .97rem; }
.header-ort { font-size: .75rem; color: rgba(255,255,255,.65); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-einsatznummer { color: rgba(255,255,255,.78); }

.header-user { font-size: .85rem; color: rgba(255,255,255,.8); }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .45rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--thw-yellow);
  color: var(--thw-blue);
}
.btn-primary:hover { background: var(--thw-yellow-dark); }

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

.btn-header-sm {
  background: rgba(255,255,255,.15);
  color: #fff;
  padding: .35rem .8rem;
  font-size: .8rem;
}
.btn-header-sm:hover { background: rgba(255,255,255,.25); }
.btn-home { flex-shrink: 0; }

.btn-block { width: 100%; }
.btn-lg { padding: .7rem 1.5rem; font-size: 1rem; }
.btn-eintrag { height: 100%; padding: .6rem 1.4rem; font-size: .9rem; }

/* ========== FORMS ========== */
.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .9rem; }
.form-group:last-child { margin-bottom: 0; }

.form-group label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .6px;
}

.form-group input,
.form-group textarea,
.form-col input,
.form-col textarea {
  padding: .5rem .7rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .88rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  resize: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-col input:focus,
.form-col textarea:focus {
  outline: none;
  border-color: var(--thw-blue-light);
  box-shadow: 0 0 0 3px rgba(26,79,168,.12);
}

.form-col input[readonly] {
  background: #f3f5f8;
  color: var(--muted);
  cursor: default;
}

.checkbox-row {
  align-items: center;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font-size: .88rem;
  font-weight: 600;
  gap: .55rem;
  margin: -.15rem 0 1rem;
}
.checkbox-row input {
  accent-color: var(--thw-blue);
  height: 16px;
  width: 16px;
}

/* ========== CONTAINER ========== */
.container {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* ========== EINSATZ LISTE ========== */
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.list-header h3 { font-size: 1.15rem; color: var(--thw-blue); }

.einsatz-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: .7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.einsatz-card:hover {
  border-color: var(--thw-blue-light);
  box-shadow: var(--shadow);
  transform: translateX(3px);
}
.einsatz-card h4 { font-size: .97rem; color: var(--thw-blue); margin-bottom: .2rem; }
.einsatz-card-info { min-width: 0; }
.einsatz-meta { font-size: .78rem; color: var(--muted); }
.einsatz-card-actions {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: .45rem;
  margin-left: .75rem;
}
.einsatz-arrow { color: var(--muted); font-size: 1.4rem; margin-left: .5rem; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); font-style: italic; }

/* ========== MODULAUSWAHL ========== */
.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.module-header h3 { font-size: 1.15rem; color: var(--thw-blue); }
.module-actions {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .9rem;
}

.start-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 320px));
  gap: .9rem;
}
.start-tile { min-height: 160px; }

.module-tile {
  position: relative;
  min-height: 132px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem;
  text-align: left;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.module-tile-active:hover {
  border-color: var(--thw-blue-light);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.module-tile-with-actions {
  cursor: default;
  gap: .9rem;
}
.module-tile-main {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.module-open-actions {
  display: grid;
  gap: .45rem;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}
.module-open-actions .btn {
  justify-content: center;
  min-height: 38px;
  padding-left: .6rem;
  padding-right: .6rem;
  text-align: center;
}
.module-key {
  background: var(--thw-blue);
  color: var(--thw-yellow);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: 1px;
  min-width: 42px;
  padding: .24rem .42rem;
}
.module-title {
  color: var(--thw-blue);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}
.module-badge {
  position: absolute;
  right: .8rem;
  top: .8rem;
  background: #f3f4f6;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  padding: .15rem .5rem;
  text-transform: uppercase;
}
.module-tile-disabled {
  cursor: default;
  opacity: .68;
}
.module-tile-disabled .module-key {
  background: #e5e7eb;
  color: #4b5563;
}
.module-tile-disabled .module-title { color: #4b5563; }

/* ========== NACHSCHLAGEWERKE ========== */
.search-bar {
  margin-bottom: 1rem;
}
.search-bar input {
  width: 100%;
  padding: .75rem .9rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  background: var(--white);
}
.search-bar input:focus {
  outline: none;
  border-color: var(--thw-blue-light);
  box-shadow: 0 0 0 3px rgba(26,79,168,.12);
}
.upload-panel {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  padding: 1rem;
}
.document-list {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.document-row {
  align-items: center;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  gap: .9rem;
  justify-content: space-between;
  padding: .9rem 1rem;
}
.document-info { min-width: 0; }
.document-title {
  color: var(--thw-blue);
  font-size: .98rem;
  font-weight: 800;
  margin-bottom: .18rem;
}
.document-meta {
  color: var(--muted);
  font-size: .78rem;
}
.document-actions {
  display: flex;
  flex-shrink: 0;
  gap: .45rem;
}

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(2px);
}
.modal-content {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  width: min(480px, 94vw);
  box-shadow: var(--shadow);
}
.modal-content h3 { color: var(--thw-blue); margin-bottom: 1.25rem; font-size: 1.1rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; }
.modal-copy {
  color: var(--text);
  font-size: .92rem;
  line-height: 1.45;
  margin-bottom: 1rem;
}

/* ========== EINTRAG FORMULAR ========== */
.eintrag-form {
  background: var(--white);
  border-top: 2px solid var(--border);
  padding: .75rem 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 -2px 8px rgba(0,0,0,.07);
}

.form-row {
  display: flex;
  gap: .7rem;
  align-items: flex-end;
}

.form-col { display: flex; flex-direction: column; gap: .3rem; }
.form-col label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.form-col-zeit    { flex: 0 0 148px; }
.form-col-benutzer { flex: 0 0 120px; }
.form-col-meldung  { flex: 1 1 0; min-width: 0; }
.form-col-bemerkung { flex: 0 0 200px; }
.form-col-attachments { flex: 0 0 170px; }
.form-col-btn      { flex: 0 0 auto; align-self: flex-end; }

.form-col-zeit input { font-family: 'Courier New', monospace; font-size: .9rem; font-weight: 700; letter-spacing: 1px; }
.form-col-attachments input[type="file"] {
  padding: .42rem .55rem;
  font-size: .78rem;
}

/* ========== TAGEBUCH TABELLE ========== */
.tagebuch-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
}

.tagebuch-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.tagebuch-table thead {
  position: sticky;
  top: 0;
  background: var(--thw-blue);
  color: #fff;
  z-index: 10;
}

.tagebuch-table th {
  padding: .65rem 1rem;
  text-align: left;
  font-size: .73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  white-space: nowrap;
}

.col-nr       { width: 48px; text-align: center; }
.col-zeit     { width: 108px; }
.col-benutzer { width: 130px; }
.col-meldung  { /* auto */ }
.col-bemerkung { width: 22%; min-width: 160px; }

.tagebuch-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.tagebuch-table tbody tr:nth-child(even) { background: #f8fafc; }
.tagebuch-table tbody tr:hover { background: #edf2ff; }

.tagebuch-table td {
  padding: .65rem 1rem;
  vertical-align: top;
  line-height: 1.5;
}

.td-nr       { text-align: center; color: var(--muted); font-size: .8rem; }
.td-zeit     { font-family: 'Courier New', monospace; font-weight: 800; color: var(--thw-blue); font-size: .92rem; white-space: nowrap; }
.td-benutzer { font-weight: 700; color: var(--thw-blue-light); white-space: nowrap; }
.td-meldung  { }
.td-bemerkung { color: var(--muted); font-size: .85rem; }

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .35rem;
}
.attachment-link {
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
  display: inline-flex;
  gap: .35rem;
  font: inherit;
  font-size: .76rem;
  font-weight: 700;
  max-width: 260px;
  overflow: hidden;
  padding: .18rem .55rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-link:hover { background: #dbeafe; }
.attachment-number {
  color: var(--thw-blue);
  flex-shrink: 0;
  font-family: 'Courier New', monospace;
  font-weight: 900;
}
.attachment-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: .9rem;
}
.attachment-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.attachment-card:hover {
  border-color: var(--thw-blue-light);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.attachment-preview {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: #f8fafc;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  width: 100%;
}
.attachment-preview img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}
.attachment-preview-loading {
  font-size: .8rem;
  font-weight: 700;
}
.attachment-file-icon {
  border: 2px solid #bfdbfe;
  color: var(--thw-blue);
  font-size: .78rem;
  font-weight: 900;
  padding: .8rem .9rem;
}
.attachment-card-body {
  padding: .75rem .85rem .85rem;
}
.attachment-card-number {
  color: var(--thw-blue);
  font-family: 'Courier New', monospace;
  font-size: .88rem;
  font-weight: 900;
  margin-bottom: .35rem;
}
.attachment-card-message {
  color: var(--text);
  font-size: .86rem;
  line-height: 1.35;
  margin-bottom: .45rem;
  overflow-wrap: anywhere;
}
.attachment-card-meta {
  color: var(--muted);
  font-size: .75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes newrow {
  0%   { background: #fff8c4; }
  100% { background: transparent; }
}
.tagebuch-table tbody tr.row-new { animation: newrow 3s ease-out forwards; }

/* ========== ONLINE USERS ========== */
.online-users {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  align-items: center;
}
.online-badge {
  font-size: .73rem;
  padding: .18rem .6rem;
  border-radius: 20px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
  white-space: nowrap;
}
.online-badge.me {
  background: var(--thw-yellow);
  border-color: var(--thw-yellow);
  color: var(--thw-blue);
  font-weight: 800;
}

/* ========== DRUCKELEMENTE (screen: versteckt) ========== */
.print-kopf,
.print-funktionen { display: none; }

/* ========== PRINT ========== */
@page {
  size: A4 portrait;
  margin: 10mm 12mm 16mm 12mm;
}


@media print {
  /* Elemente ausblenden */
  #eintrag-form,
  #btn-drucken,
  #btn-back,
  .online-users,
  .header-right,
  .app-header { display: none !important; }
  .col-benutzer, .td-benutzer { display: none !important; }

  /* View-Layout für Druck */
  .view { height: auto !important; overflow: visible !important; }
  .tagebuch-wrapper { overflow: visible !important; flex: none !important; }
  .tagebuch-table tbody tr.row-new { animation: none !important; }

  /* Tabellen-Kopf auf jeder Seite wiederholen */
  .tagebuch-table { width: 100%; border-collapse: collapse; }
  .tagebuch-table thead {
    display: table-header-group;
    background: #003087 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .tagebuch-table tbody { display: table-row-group; }
  .tagebuch-table tr { page-break-inside: avoid; }

  .print-funktionen {
    display: block !important;
    page-break-inside: avoid;
    margin-top: 14pt;
  }

  .print-funktionen-title {
    color: #003087;
    font-size: 10pt;
    font-weight: 900;
    margin-bottom: 5pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-funktionen-table {
    border-collapse: collapse;
    width: 100%;
  }

  .print-funktionen-table th,
  .print-funktionen-table td {
    border: 1pt solid #aaa;
    font-size: 8.5pt;
    padding: 5pt 6pt;
    text-align: left;
    vertical-align: bottom;
  }

  .print-funktionen-table th {
    background: #e5e7eb !important;
    color: #222;
    font-weight: 800;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-signature {
    height: 24pt;
    width: 38%;
  }

  /* ===== DRUCKKOPF ===== */
  .print-kopf {
    display: block !important;
    page-break-inside: avoid;
    margin-bottom: 6pt;
  }

  .print-kopf-oben {
    display: flex;
    align-items: center;
    padding-bottom: 5pt;
    border-bottom: 1.5pt solid #ccc;
    margin-bottom: 5pt;
  }

  .print-kopf-logo-bereich {
    display: flex;
    align-items: center;
    gap: 10pt;
  }

  .print-kopf-titel {
    font-size: 18pt;
    font-weight: 900;
    color: #003087;
    letter-spacing: -0.3pt;
    line-height: 1.1;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-kopf-ov {
    font-size: 8pt;
    color: #555;
    margin-top: 2pt;
    letter-spacing: 0.2pt;
  }

  .print-kopf-unten {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 5pt;
    border-bottom: 2pt solid #003087;
    margin-bottom: 4pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-kopf-einsatz {
    font-size: 9pt;
    color: #222;
    line-height: 1.5;
  }

  #print-einsatz-name {
    font-weight: 700;
    font-size: 10.5pt;
    color: #003087;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  #print-einsatz-ort,
  #print-einsatznummer {
    color: #555;
    font-size: 8.5pt;
  }

  .print-seite {
    font-size: 9pt;
    color: #444;
    white-space: nowrap;
    padding-left: 12pt;
    line-height: 1;
  }
}

/* ========== ALERTS ========== */
.alert-error {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: var(--radius);
  padding: .55rem .85rem;
  font-size: .875rem;
  margin-bottom: .85rem;
}
.alert-success {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  border-radius: var(--radius);
  padding: .55rem .85rem;
  font-size: .875rem;
  margin-bottom: .85rem;
}

/* ========== MODAL VARIANTEN ========== */
.modal-lg { max-width: 700px; width: min(700px, 96vw); }
.modal-sm { max-width: 400px; width: min(400px, 96vw); }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.modal-header h3 { color: var(--thw-blue); font-size: 1.1rem; }

.btn-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0 .25rem;
  transition: color .15s;
}
.btn-close:hover { color: var(--text); }

.modal-divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* ========== BENUTZERVERWALTUNG ========== */
.user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.user-table th {
  text-align: left;
  padding: .5rem .75rem;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
}
.user-table td {
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.user-table tbody tr:last-child td { border-bottom: none; }
.user-table tbody tr:hover { background: #f8fafc; }

.role-badge {
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .55rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.role-admin { background: #dbeafe; color: #1d4ed8; }
.role-user  { background: #f3f4f6; color: #4b5563; }

.badge-me { font-size: .72rem; color: var(--muted); font-weight: 400; }

.inline-pw-form {
  display: flex;
  gap: .4rem;
  align-items: center;
}
.inline-pw-form input {
  flex: 1;
  padding: .35rem .6rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .82rem;
  min-width: 0;
}
.inline-pw-form input:focus { outline: none; border-color: var(--thw-blue-light); }

.btn-sm-action {
  padding: .3rem .65rem;
  font-size: .78rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s;
}
.btn-pw-reset { background: #e0f2fe; color: #0369a1; }
.btn-pw-reset:hover { background: #bae6fd; }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-danger:hover { background: #fecaca; }

.form-row-modal {
  display: flex;
  gap: .7rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.form-row-modal .form-group { margin-bottom: 0; }
.form-row-modal select {
  padding: .5rem .7rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .88rem;
  background: var(--white);
  color: var(--text);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 700px) {
  .form-row { flex-wrap: wrap; }
  .form-col-zeit    { flex: 0 0 calc(50% - .35rem); }
  .form-col-benutzer { flex: 0 0 calc(50% - .35rem); }
  .form-col-meldung  { flex: 1 0 100%; }
  .form-col-bemerkung { flex: 1 0 100%; }
  .form-col-attachments { flex: 1 0 100%; }
  .form-col-btn { flex: 1 0 100%; }
  .btn-eintrag { width: 100%; }
  .col-bemerkung, .td-bemerkung { display: none; }
  .start-grid { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .attachment-gallery { grid-template-columns: 1fr; }
  .document-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .einsatz-card {
    align-items: flex-start;
  }
  .einsatz-card-actions {
    flex-direction: column-reverse;
    align-items: flex-end;
  }
  .module-header {
    align-items: flex-start;
    flex-direction: column;
    gap: .65rem;
  }
  .module-actions { width: 100%; }
  .module-actions .btn { flex: 1; }
  .module-open-actions { grid-template-columns: 1fr; }
  .document-actions,
  .document-actions .btn { width: 100%; }
  .document-actions { flex-direction: column; }
}
