/* =========================================================
   Grundlayout
   ========================================================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f5f7fa;
  color: #1f2937;
}

main.rbac-sim {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px 60px;
}

/* =========================================================
   Header
   ========================================================= */

.rbac-sim__header {
  margin-bottom: 32px;
}

.rbac-sim__title {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.rbac-sim__subtitle {
  margin: 0;
  color: #4b5563;
  max-width: 800px;
}

/* =========================================================
   Grid
   ========================================================= */

.rbac-sim__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Audit-Log über volle Breite */
.rbac-card--full {
  grid-column: 1 / -1;
}

/* =========================================================
   Cards
   ========================================================= */

.rbac-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 20px 22px 24px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.rbac-card__title {
  margin: 0 0 16px;
  font-size: 1.2rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 8px;
}

/* =========================================================
   Formular
   ========================================================= */

.rbac-form__row {
  margin-bottom: 16px;
}

.rbac-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.rbac-input,
.rbac-select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
}

.rbac-form__actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.rbac-button {
  padding: 10px 14px;
  border-radius: 4px;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  background: #2563eb;
  color: #ffffff;
}

.rbac-button--secondary {
  background: #6b7280;
}

/* =========================================================
   Statusbereich
   ========================================================= */

.rbac-status__row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.rbac-status__label {
  color: #4b5563;
}

.rbac-status__value {
  font-weight: 600;
}

.rbac-notice {
  margin: 14px 0;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
}

.rbac-notice--warning {
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
}

/* =========================================================
   Ergebnisbereich
   ========================================================= */

.rbac-result__line {
  margin: 10px 0;
}

.rbac-result__label {
  color: #4b5563;
}

.rbac-result__value {
  font-weight: 600;
}

.rbac-result__groups {
  margin-top: 16px;
}

.rbac-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

/* =========================================================
   Audit-Log
   ========================================================= */

.rbac-audit {
  margin: 0;
  padding-left: 20px;
}

.rbac-audit li {
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: #374151;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
  .rbac-sim__grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Sondergenehmigung (ohne Popups)
   ========================================================= */

.rbac-approval {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
}

.rbac-approval__text {
  margin-bottom: 10px;
  color: #374151;
  font-weight: 600;
  font-size: 0.9rem;
}

.rbac-approval__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* zusätzlicher Button-Stil */
.rbac-button--danger {
  background: #dc2626;
}
/* =========================================================
   Layout: Ergebnis + Audit nebeneinander
   ========================================================= */

/* Ergebnis und Audit sollen nebeneinander stehen */
#resultPanel,
#auditLog {
  height: 100%;
}

/* Audit-Log scrollbar machen, falls es länger wird */
.rbac-audit {
  max-height: 220px;
  overflow-y: auto;
}
