:root {
  --nexus-bg: #030712;
  --nexus-surface: rgba(8, 20, 43, .78);
  --nexus-surface-strong: rgba(9, 25, 54, .94);
  --nexus-line: rgba(61, 174, 255, .24);
  --nexus-blue: #1e9bff;
  --nexus-cyan: #62e9ff;
  --nexus-text: #e8f4ff;
  --nexus-muted: #8aa8c7;
}

html, body, .container-scroller, .page-body-wrapper, .main-panel, .content-wrapper {
  background-color: var(--nexus-bg) !important;
  color: var(--nexus-text) !important;
}

body {
  background-image:
    radial-gradient(circle at 16% 12%, rgba(30, 155, 255, .18), transparent 34%),
    radial-gradient(circle at 86% 8%, rgba(98, 233, 255, .10), transparent 28%),
    linear-gradient(135deg, #02050c 0%, #071329 48%, #030712 100%) !important;
  background-attachment: fixed !important;
  font-family: Inter, "Segoe UI", Tahoma, sans-serif !important;
}

.navbar, .sidebar, .card, .modal-content, .dropdown-menu, .auto-form-wrapper,
.dataTables_wrapper, .content-wrapper .card {
  background: var(--nexus-surface) !important;
  border: 1px solid var(--nexus-line) !important;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .32), inset 0 1px rgba(255, 255, 255, .03) !important;
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.navbar {
  background: rgba(3, 10, 25, .9) !important;
  border-width: 0 0 1px !important;
}

.sidebar {
  background: rgba(4, 12, 29, .94) !important;
  border-width: 0 1px 0 0 !important;
}

.card, .modal-content, .auto-form-wrapper {
  border-radius: 18px !important;
}

.card:hover {
  border-color: rgba(61, 174, 255, .42) !important;
  box-shadow: 0 22px 60px rgba(0, 94, 255, .16) !important;
}

.nexus-wordmark {
  display: inline-flex;
  align-items: center;
  letter-spacing: .16em;
  font-size: 1.25rem;
  font-weight: 900;
  color: #f4fbff;
  text-shadow: 0 0 24px rgba(30, 155, 255, .72);
}

.nexus-wordmark span { color: var(--nexus-cyan); }
.nexus-wordmark-mini { font-size: 1.05rem; letter-spacing: .04em; }
.nexus-login-logo { justify-content: center; font-size: 2.25rem; margin-bottom: .35rem; }
.nexus-login-subtitle { color: var(--nexus-muted); letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; margin-bottom: 1.8rem; }

.nav-link, .navbar .nav-link, .text-muted, label, small, .card-description {
  color: var(--nexus-muted) !important;
}

.nav-link:hover, .nav-item.active > .nav-link, a, .text-primary {
  color: var(--nexus-cyan) !important;
}

.sidebar .nav .nav-item .nav-link:hover,
.sidebar .nav .nav-item.active > .nav-link {
  background: linear-gradient(90deg, rgba(30, 155, 255, .18), rgba(30, 155, 255, .03)) !important;
  border-left: 2px solid var(--nexus-blue);
}

.btn-primary, .btn-info, .badge-primary, .bg-primary {
  background: linear-gradient(135deg, #087cff, #22c7ff) !important;
  border-color: rgba(98, 233, 255, .55) !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(8, 124, 255, .28) !important;
}

.btn-primary:hover, .btn-info:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(34, 199, 255, .42) !important;
}

.btn, .form-control, .custom-select, select {
  border-radius: 10px !important;
}

.form-control, .custom-select, select, textarea, input {
  background: rgba(2, 9, 22, .78) !important;
  border-color: rgba(83, 153, 218, .28) !important;
  color: var(--nexus-text) !important;
}

.form-control:focus, select:focus, textarea:focus, input:focus {
  border-color: var(--nexus-blue) !important;
  box-shadow: 0 0 0 .2rem rgba(30, 155, 255, .16) !important;
}

table, .table, .table td, .table th {
  color: var(--nexus-text) !important;
  border-color: rgba(83, 153, 218, .16) !important;
}

.table tbody tr:hover { background: rgba(30, 155, 255, .07) !important; }
.progress { background: rgba(0, 0, 0, .35) !important; }
.progress-bar { background: linear-gradient(90deg, #087cff, #62e9ff) !important; }

pre, code, .terminal, #term_wrap, .ace_editor {
  background: #020713 !important;
  color: #bfeaff !important;
  border-color: rgba(30, 155, 255, .25) !important;
}

.auth.auth-bg-1 {
  background-image:
    linear-gradient(120deg, rgba(2, 7, 19, .94), rgba(4, 22, 50, .72)),
    radial-gradient(circle at 72% 22%, rgba(30, 155, 255, .32), transparent 34%) !important;
}

.login-modal { max-width: 460px; margin: auto; padding: 2.25rem !important; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: #030712; }
::-webkit-scrollbar-thumb { background: #0d67b5; border-radius: 10px; }

@media (max-width: 767px) {
  .content-wrapper { padding: 1rem !important; }
  .card { border-radius: 14px !important; }
  .login-modal { margin: 1rem; padding: 1.5rem !important; }
  .nexus-login-logo { font-size: 1.8rem; }
  .table-responsive { border: 0 !important; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .card, .nav-link { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease; }
}
