:root {
  --bg: #f4f8fc;
  --bg-soft: #eef4fb;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --border: rgba(28, 77, 138, 0.1);
  --text: #16314f;
  --muted: #6a7f97;
  --primary: #2a7fff;
  --primary-strong: #1667e8;
  --success: #1f9b68;
  --warning: #d9822b;
  --danger: #d65271;
}

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

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

body.app-shell {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(42, 127, 255, 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(67, 201, 255, 0.08), transparent 22%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
}

.app-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(72px);
  opacity: 0.5;
}

.orb-one {
  top: -5rem;
  left: -3rem;
  width: 16rem;
  height: 16rem;
  background: rgba(98, 176, 255, 0.18);
}

.orb-two {
  right: -3rem;
  top: 20%;
  width: 12rem;
  height: 12rem;
  background: rgba(42, 127, 255, 0.12);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(29, 93, 171, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 93, 171, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 85%);
}

a {
  color: var(--primary);
}

code {
  color: #195ec8;
  word-break: break-all;
}

.topbar {
  position: relative;
  z-index: 1;
  background: transparent;
}

.nav-shell {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 44px rgba(38, 72, 112, 0.12);
  backdrop-filter: blur(16px);
  border-radius: 22px;
  padding: 0.8rem 1rem;
}

.brand-lockup {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
}

.brand-mark {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #8fd1ff);
  box-shadow: 0 0 0.7rem rgba(42, 127, 255, 0.35);
}

.nav-link,
.navbar-brand,
.navbar-dark .navbar-nav .nav-link {
  color: rgba(22, 49, 79, 0.8);
}

.nav-link:hover,
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-brand:hover {
  color: #0f2640;
}

.nav-user-pill {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(42, 127, 255, 0.08);
  border: 1px solid rgba(42, 127, 255, 0.1);
  color: var(--text) !important;
}

.app-content {
  position: relative;
  z-index: 1;
}

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(22, 49, 79, 0.08);
}

.spotlight-card,
.glass-card,
.login-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 20px 48px rgba(38, 72, 112, 0.12);
  backdrop-filter: blur(16px);
}

.spotlight-card,
.login-panel {
  border-radius: 26px;
}

.spotlight-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  align-items: start;
}

.compact-spotlight-card {
  min-height: min(64vh, 30rem);
  align-items: center;
}

.spotlight-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.spotlight-copy h1 {
  margin-bottom: 0.75rem;
}

.eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: #4a8cff;
  font-weight: 700;
}

.lead-text,
.text-muted,
.site-description {
  color: var(--muted) !important;
}

.status-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  min-height: 100%;
  border-radius: 20px;
  padding: 1rem;
  background: linear-gradient(180deg, #f5faff, #eef5fd);
  border: 1px solid rgba(42, 127, 255, 0.12);
}

.compact-status-panel {
  align-self: start;
}

.warning-panel {
  background: linear-gradient(180deg, #fff5ee, #fffaf6);
  border-color: rgba(217, 130, 43, 0.18);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 3.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  background: rgba(42, 127, 255, 0.08);
}

.status-badge-warning {
  color: var(--warning);
  background: rgba(217, 130, 43, 0.12);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section-shell,
.users-shell {
  margin-bottom: 1rem;
}

.section-heading-bar,
.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.glass-card {
  border-radius: 20px;
  padding: 1rem;
}

.muted-card {
  text-align: center;
}

.site-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.9rem;
  min-height: 10.5rem;
}

.users-header {
  align-items: stretch;
}

.search-panel {
  padding: 0.75rem;
}

.search-form {
  display: flex;
  gap: 0.75rem;
  min-width: min(28rem, 100%);
}

.users-table-card {
  padding: 0.35rem;
}

.users-table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: rgba(22, 49, 79, 0.08);
  margin: 0;
}

.users-table thead th {
  color: #345b87;
  font-weight: 600;
  border-bottom-color: rgba(22, 49, 79, 0.1);
}

.users-table tbody tr:hover {
  --bs-table-accent-bg: rgba(42, 127, 255, 0.04);
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.mini-badge-success {
  background: rgba(31, 155, 104, 0.12);
  color: var(--success);
}

.mini-badge-muted {
  background: rgba(106, 127, 151, 0.12);
  color: #50667f;
}

.pagination-shell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.pagination-shell-dark .btn {
  border-color: rgba(22, 49, 79, 0.14);
}

.login-shell {
  min-height: calc(100vh - 12rem);
  display: grid;
  place-items: center;
}

.login-panel {
  overflow: hidden;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  width: min(100%, 980px);
}

.brand-column {
  padding: 1.6rem;
  background: linear-gradient(160deg, #edf5ff, #f8fbff);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.form-column {
  padding: 1.6rem;
  display: flex;
  align-items: center;
}

.login-form-shell {
  width: 100%;
}

.language-switcher {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.language-switcher a {
  color: #356da9;
  text-decoration: none;
}

.form-control,
.form-control:focus {
  color: var(--text);
  background: rgba(244, 248, 252, 0.8);
  border-color: rgba(22, 49, 79, 0.14);
}

.form-control::placeholder {
  color: rgba(106, 127, 151, 0.72);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border-color: transparent;
}

.btn-primary:hover,
.btn-primary:focus {
  color: #fff;
  background: linear-gradient(135deg, #4d94ff, #0f5ddb);
  border-color: transparent;
}

.btn-outline-light,
.btn-outline-primary,
.btn-outline-secondary {
  color: var(--text);
  border-color: rgba(22, 49, 79, 0.16);
  background: #fff;
}

.btn-outline-light:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover {
  color: var(--primary-strong);
  background: #f3f8ff;
  border-color: rgba(42, 127, 255, 0.24);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem rgba(255, 255, 255, 1), 0 0 0 0.25rem rgba(42, 127, 255, 0.22);
}

@media (max-width: 991.98px) {
  .spotlight-card,
  .login-panel,
  .page-header,
  .users-header,
  .search-form,
  .pagination-shell {
    display: block;
  }

  .spotlight-card,
  .brand-column,
  .form-column {
    padding: 1.1rem;
  }

  .status-panel {
    margin-top: 1rem;
  }

  .search-form {
    min-width: 0;
    margin-top: 1rem;
  }

  .search-form .form-control {
    margin-bottom: 0.75rem;
  }
}

@media (max-width: 767.98px) {
  .nav-shell {
    border-radius: 18px;
    padding: 0.75rem 0.9rem;
  }

  .spotlight-card,
  .glass-card,
  .login-panel {
    border-radius: 18px;
  }

  .spotlight-card,
  .brand-column,
  .form-column,
  .login-form-shell,
  .search-panel,
  .users-table-card {
    padding: 0.95rem;
  }

  .login-shell {
    min-height: auto;
  }

  .hero-actions,
  .language-switcher {
    gap: 0.55rem;
  }

  .hero-actions > *,
  .hero-actions form,
  .hero-actions .btn,
  .search-form .btn {
    width: 100%;
  }

  .pagination-shell {
    align-items: stretch;
  }

  .pagination-shell .btn-group {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }

  .compact-spotlight-card {
    min-height: auto;
  }
}
