/* ============================================================
   Personen & Rechte · Cockpit · Welle 0.2
   Bona Vita® Portal
   ============================================================ */

#personenRoot {
  padding: 24px 0 80px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Intro-Box */
.rc-intro {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 20px;
  margin: 0 4px 24px;
  background: #faf6ed;
  border-left: 3px solid #b8945a;
  border-radius: 6px;
  color: #5a6170;
  font-size: 0.93rem;
  line-height: 1.55;
}
.rc-intro__icon {
  flex: 0 0 auto;
  font-size: 1.4rem;
  color: #b8945a;
  line-height: 1;
  padding-top: 2px;
}
.rc-intro__text { margin: 0; }
.rc-intro__text strong { color: #0f1d3f; }

/* Rollen-Karten */
.rc-role {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin: 0 4px 16px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.rc-role:hover { box-shadow: 0 4px 16px rgba(15, 29, 63, 0.06); }

.rc-role__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 22px;
  background: linear-gradient(180deg, #f8f9fb 0%, #fff 100%);
  border-bottom: 1px solid #eef0f4;
}
.rc-role__title {
  flex: 1;
  min-width: 0;
}
.rc-role__name {
  margin: 0 0 4px;
  color: #0f1d3f;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.rc-role__desc {
  margin: 0;
  color: #5a6170;
  font-size: 0.88rem;
  line-height: 1.5;
}
.rc-role__add {
  flex: 0 0 auto;
  background: #0f1d3f;
  color: #fff;
  border: 0;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.rc-role__add:hover { background: #1f3d6b; }
.rc-role__add:before {
  content: "+ ";
  font-weight: 600;
  margin-right: 2px;
}

/* Mitglieder-Liste */
.rc-role__members {
  padding: 8px 0;
}
.rc-member {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px;
  border-bottom: 1px solid #f4f5f7;
  transition: background 0.1s ease;
}
.rc-member:last-child { border-bottom: 0; }
.rc-member:hover { background: #fafbfc; }
.rc-member--expired { opacity: 0.55; }

.rc-member__avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e4c287;
  color: #0f1d3f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.rc-member--core .rc-member__avatar {
  background: #0f1d3f;
  color: #e4c287;
}

.rc-member__info {
  flex: 1;
  min-width: 0;
}
.rc-member__name {
  color: #0f1d3f;
  font-weight: 500;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rc-member__note {
  margin-top: 3px;
  color: #7a8190;
  font-size: 0.82rem;
  line-height: 1.35;
}

.rc-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rc-badge--core { background: #faf6ed; color: #8a6a3a; }
.rc-badge--active { background: #e8f3ec; color: #2d7a4f; }
.rc-badge--expired { background: #fbeaea; color: #b83a3a; }
.rc-badge--temp { background: #eef2fb; color: #2d4a8f; }

.rc-member__remove {
  flex: 0 0 auto;
  background: transparent;
  color: #b83a3a;
  border: 1px solid #f1d8d8;
  padding: 5px 12px;
  font-size: 0.82rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.rc-member__remove:hover {
  background: #b83a3a;
  color: #fff;
  border-color: #b83a3a;
}

/* Zugriff verweigert */
.rc-denied {
  padding: 60px 20px;
  text-align: center;
  color: #7a8190;
}
.rc-denied__icon { font-size: 2.2rem; color: #b8945a; margin-bottom: 12px; }
.rc-denied__title { color: #0f1d3f; font-size: 1.15rem; font-weight: 600; margin: 0 0 6px; }
.rc-denied__text { margin: 0; font-size: 0.92rem; }

/* ============================================================
   Dialog: Person hinzufügen
   ============================================================ */
.rc-dialog__backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 29, 63, 0.45);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: rcFadeIn 0.15s ease;
}
@keyframes rcFadeIn { from { opacity: 0; } to { opacity: 1; } }

.rc-dialog {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: rcPop 0.2s ease;
}
@keyframes rcPop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.rc-dialog__head {
  padding: 22px 26px 16px;
  border-bottom: 1px solid #eef0f4;
}
.rc-dialog__title {
  margin: 0 0 4px;
  color: #0f1d3f;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.rc-dialog__sub {
  margin: 0;
  color: #5a6170;
  font-size: 0.88rem;
}

.rc-dialog__body {
  padding: 20px 26px;
}

.rc-field {
  margin-bottom: 18px;
}
.rc-field__label {
  display: block;
  color: #0f1d3f;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.rc-field__hint {
  color: #7a8190;
  font-size: 0.78rem;
  margin-top: 4px;
  line-height: 1.4;
}
.rc-field input[type="text"],
.rc-field input[type="date"],
.rc-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d5d9e0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.92rem;
  color: #0f1d3f;
  background: #fff;
  transition: border-color 0.15s ease;
}
.rc-field input:focus,
.rc-field textarea:focus {
  outline: 0;
  border-color: #b8945a;
  box-shadow: 0 0 0 3px rgba(184,148,90,0.15);
}
.rc-field textarea { min-height: 64px; resize: vertical; }

/* Befristung Radio */
.rc-radio-group {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}
.rc-radio {
  flex: 1;
  position: relative;
}
.rc-radio input { position: absolute; opacity: 0; pointer-events: none; }
.rc-radio__label {
  display: block;
  padding: 10px 14px;
  border: 1px solid #d5d9e0;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.88rem;
  color: #5a6170;
}
.rc-radio input:checked + .rc-radio__label {
  background: #faf6ed;
  border-color: #b8945a;
  color: #0f1d3f;
  font-weight: 500;
}

.rc-date-wrap {
  margin-top: 12px;
  display: none;
}
.rc-date-wrap.is-visible { display: block; }

/* Dialog Actions */
.rc-dialog__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 26px 22px;
  border-top: 1px solid #eef0f4;
}
.rc-btn {
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  font-family: inherit;
}
.rc-btn--ghost {
  background: transparent;
  color: #5a6170;
  border-color: #d5d9e0;
}
.rc-btn--ghost:hover {
  background: #f4f5f7;
  color: #0f1d3f;
}
.rc-btn--primary {
  background: #0f1d3f;
  color: #fff;
}
.rc-btn--primary:hover { background: #1f3d6b; }
.rc-btn--primary:disabled {
  background: #aab0bd;
  cursor: not-allowed;
}

.rc-error {
  margin-top: 10px;
  padding: 8px 12px;
  background: #fbeaea;
  color: #b83a3a;
  border-radius: 5px;
  font-size: 0.85rem;
  display: none;
}
.rc-error.is-visible { display: block; }

/* Toast */
.rc-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f1d3f;
  color: #fff;
  padding: 12px 22px;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  font-size: 0.9rem;
  z-index: 9100;
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
}
.rc-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 640px) {
  .rc-role__head { flex-direction: column; }
  .rc-role__add { align-self: stretch; text-align: center; }
  .rc-member { flex-wrap: wrap; padding: 12px 16px; }
  .rc-member__remove { margin-top: 6px; margin-left: 52px; }
  .rc-dialog { border-radius: 12px 12px 0 0; max-height: 100vh; position: absolute; bottom: 0; left: 0; right: 0; }
  .rc-dialog__backdrop { align-items: flex-end; padding: 0; }
}
