/* ------------------------------------------------------------------ */
/* Basis-Styles des IAM-Kerns.                                        */
/* Verwendet ausschließlich Design-Tokens (--feb-*) — die Werte       */
/* liefert der Wirt über seine tokens.css.                            */
/* ------------------------------------------------------------------ */

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 15px;
  }
}

body {
  margin-bottom: 60px;
  background-color: var(--feb-bg);
  color: var(--feb-text);
  font-family: var(--feb-font-family, system-ui, sans-serif);
}

/* ------------------------------------------------------------------ */
/* Navbar                                                             */
/* ------------------------------------------------------------------ */
.navbar {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--feb-primary) !important;
}

/* ------------------------------------------------------------------ */
/* Buttons & Forms                                                    */
/* ------------------------------------------------------------------ */
.btn {
  border-radius: 0.5rem;
}

.btn-primary {
  background-color: var(--feb-primary);
  border-color: var(--feb-primary);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--feb-primary-dark);
  border-color: var(--feb-primary-dark);
}

.form-control, .form-select {
  border-radius: 0.5rem;
  border-color: var(--feb-border);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus, .form-select:focus {
  border-color: var(--feb-primary);
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.18);
}

.form-check-input:checked {
  background-color: var(--feb-primary);
  border-color: var(--feb-primary);
}

/* ------------------------------------------------------------------ */
/* Auth-Seiten (Login, Registrierung, Passwort-Reset, …)              */
/* Die Breite ist bewusst vom Seiten-Container entkoppelt: Wirte      */
/* steuern sie über --feb-auth-width, ohne den Container (und damit   */
/* den Admin-Bereich) einzuengen.                                     */
/* ------------------------------------------------------------------ */
.iam-auth {
  max-width: var(--feb-auth-width, 28rem);
  margin-inline: auto;
}

/* ------------------------------------------------------------------ */
/* Admin-Bereich                                                      */
/* ------------------------------------------------------------------ */
.admin-shell {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.admin-sidebar {
  flex: 0 0 230px;
  position: sticky;
  top: 1rem;
}

.admin-sidebar .sidebar-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--feb-text-muted);
  padding: 0.25rem 0.75rem 0.5rem;
}

.admin-sidebar .nav-link {
  color: var(--feb-text);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-sidebar .nav-link:hover {
  background-color: var(--feb-primary-soft);
  color: var(--feb-primary-dark);
}

.admin-sidebar .nav-link.active {
  background-color: var(--feb-primary);
  color: #fff;
  font-weight: 600;
}

.admin-sidebar .nav-link svg {
  flex-shrink: 0;
  opacity: 0.75;
}

.admin-content {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-card {
  background: var(--feb-surface);
  border: 1px solid var(--feb-border);
  border-radius: var(--feb-radius);
  box-shadow: var(--feb-shadow);
  padding: 1.75rem;
}

.admin-content h2:first-child,
.admin-card h2:first-child {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

@media (max-width: 767.98px) {
  .admin-shell {
    flex-direction: column;
  }

  .admin-sidebar {
    position: static;
    flex-basis: auto;
    width: 100%;
  }
}

/* ------------------------------------------------------------------ */
/* Tabellen                                                           */
/* ------------------------------------------------------------------ */
.admin-card .table {
  margin-bottom: 0;
  border-color: var(--feb-border);
}

.admin-card .table > thead {
  background: #f8fafc;
}

.admin-card .table > thead th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--feb-text-muted);
  border-bottom-width: 1px;
}

.admin-card .table > tbody td {
  vertical-align: middle;
}

.badge {
  border-radius: 999px;
  font-weight: 600;
  padding: 0.4em 0.8em;
}

/* Application-Zuweisung in Benutzerlisten; deaktivierte durchgestrichen */
.badge.app-badge {
  background: var(--feb-primary-soft, #eef2ff);
  color: var(--feb-primary-dark, #4338ca);
  border: 1px solid var(--feb-border);
}

.badge.app-badge.inactive {
  background: transparent;
  color: var(--feb-text-muted);
  text-decoration: line-through;
}

fieldset legend {
  font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Footer                                                             */
/* ------------------------------------------------------------------ */
.footer {
  background: transparent;
  border-top: 1px solid var(--feb-border) !important;
}
