html {
  overflow-x: clip;
}

:root {
  --app-space: 1rem;
  --app-radius: 8px;
  --surface-bg: rgba(237, 243, 247, 0.94);
  --surface-bg-solid: #edf3f7;
  --surface-row-bg: #e5edf3;
  --surface-hover-bg: #dcebf5;
  --surface-border: rgba(217, 227, 236, 0.78);
  --surface-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  --ease-out-ui: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out-ui: cubic-bezier(0.77, 0, 0.175, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background:
    linear-gradient(135deg, #d7e4ec 0%, #cbdbe6 55%, #b9cedd 100%),
    radial-gradient(circle at top left, rgba(52, 152, 219, 0.22), transparent 32rem);
  background-attachment: fixed;
  overflow-x: clip;
}

.app-toolbar {
  margin: var(--app-space) var(--app-space) 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--surface-border);
  border-radius: var(--app-radius);
  background: var(--surface-bg);
  color: #1f2933;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--surface-shadow);
  backdrop-filter: blur(10px);
}

.app-toolbar > div {
  min-width: 0;
}

.app-toolbar h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.app-toolbar .login-eyebrow {
  color: #287fb8;
  margin-bottom: 0.25rem;
}

.menu-toggle {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.navigation-backdrop {
  position: fixed;
  inset: 0;
  z-index: 7000;
  background: rgba(15, 23, 31, 0.46);
  backdrop-filter: blur(2px);
}

.side-navigation {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 7001;
  width: min(23rem, calc(100vw - 2rem));
  height: 100vh;
  height: 100dvh;
  box-sizing: border-box;
  background: #edf3f7;
  color: #1f2933;
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.28);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.side-navigation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.side-navigation-header h2 {
  margin: 0.15rem 0 0;
  font-size: 1.6rem;
}

.side-navigation-close {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.side-navigation-user {
  margin: 0;
  color: #60717f;
  font-weight: 700;
}

.side-navigation-links {
  display: grid;
  gap: 0.55rem;
}

.side-navigation-link {
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  background: #f4f8fb;
  color: #1f2933;
  text-decoration: none;
  min-height: 4.4rem;
  padding: 0.75rem;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  align-items: center;
  gap: 0.75rem;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.side-navigation-link > i {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #dcebf5;
  color: #287fb8;
}

.side-navigation-link span {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.side-navigation-link small {
  color: #6f8191;
  font-weight: 600;
}

.side-navigation-link:hover,
.side-navigation-link:focus-visible,
.side-navigation-link.active {
  background: #e7f1f8;
  border-color: #3498db;
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.16);
  outline: none;
  transform: translateY(-1px);
}

.side-navigation-actions {
  margin-top: auto;
  display: grid;
  gap: 0.55rem;
}

.side-navigation-action {
  width: 100%;
  min-height: 3rem;
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  background: #f4f8fb;
  color: #1f2933;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  text-align: left;
  text-decoration: none;
  min-width: 0;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.side-navigation-action i {
  width: 1.35rem;
  text-align: center;
}

.side-navigation-action:hover,
.side-navigation-action:focus-visible {
  background: #e7f1f8;
  border-color: #3498db;
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.14);
  outline: none;
}

.side-navigation-action.danger {
  color: #9f2a20;
}

.section-backbar {
  padding: var(--app-space) var(--app-space) 0;
}

.section-back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: auto;
  min-width: 0;
  padding-inline: 0.9rem;
}

.app-alert {
  margin: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  background: #fce4e4;
  color: #8a1f1f;
  border: 1px solid #f5b5b5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.app-alert-close {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease;
}

.app-alert-close:hover,
.app-alert-close:focus-visible {
  background: rgba(138, 31, 31, 0.12);
  outline: none;
}

.app-notice-stack {
  display: grid;
  gap: 0.6rem;
  margin: var(--app-space) var(--app-space) 0;
}

.app-notice {
  width: 100%;
  min-height: 3rem;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border-radius: var(--app-radius);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid #d8e4ec;
  background: #eef4f8;
  color: #34495e;
  box-shadow: var(--surface-shadow);
}

.app-notice-action {
  cursor: pointer;
}

.app-notice-action:hover,
.app-notice-action:focus-visible {
  filter: brightness(0.985);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.12), var(--surface-shadow);
  outline: none;
}

.app-notice-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #95a5a6;
  flex: 0 0 auto;
}

.app-notice-label {
  font-weight: 850;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  min-height: 1rem;
}

.app-notice-meta {
  color: #60717f;
  font-weight: 650;
  line-height: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  min-height: 1rem;
}

.app-notice-close {
  margin-left: auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.app-notice-close:hover,
.app-notice-close:focus-visible {
  background: rgba(52, 73, 94, 0.08);
  outline: none;
}

.app-notice-success {
  background: #e8f7ed;
  border-color: #b8e1c5;
  color: #1f5f35;
}

.app-notice-success .app-notice-dot {
  background: #2ecc71;
  box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.15);
}

.app-notice-warning {
  background: #fff7e6;
  border-color: #f3d39a;
  color: #805600;
}

.app-notice-warning .app-notice-dot {
  background: #f1c40f;
  box-shadow: 0 0 0 4px rgba(241, 196, 15, 0.18);
}

.app-notice-error {
  background: #fce4e4;
  border-color: #f5b5b5;
  color: #8a1f1f;
}

.app-notice-error .app-notice-dot {
  background: #e74c3c;
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.16);
}

.app-notice-info .app-notice-dot {
  background: #3498db;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.16);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  box-sizing: border-box;
  background:
    linear-gradient(145deg, rgba(246, 249, 251, 0.94) 0%, rgba(222, 233, 240, 0.94) 52%, rgba(198, 215, 226, 0.94) 100%);
}

.login-shell {
  width: min(960px, 100%);
  min-height: 560px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  background: #e9f0f5;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(24, 44, 58, 0.24);
}

.login-brand {
  background:
    linear-gradient(135deg, #eef5f8 0%, #d8e8f1 58%, #c5d9e6 100%);
  color: #1f2933;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  border-right: 1px solid rgba(162, 188, 207, 0.42);
}

.login-mark {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 8px;
  background: #1f78b4;
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 2rem;
  box-shadow: 0 12px 24px rgba(31, 120, 180, 0.28);
}

.login-eyebrow {
  margin: 0 0 0.6rem;
  color: #287fb8;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.login-brand h1 {
  margin: 0;
  font-size: 3.2rem;
  line-height: 1;
}

.login-system-status {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #506879;
  font-size: 0.95rem;
  font-weight: 700;
}

.login-status-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.2);
  flex: 0 0 auto;
}

.login-panel {
  background: #edf3f7;
  color: #1f2933;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.login-panel-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}

.login-panel-header h2 {
  margin: 0;
  font-size: 1.8rem;
}

.login-lock {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #dcebf5;
  color: #287fb8;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.login-form label {
  font-weight: 700;
  color: #34495e;
  margin-top: 0.6rem;
}

.login-input {
  height: 3.2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid #c3d1dc;
  border-radius: 8px;
  background: #f7fafc;
  padding: 0 0.95rem;
  transition: border-color 180ms var(--ease-out-ui), box-shadow 180ms var(--ease-out-ui), background 180ms var(--ease-out-ui);
}

.login-input:focus-within {
  background: #ffffff;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.18);
}

.login-input i {
  color: #6f8191;
  flex: 0 0 auto;
}

.login-input input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 1rem;
  color: #1f2933;
}

.login-forgot-button {
  align-self: flex-start;
  border: 0;
  background: transparent;
  color: #287fb8;
  font: inherit;
  font-weight: 800;
  padding: 0.1rem 0;
  cursor: pointer;
  transition: color 160ms var(--ease-out-ui);
}

.login-forgot-button:hover,
.login-forgot-button:focus-visible {
  color: #1f5f89;
  text-decoration: underline;
  outline: none;
}

.login-alert {
  margin: 1rem 0 0;
}

.login-submit {
  width: 100%;
  height: 3.2rem;
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-weight: 700;
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button.login-submit:focus-visible {
  transform: none;
}

.button.login-submit:active:not(:disabled) {
  transform: scale(0.98);
}

.dashboard-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  box-sizing: border-box;
  background:
    linear-gradient(145deg, rgba(246, 249, 251, 0.94) 0%, rgba(222, 233, 240, 0.94) 52%, rgba(198, 215, 226, 0.94) 100%);
}

.dashboard-shell {
  width: min(1080px, 100%);
  min-height: 560px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  background: #e9f0f5;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(24, 44, 58, 0.24);
  min-width: 0;
}

.dashboard-hero {
  background:
    linear-gradient(135deg, #eef5f8 0%, #d8e8f1 58%, #c5d9e6 100%);
  color: #1f2933;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  border-right: 1px solid rgba(162, 188, 207, 0.42);
}

.dashboard-hero h1 {
  margin: 0;
  font-size: 3rem;
  line-height: 1;
}

.dashboard-hero .login-eyebrow {
  color: #287fb8;
}

.dashboard-hero .login-system-status {
  color: #506879;
}

.dashboard-subtitle {
  margin: 0.8rem 0 0;
  color: #60717f;
  font-size: 1.05rem;
}

.dashboard-content {
  background: #edf3f7;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.dashboard-header > div {
  min-width: 0;
}

.dashboard-header h2 {
  margin: 0;
  font-size: 1.8rem;
  color: #1f2933;
}

.dashboard-header p {
  margin: 0.45rem 0 0;
  color: #6f8191;
}

.dashboard-user-line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.dashboard-user-link {
  color: inherit;
  text-decoration: none;
  border-radius: 6px;
  outline: none;
}

.dashboard-user-link:hover,
.dashboard-user-link:focus-visible {
  color: #1f8fd3;
  text-decoration: underline;
  text-underline-offset: 0.18rem;
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}

.dashboard-action-button {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  background: #f4f8fb;
  color: #34495e;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 160ms var(--ease-out-ui), border-color 160ms var(--ease-out-ui), box-shadow 160ms var(--ease-out-ui), transform 140ms var(--ease-out-ui);
}

.dashboard-action-button:focus-visible {
  background: #e7f1f8;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.16);
  outline: none;
}

.dashboard-action-button:active {
  transform: scale(0.97);
}

.dashboard-action-button.danger {
  color: #9f2a20;
}

.module-grid {
  display: grid;
  gap: 1rem;
}

.module-card {
  min-height: 6.25rem;
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  background: #f8fbfd;
  color: #1f2933;
  text-decoration: none;
  padding: 1rem;
  display: grid;
  grid-template-columns: 3.25rem 1fr auto;
  align-items: center;
  gap: 1rem;
  transition: border-color 180ms var(--ease-out-ui), transform 160ms var(--ease-out-ui), box-shadow 180ms var(--ease-out-ui), background 180ms var(--ease-out-ui);
  min-width: 0;
}

.module-card:focus-visible {
  background: #ffffff;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.16), 0 12px 28px rgba(52, 152, 219, 0.12);
  outline: none;
}

.module-card:active {
  transform: scale(0.99);
}

.module-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #e3eff7;
  color: #1f78b4;
  font-size: 1.35rem;
}

.module-copy {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.module-copy strong {
  font-size: 1.15rem;
}

.module-copy span {
  color: #6f8191;
  line-height: 1.35;
}

.module-arrow {
  color: #8ba0b2;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: center;
}

@media (hover: hover) and (pointer: fine) {
  .dashboard-action-button:hover {
    background: #e7f1f8;
    border-color: #3498db;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.14);
    transform: translateY(-1px);
  }

  .module-card:hover {
    background: #ffffff;
    border-color: #3498db;
    box-shadow: 0 12px 28px rgba(52, 152, 219, 0.18);
    transform: translateY(-1px);
  }
}

@media (hover: none) {
  .button.login-submit:hover {
    transform: none;
  }
}

.system-layout {
  padding: var(--app-space);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
  gap: 1rem;
  min-width: 0;
}

.verwaltung-layout {
  padding: var(--app-space);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1rem;
  min-width: 0;
}

.alarmgruppen-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
}

.alarmgruppen-editor-stack {
  display: grid;
  align-content: start;
  gap: 1rem;
  min-width: 0;
}

.alarmgruppen-editor-stack .system-panel-header h2 {
  font-size: 1.5rem;
}

.verwaltung-overview {
  padding: var(--app-space);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  min-width: 0;
}

.verwaltung-module-card {
  border: 1px solid #d9e3ec;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.system-panel {
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  border-radius: var(--app-radius);
  box-shadow: var(--surface-shadow);
  padding: 1rem;
  min-width: 0;
}

.system-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.system-panel-header h2 {
  margin: 0;
}

.subsection-title {
  margin: 1rem 0 0.55rem;
  color: #34495e;
  font-size: 0.88rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.subsection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}

.subsection-heading .subsection-title {
  margin-top: 0;
}

.icon-button-small {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  flex: 0 0 auto;
}

.compact-list {
  margin-bottom: 0.75rem;
}

.organisation-tree-list {
  gap: 0.45rem;
}

.organisation-tree-row {
  margin-top: 0.25rem;
}

.organisation-inline-form {
  min-height: 4.25rem;
  margin-top: 0.25rem;
  background: var(--surface-row-bg);
  border: 1px solid rgba(52, 152, 219, 0.24);
}

.organisation-inline-form input {
  width: 100%;
  min-width: 0;
  min-height: 2.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #c8d4df;
  border-radius: 8px;
  background: #f3f7fa;
  color: #1f2933;
  font: inherit;
  font-weight: 700;
  box-sizing: border-box;
}

.organisation-inline-form input::placeholder {
  color: #6f8191;
  font-weight: 600;
}

.organisation-inline-form input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.18);
  background: #f7fafc;
}

.organisation-add-row {
  margin-top: 0.25rem;
}

.alarmgruppen-nested-list {
  display: grid;
  gap: 0.35rem;
  margin: -0.15rem 0 0.35rem 1.1rem;
  padding-left: 0.85rem;
  border-left: 2px solid rgba(52, 152, 219, 0.22);
}

.alarmgruppe-tree-row {
  min-height: 4.1rem;
  padding-block: 0.65rem;
}

.alarmgruppe-add-row {
  width: 100%;
  min-height: 3.2rem;
  border: 1px dashed #9bbbd3;
  border-radius: 8px;
  background: rgba(220, 235, 245, 0.24);
  color: #287fb8;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  align-items: center;
  padding: 0.65rem 0.85rem;
  text-align: center;
}

.alarmgruppe-add-row:hover,
.alarmgruppe-add-row:focus-visible {
  background: rgba(220, 235, 245, 0.54);
  border-color: #3498db;
  outline: none;
}

.verwaltung-row-muted {
  background: rgba(220, 235, 245, 0.58);
}

.form-split {
  padding: 0.9rem;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: rgba(220, 235, 245, 0.34);
}

.form-split + .form-split {
  margin-top: 0.9rem;
}

.form-split h3 {
  margin: 0;
  color: #1f2933;
  font-size: 1.05rem;
}

.user-table {
  display: grid;
  gap: 0.5rem;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 8rem 6rem auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--surface-row-bg);
}

.user-row-head {
  background: transparent;
  color: #6f8191;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.user-name {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.user-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.verwaltung-list {
  display: grid;
  gap: 0.5rem;
}

.verwaltung-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--surface-row-bg);
  min-width: 0;
}

.verwaltung-row p {
  margin: 0.35rem 0 0;
  color: #6f8191;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.verwaltung-row .badge-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.verwaltung-row-clickable {
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  border: 1px solid transparent;
}

.verwaltung-row-clickable:hover,
.verwaltung-row-clickable:focus-visible {
  background: var(--surface-hover-bg);
  border-color: #3498db;
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.14);
  transform: translateY(-1px);
  outline: none;
}

.verwaltung-row-clickable.active {
  background: #dceeff;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.12);
}

.compact-empty-state {
  min-height: 7rem;
  padding: 1rem;
  border-radius: 8px;
  border: 1px dashed #c8d4df;
  background: rgba(220, 235, 245, 0.36);
  display: grid;
  place-items: center;
  text-align: center;
  color: #6f8191;
}

.compact-empty-state i {
  color: #287fb8;
  font-size: 1.4rem;
  margin-bottom: 0.35rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-pill-active {
  background: #dff7e8;
  color: #166534;
}

.status-pill-inactive {
  background: #eceff3;
  color: #52606d;
}

.status-pill-auto {
  background: #dff7e8;
  color: #166534;
}

.status-pill-manual {
  background: #fff1d6;
  color: #9a4f00;
}

.role-pill {
  min-width: 5.5rem;
}

.role-pill-admin {
  background: #e8ddff;
  color: #5b21b6;
}

.role-pill-disponent {
  background: #dceeff;
  color: #075985;
}

.role-pill-benutzer {
  background: #dbe5ee;
  color: #17324a;
  border: 1px solid #c0ceda;
}

.role-choice-group {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.role-choice-pill {
  min-height: 2rem;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.role-choice-pill:hover,
.role-choice-pill:focus-visible,
.role-choice-pill.active {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.16);
  outline: none;
}

.role-choice-pill.active {
  transform: translateY(-1px);
}

.einheiten-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.einheit-choice {
  min-height: 2.35rem;
  border: 1px solid #c8d4df;
  border-radius: 999px;
  background: #f3f7fa;
  color: #34495e;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  padding: 0.45rem 0.75rem;
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.einheit-choice i {
  width: 1rem;
  text-align: center;
  color: #287fb8;
  flex: 0 0 auto;
}

.einheit-choice span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.einheit-choice:hover,
.einheit-choice:focus-visible {
  background: #e7f1f8;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.14);
  outline: none;
}

.einheit-choice.active {
  background: #dceeff;
  border-color: #3498db;
  color: #075985;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.12);
}

.einheit-choice.active i {
  color: #075985;
}

.einheit-choice:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.einheit-choice-add {
  width: 2.35rem;
  justify-content: center;
  padding-inline: 0;
}

.einheit-choice-input {
  cursor: default;
  padding: 0.25rem 0.35rem 0.25rem 0.65rem;
}

.system-form .einheit-choice-input input[type="text"] {
  width: min(13rem, 46vw);
  height: 1.8rem;
  min-width: 8rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: 0 0.25rem;
  box-shadow: none;
}

.system-form .einheit-choice-input input[type="text"]:focus {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.einheit-choice-close {
  width: 1.65rem;
  height: 1.65rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.einheit-choice-close:hover,
.einheit-choice-close:focus-visible {
  background: rgba(52, 73, 94, 0.12);
  outline: none;
}

.aao-summary {
  display: inline-flex;
  margin-left: 0.5rem;
  color: #60717f;
  overflow-wrap: anywhere;
}

.aao-editor {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: var(--surface-row-bg);
}

.aao-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.aao-editor-header label {
  margin: 0;
}

.aao-editor-actions {
  display: flex;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.aao-empty {
  color: #60717f;
  font-size: 0.92rem;
}

.aao-rule-row {
  display: grid;
  grid-template-columns: minmax(7rem, 0.85fr) 5rem minmax(8rem, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.aao-rule-row input,
.aao-rule-row select {
  min-width: 0;
}

.profile-panel {
  display: grid;
  gap: 1.25rem;
  width: min(100% - (var(--app-space) * 2), 980px);
  margin: var(--app-space) auto;
  box-sizing: border-box;
}

.profile-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.profile-summary > div {
  display: grid;
  align-content: center;
  height: 4rem;
  min-width: 0;
}

.profile-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 8px;
  background: #dcebf5;
  color: #287fb8;
  display: grid;
  place-items: center;
  font-size: 1.65rem;
  flex: 0 0 auto;
}

.profile-summary h2 {
  margin: 0;
  color: #1f2933;
  font-size: clamp(1.45rem, 3vw, 1.8rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.profile-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.profile-detail {
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: var(--surface-row-bg);
  padding: 0.85rem;
  display: grid;
  gap: 0.35rem;
}

.profile-detail span {
  color: #6f8191;
  font-weight: 700;
  font-size: 0.88rem;
}

.profile-detail strong {
  color: #1f2933;
  overflow-wrap: anywhere;
}

.profile-role-badge {
  justify-self: start;
}

.profile-detail .role-pill-admin {
  color: #5b21b6;
}

.profile-detail .role-pill-disponent {
  color: #075985;
}

.profile-detail .role-pill-benutzer {
  color: #2f4b63;
}

.profile-status-value {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.profile-status-light {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.profile-status-light-active {
  background: #2ecc71;
  box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.16), 0 0 14px rgba(46, 204, 113, 0.55);
}

.profile-status-light-inactive {
  background: #e74c3c;
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.14), 0 0 14px rgba(231, 76, 60, 0.48);
}

.profile-form {
  width: 100%;
  max-width: none;
}

.profile-form .form-buttons {
  justify-content: flex-end;
}

.profile-form .form-buttons .button {
  width: auto;
  min-width: 9.5rem;
  height: auto;
  padding: 0.6rem 1rem;
  flex: 0 0 auto;
}

.app-success {
  background: #dff7e8;
  color: #166534;
  border: 1px solid #b8e8c8;
  border-radius: 8px;
  padding: 0.75rem;
  font-weight: 700;
}

.system-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.system-form label {
  font-weight: 700;
  color: #34495e;
  margin-top: 0.5rem;
}

.system-form input[type="text"],
.system-form input[type="password"],
.system-form select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #c8d4df;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 1rem;
  background-color: #f3f7fa;
}

.system-form input:focus,
.system-form select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.18);
  background-color: #f7fafc;
}

.system-form input[readonly],
.system-form input[disabled] {
  background-color: #e3ebf1;
  border-color: #c9d5df;
  color: #6d7f8d;
  cursor: not-allowed;
}

.system-form input[readonly]:focus,
.system-form input[disabled]:focus {
  border-color: #c9d5df;
  box-shadow: none;
  background-color: #e3ebf1;
}

.input-action-wrap {
  position: relative;
}

.input-action-wrap input {
  padding-right: 3rem;
}

.input-action-button {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  width: 2.15rem;
  height: 2.15rem;
  transform: translateY(-50%);
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #287fb8;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.input-action-button:hover,
.input-action-button:focus-visible,
.input-action-button.active {
  border-color: rgba(52, 152, 219, 0.35);
  background: rgba(52, 152, 219, 0.12);
  outline: none;
}

select {
  color: #1f2933;
  background-color: #f3f7fa;
  border-color: #c8d4df;
  color-scheme: light;
}

select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%23287fb8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 0.8rem auto;
  padding-right: 2.45rem;
}

select option,
select optgroup {
  background-color: #f3f7fa;
  color: #1f2933;
  font-weight: 650;
}

select option:checked {
  background-color: #dceeff;
  color: #075985;
}

.system-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: var(--surface-row-bg);
  color: #33485c;
  font-weight: 700;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.system-check input {
  appearance: none;
  width: 2.8rem;
  height: 1.55rem;
  padding: 0;
  border: 1px solid #c8d4df;
  border-radius: 999px;
  background: #dce4ea;
  position: relative;
  flex: 0 0 auto;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.system-check input::after {
  content: "";
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(31, 41, 51, 0.2);
  position: absolute;
  top: 50%;
  left: 0.22rem;
  transform: translateY(-50%);
  transition: left 0.2s ease, background 0.2s ease;
}

.system-check input:checked {
  background: #3498db;
  border-color: #3498db;
}

.system-check input:checked::after {
  left: 1.45rem;
}

.system-check:focus-within {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.18);
}

.user-active-check {
  padding: 0;
  border-color: transparent;
  background: transparent;
}

.user-active-check:focus-within {
  border-color: transparent;
  box-shadow: none;
}

.user-active-check input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.18);
}

.form-hint {
  margin: 0;
  color: #6f8191;
  font-size: 0.9rem;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  padding: var(--app-space);
  gap: var(--app-space);
  max-width: 100%;
  overflow: visible;
}

.card {
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  border-radius: var(--app-radius);
  box-shadow: var(--surface-shadow);
  padding: 1rem;
  flex: 1 1 300px;
  width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.leitstelle-overview-card {
  overflow: visible;
  padding-bottom: 1.25rem;
}

.item {
  margin-bottom: 0.5rem;
}

.status {
  color: #2ecc71;
  font-weight: bold;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.modal-header-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  flex: 1 1 auto;
}

.modal-header-title h2 {
  min-width: 0;
}

.modal-close-button {
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
}

.status-badge,
.typ-badge {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-weight: bold;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-transform: uppercase;
  background: #525252;
}

.status-badge {
  min-width: 6rem;
}

.typ-badge {
  min-width: 3.1rem;
  padding-inline: 0.8rem;
  font-size: 0.78rem;
  letter-spacing: 0;
  line-height: 1.15;
}

.typ-badge-feuerwehr {
  background: #b42318;
  color: #fff7f5;
}

.typ-badge-rettungsdienst {
  background: #eadcc2;
  color: #7a1f1f;
  border: 1px solid rgba(122, 31, 31, 0.22);
}

/* Farbcodierung */
.badge-status-offen,
.badge-status-geplant {
  background: #f1c40f;
  color: black;
}
.badge-status-alarmiert {
  background: #e74c3c;
}
.badge-status-disponiert {
  background: #2ecc71;
}
.badge-status-beendet {
  background: #7f8c8d;
}


.modal-content {
  background: #edf3f7;
  padding: 2rem;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.einsatz-modal-content {
  max-width: 1180px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  box-sizing: border-box;
}

.confirm-modal {
  padding: var(--app-space);
}

.confirm-modal-content {
  width: min(100%, 34rem);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.confirm-modal-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 8px;
  background: #fce4e4;
  color: #c0392b;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
}

.confirm-modal-copy {
  min-width: 0;
}

.confirm-modal-copy h2 {
  margin: 0;
  color: #1f2933;
  font-size: 1.45rem;
}

.confirm-modal-copy p {
  margin: 0.5rem 0 0;
  color: #52606d;
  line-height: 1.45;
}

.confirm-modal-detail {
  font-weight: 700;
}

.confirm-modal-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.einsatz-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 1.5rem;
  align-items: start;
}

.einsatz-form-fields {
  min-width: 0;
}

.modal-content label {
  display: block;
  font-weight: bold;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

.modal-content input[type="text"],
.modal-content input[type="datetime-local"],
.modal-content textarea,
.modal-content select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
}

.modal-content input:focus,
.modal-content textarea:focus,
.modal-content select:focus {
  border-color: #3498db;
  outline: none;
  background-color: #f7fafc;
}

.suggest-field {
  position: relative;
}

.field-suggestions {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 10000;
  background: #f3f7fa;
  border: 1px solid #c8d4df;
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.field-suggestion,
.field-suggestion-hint {
  width: 100%;
  padding: 0.75rem 0.9rem;
  box-sizing: border-box;
}

.field-suggestion {
  border: 0;
  border-bottom: 1px solid #d9e3ec;
  background: transparent;
  color: #1f2933;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.field-suggestion:last-child {
  border-bottom: 0;
}

.field-suggestion:hover,
.field-suggestion:focus-visible {
  background: #dcebf5;
  outline: none;
}

.field-suggestion strong,
.field-suggestion span {
  overflow-wrap: anywhere;
}

.field-suggestion span,
.field-suggestion-hint {
  color: #60717f;
  font-size: 0.9rem;
}

.einsatz-map-panel {
  min-width: 0;
  position: sticky;
  top: 1rem;
}

.einsatz-map-panel h3 {
  margin: 0 0 0.65rem;
}

.einsatz-map-panel-spaced::before {
  content: "";
  display: block;
  height: calc(1.2rem + 0.65rem);
}

.einsatz-map {
  width: 100%;
  min-height: 24rem;
  border-radius: 8px;
  border: 1px solid #c8d4df;
  overflow: hidden;
  background: #edf2f7;
}

.einsatzmittel-editor {
  margin-top: 1.25rem;
}

.einsatzmittel-editor-head,
.einsatzmittel-editor-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.einsatzmittel-editor-head {
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.einsatzmittel-editor-head label {
  margin: 0;
}

.einsatzmittel-table-wrap {
  overflow-x: auto;
  border: 1px solid #c8d4df;
  border-radius: 8px;
  background: #f3f7fa;
}

.einsatzmittel-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  table-layout: fixed;
}

.einsatzmittel-table th,
.einsatzmittel-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #d9e3ec;
  text-align: left;
  vertical-align: middle;
}

.einsatzmittel-table th {
  color: #34495e;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.einsatzmittel-table th:nth-child(1),
.einsatzmittel-table td:nth-child(1) {
  width: auto;
}

.einsatzmittel-table th:nth-child(2),
.einsatzmittel-table td:nth-child(2),
.einsatzmittel-table th:nth-child(3),
.einsatzmittel-table td:nth-child(3),
.einsatzmittel-table th:nth-child(4),
.einsatzmittel-table td:nth-child(4),
.einsatzmittel-table th:nth-child(5),
.einsatzmittel-table td:nth-child(5) {
  width: 4.7rem;
  text-align: center;
}

.einsatzmittel-table th:nth-child(6),
.einsatzmittel-table td:nth-child(6) {
  width: 11rem;
}

.einsatzmittel-table td:first-child strong {
  display: block;
  overflow-wrap: anywhere;
}

.einsatzmittel-table td > span {
  display: block;
  margin-top: 0.2rem;
  color: #60717f;
  font-size: 0.9rem;
}

.einsatzmittel-empty {
  color: #60717f;
  text-align: center;
}

.einsatzmittel-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .einsatzmittel-table {
    min-width: 0;
    padding: 0.5rem;
  }

  .einsatzmittel-table thead {
    display: none;
  }

  .einsatzmittel-table,
  .einsatzmittel-table tbody {
    display: block;
    width: 100%;
  }

  /* Jede Zeile wird zur Karte: Funkrufname als Ueberschrift, darunter die
     Zeitstempel als Viererleiste, darunter die Aktionen rechtsbuendig. */
  .einsatzmittel-table tr {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
      "name name name name"
      "v    s3   s4   s1"
      "akt  akt  akt  akt";
    gap: 0.5rem 0.4rem;
    width: auto;
    margin: 0 0 0.5rem;
    padding: 0.85rem 0.9rem;
    background: #fff;
    border: 1px solid #d9e3ec;
    border-radius: 8px;
  }

  .einsatzmittel-table tr:last-child {
    margin-bottom: 0;
  }

  .einsatzmittel-table td {
    display: block;
    width: auto;
    padding: 0;
    border-bottom: 0;
    text-align: center;
  }

  /* Ohne diesen Reset behalten die Zellen die festen Breiten der
     Tabellenansicht (4.7rem bzw. 11rem) und stauchen die Karte. */
  .einsatzmittel-table td:nth-child(n+2):nth-child(-n+6) {
    width: auto;
  }

  .einsatzmittel-table td::before {
    content: attr(data-label);
    color: #60717f;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
  }

  /* Funkrufname als Kartenueberschrift */
  .einsatzmittel-table td:nth-child(1) {
    grid-area: name;
    text-align: left;
  }

  .einsatzmittel-table td:nth-child(1)::before {
    content: none;
  }

  .einsatzmittel-table td:nth-child(1) strong {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
  }

  /* Zeitstempel: sichtbar, aber zurueckgenommen */
  .einsatzmittel-table td:nth-child(2) { grid-area: v; }
  .einsatzmittel-table td:nth-child(3) { grid-area: s3; }
  .einsatzmittel-table td:nth-child(4) { grid-area: s4; }
  .einsatzmittel-table td:nth-child(5) { grid-area: s1; }

  .einsatzmittel-table td:nth-child(n+2):nth-child(-n+5) {
    padding: 0.3rem 0.2rem;
    color: #60717f;
    font-size: 0.95rem;
    background: #f3f7fa;
    border-radius: 6px;
    font-variant-numeric: tabular-nums;
  }

  .einsatzmittel-table td:nth-child(n+2):nth-child(-n+5)::before {
    display: block;
    margin-bottom: 0.1rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    opacity: 0.75;
  }

  /* Aktionen nebeneinander. Der Selektor braucht die td-Spezifitaet, sonst
     gewinnt die display-block-Regel oben. */
  .einsatzmittel-table td.einsatzmittel-row-actions {
    grid-area: akt;
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
    width: auto;
    white-space: normal;
  }

  .einsatzmittel-table td.einsatzmittel-row-actions::before {
    content: none;
  }

  .einsatzmittel-table td.einsatzmittel-row-actions .button {
    grid-column: auto;
    justify-self: auto;
  }

  /* Spezifitaet muss td:nth-child(1) schlagen, sonst bleibt der Platzhalter
     linksbuendig und die leeren Rasterzeilen erzeugen toten Zwischenraum. */
  .einsatzmittel-table td.einsatzmittel-empty {
    grid-area: 1 / 1 / -1 / -1;
    padding: 0.85rem;
    text-align: center;
  }

  .einsatzmittel-table td.einsatzmittel-empty::before {
    content: "";
  }
}

.einsatzmittel-status-vorgeschlagen {
  background: rgba(217, 119, 6, 0.15);
  color: #92400e;
}

.einsatzmittel-status-alarmiert {
  background: rgba(220, 38, 38, 0.15);
  color: #991b1b;
}

.einsatzmittel-status-uebernommen {
  background: rgba(37, 99, 235, 0.14);
  color: #1d4ed8;
}

.einsatzmittel-status-eingetroffen {
  background: rgba(22, 163, 74, 0.15);
  color: #166534;
}

.einsatzmittel-status-frei {
  background: rgba(71, 85, 105, 0.14);
  color: #334155;
}

.einsatzmittel-browser-modal {
  max-width: min(860px, calc(100vw - 2rem));
}

.einsatzmittel-browser-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.6fr) minmax(150px, 0.6fr);
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.einsatzmittel-browser-list {
  display: grid;
  gap: 0.45rem;
  max-height: 60vh;
  overflow: auto;
}

.einsatzmittel-browser-row {
  display: grid;
  grid-template-columns: auto minmax(0, 0.8fr) minmax(0, 1.2fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  background: #f3f7fa;
  color: #1f2933;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.einsatzmittel-browser-row:hover,
.einsatzmittel-browser-row:focus-visible {
  border-color: #3498db;
  background: #dcebf5;
  outline: none;
}

.einsatzmittel-browser-row small {
  color: #60717f;
  overflow-wrap: anywhere;
}

.standort-map-panel {
  margin-top: 1rem;
}

.standort-map {
  width: 100%;
  min-height: 16rem;
  border-radius: 8px;
  border: 1px solid #c8d4df;
  overflow: hidden;
  background: #edf2f7;
}

.map-status {
  margin: 0.75rem 0 0;
  color: #60717f;
  font-size: 0.92rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.einsatz-overview-map-panel {
  margin-bottom: 1rem;
}

.einsatz-overview-map {
  width: 100%;
  min-height: 22rem;
  border-radius: 8px;
  border: 1px solid #c8d4df;
  overflow: hidden;
  background: #edf2f7;
}

.einsatz-map.leaflet-container,
.standort-map.leaflet-container,
.einsatz-overview-map.leaflet-container,
.alarm-route-map.leaflet-container,
.einsatz-map .leaflet-grab,
.standort-map .leaflet-grab,
.einsatz-overview-map .leaflet-grab,
.alarm-route-map .leaflet-grab,
.einsatz-map .leaflet-dragging,
.standort-map .leaflet-dragging,
.einsatz-overview-map .leaflet-dragging,
.alarm-route-map .leaflet-dragging,
.einsatz-map .leaflet-interactive,
.standort-map .leaflet-interactive,
.einsatz-overview-map .leaflet-interactive,
.alarm-route-map .leaflet-interactive,
.einsatz-map .leaflet-marker-icon,
.standort-map .leaflet-marker-icon,
.einsatz-overview-map .leaflet-marker-icon,
.alarm-route-map .leaflet-marker-icon {
  cursor: default !important;
}

.einsatz-map-marker {
  min-width: 2.75rem;
  height: 2rem;
  padding: 0 0.45rem;
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  cursor: default;
  font-family: sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.einsatz-map-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.48rem;
  width: 0.65rem;
  height: 0.65rem;
  background: inherit;
  border-right: 2px solid rgba(255, 255, 255, 0.92);
  border-bottom: 2px solid rgba(255, 255, 255, 0.92);
  transform: translateX(-50%) rotate(45deg);
}

.einsatz-map-marker-offen,
.einsatz-map-marker-geplant {
  background: #f1c40f;
  color: #1f2933;
}

.einsatz-map-marker-alarmiert {
  background: #e74c3c;
}

.einsatz-map-marker-disponiert {
  background: #2ecc71;
  color: #12301f;
}

.einsatz-map-marker-beendet {
  background: #7f8c8d;
}

.form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.fahrzeug-auswahl {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fahrzeug-auswahl li {
  margin: 0;
}

.fahrzeug-eintrag {
  display: flex;
  align-items: center;
  background: #ecf0f1;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  gap: 0.8rem;
  user-select: none;
  height: auto;
}

.fz-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
  line-height: 1.2;
  font-weight: bold;
  font-size: 1rem;
}

.fz-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.alarm-kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1rem;
  padding: 1rem;
}

.alarm-fahrzeug {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: clamp(8.5rem, 15vh, 13rem);
  height: auto;
  flex: 1 1 200px;
  background: #ca3b3b;
  border-radius: 10px;
  padding: 1rem;
  font-size: clamp(1.25rem, 2.2vw, 2.6rem);
  text-align: center;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
  position: relative;
}

.badge {
  display: inline-block;
  background: #616161b0;
  color: black;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  text-align: center;
  line-height: 1.2;
  min-width: 90px;
}

.status-1 { background: #2cd82c; color: black; }
.status-2 { background: #10970b; color: black; }
.status-3 { background: #f1c40f; color: black; }
.status-4 { background: #e67e22; color: black; }
.status-5 { background: #f10606; color: black; }
.status-6 { background: #9da1a1; color: black; }
.status-7 { background: #c43f81; color: black; }
.status-8 { background: #5f3a1c; color: black; }

.button {
  background: #f4f8fb;
  color: #34495e;
  border: 1px solid #d9e3ec;
  min-height: 2.75rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.alarm-fahrzeug strong {
  overflow-wrap: anywhere;
}

.button i {
  display: block;
  line-height: 1;
  margin: 0;
}

.button:hover {
  background: #e7f1f8;
  border-color: #3498db;
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.14);
  transform: translateY(-1px);
}

.button:focus-visible {
  outline: none;
  background: #e7f1f8;
  border-color: #3498db;
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.14);
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.cancel {
  background: #fff7f6;
  color: #9f2a20;
  border-color: #f1c0ba;
}

.secondary {
  background: #f4f8fb;
  color: #34495e;
  border-color: #d9e3ec;
}

.cancel:hover {
  background: #fdecea;
  border-color: #e74c3c;
  box-shadow: 0 8px 20px rgba(231, 76, 60, 0.14);
}

.cancel:focus-visible {
  background: #fdecea;
  border-color: #e74c3c;
  box-shadow: 0 8px 20px rgba(231, 76, 60, 0.14);
}

.secondary:hover {
  background: #e7f1f8;
}

.secondary:focus-visible {
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.14);
}

.list-actions .button,
.einsatz-buttons .button,
.fahrzeug-buttons .button,
.form-buttons .button,
.user-actions .button,
.system-panel-header .button {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  flex: 0 0 auto;
}

.fahrzeug-eintrag.selected {
  background: #3498db;
  color: white;
}

.fahrzeug-eintrag.selected .typ-badge {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.list-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}


.alarm-main {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
  align-items: stretch;
  gap: var(--app-space);
  padding: var(--app-space);
}

/* Alarm-Display: Einsatz-Kachel */
.einsatz-kachel {
  grid-column: 1;
  grid-row: 1;
  background: #e26c5f;
  color: white;
  margin: 0;
  border-radius: var(--app-radius);
  padding: clamp(1.2rem, 2.5vw, 2.5rem);
  text-align: center;
  font-size: clamp(1rem, 1.35vw, 1.55rem);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
  min-height: clamp(14rem, 34vh, 28rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.75rem, 1.4vw, 1.5rem);
}

.alarm-kacheln {
  grid-column: 1 / -1;
}

.einsatz-kachel h1 {
  align-self: center;
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.4rem, 5.4vw, 5.8rem);
  line-height: 1.02;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.einsatz-kachel p {
  margin: 0;
}

.alarm-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: clamp(0.95rem, 1.4vw, 1.4rem);
}

.alarm-address {
  align-self: center;
  max-width: 42ch;
  font-size: clamp(1.15rem, 1.75vw, 2.15rem);
  line-height: 1.18;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.alarm-description {
  font-size: clamp(1rem, 1.35vw, 1.55rem);
  line-height: 1.25;
  max-width: 56ch;
  align-self: center;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.alarm-route-card {
  grid-column: 2;
  grid-row: 1;
  display: block;
  padding: 0;
  width: 100%;
  min-width: 0;
  min-height: 0;
}

.alarm-route-map {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  border-radius: var(--app-radius);
  overflow: hidden;
  background: #dce8ef;
}

.alarm-route-marker {
  display: grid;
  place-items: center;
}

.alarm-route-marker span {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22);
  color: #0f172a;
  font-weight: 900;
  font-size: 0.82rem;
  line-height: 1;
}

.alarm-route-marker-einsatz span {
  background: #e74c3c;
  color: #fff;
}

.alarm-route-marker-standort span {
  background: #3498db;
  color: #fff;
  font-size: 0.95rem;
}

.clock {
  font-size: 1.5rem;
  font-family: monospace;
}

@keyframes blink-bg {
  0%, 100% { background-color: #e74c3c; }
  50% { background-color: #ff0000; }
}

.blink-bg {
  animation: blink-bg 1s infinite;
  color: inherit;
  transition: color 0.2s ease;
}

.ansage-icon {
  margin-left: 1rem;
  font-size: 1.3rem;
  animation: pulsieren 1s infinite;
}

/* optional: sanftes Pulsieren */
@keyframes pulsieren {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}



.einsatz-zeile,
.fz-zeile {
  flex: 1 1 60%;
  min-width: 0;
  overflow-wrap: break-word;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.4rem; /* optional, für visuelle Höhe */
}

.fahrzeug-zeile,
.fahrzeugart-zeile {
  display: grid;
  grid-template-columns: 5.9rem minmax(0, 1fr);
  gap: 0.75rem;
}

.fahrzeug-zeile .typ-badge,
.fahrzeugart-zeile .typ-badge {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.einsatz-info {
  font-weight: bold;
  font-size: 1rem;
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.einsatz-ort {
  color: #52606d;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.einsatz-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  color: #6f8191;
  font-size: 0.88rem;
  font-weight: 600;
}

.einsatz-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.einsatz-meta i {
  width: 0.95rem;
  text-align: center;
  color: #52606d;
}

.overview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.overview-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.35rem;
  margin: 0;
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  background: #e5edf3;
}

.overview-new-button {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  flex: 0 0 auto;
}

.overview-switch-button {
  min-height: 2.5rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #52606d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.overview-switch-button.active,
.overview-switch-button:hover,
.overview-switch-button:focus-visible {
  background: #f4f8fb;
  border-color: #c8d4df;
  color: #1f2933;
  outline: none;
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.1);
}

.einsatzmittel-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
  gap: 1rem;
}

.standort-status-group {
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  background: #f4f8fb;
  padding: 1rem;
  min-width: 0;
}

.standort-status-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  min-width: 0;
}

.standort-status-header strong,
.standort-status-header small {
  display: block;
}

.standort-status-header strong {
  color: #1f2933;
  font-size: 1.08rem;
}

.standort-status-header small {
  margin-top: 0.2rem;
  color: #6f8191;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.standort-status-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  background: #dcebf5;
  color: #287fb8;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.einsatzmittel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.einsatzmittel-card {
  min-height: 4.4rem;
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  background: #edf3f7;
  padding: 0.85rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  position: relative;
}

.einsatzmittel-name {
  color: #1f2933;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.status-select {
  position: relative;
  flex: 0 0 auto;
}

.status-select-trigger {
  border: 0;
  cursor: pointer;
  width: 2.45rem;
  height: 2.45rem;
  min-width: 2.45rem;
  min-height: 2.45rem;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  font-size: 1rem;
}

.status-select-trigger:disabled {
  cursor: wait;
  opacity: 0.76;
}

.status-select-trigger:hover,
.status-select-trigger:focus-visible {
  outline: 2px solid rgba(52, 152, 219, 0.45);
  outline-offset: 2px;
}

.status-select-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: auto;
  z-index: 25;
  width: max-content;
  min-width: 8.5rem;
  max-width: min(12rem, calc(100vw - 3rem));
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  background: #f4f8fb;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
  padding: 0.45rem;
  display: grid;
  gap: 0.35rem;
}

.status-select-option {
  width: 100%;
  border: 0;
  cursor: pointer;
  min-height: 2.15rem;
  min-width: 2.75rem;
}

.status-select-option:hover,
.status-select-option:focus-visible,
.status-select-option[aria-selected="true"] {
  outline: 2px solid rgba(52, 152, 219, 0.5);
  outline-offset: 1px;
}

.einsatz-filter-bar {
  --einsatz-filter-height: 2.85rem;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px);
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.einsatz-filter-input {
  min-width: 0;
  height: var(--einsatz-filter-height);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.75rem;
  border: 1px solid #c8d4df;
  border-radius: 8px;
  background: #f3f7fa;
  box-sizing: border-box;
}

.einsatz-filter-input i {
  color: #6f8191;
}

.einsatz-filter-input input,
.einsatz-filter-bar select {
  width: 100%;
  min-width: 0;
  height: calc(var(--einsatz-filter-height) - 2px);
  border: 0;
  background: transparent;
  color: #1f2933;
  font: inherit;
  box-sizing: border-box;
}

.einsatz-filter-input input:focus {
  outline: none;
  border: 0;
  box-shadow: none;
}

.einsatz-filter-bar select {
  border: 1px solid #c8d4df;
  border-radius: 8px;
  background: #f3f7fa;
  padding: 0 0.75rem;
  box-sizing: border-box;
  appearance: none;
}

.einsatz-filter-input:focus-within,
.einsatz-filter-bar select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.18);
  background: #f7fafc;
}

.einsatz-sort-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.sort-button {
  min-height: 2.2rem;
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  background: #e5edf3;
  color: #34495e;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.sort-button:hover,
.sort-button:focus-visible {
  background: #e3edf6;
  border-color: #3498db;
  outline: none;
}

.empty-state {
  margin: 1rem 0 0;
  color: #6f8191;
  font-weight: 700;
}

.einsatz-eintrag,
.fahrzeug-eintrag {
  background: var(--surface-row-bg);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  box-shadow: 0 2px 4px rgba(31, 41, 51, 0.05);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap; /* erlaubt Umbruch */
  gap: 0.5rem;
  justify-content: space-between;
  min-width: 0;
}

.einsatz-eintrag-clickable {
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.einsatz-eintrag-clickable:hover,
.einsatz-eintrag-clickable:focus-visible {
  background: var(--surface-hover-bg);
  border-color: #3498db;
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.16);
  outline: none;
  transform: translateY(-1px);
}

.einsatz-buttons,
.fahrzeug-buttons {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.fz-status-dropdown {
  height: 2.6rem;
  font-size: 1rem;
  padding: 0.3rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  color: #333;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2210%22%20height%3D%225%22%20viewBox%3D%220%200%2010%205%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M0%200L5%205L10%200H0Z%22%20fill%3D%22%23333%22/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 0.65rem auto;
  padding-right: 2rem; /* Platz für Icon */
  transition: border 0.2s ease;
  cursor: pointer;
}

.fz-status-dropdown:focus {
  border-color: #3498db;
}

.gruppen-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.badge-gruppe {
  background: #ddd;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.badge-gruppe:hover {
  background: #3498db;
  color: white;
}

@media (max-width: 900px) {
  .login-page,
  .dashboard-page {
    padding: 1rem;
    align-items: stretch;
    place-items: stretch;
  }

  .login-shell,
  .dashboard-shell {
    width: 100%;
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .login-brand,
  .dashboard-hero {
    padding: 1.5rem;
    gap: 1.25rem;
  }

  .login-brand h1,
  .dashboard-hero h1 {
    font-size: clamp(2.1rem, 8vw, 2.8rem);
  }

  .login-panel,
  .dashboard-content {
    padding: 1.5rem;
  }

  .system-layout,
  .verwaltung-layout,
  .einsatz-form-layout {
    grid-template-columns: 1fr;
  }

  .verwaltung-overview {
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  }

  .module-card .module-arrow {
    display: none;
  }

  .einsatz-map-panel {
    position: static;
  }

  .aao-rule-row {
    grid-template-columns: minmax(0, 1fr) 5rem auto;
  }

  .aao-rule-row select:last-of-type {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .app-toolbar {
    margin: 0.75rem 0.75rem 0;
    padding: 0.75rem;
  }

  .app-toolbar h1 {
    font-size: clamp(1.35rem, 6vw, 1.65rem);
  }

  .side-navigation {
    right: 0.75rem;
    width: min(23rem, calc(100vw - 1.5rem));
    padding: 1rem;
  }

  .side-navigation-link {
    min-height: 3.75rem;
  }

  .grid,
  .system-layout,
  .verwaltung-layout,
  .verwaltung-overview,
  .section-backbar {
    padding: 0.75rem;
  }

  .card,
  .system-panel {
    padding: 0.75rem;
  }

  .dashboard-header,
  .list-header,
  .system-panel-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .module-card {
    grid-template-columns: 2.75rem minmax(0, 1fr);
    min-height: 5.5rem;
    padding: 0.85rem;
  }

  .module-icon {
    width: 2.75rem;
    height: 2.75rem;
  }

  .module-arrow {
    display: none;
  }

  .verwaltung-row,
  .user-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .user-row-head {
    display: none;
  }

  .user-actions {
    justify-content: flex-start;
  }

  .einsatz-filter-bar {
    grid-template-columns: 1fr;
  }

  .einsatz-sort-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sort-button {
    justify-content: center;
    min-width: 0;
  }

  .einsatz-eintrag {
    align-items: stretch;
  }

  .alarm-kacheln {
    grid-template-columns: 1fr;
    padding: 0.75rem;
  }

  .einsatz-kachel {
    margin: 0.75rem;
    min-height: auto;
    padding: 1.25rem;
  }

  .einsatz-kachel h1 {
    max-width: 18ch;
    font-size: clamp(2rem, 11vw, 3.7rem);
  }

  .alarm-address {
    font-size: clamp(1.1rem, 5vw, 1.8rem);
  }

  .alarm-description {
    font-size: clamp(1rem, 4vw, 1.35rem);
  }

  .alarm-route-card {
    margin: 0.75rem;
  }

  .alarm-route-map {
    min-height: 18rem;
  }
}

@media (max-width: 768px) {
  .side-navigation {
    right: 0.75rem;
    width: min(23rem, calc(100vw - 1.5rem));
    padding: 1rem;
  }

  .side-navigation-link {
    min-height: 4rem;
  }

  .card {
    padding: 1rem;
  }

  .app-notice {
    flex-wrap: wrap;
  }

  .app-notice-meta {
    flex: 1 1 auto;
  }

  .app-notice-close {
    margin-left: auto;
  }

  .fz-zeile,
  .einsatz-zeile {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .einsatz-buttons {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }

  .einsatz-buttons .button {
    width: 2.75rem;
    height: 2.75rem;
    justify-content: center;
  }

  .form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .form-footer button,
  .fahrzeug-buttons button {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .form-footer button,
  .fahrzeug-buttons button {
    width: 100%;
  }

  .fahrzeug-buttons select {
    display: none;
  }

  input,
  select,
  textarea {
    width: 100%;
    box-sizing: border-box;
  }

  .fahrzeug-auswahl li {
    flex-direction: column;
    align-items: flex-start;
  }

  .fahrzeug-auswahl label {
    width: 100%;
  }

  .einsatz-filter-bar {
    grid-template-columns: 1fr;
  }

  .overview-toolbar {
    align-items: stretch;
  }

  .overview-switch {
    flex: 1 1 auto;
    min-width: 0;
  }

  .overview-switch-button {
    min-width: 0;
    padding: 0.45rem 0.55rem;
  }

  .overview-new-button {
    height: auto;
    min-height: 2.75rem;
  }

  .einsatzmittel-overview,
  .einsatzmittel-grid {
    grid-template-columns: 1fr;
  }

  .einsatzmittel-card {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .status-select {
    align-self: center;
  }

  .status-select-menu {
    left: 0;
    right: auto;
  }

  .einsatz-meta {
    flex-direction: column;
    gap: 0.25rem;
  }

  .clock {
    display: none;
  }
  .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.75);
  }

  .modal-content {
    width: 100%;
    height: auto;
    max-height: 100%;
    border-radius: 0;
    margin: 0;
    padding: 1.5rem;
    box-sizing: border-box;
    overflow-y: auto;
  }

  .confirm-modal-content {
    border-radius: var(--app-radius);
    grid-template-columns: 1fr;
  }

  .confirm-modal-icon {
    width: 2.75rem;
    height: 2.75rem;
  }

  .confirm-modal-actions {
    justify-content: stretch;
  }

  .confirm-modal-actions .button {
    flex: 1 1 11rem;
  }

  .einsatz-form-layout {
    grid-template-columns: 1fr;
  }

  .einsatz-map-panel {
    position: static;
  }

  .einsatz-map {
    min-height: 18rem;
  }

  .standort-map {
    min-height: 15rem;
  }

  .einsatz-overview-map {
    min-height: 17rem;
  }

  body.modal-open {
    overflow: hidden;
  }

  .login-page {
    padding: 1rem;
    align-items: stretch;
  }

  .login-shell,
  .dashboard-shell {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .login-brand,
  .dashboard-hero {
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .login-brand h1,
  .dashboard-hero h1 {
    font-size: 2.35rem;
  }

  .login-panel,
  .dashboard-content {
    padding: 1.5rem;
  }

  .dashboard-page {
    padding: 1rem;
    align-items: stretch;
  }

  .system-layout,
  .verwaltung-layout {
    grid-template-columns: 1fr;
  }

  .alarm-main {
    grid-template-columns: 1fr;
  }

  .einsatz-kachel,
  .alarm-route-card {
    grid-column: auto;
    grid-row: auto;
  }

  .alarm-kacheln {
    grid-column: auto;
  }

  .user-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .user-row-head {
    display: none;
  }

  .user-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .side-navigation {
    right: 0.75rem;
    width: min(23rem, calc(100vw - 1.5rem));
    padding: 1rem;
  }

  .grid,
  .system-layout,
  .verwaltung-layout,
  .verwaltung-overview,
  .section-backbar {
    padding: 0.75rem;
  }

  .card,
  .system-panel {
    padding: 0.75rem;
  }

  .dashboard-header,
  .list-header,
  .system-panel-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .module-card {
    grid-template-columns: 2.75rem minmax(0, 1fr);
    min-height: 5.5rem;
    padding: 0.85rem;
  }

  .module-icon {
    width: 2.75rem;
    height: 2.75rem;
  }

  .module-arrow {
    display: none;
  }

  .verwaltung-row,
  .user-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .einsatz-sort-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sort-button {
    justify-content: center;
    min-width: 0;
  }

  .alarm-kacheln {
    grid-template-columns: 1fr;
    padding: 0.75rem;
  }

  .einsatz-kachel {
    margin: 0.75rem;
    min-height: auto;
    padding: 1.25rem;
  }

  .alarm-route-map {
    min-height: 16rem;
  }
}

@media (max-width: 480px) {
  .status-badge,
  .typ-badge {
    font-size: 0.7rem;
  }

  .login-page,
  .dashboard-page {
    padding: 0;
    place-items: stretch;
  }

  .login-shell,
  .dashboard-shell {
    min-height: 100vh;
    border-radius: 0;
  }

  .login-brand,
  .login-panel,
  .dashboard-hero,
  .dashboard-content {
    padding: 1.25rem;
  }

  .login-mark {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.6rem;
  }

  .module-card {
    min-height: 8.5rem;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 0.75rem;
  }

  .module-arrow {
    display: none;
  }

  .module-copy {
    justify-items: center;
  }
}



body.dark-mode {
  background:
    linear-gradient(135deg, rgba(22, 28, 34, 0.96), rgba(12, 17, 22, 0.98)),
    radial-gradient(circle at top left, rgba(52, 152, 219, 0.18), transparent 32rem);
  background-attachment: fixed;
  color: #e0e0e0;
}

body.dark-mode {
  --surface-bg: rgba(42, 42, 42, 0.94);
  --surface-bg-solid: #2a2a2a;
  --surface-row-bg: #333;
  --surface-hover-bg: #333f48;
  --surface-border: rgba(63, 74, 82, 0.9);
  --surface-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

/* Container und Karten */
body.dark-mode .card,
body.dark-mode .modal-content,
body.dark-mode .fz-zeile,
body.dark-mode .einsatz-zeile {
  background-color: #2a2a2a;
  color: #e0e0e0;
  border-color: #3a3a3a;
}

body.dark-mode .app-alert {
  background: #3a1f1f;
  border-color: #6a2f2f;
  color: #f0c0c0;
}

body.dark-mode .app-notice {
  background: #26323b;
  border-color: #3a4a55;
  color: #e0e0e0;
}

body.dark-mode .app-notice-meta {
  color: #c9c9c9;
}

body.dark-mode .app-notice-success {
  background: #203a2a;
  border-color: #35694b;
  color: #d9f3e1;
}

body.dark-mode .app-notice-close:hover,
body.dark-mode .app-notice-close:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .app-notice-error {
  background: #3a1f1f;
  border-color: #6a2f2f;
  color: #f0c0c0;
}

body.dark-mode .app-notice-warning {
  background: #3a321f;
  border-color: #735d24;
  color: #ffe6a8;
}

body.dark-mode .app-toolbar {
  background: rgba(42, 42, 42, 0.94);
  border-color: rgba(63, 74, 82, 0.9);
  color: #e0e0e0;
}

body.dark-mode .app-toolbar .login-eyebrow {
  color: #8ac7f2;
}

body.dark-mode .side-navigation {
  background: #242a30;
  color: #e0e0e0;
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.45);
}

body.dark-mode .navigation-backdrop {
  background: rgba(0, 0, 0, 0.58);
}

body.dark-mode .side-navigation-user,
body.dark-mode .side-navigation-link small {
  color: #c9c9c9;
}

body.dark-mode .side-navigation-link,
body.dark-mode .side-navigation-action {
  background: #2f363d;
  border-color: #3f4a52;
  color: #e0e0e0;
}

body.dark-mode .side-navigation-link > i {
  background: #263746;
  color: #8ac7f2;
}

body.dark-mode .side-navigation-link:hover,
body.dark-mode .side-navigation-link:focus-visible,
body.dark-mode .side-navigation-link.active,
body.dark-mode .side-navigation-action:hover,
body.dark-mode .side-navigation-action:focus-visible {
  background: #333f48;
  border-color: #3498db;
}

body.dark-mode .side-navigation-action.danger {
  color: #f0c0c0;
}

body.dark-mode .system-panel {
  background: #2a2a2a;
  color: #e0e0e0;
}

body.dark-mode .login-page,
body.dark-mode .dashboard-page {
  background:
    linear-gradient(145deg, rgba(18, 23, 28, 0.98) 0%, rgba(27, 35, 42, 0.98) 54%, rgba(35, 48, 58, 0.98) 100%);
}

body.dark-mode .dashboard-shell {
  background: #20262c;
  border-color: rgba(114, 138, 154, 0.24);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

body.dark-mode .login-shell {
  background: #20262c;
  border-color: rgba(114, 138, 154, 0.24);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

body.dark-mode .login-panel {
  background: #2a2a2a;
  color: #e0e0e0;
}

body.dark-mode .login-panel-header h2 {
  color: #e0e0e0;
}

body.dark-mode .login-brand {
  background:
    linear-gradient(135deg, #263847 0%, #22313e 58%, #1d2934 100%);
  color: #f8fbff;
  border-right-color: rgba(126, 163, 188, 0.2);
}

body.dark-mode .login-brand .login-eyebrow {
  color: #9fd2f5;
}

body.dark-mode .login-brand .login-system-status {
  color: #b9cad8;
}

body.dark-mode .login-lock {
  background: #2f363d;
  color: #e0e0e0;
}

body.dark-mode .login-input {
  background: #333b42;
  border-color: #555;
}

body.dark-mode .login-input:focus-within {
  background: #37424a;
  border-color: #58aee8;
  box-shadow: 0 0 0 3px rgba(88, 174, 232, 0.2);
}

body.dark-mode .login-input input {
  color: #e0e0e0;
}

body.dark-mode .dashboard-content {
  background: #2a2a2a;
  color: #e0e0e0;
}

body.dark-mode .dashboard-hero {
  background:
    linear-gradient(135deg, #263847 0%, #22313e 58%, #1d2934 100%);
  color: #f8fbff;
  border-right-color: rgba(126, 163, 188, 0.2);
}

body.dark-mode .dashboard-hero .login-eyebrow {
  color: #9fd2f5;
}

body.dark-mode .dashboard-hero .login-system-status,
body.dark-mode .dashboard-subtitle {
  color: #b9cad8;
}

body.dark-mode .dashboard-header h2 {
  color: #e0e0e0;
}

body.dark-mode .dashboard-header p {
  color: #c9c9c9;
}

body.dark-mode .dashboard-user-link:hover,
body.dark-mode .dashboard-user-link:focus-visible {
  color: #7cc7ff;
}

body.dark-mode .dashboard-action-button {
  background: #2f363d;
  border-color: #3f4a52;
  color: #e0e0e0;
}

body.dark-mode .dashboard-action-button:hover,
body.dark-mode .dashboard-action-button:focus-visible {
  background: #333f48;
  border-color: #3498db;
}

body.dark-mode .dashboard-action-button.danger {
  color: #f0c0c0;
}

body.dark-mode .module-card {
  background: #2f363d;
  border-color: #3f4a52;
  color: #e0e0e0;
}

body.dark-mode .module-card:hover,
body.dark-mode .module-card:focus-visible {
  background: #36444e;
  border-color: #3498db;
}

body.dark-mode .module-icon {
  background: #263746;
  color: #8ac7f2;
}

body.dark-mode .module-copy span,
body.dark-mode .module-arrow {
  color: #c9c9c9;
}

body.dark-mode .user-row {
  background: #333;
}

body.dark-mode .verwaltung-row {
  background: #333;
}

body.dark-mode .organisation-inline-form {
  background: #333;
  border-color: #3f4a52;
}

body.dark-mode .organisation-inline-form input {
  background: #2f363d;
  border-color: #526778;
  color: #e0e0e0;
}

body.dark-mode .organisation-inline-form input::placeholder {
  color: #b9cad8;
}

body.dark-mode .organisation-inline-form input:focus {
  background: #333f48;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
  color: #f4fbff;
}

body.dark-mode .verwaltung-row-clickable:hover,
body.dark-mode .verwaltung-row-clickable:focus-visible {
  background: #333f48;
  border-color: #3498db;
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.18);
}

body.dark-mode .verwaltung-module-card {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: #e0e0e0;
}

body.dark-mode .verwaltung-row p {
  color: #c9c9c9;
}

body.dark-mode .role-pill-admin {
  background: rgba(124, 58, 237, 0.25);
  color: #ddd6fe;
}

body.dark-mode .role-pill-disponent {
  background: rgba(14, 116, 144, 0.28);
  color: #bae6fd;
}

body.dark-mode .role-pill-benutzer {
  background: rgba(148, 163, 184, 0.2);
  color: #f1f5f9;
  border-color: rgba(203, 213, 225, 0.28);
}

body.dark-mode .status-pill-manual {
  background: rgba(217, 119, 6, 0.24);
  color: #fed7aa;
}

body.dark-mode .status-pill-auto {
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
}

body.dark-mode .subsection-title,
body.dark-mode .form-split h3 {
  color: #e0e0e0;
}

body.dark-mode .verwaltung-row-muted,
body.dark-mode .form-split {
  background: rgba(51, 63, 72, 0.45);
}

body.dark-mode .verwaltung-row-clickable.active {
  background: #263746;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.16);
}

body.dark-mode .alarmgruppen-nested-list {
  border-left-color: rgba(159, 210, 242, 0.24);
}

body.dark-mode .alarmgruppe-add-row {
  background: rgba(51, 63, 72, 0.24);
  border-color: #526778;
  color: #9fd2f2;
}

body.dark-mode .alarmgruppe-add-row:hover,
body.dark-mode .alarmgruppe-add-row:focus-visible {
  background: rgba(51, 63, 72, 0.48);
  border-color: #3498db;
}

body.dark-mode .compact-empty-state {
  background: rgba(51, 63, 72, 0.38);
  border-color: #555;
  color: #c9c9c9;
}

body.dark-mode .einheit-choice {
  background: #333;
  border-color: #555;
  color: #e0e0e0;
}

body.dark-mode .einheit-choice i {
  color: #8ac7f2;
}

body.dark-mode .einheit-choice:hover,
body.dark-mode .einheit-choice:focus-visible {
  background: #333f48;
  border-color: #3498db;
}

body.dark-mode .einheit-choice.active {
  background: #263746;
  border-color: #3498db;
  color: #dceeff;
}

body.dark-mode .einheit-choice.active i {
  color: #dceeff;
}

body.dark-mode .system-form .einheit-choice-input input[type="text"],
body.dark-mode .system-form .einheit-choice-input input[type="text"]:focus {
  background: transparent;
  border: 0;
  color: #e0e0e0;
  box-shadow: none;
}

body.dark-mode .einheit-choice-close:hover,
body.dark-mode .einheit-choice-close:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .aao-summary,
body.dark-mode .aao-empty {
  color: #c9c9c9;
}

body.dark-mode .profile-avatar {
  background: #263746;
  color: #8ac7f2;
}

body.dark-mode .profile-summary h2,
body.dark-mode .profile-detail strong {
  color: #e0e0e0;
}

body.dark-mode .profile-detail .role-pill-admin {
  color: #ddd6fe;
}

body.dark-mode .profile-detail .role-pill-disponent {
  color: #bae6fd;
}

body.dark-mode .profile-detail .role-pill-benutzer {
  color: #dbeafe;
}

body.dark-mode .profile-detail {
  background: #333;
  border-color: #3f4a52;
}

body.dark-mode .profile-detail span {
  color: #c9c9c9;
}

body.dark-mode .app-success {
  background: #1f3a2a;
  border-color: #2d6a42;
  color: #dff7e8;
}

body.dark-mode .user-row-head {
  background: transparent;
  color: #c9c9c9;
}

body.dark-mode .system-form label {
  color: #ddd;
}

body.dark-mode .system-form input,
body.dark-mode .system-form select {
  background-color: #333;
  color: #e0e0e0;
  border-color: #555;
}

body.dark-mode .system-check {
  background: #333;
  border-color: #3f4a52;
  color: #e0e0e0;
}

body.dark-mode .user-active-check {
  background: transparent;
  border-color: transparent;
}

body.dark-mode .system-check input[type="checkbox"] {
  background: #48545f;
  border-color: #5a6671;
}

body.dark-mode .system-check input[type="checkbox"]:checked {
  background: #3498db;
  border-color: #3498db;
}

body.dark-mode .field-suggestions {
  background: #2a2a2a;
  border-color: #555;
}

body.dark-mode .field-suggestion {
  color: #e0e0e0;
  border-color: #3a3a3a;
}

body.dark-mode .field-suggestion:hover,
body.dark-mode .field-suggestion:focus-visible {
  background: #333f48;
}

body.dark-mode .field-suggestion span,
body.dark-mode .field-suggestion-hint,
body.dark-mode .map-status {
  color: #c9c9c9;
}

body.dark-mode .einsatzmittel-table-wrap,
body.dark-mode .einsatzmittel-browser-row {
  background: #333;
  border-color: #3f4a52;
}

body.dark-mode .einsatzmittel-table th {
  color: #ddd;
}

body.dark-mode .einsatzmittel-table th,
body.dark-mode .einsatzmittel-table td {
  border-bottom-color: #3f4a52;
}

body.dark-mode .einsatzmittel-table td > span,
body.dark-mode .einsatzmittel-empty,
body.dark-mode .einsatzmittel-browser-row small {
  color: #c9c9c9;
}

@media (max-width: 760px) {
  body.dark-mode .einsatzmittel-table tr {
    background: #2a2a2a;
    border-color: #3f4a52;
  }

  body.dark-mode .einsatzmittel-table td:nth-child(n+2):nth-child(-n+5) {
    color: #c9c9c9;
    background: #333;
  }
}

body.dark-mode .einsatzmittel-browser-row {
  color: #e0e0e0;
}

body.dark-mode .einsatzmittel-browser-row:hover,
body.dark-mode .einsatzmittel-browser-row:focus-visible {
  background: #333f48;
  border-color: #3498db;
}

body.dark-mode .einsatzmittel-status-vorgeschlagen {
  background: rgba(217, 119, 6, 0.24);
  color: #fed7aa;
}

body.dark-mode .einsatzmittel-status-alarmiert {
  background: rgba(220, 38, 38, 0.22);
  color: #fecaca;
}

body.dark-mode .einsatzmittel-status-uebernommen {
  background: rgba(37, 99, 235, 0.22);
  color: #bfdbfe;
}

body.dark-mode .einsatzmittel-status-eingetroffen {
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
}

body.dark-mode .einsatzmittel-status-frei {
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

body.dark-mode .einsatz-map {
  border-color: #555;
  background: #333;
}

body.dark-mode .standort-map {
  border-color: #555;
  background: #333;
}

body.dark-mode .einsatz-overview-map {
  border-color: #555;
  background: #333;
}

body.dark-mode .alarm-route-map {
  background: #333;
}

body.dark-mode .form-hint {
  color: #c9c9c9;
}

body.dark-mode .einsatz-zeile,
body.dark-mode .fz-zeile {
  background: #bdbbbb00;
}

body.dark-mode .einsatz-eintrag,
body.dark-mode .fahrzeug-eintrag {
  background: #2f363d;
  border-color: #3f4a52;
  box-shadow: none;
}

body.dark-mode .einsatz-ort,
body.dark-mode .einsatz-meta,
body.dark-mode .empty-state {
  color: #c9c9c9;
}

body.dark-mode .einsatz-meta i {
  color: #c9c9c9;
}

body.dark-mode .einsatz-eintrag-clickable:hover,
body.dark-mode .einsatz-eintrag-clickable:focus-visible {
  background: #333f48;
  border-color: #3498db;
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.18);
}

body.dark-mode .einsatz-filter-input,
body.dark-mode .einsatz-filter-bar select {
  background: #333;
  color: #e0e0e0;
  border-color: #555;
}

body.dark-mode .einsatz-filter-input input,
body.dark-mode .einsatz-filter-bar select {
  color: #e0e0e0;
}

body.dark-mode .sort-button {
  background: #333;
  border-color: #555;
  color: #e0e0e0;
}

body.dark-mode .sort-button:hover,
body.dark-mode .sort-button:focus-visible {
  background: #3b4650;
  border-color: #3498db;
}

body.dark-mode .overview-switch {
  background: #333;
  border-color: #3f4a52;
}

body.dark-mode .overview-switch-button {
  color: #c9c9c9;
}

body.dark-mode .overview-switch-button.active,
body.dark-mode .overview-switch-button:hover,
body.dark-mode .overview-switch-button:focus-visible {
  background: #2f363d;
  border-color: #3498db;
  color: #e0e0e0;
}

body.dark-mode .standort-status-group {
  background: #2f363d;
  border-color: #3f4a52;
}

body.dark-mode .standort-status-header strong,
body.dark-mode .einsatzmittel-name {
  color: #e0e0e0;
}

body.dark-mode .standort-status-header small {
  color: #c9c9c9;
}

body.dark-mode .standort-status-icon {
  background: #263746;
  color: #8ac7f2;
}

body.dark-mode .einsatzmittel-card {
  background: #333;
  border-color: #3f4a52;
}

body.dark-mode .status-select-menu {
  background: #2f363d;
  border-color: #3f4a52;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
}

/* Buttons, inklusive Status-Dropdowns */
body.dark-mode .button {
  background: #2f363d;
  border-color: #3f4a52;
  color: #e0e0e0;
}
body.dark-mode .button.cancel {
  background: #3a1f1f;
  border-color: #6a2f2f;
  color: #f0c0c0;
}

body.dark-mode .button.secondary {
  background: #2f363d;
  border-color: #3f4a52;
  color: #e0e0e0;
}

body.dark-mode .button:hover {
  background: #333f48;
  border-color: #3498db;
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.16);
}

body.dark-mode .button.cancel:hover {
  background: #4a2624;
  border-color: #e74c3c;
  box-shadow: 0 8px 20px rgba(231, 76, 60, 0.16);
}

body.dark-mode .button.secondary:hover {
  background: #333f48;
}

body.dark-mode .fz-status-dropdown {
  background-color: #333;
  color: #e0e0e0;
  border-color: #555;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2210%22%20height%3D%225%22%20viewBox%3D%220%200%2010%205%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M0%200L5%205L10%200H0Z%22%20fill%3D%22%23EEE%22/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 0.65rem auto;
}
body.dark-mode .fz-status-dropdown:focus {
  border-color: #888;
}

/* Formularelemente */
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background-color: #333;
  color: #e0e0e0;
  border: 1px solid #555;
}

body.dark-mode .system-form input[readonly],
body.dark-mode .system-form input[disabled] {
  background-color: #272c30;
  border-color: #454f57;
  color: #9aa7b1;
}

body.dark-mode .system-form input[readonly]:focus,
body.dark-mode .system-form input[disabled]:focus {
  border-color: #454f57;
  box-shadow: none;
  background-color: #272c30;
}

body.dark-mode .input-action-button {
  color: #9fd2f2;
}

body.dark-mode .input-action-button:hover,
body.dark-mode .input-action-button:focus-visible,
body.dark-mode .input-action-button.active {
  border-color: rgba(159, 210, 242, 0.28);
  background: rgba(52, 152, 219, 0.16);
}

body.dark-mode select {
  color-scheme: dark;
}

body.dark-mode select:not([multiple]) {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%239fd2f2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 0.8rem auto;
}

body.dark-mode select option,
body.dark-mode select optgroup {
  background-color: #333;
  color: #e0e0e0;
}

body.dark-mode select option:checked {
  background-color: #244b66;
  color: #f4fbff;
}

body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
  outline: none;
  border-color: #888;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2); /* dezent hell */
  background-color: #333;
  color: #eee;
}

body.dark-mode .einsatz-filter-input input,
body.dark-mode .einsatz-filter-input input:focus {
  background: transparent;
  border: 0;
  outline: none;
  box-shadow: none;
  color: #e0e0e0;
}

body.dark-mode .login-input input,
body.dark-mode .login-input input:focus {
  background: transparent;
  border: 0;
  outline: none;
  box-shadow: none;
  color: #e0e0e0;
}

body.dark-mode .einsatz-filter-input:focus-within,
body.dark-mode .einsatz-filter-bar select:focus {
  background: #333f48;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

body.dark-mode .badge-gruppe {
  background: #333;
  color: #eee;
}

body.dark-mode .badge-gruppe:hover {
  background: #3498db;
}

/* Überschriften in Modal-Köpfen */
body.dark-mode .modal-header h2,
body.dark-mode .modal-header h3 {
  color: #fff;
}

/* Optionale Feinstilisierung */
body.dark-mode .einsatz-ort {
  color: #ccc;
}
body.dark-mode .modal-content label {
  color: #ddd;
}

body.dark-mode .confirm-modal-icon {
  background: #3a1f1f;
  color: #f0c0c0;
}

body.dark-mode .confirm-modal-copy h2 {
  color: #e0e0e0;
}

body.dark-mode .confirm-modal-copy p {
  color: #c9c9c9;
}

@media (max-width: 900px) {
  .dashboard-hero {
    min-height: auto;
    padding: 0.65rem 0.9rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
    align-content: center;
    justify-content: start;
  }

  .dashboard-hero .login-mark {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1.05rem;
  }

  .dashboard-hero > div:nth-of-type(2) {
    min-width: 0;
  }

  .dashboard-hero h1 {
    font-size: clamp(1.35rem, 4.5vw, 1.8rem);
  }

  .dashboard-hero .login-eyebrow {
    margin-bottom: 0.1rem;
    font-size: 0.66rem;
  }

  .dashboard-hero .login-system-status {
    position: absolute;
    left: 1.5rem;
    bottom: 1.5rem;
    z-index: 50;
    background: #eef6fc;
    color: #34495e;
    border: 1px solid #d9e3ec;
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
    white-space: nowrap;
    font-size: 0.82rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  }

  .dashboard-content {
    position: relative;
    padding-bottom: 4.75rem;
  }
}

@media (max-width: 520px) {
  .dashboard-hero .login-system-status {
    left: 1.25rem;
    bottom: 1.25rem;
  }
}

body.dark-mode .dashboard-hero .login-system-status {
  background: #2f363d;
  color: #e0e0e0;
  border-color: #3f4a52;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-action-button,
  .module-card,
  .button.login-submit,
  .login-input,
  .login-forgot-button {
    transition-duration: 1ms;
  }

  .dashboard-action-button:hover,
  .dashboard-action-button:active,
  .module-card:hover,
  .module-card:active,
  .button.login-submit:hover,
  .button.login-submit:active {
    transform: none;
  }
}

/* ----------------------------------🌙 Dark-Mode ENDE--------------------------------------------------  */

/* ============================================================
   Alarmdisplay: Ruhezustand (kein aktiver Einsatz)
   ============================================================ */

/* Damit der Ruhezustand die Flaeche unter der Toolbar ausfuellen kann,
   ist die Seite eine Spalte und .ruhe-main der wachsende Abschnitt. */
#alarmApp {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.ruhe-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(20rem, 24vw, 28rem);
  grid-template-rows: minmax(0, 1fr);
  gap: var(--app-space);
  padding: var(--app-space);
  flex: 1 1 auto;
  min-height: 0;
}

/* Uhr in der gemeinsamen Kopfzeile */
.toolbar-uhr {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-left: auto;
  margin-right: 0.5rem;
}

.toolbar-uhrzeit {
  font-size: clamp(1.8rem, 2.8vw, 3.2rem);
  font-weight: 800;
  line-height: 1;
  color: #22384a;
  font-variant-numeric: tabular-nums;
}

.toolbar-sekunden {
  font-size: 0.45em;
  font-weight: 700;
  color: #7d8fa0;
}

/* Gruppenspalte */
.ruhe-gruppen {
  display: flex;
  flex-direction: column;
  gap: var(--app-space);
  min-height: 0;
}

.ruhe-gruppe {
  display: flex;
  flex-direction: column;
  flex: var(--anteil, 1) 1 auto;
  min-height: 0;
  padding: 0.9rem 1.1rem 1.1rem;
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  border-radius: var(--app-radius);
  box-shadow: var(--surface-shadow);
}

.ruhe-gruppe-kopf {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid rgba(90, 112, 128, 0.22);
}

.ruhe-gruppe-kopf h2 {
  margin: 0;
  font-size: clamp(1.5rem, 1.5vw, 2.1rem);
  font-weight: 800;
  color: #22384a;
}

.ruhe-gruppe-kopf small {
  font-size: clamp(0.95rem, 0.9vw, 1.25rem);
  font-weight: 600;
  color: #64798a;
}

.ruhe-kacheln {
  display: grid;
  grid-template-columns: repeat(var(--spalten, 3), minmax(0, 1fr));
  grid-auto-rows: minmax(4.5rem, 1fr);
  gap: 1.1rem;
  flex: 1 1 auto;
  min-height: 0;
}

/* Kachel: heller Grund, Statusfarbe nur als Kante, Punkt und Ziffer */
.ruhe-kachel {
  --ruhe-akzent: #74797a;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  background: #fff;
  border: 1px solid rgba(90, 112, 128, 0.16);
  border-left: 8px solid var(--ruhe-akzent);
  border-radius: 6px;
}

.ruhe-punkt {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--ruhe-akzent);
}

.ruhe-name {
  font-size: clamp(1.4rem, 1.5vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  color: #1d2b36;
  overflow-wrap: anywhere;
}

.ruhe-statuszahl {
  min-width: 2.4rem;
  padding: 0.15rem 0.5rem;
  font-size: clamp(1.4rem, 1.5vw, 2.1rem);
  font-weight: 800;
  text-align: center;
  color: var(--ruhe-akzent);
  background: #f2f5f7;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

/* Akzentfarben: an .status-1 ... .status-8 angelehnt, auf hellem Grund
   abgedunkelt, damit Kante und Ziffer lesbar bleiben. */
.ruhe-status-1 { --ruhe-akzent: #1ba81b; }
.ruhe-status-2 { --ruhe-akzent: #10970b; }
.ruhe-status-3 { --ruhe-akzent: #b8900a; }
.ruhe-status-4 { --ruhe-akzent: #d9701a; }
.ruhe-status-5 { --ruhe-akzent: #d40b0b; }
.ruhe-status-6 { --ruhe-akzent: #74797a; }
.ruhe-status-7 { --ruhe-akzent: #b23674; }
.ruhe-status-8 { --ruhe-akzent: #5f3a1c; }

.ruhe-leer {
  margin: 0;
  padding: 1.5rem;
  text-align: center;
  color: #64798a;
}

/* Infospalte: Wetter und letzter Einsatz */
.ruhe-info {
  display: flex;
  flex-direction: column;
  gap: var(--app-space);
  min-height: 0;
}

.ruhe-karte {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.2rem;
  text-align: center;
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  border-radius: var(--app-radius);
  box-shadow: var(--surface-shadow);
}

.ruhe-wetter {
  flex: 1 1 auto;
}

.ruhe-wetter-oben {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.ruhe-wetter-icon {
  font-size: clamp(2.6rem, 3.4vw, 4rem);
  line-height: 1;
}

.ruhe-wetter-temp {
  font-size: clamp(2.8rem, 3.6vw, 4.4rem);
  font-weight: 800;
  line-height: 1;
  color: #22384a;
}

.ruhe-wetter-text {
  margin-top: 0.35rem;
  font-size: clamp(1.1rem, 1.2vw, 1.5rem);
  font-weight: 600;
  color: #445c6e;
}

.ruhe-wetter-wind {
  margin-top: 0.2rem;
  font-size: clamp(0.95rem, 1vw, 1.2rem);
  color: #7d8fa0;
}

.ruhe-letzter {
  flex: 0 0 auto;
}

.ruhe-letzter-titel {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #7d8fa0;
}

.ruhe-letzter-inhalt {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0;
  font-size: clamp(0.95rem, 1vw, 1.2rem);
  color: #7d8fa0;
}

.ruhe-letzter-inhalt b {
  font-size: 1.15em;
  color: #22384a;
}

/* Infospalte nur auf grossen Displays, darunter volle Breite fuer die Gruppen */
@media (max-width: 1100px) {
  .ruhe-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .ruhe-info {
    display: none;
  }
}

@media (max-width: 640px) {
  .toolbar-uhr {
    margin-right: 0;
  }

  .ruhe-kacheln {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Dark Mode */
body.dark-mode .ruhe-gruppe-kopf small {
  color: #a8b6c2;
}

body.dark-mode .toolbar-uhrzeit,
body.dark-mode .ruhe-gruppe-kopf h2,
body.dark-mode .ruhe-wetter-temp,
body.dark-mode .ruhe-letzter-inhalt b,
body.dark-mode .ruhe-name {
  color: #eaeef2;
}

body.dark-mode .ruhe-gruppe-kopf {
  border-bottom-color: rgba(168, 182, 194, 0.28);
}

body.dark-mode .ruhe-kachel {
  background: #24313a;
  border-color: #3a4a55;
  border-left-color: var(--ruhe-akzent);
}

body.dark-mode .ruhe-statuszahl {
  background: #1b252c;
}

body.dark-mode .ruhe-wetter-text {
  color: #cfd8e0;
}

/* Auf dunklem Grund brauchen die dunkelsten Akzente mehr Helligkeit. */
body.dark-mode .ruhe-status-3 { --ruhe-akzent: #e8bc1f; }
body.dark-mode .ruhe-status-8 { --ruhe-akzent: #a9723f; }

/* Adresssuche wird bewusst nur auf Anforderung ausgeloest - per Enter
   oder Schaltflaeche. Die Nutzungsbedingungen von Nominatim untersagen
   Auto-Vervollstaendigung waehrend der Eingabe. */
.address-field {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.address-field > input {
  flex: 1 1 auto;
  min-width: 0;
}

.address-field > .address-search-button {
  flex: 0 0 auto;
}
