:root {
  --primary: #4682B4;
  --primary-dark: #2f5f7a;
  --primary-light: #6aa4d6;
  --sidebar-bg: #2f5f7a;
  --sidebar-bg-hover: #3d6f94;
  --success: #2e8b57;
  --danger: #c0392b;
  --warning: #d68910;
  --bg-gradient-start: #eef4ff;
  --bg-gradient-end: #f7f9fc;
  --text-color: #10151c;

  /* Etwas weniger "verspielt rund" als zuvor - naeher am ruhigeren, kompakteren
     Erscheinungsbild des alten Portals (Buttons, Inputs, Badges, Alerts, ...). */
  --bs-border-radius-sm: 0.35rem;
  --bs-border-radius: 0.5rem;
  --bs-border-radius-lg: 0.65rem;
  --bs-border-radius-xl: 0.85rem;
  --bs-border-radius-xxl: 1.1rem;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 17px;
}

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  margin: 0;
  color: var(--text-color);
  line-height: 1.6;
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end)) fixed;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  color: #0c1420;
  font-weight: 700;
}

.small, small {
  font-size: 0.92rem;
}

.text-muted {
  color: #4b5768 !important;
}

/* ---------- Auth (Login/Register) ---------- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) fixed;
  padding: 24px;
}

.auth-card {
  background: #fff;
  width: 100%;
  max-width: 400px;
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  padding: 36px 32px;
}

.auth-title {
  text-align: center;
  color: var(--primary-dark);
  margin: 0 0 4px;
  font-size: 1.6rem;
}

.auth-subtitle {
  text-align: center;
  color: #52606d;
  font-size: 1.1rem;
  margin: 0 0 20px;
  font-weight: 500;
}

.auth-links {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
}

.auth-links a {
  color: var(--primary);
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-footer {
  text-align: center;
  margin-top: 18px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- App shell (Sidebar + Header) ---------- */
/* Bewusst "align-items: flex-start" statt des Standardverhaltens ("stretch") - vorher wurde
   die weisse Inhaltsflaeche immer auf die Hoehe der (langen) Seitenleiste gestreckt, auch wenn
   der eigentliche Seiteninhalt viel kuerzer war. Ergebnis: ein grosser leerer Bereich unterhalb
   der letzten Kachel, bevor die Fusszeile kam. Jetzt endet die Inhaltsflaeche direkt nach dem
   eigentlichen Inhalt + Fusszeile - die Seitenleiste bleibt trotzdem dank "position: sticky"
   beim Scrollen immer sichtbar und deckt weiterhin den ganzen Bildschirm ab. */
.app-shell {
  display: flex;
  align-items: flex-start;
}

.sidebar {
  width: 278px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 26px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  font-size: 1.45rem;
  font-weight: 700;
  padding: 0 22px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 16px;
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.sidebar-nav li {
  margin: 3px 12px 3px 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  padding: 12px 22px;
  font-size: 1.04rem;
  font-weight: 500;
  border-radius: 0 999px 999px 0;
  transition: background 0.15s ease, transform 0.1s ease;
}

.sidebar-nav a:hover {
  background: var(--sidebar-bg-hover);
  color: #fff;
  transform: translateX(2px);
}

.sidebar-nav a.active {
  background: #fff;
  color: var(--primary-dark);
  font-weight: 700;
}

.sidebar-nav .nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 1.05rem;
  flex-shrink: 0;
}

.sidebar-nav a:hover .nav-icon {
  background: rgba(255, 255, 255, 0.26);
}

.sidebar-nav a.active .nav-icon {
  background: rgba(70, 130, 180, 0.15);
  color: var(--primary-dark);
}

.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #dc3545;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  flex-shrink: 0;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--sidebar-bg));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header h1 {
  font-size: 1.3rem;
  margin: 0;
  color: #fff;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.92rem;
  color: #fff;
}

.header-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.1rem;
  text-decoration: none;
  transition: background 0.15s ease;
}

.header-bell:hover {
  background: rgba(255, 255, 255, 0.26);
  color: #fff;
}

.header-bell-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #dc3545;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border: 2px solid var(--primary-dark);
}

.tenant-switch-form select {
  background-color: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  min-width: 160px;
}

.tenant-switch-form select option {
  color: #10151c;
}

.header-search {
  display: flex;
  gap: 6px;
  flex: 1;
  max-width: 320px;
  margin: 0 16px;
}

.header-search input {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.header-search input:focus {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.6);
}

/* ---------- Mobile-Navigation ---------- */
.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.26);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 999;
}

.sidebar-backdrop.show {
  display: block;
}

@media (max-width: 860px) {
  .mobile-nav-toggle {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    overflow-y: auto;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .app-header {
    padding: 12px 16px;
    gap: 10px;
  }

  .app-header h1 {
    font-size: 1.05rem;
  }

  .user-name-role {
    display: none;
  }

  .card {
    overflow-x: auto;
  }
}

.tenant-switch-form select:focus {
  background-color: #fff;
  color: #10151c;
}

.user-name-role {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: right;
}

.user-name-role-name {
  font-weight: 600;
}

.user-name-role-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.75);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  border: 2px solid rgba(255, 255, 255, 0.6);
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-photo-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 0, 0, 0.08);
  background: #f1f3f5;
}

.app-content {
  padding: 28px;
  flex: 1;
}

.app-footer {
  text-align: center;
  padding: 16px;
  color: #8896a6;
  font-size: 0.8rem;
  background: #f2f5f9;
}

/* ---------- Shared components ---------- */
.card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e4e9f0;
  box-shadow: 0 1px 4px rgba(20, 40, 70, 0.04);
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.status-badge.approved {
  background: rgba(46, 139, 87, 0.12);
  color: var(--success);
}

.status-badge.pending {
  background: rgba(214, 137, 16, 0.12);
  color: var(--warning);
}

.status-badge.is-normal {
  background: rgba(70, 130, 180, 0.12);
  color: var(--primary-dark);
}

.status-badge.is-important {
  background: rgba(214, 137, 16, 0.15);
  color: var(--warning);
}

.news-card {
  border-left: 4px solid var(--primary-light);
}

.news-card.is-important {
  border-left: 4px solid var(--warning);
}

.calendar-legend-pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #fff;
}

.table thead th {
  color: #52606d;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom-width: 1px;
}

a.btn-primary,
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* ---------- Unser Team ---------- */
#team-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 18px;
}

.team-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.team-filter-bar select {
  min-width: 210px;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid #c9d8e8;
  background: #fff;
  color: #122033;
}

.team-member-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
  padding: 18px;
  border: 1px solid #dbe7f3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(28, 72, 105, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.team-member-card:hover {
  transform: translateY(-2px);
  border-color: #9cc6df;
  box-shadow: 0 12px 26px rgba(28, 72, 105, 0.13);
}

.team-member-header {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.team-member-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-light);
}

.team-member-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef6fb;
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.team-member-title h3 {
  margin: 0 0 8px;
  color: #16334d;
  font-size: 21px;
  line-height: 1.2;
}

.team-member-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-member-badges span,
.team-member-dates span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 9px;
  background: #edf6fb;
  color: #17405c;
  font-size: 13px;
  font-weight: 800;
}

.team-member-focus {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

.team-member-focus i {
  color: #087c91;
}

.team-member-contact {
  display: grid;
  gap: 8px;
}

.team-member-contact a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #1f3b57;
  text-decoration: none;
  font-weight: 700;
}

.team-member-contact span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-member-contact i {
  color: #087c91;
}

.team-member-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-profile-text {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid #e4edf6;
  color: #334155;
  font-size: 14px;
  line-height: 1.5;
  font-style: italic;
}

@media (max-width: 760px) {
  #team-container {
    grid-template-columns: 1fr;
  }

  .team-filter-bar select {
    width: 100%;
  }

  .team-member-header {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .team-member-avatar {
    width: 60px;
    height: 60px;
  }
}

/* ---------- Dienstplan ---------- */
.dienst-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  min-width: 96px;
  /* Feste Mindesthoehe, damit alle Kacheln gleich gross wirken, egal ob Bereich-Tag,
     Pause-Angabe oder Stunden-Label vorhanden sind oder nicht. */
  min-height: 92px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #dbeafe;
  color: #12344f;
  font-size: 14px;
  font-weight: 700;
}

.dienst-box-school {
  background: #fef3c7;
  color: #7c4a03;
}

.dienst-hours {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}

.dienstplan-week-hours {
  font-weight: 700;
  white-space: nowrap;
}

.bereich-tag {
  padding: 6px 10px;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-block;
}

.bereich-arzt { background: #b91c1c; }
.bereich-pa { background: #2563eb; }
.bereich-naepa { background: #0f766e; }
.bereich-anmeldung { background: #ea580c; }
.bereich-telefon { background: #ca8a04; }
.bereich-labor { background: #7c3aed; }
.bereich-setzer { background: #9333ea; }
.bereich-dmp { background: #16a34a; }
.bereich-sapv { background: #374151; }
.bereich-studien { background: #0f766e; }
.bereich-buero { background: #6b7280; }
.bereich-praevention { background: #65a30d; }
.bereich-betriebsmedizin { background: #166534; }
.bereich-neuro { background: #4338ca; }
.bereich-schule { background: #0284c7; }
.bereich-mfa { background: #059669; }
.bereich-azubi { background: #0891b2; }
.bereich-uni { background: #1d4ed8; }
.bereich-wundversorgung { background: #be123c; }
.bereich-dermatologie { background: #a16207; }

/* ---------- Zielgruppen-Auswahl (Veranstaltungen) ---------- */
.target-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 4px 10px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #dbe7f3;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.target-picker-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 400;
  margin: 0;
  padding: 2px 0;
}

.target-picker-item input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 12px;
  border-radius: 999px;
  background: rgba(70, 130, 180, 0.12);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 600;
}

.chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--primary-dark);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.chip-remove:hover {
  background: rgba(70, 130, 180, 0.25);
}

/* ---------- Dashboard ---------- */
.dashboard-hero {
  position: relative;
  min-height: 380px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--tenant-color, var(--primary)), var(--primary-dark));
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.15) 100%);
}

.dashboard-hero-overlay {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(2px);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 18px;
  max-width: 420px;
  box-shadow: 0 8px 22px rgba(15, 40, 70, 0.18);
}

.dashboard-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(70, 130, 180, 0.12);
  color: var(--primary-dark);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.dashboard-hero-title {
  margin: 0 0 4px;
  color: #16334d;
  font-size: 1.5rem;
}

.dashboard-hero-subtitle {
  margin: 0 0 14px;
  color: #52606d;
  font-size: 0.88rem;
}

.dashboard-hero-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-hero-chip {
  background: #f0f6fb;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.76rem;
  color: #52606d;
  line-height: 1.3;
}

.dashboard-hero-chip strong {
  display: block;
  color: #16334d;
  font-size: 0.85rem;
}

.dashboard-row-split {
  display: grid;
  grid-template-columns: 3fr 2fr;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* Fuer Kartenreihen, deren Anzahl an Karten je nach Daten schwankt (z.B. nur
   Geburtstage + Dienstjubilaeen, aber kein "Heute im MVZ", oder kein Standort-Cockpit
   fuer normale Mitarbeitende ohne Verwaltungsrechte). "auto-fit" (statt "auto-fill" oder
   einer festen Spaltenzahl) sorgt dafuer, dass die vorhandenen Karten die Reihe immer
   komplett ausfuellen, egal ob 1, 2 oder 3 Karten angezeigt werden - so entsteht keine
   leere Luecke, wenn eine Karte wegen fehlender Daten gar nicht erst gerendert wird.*/
.dashboard-flow-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .dashboard-row-split,
  .dashboard-grid-3,
  .dashboard-flow-row {
    grid-template-columns: 1fr;
  }
}

.dashboard-widget {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.dashboard-widget-wide {
  grid-column: 1 / -1;
}

.dashboard-widget h6 {
  color: var(--primary-dark);
  display: flex;
  align-items: center;
}

.dashboard-widget a {
  color: var(--primary);
  text-decoration: none;
}

.dashboard-widget a:hover {
  text-decoration: underline;
}

/* Schlichteres, flacheres Icon vor den Widget-Ueberschriften (statt grosser farbiger
   Kreis-Badges) - naeher am kompakteren, "ernsteren" Look des alten Portals. */
.widget-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  color: var(--primary-dark);
  margin-right: 6px;
  flex-shrink: 0;
  font-size: 1rem;
}

.dashboard-widget h6 {
  font-size: 1rem;
  font-weight: 700;
}

/* QM-Schnellzugriff & aehnliche reine Link-Listen: schlichter, dunkler Text statt
   auffaelliger blauer Links - entspricht dem ruhigeren Listenstil des alten Portals. */
.plain-link-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plain-link-list a {
  color: #223042 !important;
  font-weight: 600;
  text-decoration: none !important;
  padding: 4px 0;
}

.plain-link-list a:hover {
  color: var(--primary-dark) !important;
}

.widget-footer-link {
  display: block;
  text-align: center;
  background: #eef6fb;
  color: var(--primary-dark) !important;
  border-radius: 8px;
  padding: 8px;
  margin-top: auto;
  padding-top: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none !important;
}

.widget-footer-link + .widget-footer-link {
  margin-top: 8px;
}

.widget-footer-link:hover {
  background: #dcecf7;
}

.news-list-item {
  border-left: 4px solid var(--primary-light);
  background: #f8fbfd;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.news-list-item.is-important {
  border-left-color: var(--warning);
}

.news-list-item-excerpt {
  color: #4a5560;
  line-height: 1.4;
}

/* Der schmale farbige Rahmen links (wie bei "Aktuelle News") - fuer alle anderen
   Listen-artigen Dashboard-Eintraege wiederverwendet, damit der Look einheitlich ist. */
.dashboard-list-item {
  border-left: 4px solid var(--primary-light);
  background: #f8fbfd;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 6px;
}

a.dashboard-list-item {
  transition: background 0.15s ease;
}

a.dashboard-list-item:hover {
  background: #eef6fb;
}

/* Farbvarianten - generisch, damit sie auf .dashboard-list-item UND .subbox passen
   (einzelne Zeilen innerhalb einer Karte duerfen wie im alten Portal unterschiedliche
   Akzentfarben je nach Thema haben, statt immer nur blau). */
.accent-pink { border-left-color: #d9468f !important; }
.accent-amber { border-left-color: #b45309 !important; }
.accent-warning { border-left-color: var(--warning) !important; }
.accent-success { border-left-color: var(--success) !important; }
.accent-purple { border-left-color: #7c3aed !important; }

.accent-success .subbox-icon { color: var(--success); }
.accent-warning .subbox-icon { color: var(--warning); }
.accent-purple .subbox-icon { color: #7c3aed; }
.accent-pink .subbox-icon { color: #d9468f; }
.accent-amber .subbox-icon { color: #b45309; }

.team-avatar-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.team-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.subbox {
  border-left: 4px solid var(--primary-light);
  background: #f8fbfd;
  border-radius: 6px;
  padding: 9px 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* Der letzte Punkt in "Mein Tag" braucht keinen Abstand nach unten - welcher Eintrag das
   ist, haengt von den Daten ab (z.B. nur wenn gerade ein Geburtstag/Jubilaeum ansteht),
   daher automatisch per :last-child statt eine feste Karte manuell mit "mb-0" zu markieren. */
.subbox:last-child {
  margin-bottom: 0;
}

.subbox-icon {
  width: 22px;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  padding-top: 2px;
}

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: center;
  gap: 10px;
  flex: 1;
}

.quick-action-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 1px solid #e4e9f0;
  border-radius: 10px;
  text-decoration: none !important;
  color: #334155 !important;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.quick-action-tile:hover {
  border-color: var(--primary-light);
  background: #f4f9fd;
}

.quick-action-tile i {
  font-size: 1.3rem;
  color: var(--primary);
}

.cockpit-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: center;
  gap: 10px;
  flex: 1;
}

.cockpit-tile {
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}

.cockpit-tile .value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.cockpit-tile .label {
  font-size: 0.74rem;
  color: #52606d;
}

/* Fuer Karten mit Listen, die auch leer sein koennen (z.B. Wichtige Telefonnummern
   ohne hinterlegte Eintraege). Bewusst OBEN ausgerichtet (kein "justify-content:center"),
   damit der Inhalt genauso wie bei "Meine Dienste diese Woche" / "QM-Schnellzugriff"
   oben beginnt und der Freiraum einheitlich unten vor dem Footer-Link liegt - alles
   andere sieht innerhalb der Kartenreihe uneinheitlich aus. */
.phone-list-content {
  flex: 1;
}

.empty-state-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #98a4ae;
  padding: 2px 0;
}

.empty-state-hint i {
  font-size: 1.1rem;
}

.shift-box {
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shift-box.is-today {
  border-color: var(--primary);
  background: #f4f9fd;
}

.week-shift-card.is-today {
  border-color: var(--primary);
  background: #f4f9fd;
}

.week-shift-card.is-today .subbox-icon {
  color: var(--primary);
}

/* ---------- Support-Ticket Verlauf ---------- */
.ticket-thread {
  border-left: 3px solid #e4e9f0;
  padding-left: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticket-reply {
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
}

.ticket-reply.is-admin {
  background: rgba(70, 130, 180, 0.1);
}
