/* ============================================================================
 * MANDALOR Dark Glassmorphism Theme — Paperless-ngx EDMS Archive (docs.tth-4ups.ru)
 * ============================================================================ */
:root,
[data-bs-theme="light"],
[data-bs-theme="dark"],
[data-bs-theme="auto"],
html,
body {
  --pngx-primary: 199, 89% !important;
  --pngx-primary-lightness: 48% !important;
  --pngx-bg-alt: rgba(15, 23, 42, 0.82) !important;
  --pngx-bg-alt2: rgba(30, 41, 59, 0.85) !important;
  --pngx-bg-darker: #070b14 !important;
  --pngx-card-hover-border: rgba(56, 189, 248, 0.55) !important;
  --bs-primary: #0ea5e9 !important;
  --bs-primary-rgb: 14, 165, 233 !important;
  --bs-body-bg: #070b14 !important;
  --bs-body-color: #f8fafc !important;
  --bs-card-bg: rgba(15, 23, 42, 0.82) !important;
  --bs-border-color: rgba(56, 189, 248, 0.22) !important;
  --bs-tertiary-bg: rgba(15, 23, 42, 0.75) !important;
  --bs-secondary-bg: rgba(30, 41, 59, 0.78) !important;
  color-scheme: dark !important;
}

html,
body,
pngx-root,
main,
.col-slim {
  background:
    radial-gradient(circle at 18% 18%, rgba(56, 189, 248, 0.12), transparent 44%),
    radial-gradient(circle at 82% 82%, rgba(99, 102, 241, 0.10), transparent 46%),
    #070b14 !important;
  background-attachment: fixed !important;
  color: #f8fafc !important;
}

/* Top Navbar */
nav.navbar,
.navbar.bg-primary,
pngx-app-frame nav.navbar {
  background: rgba(11, 17, 30, 0.90) !important;
  backdrop-filter: blur(16px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.26) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45) !important;
}

/* Left Sidebar */
nav.sidebar,
#sidebarMenu,
.sidebar-sticky {
  background: rgba(11, 17, 30, 0.88) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-right: 1px solid rgba(56, 189, 248, 0.22) !important;
}

.sidebar .nav-link {
  border-radius: 10px !important;
  margin: 2px 8px !important;
  color: #cbd5e1 !important;
  transition: all 0.2s ease !important;
}

.sidebar .nav-link:hover {
  background: rgba(30, 41, 59, 0.65) !important;
  color: #f8fafc !important;
}

.sidebar .nav-link.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.28), rgba(79, 70, 229, 0.24)) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.18) !important;
}

/* Cards, Document Cards, Widgets, Dropzone, Modals & Tables */
.card,
pngx-document-card-small .card,
pngx-document-card-large .card,
.modal-content,
.list-group-item,
.dropdown-menu,
ngx-file-drop .ngx-file-drop__drop-zone {
  background: rgba(15, 23, 42, 0.82) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(56, 189, 248, 0.22) !important;
  border-radius: 14px !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.48) !important;
  color: #f8fafc !important;
  transition: all 0.2s ease;
}

pngx-document-card-small .card:hover,
pngx-document-card-large .card:hover {
  border-color: rgba(56, 189, 248, 0.55) !important;
  transform: translateY(-2px);
}

/* Primary Buttons */
.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  color: #fff !important;
  font-weight: 600 !important;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.30) !important;
  transition: all 0.2s ease !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 8px 26px rgba(56, 189, 248, 0.40) !important;
  transform: translateY(-1px);
}

/* Inputs, Selects & Ng-Select */
.form-control,
.form-select,
.ng-select .ng-select-container {
  background-color: rgba(15, 23, 42, 0.90) !important;
  border: 1px solid rgba(56, 189, 248, 0.26) !important;
  color: #f8fafc !important;
  border-radius: 8px !important;
}

.form-control:focus,
.form-select:focus,
.ng-select.ng-select-focused .ng-select-container {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
  outline: none !important;
}

/* MANDALOR EDMS Brand & AI Quicklink */
.mandalor-edms-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.10em;
  color: #f8fafc !important;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

.mandalor-edms-logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.55));
}

.mandalor-ai-quicklink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  color: #f8fafc !important;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.35), rgba(99, 102, 241, 0.35));
  border: 1px solid rgba(56, 189, 248, 0.50);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.22);
  transition: all 0.2s ease;
}

.mandalor-ai-quicklink:hover {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  border-color: #7dd3fc;
  color: #ffffff !important;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
}
