/* Ergänzung zu Tailwind: Status-Badges, INES-Sidebar-tauglich */

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.status-offen {
  background-color: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}

.status-arbeit {
  background-color: #dbeafe;
  color: #1e3a8a;
  border: 1px solid #93c5fd;
}

.status-erledigt {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

/* Schmale Einbettung: Tabellen scrollbar, keine festen Mindestbreiten außerhalb Tabelle */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.nav-side-link:focus-visible {
  outline: 2px solid #1e40af;
  outline-offset: 2px;
}

.field-input,
.field-textarea {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: #0f172a;
  background: #fff;
}

.field-input:focus,
.field-textarea:focus {
  outline: none;
  border-color: #1e40af;
  box-shadow: 0 0 0 1px #1e40af;
}

.field-textarea {
  resize: vertical;
  min-height: 2.75rem;
}

/* Ein Feld, farbig wie Word (contenteditable) */
.rich-field {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #0f172a;
  background: #fff;
  white-space: pre-wrap;
  word-break: break-word;
  outline: none;
}

.rich-field:focus {
  border-color: #1e40af;
  box-shadow: 0 0 0 1px #1e40af;
}

.rich-field--input {
  min-height: 2.75rem;
  white-space: normal;
}

.form-section h3 {
  letter-spacing: -0.01em;
}

/* Berufsgruppen: im Rich-Field gegen Tailwind/preflight (span erbt sonst body-Farbe) */
.segment-preview {
  word-break: break-word;
}

.rich-field span.seg {
  display: inline;
  border-bottom: 2px solid transparent;
  cursor: help;
  transition: background-color 0.12s ease, border-color 0.12s ease;
  border-radius: 0.125rem;
  padding: 0 0.05em;
}

.rich-field span.seg:hover {
  background-color: rgba(15, 23, 42, 0.06);
}

/* !important: Tailwind CDN setzt oft color:inherit auf span */
.rich-field span.seg-pflege {
  color: #1d40af !important;
  border-bottom-color: rgba(37, 99, 235, 0.5) !important;
  background-color: rgba(37, 99, 235, 0.09) !important;
}

.rich-field span.seg-arzt {
  color: #b91c1c !important;
  border-bottom-color: rgba(220, 38, 38, 0.55) !important;
  background-color: rgba(220, 38, 38, 0.08) !important;
}

.rich-field span.seg-psychologie {
  color: #15803d !important;
  border-bottom-color: rgba(22, 163, 74, 0.55) !important;
  background-color: rgba(22, 163, 74, 0.09) !important;
}

.rich-field span.seg-unknown {
  color: #475569 !important;
  border-bottom-color: rgba(71, 85, 105, 0.45) !important;
  background-color: rgba(71, 85, 105, 0.06) !important;
}

/* Gleiche Textfarben ausserhalb Rich-Field (Navigation, Tabellen, Badges) */
.seg.seg-pflege {
  color: #1d40af !important;
}
.seg.seg-arzt {
  color: #b91c1c !important;
}
.seg.seg-psychologie {
  color: #15803d !important;
}
.seg.seg-unknown {
  color: #475569 !important;
}
