/* Responda Platform – Erweiterungen auf Alarm4Port style.css v205 */

:root {
  --r-red: var(--accent);
  --r-blue: #4a8fd4;
  --r-cyan: #64b5f6;
  --r-bg: var(--bg);
  --r-surface: var(--surface);
  --r-text: var(--text);
  --r-muted: var(--muted);
  --r-border: var(--border);
  --r-success: var(--ok);
  --r-warning: var(--warn);
  --r-danger: var(--accent);
  --r-radius: var(--radius);
}

body.responda-portal .logo-inline {
  height: 26px;
  max-height: 26px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #f0f4fa;
  margin: 0;
}

.einsatz-kpi-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.einsatz-kpi {
  background: #1e2f47;
  border: 1px solid #2a3f5c;
  border-radius: 8px;
  padding: 8px 14px;
  text-align: center;
  min-width: 72px;
}

.einsatz-kpi-val {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: #f0f4fa;
}

.einsatz-kpi-lbl {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.text-muted, .loading-text, .module-hint.loading { color: var(--muted); font-size: 0.9rem; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 1rem;
}

.kpi-card {
  background: #1e2f47;
  border: 1px solid #2a3f5c;
  border-radius: var(--radius);
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
}

.kpi-card.blue { border-left-color: #4a8fd4; }
.kpi-card.cyan { border-left-color: #64b5f6; }
.kpi-card.green { border-left-color: var(--ok); }

.kpi-value { font-size: 1.75rem; font-weight: 800; color: var(--text); }
.kpi-label { font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; }

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1rem;
}

.quick-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 8px 14px;
  background: #243652;
  border: 1px solid #3a5275;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: #dce4f0;
}

.quick-action:hover {
  background: #2d5a8a;
  border-color: #4a8fd4;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 6px 12px;
  background: #243652;
  border: 1px solid #3a5275;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #c8d4e4;
  text-decoration: none;
  cursor: pointer;
}

.quick-link:hover {
  background: #2d5a8a;
  border-color: #4a8fd4;
  text-decoration: none;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-active, .badge-bestaetigt, .badge-bezahlt, .badge-angenommen, .badge-geloest {
  background: rgba(46, 204, 113, 0.18);
  color: #a8f0c8;
  border: 1px solid rgba(46, 204, 113, 0.35);
}

.badge-inactive, .badge-storniert, .badge-abgelehnt {
  background: rgba(230, 57, 70, 0.18);
  color: #ffb4bc;
  border: 1px solid rgba(230, 57, 70, 0.35);
}

.badge-entwurf, .badge-neu, .badge-offen {
  background: rgba(74, 143, 212, 0.2);
  color: #90caf9;
  border: 1px solid rgba(74, 143, 212, 0.4);
}

.badge-versendet, .badge-in_arbeit, .badge-in_bearbeitung {
  background: rgba(243, 156, 18, 0.18);
  color: #ffd54f;
  border: 1px solid rgba(243, 156, 18, 0.35);
}

.badge-hoch, .badge-kritisch, .badge-dringend, .badge-ueberfaellig {
  background: rgba(198, 40, 40, 0.22);
  color: #ff8a80;
  border: 1px solid rgba(198, 40, 40, 0.45);
}

.badge-suspended {
  background: rgba(243, 156, 18, 0.18);
  color: #ffd54f;
  border: 1px solid rgba(243, 156, 18, 0.35);
}

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-size: 0.9rem;
  opacity: 0;
  transform: translateX(1rem);
  transition: opacity 0.25s, transform 0.25s;
  border-left: 4px solid var(--ok);
  max-width: 360px;
  color: var(--text);
}

.toast.show { opacity: 1; transform: translateX(0); }
.toast-error { border-left-color: var(--accent); }
.toast-info { border-left-color: #4a8fd4; }

.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--muted);
}

.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.85; }
.empty-state h3 { color: var(--text); font-size: 1.05rem; margin-bottom: 0.35rem; }
.empty-state p { font-size: 0.9rem; max-width: 360px; margin: 0 auto; }

tr.empty-row td {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 2rem 1rem !important;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: flex-end;
}

.filter-input, .filter-select {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface2);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  min-width: 200px;
}

.filter-input { flex: 1; max-width: 320px; }

.filter-input:focus, .filter-select:focus {
  outline: none;
  border-color: var(--accent);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.detail-item label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.detail-item span { font-weight: 500; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  background: none;
  border: none;
  font-weight: 500;
}

.back-link:hover { text-decoration: underline; }

.line-items-wrap { margin-top: 0.5rem; }

.line-items-header, .line-item {
  display: grid;
  grid-template-columns: 1fr 80px 100px 36px;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.line-items-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.line-item input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface2);
  color: var(--text);
  font-size: 0.9rem;
}

.line-items-total {
  text-align: right;
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-bottom: 10px;
  border-bottom: 1px solid #2a3f5c;
}

.tab {
  padding: 6px 12px;
  border: 1px solid #3a5275;
  background: #243652;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: #c8d4e4;
}

.tab.active {
  background: #2d5a8a;
  border-color: #4a8fd4;
  color: #fff;
}

.tab-panel.hidden { display: none !important; }

.comment-list { margin: 1rem 0; }

.comment {
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid #2a3f5c;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.comment-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem;
}

.module-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid #2a3f5c;
  border-radius: 8px;
  font-size: 0.85rem;
}

.module-check input { width: auto; margin-bottom: 0; }

.activity-list { list-style: none; margin: 0; padding: 0; }

.activity-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #2a3f5c;
  font-size: 0.9rem;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  flex-shrink: 0;
}

.activity-time {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.form-group { margin-bottom: 0; }

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  margin-bottom: 1rem;
}

.form-hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }
.form-error { font-size: 0.8rem; color: #ffb4bc; margin-top: 0.25rem; }

.login-hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: -0.5rem 0 1rem;
  text-align: center;
}

.login-hint a { color: var(--accent); }

button.btn-sm, .btn-sm {
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
}

.modal-panel.modal-wide-panel {
  width: min(720px, 96vw);
}

.welcome-banner {
  background: #1e2f47;
  border: 1px solid #2a3f5c;
  color: var(--text);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.welcome-banner h3 { font-size: 1.15rem; margin-bottom: 0.25rem; font-weight: 800; }
.welcome-banner p { color: var(--muted); font-size: 0.9rem; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 1rem;
}

.calendar-head, .calendar-cell {
  padding: 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  border-radius: 6px;
}

.calendar-head { font-weight: 700; color: var(--muted); }

.calendar-cell {
  min-height: 64px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid #2a3f5c;
  vertical-align: top;
}

.calendar-cell.today { border-color: #4a8fd4; background: rgba(74, 143, 212, 0.12); }
.calendar-cell.other-month { opacity: 0.45; }
.calendar-cell .day-num { font-weight: 700; margin-bottom: 0.25rem; }

.calendar-cell .day-event {
  font-size: 0.65rem;
  background: #2d5a8a;
  color: white;
  border-radius: 4px;
  padding: 1px 4px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coming-soon-banner {
  background: rgba(243, 156, 18, 0.12);
  border: 1px solid rgba(243, 156, 18, 0.35);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #ffd54f;
  margin-bottom: 1rem;
}

.perm-grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.35rem 0.75rem;
  align-items: center;
  font-size: 0.85rem;
}

.perm-grid .perm-head { font-weight: 600; color: var(--muted); font-size: 0.75rem; }

.reorder-btns { display: flex; flex-direction: column; gap: 2px; }

.reorder-btns button {
  padding: 0.15rem 0.4rem;
  font-size: 0.7rem;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  border-radius: 4px;
  cursor: pointer;
}

.notruf-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.notruf-form-card .notruf-actions,
.notruf-disp-card .notruf-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.disposition-data-list { margin: 0 0 0.75rem; }

.disp-data-row {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.9rem;
}

.disp-data-row dt { color: var(--muted); font-weight: 600; }

.disposition-empfehlung { font-size: 0.85rem; color: #93c5fd; margin: 0 0 0.75rem; }

.disp-unit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
}

.disp-unit {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.6rem 0.75rem;
  border: 1px solid #3a5275;
  border-radius: 8px;
  background: #243652;
  cursor: pointer;
}

.disp-unit.recommended { border-color: #3b82f6; background: rgba(59, 130, 246, 0.08); }
.disp-unit input { margin-top: 0.2rem; width: auto; margin-bottom: 0; }

.veh-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.veh-status-card {
  background: #1e2f47;
  border: 2px solid var(--status-color, #2a3f5c);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.veh-status-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; }
.veh-callsign { font-size: 0.8rem; color: var(--muted); }
.veh-status-code { font-size: 1.5rem; font-weight: 700; color: var(--status-color); }
.veh-status-label { font-size: 0.9rem; margin: 0.25rem 0; }
.veh-status-since { font-size: 0.75rem; color: var(--muted); }
.veh-status-inc { font-size: 0.8rem; color: #93c5fd; margin-top: 0.35rem; }
.veh-status-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.75rem; }

.status-chip {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  border: 2px solid var(--status-color);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.status-chip:hover, .status-chip.active { background: var(--status-color); color: #fff; }

.timeline { list-style: none; padding: 0; margin: 0; }

.timeline-item {
  padding: 0.75rem 0 0.75rem 1rem;
  border-left: 3px solid #4a8fd4;
  margin-left: 0.5rem;
  margin-bottom: 0.5rem;
}

.timeline-time { display: block; font-size: 0.75rem; color: var(--muted); margin-bottom: 0.25rem; }

.live-indicator { font-size: 0.8rem; }

.live-indicator::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--ok);
  border-radius: 50%;
  margin-right: 0.35rem;
  animation: live-pulse 2s infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@media (max-width: 960px) {
  .notruf-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .line-items-header, .line-item { grid-template-columns: 1fr; }
  .line-items-header { display: none; }
}
