/* ============================================================
   AREC Platform — NSV Design System Theme Override
   Tailwind v4: CSS custom property overrides + structural rules.
   Loaded last in every page; cascades over Tailwind defaults.
   ============================================================ */

/* ── Tailwind v4 blue palette → NSV #0057FF family ─────────── */
:root {
  --color-blue-50:  #E8F0FF;
  --color-blue-100: #D1E4FF;
  --color-blue-200: #A3C4FF;
  --color-blue-300: #6694FF;
  --color-blue-400: #3D7EFF;
  --color-blue-500: #2B5FFF;
  --color-blue-600: #0057FF;
  --color-blue-700: #0040CC;
  --color-blue-800: #002FA3;
  --color-blue-900: #001F6E;

  /* Indigo → unify to NSV blue */
  --color-indigo-50:  #E8F0FF;
  --color-indigo-100: #D1E4FF;
  --color-indigo-200: #A3C4FF;
  --color-indigo-300: #6694FF;
  --color-indigo-400: #3D7EFF;
  --color-indigo-500: #0057FF;
  --color-indigo-600: #0057FF;
  --color-indigo-700: #0040CC;
  --color-indigo-800: #002FA3;
  --color-indigo-900: #001F6E;
}

/* ── Body ─────────────────────────────────────────────────────── */
body {
  background-color: #FAFAFA !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* ── Glassmorphism header ─────────────────────────────────────── */
header {
  background: rgba(250, 250, 250, 0.88) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid #E5E8F0 !important;
}

/* ── Sidebar ──────────────────────────────────────────────────── */
aside.w-64, aside.sidebar, #sidebar {
  background-color: #FFFFFF !important;
  border-right: 1px solid #E5E8F0 !important;
}

/* ── Buttons → pill shape ─────────────────────────────────────── */
button:not([class*="rounded-full"]):not([class*="rounded-none"]):not([class*="rounded-sm"]),
.btn,
input[type="submit"],
input[type="button"] {
  border-radius: 9999px !important;
}

/* ── Input focus ──────────────────────────────────────────────── */
input:focus, textarea:focus, select:focus {
  border-color: #0057FF !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.12) !important;
}

/* ── Cards / panels ───────────────────────────────────────────── */
.bg-white.rounded-xl,
.bg-white.rounded-2xl,
.bg-white.rounded-lg,
.bg-white.rounded-md {
  border-color: #E5E8F0;
}
.shadow-lg { box-shadow: 0 10px 40px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04) !important; }
.shadow-md { box-shadow: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04) !important; }

/* ── Alt section backgrounds ──────────────────────────────────── */
.bg-gray-100 { background-color: #F3F6FF !important; }
.bg-gray-50  { background-color: #F8FAFF !important; }

/* ── Dark sections / footers ──────────────────────────────────── */
.bg-slate-900, .bg-gray-900, .bg-gray-800 {
  background-color: #0D0D1A !important;
}

/* ── Active sidebar nav item ──────────────────────────────────── */
a.text-blue-600.bg-blue-50,
.bg-blue-50.text-blue-600 {
  color: #0057FF !important;
  background-color: #E8F0FF !important;
  border-left: 3px solid #0057FF;
}

/* ── Progress / status bars ───────────────────────────────────── */
.bg-blue-600[style*="width"] { background-color: #0057FF !important; }

/* ============================================================
   NSV Circuit Background — Auth Pages (login, forgot-password)
   Layers injected by nsv-bg.js using position:fixed.
   ============================================================ */
.hero__bg-grid {
  position: fixed !important;
  inset: 0;
  background-image:
    linear-gradient(#E5E8F0 1px, transparent 1px),
    linear-gradient(90deg, #E5E8F0 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.5;
  z-index: 0 !important;
  pointer-events: none;
}
.hero__bg-glow {
  position: fixed !important;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 87, 255, 0.08) 0%, transparent 70%);
  z-index: 0 !important;
  pointer-events: none;
}
.hero__bg-anim {
  position: fixed !important;
  inset: 0;
  z-index: 0 !important;
  pointer-events: none;
}
.hero__bg-anim .ct { stroke: #0057FF !important; stroke-width: 1 !important; fill: none !important; opacity: .2 !important; }
.hero__bg-anim .nd { fill: #0057FF !important; stroke: none !important; }
.hero__bg-anim .fp { fill: #0057FF !important; stroke: none !important; }

/* Auth page: content floats above circuit layers */
body.arec-auth-page {
  background-color: #F0F4FF !important;
}
body.arec-auth-page > div:not(.hero__bg-grid):not(.hero__bg-glow):not(.hero__bg-anim),
body.arec-auth-page > main,
body.arec-auth-page > .w-full {
  position: relative;
  z-index: 1;
}

/* ============================================================
   Report pages — clean white, minimal decoration
   Class added by nsv-bg.js on Sample_*.html and report pages.
   ============================================================ */
body.arec-report-page {
  background: #FFFFFF !important;
}
body.arec-report-page .bg-gray-50 {
  background-color: #FAFAFA !important;
}
body.arec-report-page .bg-gray-100 {
  background-color: #F5F5F5 !important;
}
body.arec-report-page header {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: #FFFFFF !important;
}
