:root {
  --bg: #07090c;
  --panel: rgba(18, 22, 28, .78);
  --panel2: rgba(255, 255, 255, .04);
  --border: rgba(255, 255, 255, .08);
  --text: #e9eef6;
  --muted: rgba(233, 238, 246, .65);
  --brand: #c9162a;
  --brand2: #ff2d3d;
  --accent: #6e5cff;
  --accent2: #a45cff;
  --ok: #25c26a;
  --warn: #f7b500;
  --danger: #ff3b3b;
  --radius: 18px;
}

html,
body {
  height: 100%
}

body {
  background:
    radial-gradient(850px 420px at 10% 0%, rgba(201, 22, 42, .18), transparent 60%),
    radial-gradient(850px 420px at 90% 8%, rgba(255, 45, 61, .12), transparent 60%),
    linear-gradient(180deg, #050608, var(--bg) 60%, #050608);
  color: var(--text);
}

a {
  text-decoration: none;
}

.text-muted,
.text-white-50,
.form-text {
  color: var(--muted) !important;
}

.navbar {
  background: rgba(10, 12, 16, .82) !important;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .3px;
}

.navbar-brand img {
  height: 42px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .35));
}

.nav-link {
  border-radius: 12px;
  padding: .45rem .7rem !important;
}

.nav-link:hover {
  background: rgba(255, 255, 255, .05);
}

.page-wrap {
  max-width: 1200px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .30);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.kpi {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kpi .icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .08);
}

.kpi .value {
  font-size: 1.35rem;
  font-weight: 800;
}

.kpi .label {
  color: var(--muted);
  font-size: .9rem;
}

.btn {
  border-radius: 14px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  border: none;
  box-shadow: 0 12px 30px rgba(201, 22, 42, .25);
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, .18);
}

.form-control,
.form-select {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(201, 22, 42, .65);
  box-shadow: 0 0 0 .2rem rgba(201, 22, 42, .22);
}

.table thead th {
  background: rgba(12, 15, 20, .92) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
}

.table td,
.table th {
  border-color: rgba(255, 255, 255, .07) !important;
  vertical-align: middle;
}

.table-striped>tbody>tr:nth-of-type(odd)>* {
  background-color: rgba(255, 255, 255, .02) !important;
}

.table-hover>tbody>tr:hover>* {
  background-color: rgba(255, 255, 255, .04) !important;
}

.badge {
  border-radius: 999px;
  padding: .48rem .7rem;
  font-weight: 700;
}

.badge.bg-success {
  background: rgba(37, 194, 106, .16) !important;
  color: #7CFFB0
}

.badge.bg-danger {
  background: rgba(255, 59, 59, .14) !important;
  color: #ff9b9b
}

.badge.bg-warning {
  background: rgba(247, 181, 0, .16) !important;
  color: #ffe28a
}

.badge.text-bg-secondary {
  background: rgba(255, 255, 255, .08) !important;
  color: var(--text);
}

.auth-shell {
  min-height: calc(100vh - 2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 14px;
}

.auth-card {
  width: min(920px, 96vw);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.auth-logo img {
  height: 92px;
  width: auto;
}


.auth-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  overflow: hidden;
}

.auth-side {
  padding: 26px 26px;
  background:
    radial-gradient(520px 280px at 10% 0%, rgba(110, 92, 255, .24), transparent 60%),
    radial-gradient(520px 280px at 90% 20%, rgba(164, 92, 255, .16), transparent 60%),
    rgba(255, 255, 255, .03);
  border-right: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-side .brandline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-side .brandline img {
  height: 58px;
  width: auto;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .35));
}

.auth-side .headline {
  font-weight: 900;
  letter-spacing: .3px;
  font-size: 1.35rem;
  line-height: 1.15;
  margin-top: 14px;
}

.auth-side .subline {
  color: rgba(233, 238, 246, .65);
  margin-top: 6px;
}

.auth-side .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.auth-chip {
  padding: 9px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(233, 238, 246, .82);
  font-weight: 700;
  font-size: .85rem;
}

.auth-form {
  padding: 26px 26px;
}

@media (max-width: 820px) {
  .auth-split {
    grid-template-columns: 1fr;
  }

  .auth-side {
    display: none;
  }

  .auth-card {
    width: min(520px, 96vw);
  }
}


/* -------------------------------------------------
   Panel Layout (Sidebar + Topbar) – passend zum Look
   der Beispiel-Screenshots (dark / glass / soft glow)
--------------------------------------------------*/

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 18px;
  padding: 18px;
}

.sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
  height: calc(100vh - 36px);
  border-radius: 24px;
  background:
    radial-gradient(400px 240px at 20% 0%, rgba(110, 92, 255, .22), transparent 60%),
    radial-gradient(520px 260px at 75% 10%, rgba(164, 92, 255, .16), transparent 60%),
    rgba(12, 14, 18, .72);
  border: 1px solid rgba(255, 255, 255, .10);
  backdrop-filter: blur(16px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, .45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-logo {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .10);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sidebar-logo img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .35));
}

.sidebar-brand-text .app-name {
  font-weight: 900;
  letter-spacing: .3px;
  font-size: 1.05rem;
}

.sidebar-brand-text .app-sub {
  color: var(--muted);
  font-size: .85rem;
  margin-top: 2px;
}

.sidebar-nav {
  padding: 14px 12px 12px;
  overflow: auto;
}

.nav-section {
  margin: 14px 10px 8px;
  color: rgba(233, 238, 246, .55);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  margin: 6px 6px;
  border-radius: 16px;
  color: rgba(233, 238, 246, .86);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .03);
}

.nav-item i {
  font-size: 1.05rem;
  opacity: .92;
}

.nav-item:hover {
  background: rgba(255, 255, 255, .055);
  border-color: rgba(255, 255, 255, .08);
}

.nav-item.is-active {
  background: linear-gradient(135deg, rgba(110, 92, 255, .85), rgba(164, 92, 255, .75));
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 18px 40px rgba(110, 92, 255, .18);
  color: #fff;
}

.sidebar-footer {
  padding: 14px 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  margin-top: auto;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
}

.user-chip .avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(110, 92, 255, .85), rgba(164, 92, 255, .75));
}

.user-chip .name {
  font-weight: 800;
  line-height: 1.1;
}

.user-chip .role {
  color: var(--muted);
  font-size: .85rem;
}

.logout {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 12px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .02);
  border: 1px solid rgba(255, 255, 255, .08);
  color: rgba(233, 238, 246, .85);
}

.logout:hover {
  background: rgba(255, 255, 255, .055);
}

.app-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.topbar {
  border-radius: 24px;
  background: rgba(12, 14, 18, .62);
  border: 1px solid rgba(255, 255, 255, .10);
  backdrop-filter: blur(16px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, .35);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.crumbs {
  color: rgba(233, 238, 246, .85);
  font-weight: 750;
}

.crumbs .crumb {
  color: rgba(233, 238, 246, .55);
  font-weight: 700;
}

.crumbs .sep {
  margin: 0 8px;
  color: rgba(233, 238, 246, .35);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-search {
  position: relative;
  min-width: min(520px, 44vw);
}

.top-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(233, 238, 246, .55);
}

.top-search .form-control {
  padding-left: 40px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .03) !important;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--ok);
  box-shadow: 0 0 0 6px rgba(37, 194, 106, .12);
}

.top-user {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .02);
  white-space: nowrap;
}

.top-user .u-name {
  font-weight: 800;
}

.top-user .u-role {
  color: rgba(233, 238, 246, .55);
  font-weight: 700;
}

.content {
  border-radius: 24px;
  background: rgba(12, 14, 18, .38);
  border: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(14px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, .30);
  padding: 18px;
}

/* Bootstrap Container innerhalb des Content-Bereichs entkoppeln */
.content .page-wrap {
  max-width: 1200px;
}

/* Responsive */
@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .top-search {
    min-width: 280px;
  }
}

/* --- Fix: Dropdown Optionen im Dark Mode lesbar --- */
:root {
  color-scheme: dark;
}

/* hilft vielen Browsern bei nativen Controls */

.form-select,
.form-control {
  color: var(--text) !important;
  background-color: rgba(255, 255, 255, .04) !important;
}

/* Wichtig: Optionen separat stylen (native Dropdown-Liste) */
.form-select option {
  background-color: #0f131a !important;
  /* dunkler als panel */
  color: var(--text) !important;
}

/* Optional: Disabled/Placeholder Options */
.form-select option:disabled {
  color: rgba(233, 238, 246, .45) !important;
}

/* Optional: Firefox/Chromium teils nötig */
.form-select optgroup {
  background-color: #0f131a !important;
  color: var(--text) !important;
}

.form-select {
  background-color: #10141b !important;
}

select,
select.form-select,
select.form-control {
  background-color: #10141b !important;
  color: var(--text) !important;
}

select option,
select.form-select option,
select.form-control option {
  background-color: #0f131a !important;
  color: var(--text) !important;
}

select optgroup {
  background-color: #0f131a !important;
  color: var(--text) !important;
}

/* -------------------------------------------------
   Bootstrap-Komponenten: Buttons / Alerts / Modals
   Ziel: überall gleicher "Glass + Soft glow" Look
--------------------------------------------------*/

/* Buttons – Grundlook */
.btn {
  border-radius: 14px;
  font-weight: 750;
  letter-spacing: .2px;
}

/* Primär (bereits vorhanden) – zusätzlich Focus/Active konsistent */
.btn-primary:focus,
.btn-primary:active {
  box-shadow: 0 0 0 .2rem rgba(201, 22, 42, .22), 0 12px 30px rgba(201, 22, 42, .22) !important;
}

/* Sekundär */
.btn-secondary {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, .10);
}

/* Danger / Success / Warning – als "Pills" wie im Screenshot */
.btn-danger {
  background: linear-gradient(135deg, #b3132a, #ff2d3d);
  border: none;
  box-shadow: 0 12px 30px rgba(255, 45, 61, .18);
}

.btn-danger:hover {
  filter: brightness(1.06);
}

.btn-success {
  background: linear-gradient(135deg, #1e9a57, #25c26a);
  border: none;
  box-shadow: 0 12px 30px rgba(37, 194, 106, .16);
}

.btn-success:hover {
  filter: brightness(1.06);
}

.btn-warning {
  background: linear-gradient(135deg, #b88700, #f7b500);
  border: none;
  color: #1b1400;
  box-shadow: 0 12px 30px rgba(247, 181, 0, .14);
}

.btn-warning:hover {
  filter: brightness(1.05);
}

/* Outline Buttons */
.btn-outline-primary {
  border-color: rgba(201, 22, 42, .55);
  color: rgba(255, 255, 255, .92);
}

.btn-outline-primary:hover {
  background: rgba(201, 22, 42, .18);
  border-color: rgba(201, 22, 42, .75);
}

.btn-outline-danger {
  border-color: rgba(255, 45, 61, .55);
  color: rgba(255, 255, 255, .92);
}

.btn-outline-danger:hover {
  background: rgba(255, 45, 61, .16);
  border-color: rgba(255, 45, 61, .75);
}

.btn-outline-success {
  border-color: rgba(37, 194, 106, .55);
  color: rgba(255, 255, 255, .92);
}

.btn-outline-success:hover {
  background: rgba(37, 194, 106, .14);
  border-color: rgba(37, 194, 106, .75);
}

.btn-outline-warning {
  border-color: rgba(247, 181, 0, .55);
  color: rgba(255, 255, 255, .92);
}

.btn-outline-warning:hover {
  background: rgba(247, 181, 0, .12);
  border-color: rgba(247, 181, 0, .75);
}

/* Kleine Buttons sollen weiterhin "puffy" wirken */
.btn-sm,
.btn-group-sm>.btn {
  border-radius: 12px;
  padding: .35rem .6rem;
}

/* Inputs – Input Group */
.input-group-text {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  color: rgba(233, 238, 246, .75);
  border-radius: 14px;
}

/* Checkbox / Switch */
.form-check-input {
  background-color: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .18);
}

.form-check-input:checked {
  background-color: rgba(201, 22, 42, .95);
  border-color: rgba(201, 22, 42, .95);
}

.form-check-input:focus {
  box-shadow: 0 0 0 .2rem rgba(201, 22, 42, .18);
  border-color: rgba(201, 22, 42, .55);
}

/* Dropdown */
.dropdown-menu {
  background: rgba(12, 14, 18, .86);
  border: 1px solid rgba(255, 255, 255, .10);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .45);
}

.dropdown-item {
  color: rgba(233, 238, 246, .86);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

/* Alerts */
.alert {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(12, 14, 18, .62);
  backdrop-filter: blur(14px);
}

.alert-success {
  border-color: rgba(37, 194, 106, .28);
  background: rgba(37, 194, 106, .10);
  color: rgba(233, 238, 246, .92);
}

.alert-danger {
  border-color: rgba(255, 45, 61, .28);
  background: rgba(255, 45, 61, .10);
  color: rgba(233, 238, 246, .92);
}

.alert-warning {
  border-color: rgba(247, 181, 0, .26);
  background: rgba(247, 181, 0, .10);
  color: rgba(233, 238, 246, .92);
}

.alert-info {
  border-color: rgba(110, 92, 255, .26);
  background: rgba(110, 92, 255, .10);
  color: rgba(233, 238, 246, .92);
}

/* Modal */
.modal-content {
  background: rgba(12, 14, 18, .82);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 22px;
  backdrop-filter: blur(16px);
  box-shadow: 0 35px 80px rgba(0, 0, 0, .55);
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.modal-footer {
  border-top: 1px solid rgba(255, 255, 255, .08);
}

/* Pagination */
.pagination .page-link {
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .10);
  color: rgba(233, 238, 246, .86);
  border-radius: 14px;
  margin: 0 4px;
}

.pagination .page-link:hover {
  background: rgba(255, 255, 255, .06);
}

.pagination .page-item.active .page-link {
  background: rgba(201, 22, 42, .22);
  border-color: rgba(201, 22, 42, .55);
  color: #fff;
}

/* Tabs */
.nav-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.nav-tabs .nav-link {
  border: 1px solid transparent;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  color: rgba(233, 238, 246, .72);
}

.nav-tabs .nav-link:hover {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .08);
}

.nav-tabs .nav-link.active {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .10);
  color: #fff;
}

/* ===== Dropdown Fix (auch für form-control / size / multiple) ===== */
select {
  background-color: #10141b !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}

select:focus {
  border-color: rgba(201, 22, 42, .65) !important;
  box-shadow: 0 0 0 .2rem rgba(201, 22, 42, .22) !important;
  outline: none !important;
}

/* Die Liste selbst */
select option {
  background-color: #0f131a !important;
  color: var(--text) !important;
}

/* markierte/ausgewählte option */
select option:checked,
select option:hover {
  background-color: rgba(201, 22, 42, .35) !important;
  color: var(--text) !important;
}

/* Erzwingt Dark-UI für native Form-Controls */
html {
  color-scheme: dark;
}

body {
  color-scheme: dark;
}

select.form-select,
select.form-control,
select {
  color-scheme: dark;
}

/* (optional) trotzdem option-styles lassen */
select option {
  background-color: #0f131a !important;
  color: #e9eef6 !important;
}

/* ------------------------------------------------------------------
   App Shell (Sidebar + Topbar) – inspiriert vom hochgeladenen Design
   ------------------------------------------------------------------ */

.app-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
  gap: 22px;
  padding: 22px;
}

.sidebar {
  background: rgba(10, 12, 16, .80);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 14px;
}

.sidebar-logo {
  width: 86px;
  height: 86px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .10);
  background:
    radial-gradient(140px 90px at 20% 20%, rgba(110, 92, 255, .35), transparent 60%),
    radial-gradient(140px 90px at 80% 20%, rgba(164, 92, 255, .25), transparent 60%),
    rgba(255, 255, 255, .03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo img {
  width: 145px;
  height: 145px;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .45));
}

.sidebar-brand-text .app-name {
  font-weight: 900;
  letter-spacing: .2px;
  font-size: 1.05rem;
}

.sidebar-brand-text .app-sub {
  color: var(--muted);
  font-size: .85rem;
}

.sidebar-nav {
  padding: 6px 10px 12px;
  flex: 1;
  overflow: auto;
}

.nav-section {
  padding: 14px 12px 8px;
  color: rgba(233, 238, 246, .55);
  font-weight: 800;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 16px;
  color: rgba(233, 238, 246, .88);
  border: 1px solid transparent;
  margin: 6px 6px;
}

.nav-item i {
  opacity: .95;
  font-size: 1.05rem;
}

.nav-item span {
  font-weight: 700;
  font-size: .95rem;
}

.nav-item:hover {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .06);
}

.nav-item.is-active {
  background: linear-gradient(135deg, rgba(110, 92, 255, .55), rgba(164, 92, 255, .35));
  border-color: rgba(255, 255, 255, .10);
  box-shadow: 0 16px 36px rgba(110, 92, 255, .18);
}

.sidebar-footer {
  padding: 14px 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .02);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .03);
}

.user-chip .avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(110, 92, 255, .85), rgba(164, 92, 255, .60));
  border: 1px solid rgba(255, 255, 255, .14);
}

.user-meta .name {
  font-weight: 900;
  line-height: 1.1;
}

.user-meta .role {
  color: var(--muted);
  font-size: .85rem;
}

.logout {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 16px;
  color: rgba(233, 238, 246, .92);
  border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 59, 59, .10);
}

.logout:hover {
  filter: brightness(1.06);
}

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.topbar {
  background: rgba(10, 12, 16, .74);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .35);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.crumbs {
  font-weight: 800;
  color: rgba(233, 238, 246, .85);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.crumbs .crumb {
  color: rgba(233, 238, 246, .55);
}

.crumbs .sep {
  color: rgba(233, 238, 246, .35);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.top-search {
  position: relative;
  min-width: min(520px, 42vw);
}

.top-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .65;
}

.top-search .form-control {
  padding-left: 40px;
  height: 44px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .03);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--ok);
  box-shadow: 0 0 0 6px rgba(37, 194, 106, .12);
}

.top-user {
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.top-user .u-name {
  font-weight: 900;
}

.top-user .u-role {
  color: var(--muted);
  font-weight: 800;
}

.content {
  background: rgba(255, 255, 255, .00);
  padding: 6px;
}

/* Content spacing – Bootstrap Seiten sollen weiter funktionieren */
.content .page-wrap {
  max-width: 1400px;
  padding: 0;
}

/* Responsive */
@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .top-search {
    min-width: 1px;
    flex: 1;
  }
}

/* Runde Ecken für Tabellen in Cards */
.card .table-responsive {
  border-radius: var(--radius);
  overflow: hidden;
}

.card .table {
  margin-bottom: 0;
}

/* ===========================
   FIX: PDF-Modal nicht klickbar / nicht scrollbar
   Ursache: Backdrop liegt über dem Modal (Stacking Context)
   =========================== */

.modal {
  z-index: 3000 !important;
}

.modal-backdrop {
  z-index: 2990 !important;
}

/* Modal-Inhalt sauber scrollbar */
#trainingPdfModal .modal-body {
  max-height: calc(100vh - 180px);
  overflow: auto;
}

/* Iframe bekommt eine stabile Höhe */
#trainingPdfModal iframe {
  width: 100%;
  height: 80vh;
  border: 0;
  display: block;
}

/* Bootstrap Modal Z-Index fix (stabiler als nur .modal z-index) */
:root {
  --bs-modal-zindex: 4000;
  --bs-backdrop-zindex: 3990;
}

.modal {
  z-index: 5000 !important;
}

.modal-backdrop {
  z-index: 4990 !important;
}

.modal-dialog {
  pointer-events: none;
  position: relative;
  z-index: 5001;
}

.modal-content {
  pointer-events: auto;
  position: relative;
  z-index: 5002;
  opacity: 1 !important;
}

.modal.show .modal-dialog {
  transform: none !important;
}