:root {
  --app-bg: #020b14;
  --panel-bg: rgba(15, 28, 43, 0.82);
  --panel-bg-strong: rgba(20, 34, 52, 0.94);
  --panel-border: rgba(145, 167, 198, 0.18);
  --text-main: #f7f8ff;
  --text-muted: #a8b2c4;
  --purple: #8b5cf6;
  --purple-2: #a855f7;
  --blue: #38bdf8;
  --green: #4ade80;
  --orange: #fb923c;
  --red: #f43f5e;
  --sidebar-width: 280px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.13), transparent 30rem),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.14), transparent 34rem),
    var(--app-bg);
  color: var(--text-main);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card,
.glass-card {
  background: linear-gradient(145deg, rgba(18, 32, 49, 0.94), rgba(9, 20, 33, 0.9));
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

.login-card {
  width: min(440px, 100%);
  padding: 34px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  box-shadow: 0 14px 30px rgba(139, 92, 246, 0.34);
}

.form-control,
.form-select {
  color: var(--text-main);
  background-color: rgba(5, 14, 25, 0.76);
  border-color: rgba(145, 167, 198, 0.22);
  border-radius: 14px;
}

.form-control:focus,
.form-select:focus {
  color: var(--text-main);
  background-color: rgba(5, 14, 25, 0.94);
  border-color: rgba(139, 92, 246, 0.78);
  box-shadow: 0 0 0 0.25rem rgba(139, 92, 246, 0.16);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  border-color: rgba(139, 92, 246, 0.7);
  border-radius: 14px;
  font-weight: 700;
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 14px;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  padding: 22px 18px;
  background: rgba(8, 19, 32, 0.88);
  border-right: 1px solid var(--panel-border);
  backdrop-filter: blur(18px);
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 4px;
  font-weight: 650;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: #fff;
  background: rgba(139, 92, 246, 0.16);
}

.sidebar .nav-link.active {
  box-shadow: inset 4px 0 0 var(--purple);
}

.main {
  width: 100%;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 86px;
  padding: 18px 28px;
  background: rgba(2, 11, 20, 0.72);
  border-bottom: 1px solid var(--panel-border);
  backdrop-filter: blur(18px);
}

.content {
  padding: 28px;
}

.stat-card {
  min-height: 148px;
  padding: 22px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  font-size: 1.35rem;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-main);
  --bs-table-border-color: rgba(145, 167, 198, 0.14);
}

.table thead th {
  color: var(--text-muted);
  border-bottom-color: rgba(145, 167, 198, 0.24);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-soft {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 10px;
}

.badge-active {
  color: var(--green);
  background: rgba(74, 222, 128, 0.12);
}

.badge-inactive {
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.12);
}

.empty-state {
  border: 1px dashed rgba(145, 167, 198, 0.24);
  border-radius: 18px;
  padding: 34px;
  color: var(--text-muted);
}

@media (max-width: 991px) {
  .sidebar {
    position: static;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .app-shell {
    display: block;
  }

  .main {
    margin-left: 0;
  }
}
