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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #111827;
  line-height: 1.35;
  min-height: 100vh;
}

.app-header {
  background: linear-gradient(135deg, #7f1026, #b31d3a);
  color: #ffffff;
  padding: 0.35rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.app-header .header-top {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
}

.header-title,
.app-header h1 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.6rem;
  opacity: 0.9;
}

.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.status-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.status-icon .icon-online {
  display: none;
}

.status-icon .icon-offline {
  display: block;
}

.status-icon.status-chip-online .icon-online {
  display: block;
}

.status-icon.status-chip-online .icon-offline {
  display: none;
}

.header-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.header-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.3rem;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: none;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  cursor: pointer;
  touch-action: manipulation;
  flex-shrink: 0;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.28);
}

.icon-button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.icon-button svg {
  width: 1rem;
  height: 1rem;
}

.language-toggle {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

main {
  padding: 1rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  gap: 0.25rem;
}

.field-heading {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

input,
select,
textarea,
button {
  font: inherit;
}

input[type="text"],
input[type="search"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  padding: 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
  background: #ffffff;
  min-height: 2.75rem;
}

textarea {
  min-height: 3.5rem;
}

label:has([required]) input:not([type="checkbox"]),
label:has([required]) select,
label:has([required]) textarea {
  border-color: #e8a6b6;
  box-shadow: inset 0 0 0 1px rgba(179, 29, 58, 0.1);
}

button {
  padding: 0.6rem 1rem;
  border-radius: 0.375rem;
  border: none;
  background: #9e1730;
  color: #ffffff;
  cursor: pointer;
  min-height: 2.75rem;
  touch-action: manipulation;
}

.secondary-button,
.button-link {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #ffffff;
  min-height: 2.75rem;
  padding: 0.6rem 1rem;
  border-radius: 0.375rem;
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

fieldset {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  background: #ffffff;
}

legend {
  font-weight: 600;
  padding: 0 0.25rem;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

.checkbox-group label {
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
}

.error-message {
  color: #b91c1c;
  font-size: 0.8rem;
}

.info-message {
  font-size: 0.85rem;
  color: #374151;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.72rem;
}

.status-chip-online {
  background: #cf2445;
  color: #ffffff;
}

.status-chip-offline {
  background: #6b7280;
}

.auth-shell {
  min-height: calc(100vh - 9rem);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1rem;
}

.login-card {
  width: min(100%, 420px);
  background: #ffffff;
  border: 1px solid #ecd5db;
  border-radius: 0.85rem;
  padding: 1.25rem;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.login-card h2 {
  margin-top: 0;
}

.capture-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 5.5rem;
}

.capture-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.capture-intro h2 {
  margin: 0;
  font-size: 1.4rem;
}

.capture-hint {
  margin: 0;
  max-width: 32rem;
  color: #4b5563;
  font-size: 0.95rem;
}

.capture-form {
  gap: 1rem;
}

.form-card {
  background: #ffffff;
  border: 1px solid #ecd5db;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.form-card-primary {
  background: linear-gradient(180deg, #ffffff, #fff4f7);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.section-title {
  margin: 0;
  font-size: 1rem;
}

.section-text {
  margin: 0.2rem 0 0;
  color: #6b7280;
  font-size: 0.88rem;
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.compact-grid-main {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-grid-inline {
  align-items: end;
}

.field-span-2 {
  grid-column: span 2;
}

.form-group {
  display: grid;
  gap: 0.4rem;
}

.field-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7f1d2d;
}

.required-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.2rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #fff0f4;
  color: #9f1239;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.required-badge[hidden] {
  display: none;
}

.field-hint {
  margin: -0.15rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.35;
}

.screen-reader-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.success-rating-group {
  margin-top: 0.15rem;
}

.success-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.success-rating input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.success-rating-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.4rem;
  border-radius: 0.65rem;
  border: 2px solid #d1d5db;
  background: #ffffff;
  color: #9ca3af;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.1s ease;
}

.success-rating-label .carton-icon {
  width: 1.65rem;
  height: 1.65rem;
  display: block;
}

/* Nur echte Maus-Hover: auf Touch wirkt :hover oft nur auf dem zuletzt angetippten Karton. */
@media (hover: hover) {
  .success-rating-label:hover {
    border-color: #b31d3a;
    color: #9f1239;
  }
}

/*
  Stern-/Rating-Logik per :has(): alle Kartons bis zur Auswahl rot (unabhängig von JS).
  Kinder-Reihenfolge: input, label, input, label, … → gewählte Stufe n nutzt :nth-child(2) … (2n).
*/
.success-rating-label.is-active,
.success-rating:has(#successRating-1:checked) > :nth-child(2),
.success-rating:has(#successRating-2:checked) > :nth-child(2),
.success-rating:has(#successRating-2:checked) > :nth-child(4),
.success-rating:has(#successRating-3:checked) > :nth-child(2),
.success-rating:has(#successRating-3:checked) > :nth-child(4),
.success-rating:has(#successRating-3:checked) > :nth-child(6),
.success-rating:has(#successRating-4:checked) > :nth-child(2),
.success-rating:has(#successRating-4:checked) > :nth-child(4),
.success-rating:has(#successRating-4:checked) > :nth-child(6),
.success-rating:has(#successRating-4:checked) > :nth-child(8),
.success-rating:has(#successRating-5:checked) > :nth-child(2),
.success-rating:has(#successRating-5:checked) > :nth-child(4),
.success-rating:has(#successRating-5:checked) > :nth-child(6),
.success-rating:has(#successRating-5:checked) > :nth-child(8),
.success-rating:has(#successRating-5:checked) > :nth-child(10) {
  border-color: #b31d3a;
  background: #fff0f4;
  color: #7f1026;
  box-shadow: inset 0 0 0 1px rgba(179, 29, 58, 0.18);
}

.success-rating input:focus-visible + .success-rating-label {
  outline: 2px solid #b31d3a;
  outline-offset: 2px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.55rem;
}

.compact-choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.choice-grid label {
  min-height: 2.8rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #e8d7dc;
  border-radius: 0.85rem;
  background: #fcf9fa;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.choice-grid label:has(input:checked) {
  border-color: #b31d3a;
  background: #fff0f4;
  box-shadow: inset 0 0 0 1px rgba(179, 29, 58, 0.2);
}

.optional-block {
  margin-top: 0.9rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 0.85rem;
}

.optional-block summary {
  cursor: pointer;
  font-weight: 600;
  color: #0f172a;
}

.optional-block[open] summary {
  margin-bottom: 0.85rem;
}

.product-tabs-compact {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-tab-button {
  min-height: 2.9rem;
  border-radius: 0.9rem;
  font-weight: 700;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.product-detail-grid .field-label {
  white-space: nowrap;
}

.attachment-group-label {
  margin: 0.6rem 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b5563;
}

.thankyou-settings {
  align-items: start;
  margin-top: 0.75rem;
  padding: 0.9rem;
  border: 1px solid #e8d7dc;
  border-radius: 0.9rem;
  background: #fff7f9;
}

.toggle-row {
  justify-content: space-between;
  align-items: center;
  min-height: 2.9rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #e8d7dc;
  border-radius: 0.85rem;
  background: #fcf9fa;
  gap: 0.75rem;
}

.toggle-control {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #0f172a;
  font-weight: 600;
}

.submit-bar {
  position: sticky;
  bottom: 0.75rem;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
}

.submit-copy {
  min-width: 0;
}

.submit-copy .info-message {
  margin: 0;
  font-size: 0.8rem;
}

.form-alert {
  margin: 0 0 0.35rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid #ef4444;
  border-radius: 0.55rem;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.82rem;
  font-weight: 600;
}

.submit-button {
  min-width: min(100%, 280px);
  background: linear-gradient(135deg, #8f142c, #bf2142);
  font-weight: 700;
}

.submit-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #94a3b8;
  color: #f1f5f9;
  box-shadow: none;
  filter: grayscale(0.2);
}

.product-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0;
  flex-wrap: wrap;
}

.product-tab-button {
  background: #e5e7eb;
  color: #111827;
  border: 1px solid #d1d5db;
  padding: 0.45rem 0.8rem;
}

.product-tab-button.active {
  background: #9e1730;
  color: #ffffff;
  border-color: #9e1730;
}

.product-tab-content {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-top: 0.5rem;
  background: #f9fafb;
}

.product-tab-content h3 {
  margin: 0 0 0.5rem;
}

.carousel {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.carousel-slide {
  width: 100%;
  min-height: 220px;
  border: 1px dashed #9ca3af;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #ffffff;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

#contact-form > button[type="submit"] {
  width: 100%;
}

.dashboard-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr) auto;
  align-items: end;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.search-field {
  min-width: 0;
}

.filter-field {
  min-width: 0;
}

.dashboard-toolbar input,
.dashboard-toolbar select {
  width: 100%;
}

.dashboard-toolbar .toolbar-actions {
  justify-content: flex-end;
}

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

.dashboard-toolbar .secondary-button,
.dashboard-toolbar .button-link {
  background: #fff1f4;
  color: #8f142c;
  border: 1px solid #f2c9d3;
}

.dashboard-list {
  display: grid;
  gap: 0.5rem;
}

.lead-row,
.empty-state {
  background: #ffffff;
  border: 1px solid #ecd5db;
  border-radius: 0.85rem;
  padding: 0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.empty-state {
  padding: 1rem;
}

.lead-row-summary {
  list-style: none;
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
}

.lead-row-summary::-webkit-details-marker {
  display: none;
}

.lead-row[open] .lead-row-summary {
  border-bottom: 1px solid #e5e7eb;
}

.lead-row-details {
  padding: 0.9rem;
}

.lead-summary-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.lead-summary-top strong {
  font-size: 0.98rem;
}

.lead-summary-top span {
  color: #6b7280;
  font-size: 0.82rem;
  white-space: nowrap;
}

.lead-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  color: #475569;
  font-size: 0.84rem;
}

.lead-summary-notes {
  color: #111827;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.6rem;
}

.detail-section {
  border: 1px solid #e5e7eb;
  border-radius: 0.65rem;
  background: #f9fafb;
  padding: 0.55rem 0.65rem;
}

.detail-section h4 {
  margin: 0 0 0.4rem;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #334155;
}

.detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.28rem;
}

.detail-list li {
  display: grid;
  grid-template-columns: minmax(110px, 140px) 1fr;
  gap: 0.45rem;
  align-items: start;
  font-size: 0.88rem;
}

.detail-list li > span:first-child {
  color: #64748b;
  font-weight: 600;
}

.detail-list li > span:last-child {
  color: #111827;
  word-break: break-word;
}

.business-card-block {
  margin-top: 0.9rem;
  padding: 0.85rem;
  border: 1px solid #e8d7dc;
  border-radius: 0.85rem;
  background: #fff7f9;
}

.business-card-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.6rem;
}

.business-card-controls button {
  width: auto;
  min-height: 2.6rem;
}

.business-card-video,
.business-card-preview {
  display: block;
  width: min(100%, 420px);
  margin-top: 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #ffffff;
}

.hidden {
  display: none !important;
}

@media (max-width: 599px) {
  .app-header {
    padding: 0.4rem 0.75rem;
  }

  .app-header h1 {
    font-size: 0.9rem;
  }

  main {
    padding: 0.75rem;
  }

  .header-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.25rem;
  }

  .header-status,
  .toolbar-actions,
  .dashboard-toolbar,
  .dashboard-filters {
    width: 100%;
  }

  .header-title,
  .app-header h1 {
    font-size: 0.82rem;
  }

  .status-icon,
  .icon-button {
    width: 1.7rem;
    height: 1.7rem;
  }

  .status-icon svg,
  .icon-button svg {
    width: 0.95rem;
    height: 0.95rem;
  }

  .button-link,
  .secondary-button,
  .toolbar-actions button:not(.icon-button) {
    width: 100%;
  }

  .capture-layout {
    padding-bottom: 7rem;
  }

  .capture-intro {
    flex-direction: column;
    align-items: start;
  }

  .capture-intro h2 {
    font-size: 1.2rem;
  }

  .compact-grid,
  .compact-grid-main,
  .compact-grid-inline,
  .product-detail-grid,
  .product-tabs-compact {
    grid-template-columns: 1fr;
  }

  .field-span-2 {
    grid-column: auto;
  }

  .submit-bar {
    flex-direction: column;
    align-items: stretch;
    bottom: 0.5rem;
    padding: 0.7rem 0.8rem;
    gap: 0.55rem;
  }

  .submit-button {
    min-width: 0;
    width: 100%;
  }

  .submit-copy .info-message {
    display: none;
  }

  fieldset {
    padding: 0.6rem 0.7rem 0.8rem;
  }

  .product-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }

  .product-tab-button {
    width: 100%;
    min-height: 2.8rem;
  }

  .checkbox-group {
    gap: 0.45rem;
  }

  .checkbox-group label {
    width: 100%;
  }

  .carousel {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "slide slide"
      "prev next";
    gap: 0.5rem;
  }

  .carousel-slide {
    grid-area: slide;
    min-height: 170px;
  }

  #carousel-prev {
    grid-area: prev;
    width: 100%;
  }

  #carousel-next {
    grid-area: next;
    width: 100%;
  }

  .dashboard-toolbar {
    grid-template-columns: 1fr;
  }

  .lead-summary-top {
    flex-direction: column;
    gap: 0.15rem;
    align-items: flex-start;
  }

  .detail-sections {
    grid-template-columns: 1fr;
  }

  .detail-list li {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}

@media (min-width: 600px) and (max-width: 1023px) {
  main {
    max-width: 920px;
    margin: 0 auto;
    padding: 1rem;
  }

  .compact-grid-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .checkbox-group label {
    min-height: 2rem;
  }

  .dashboard-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 1fr);
  }

  .dashboard-toolbar .toolbar-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (min-width: 768px) {
  main {
    max-width: 900px;
    margin: 0 auto;
  }
}

@media (min-width: 1024px) {
  main {
    max-width: 1400px;
  }
}

.icon-button[hidden] {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.users-table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid #ecd5db;
  border-radius: 0.75rem;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.users-table th,
.users-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #f1e4e8;
  vertical-align: middle;
}

.users-table th {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
}

.users-table tbody tr:last-child td {
  border-bottom: none;
}

.users-table .user-email {
  display: block;
  font-size: 0.8rem;
  color: #6b7280;
}

.users-table .user-inactive td {
  color: #9ca3af;
}

.users-table .secondary-button {
  min-height: 2.25rem;
  padding: 0.35rem 0.75rem;
  background: #fff1f4;
  color: #8f142c;
  border: 1px solid #f2c9d3;
}

.users-empty {
  text-align: center;
  color: #6b7280;
}

.role-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.role-admin {
  background: #fde8ec;
  color: #8f142c;
}

.role-innendienst {
  background: #eef2ff;
  color: #3730a3;
}

.role-operator {
  background: #ecfdf5;
  color: #065f46;
}

.role-external {
  margin-left: 0.25rem;
  background: #fef3c7;
  color: #92400e;
}

.user-dialog {
  width: min(28rem, calc(100vw - 2rem));
  border: none;
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.user-dialog::backdrop {
  background: rgba(17, 24, 39, 0.45);
}

.user-form {
  display: grid;
  gap: 0.75rem;
}

.user-form h2 {
  margin: 0;
  font-size: 1.1rem;
}

.user-form input[readonly] {
  background: #f3f4f6;
  color: #6b7280;
}

.user-active-line {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.user-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.user-form-actions .danger-button {
  margin-right: auto;
  background: #ffffff;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.user-form-actions .secondary-button {
  background: #ffffff;
  color: #8f142c;
  border: 1px solid #f2c9d3;
}
