/* ============================================================
   NexLookup — Professional Medical Billing Lookup Theme
   ============================================================ */

:root {
  --nl-primary: #0b5fff;
  --nl-primary-dark: #0847c7;
  --nl-primary-soft: #e8f0ff;
  --nl-accent: #00b4d8;
  --nl-success: #0d9488;
  --nl-danger: #e11d48;
  --nl-warning: #d97706;
  --nl-surface: #ffffff;
  --nl-bg: #f4f7fb;
  --nl-border: #e2e8f0;
  --nl-text: #0f172a;
  --nl-muted: #64748b;
  --nl-radius: 12px;
  --nl-radius-sm: 8px;
  --nl-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.04);
  --nl-shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.08);
  --nl-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

[data-bs-theme="dark"] {
  --nl-primary: #3b82f6;
  --nl-primary-dark: #2563eb;
  --nl-primary-soft: #1e293b;
  --nl-surface: #1e293b;
  --nl-bg: #0f172a;
  --nl-border: #334155;
  --nl-text: #f1f5f9;
  --nl-muted: #94a3b8;
  --nl-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
  --nl-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.35);
}

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

body {
  font-family: var(--nl-font);
  background: var(--nl-bg);
  color: var(--nl-text);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Navbar ---------- */
.navbar-nl {
  background: linear-gradient(135deg, #0b5fff 0%, #0847c7 100%) !important;
  box-shadow: 0 2px 12px rgba(11, 95, 255, 0.25);
  padding: 0.65rem 0;
}
.navbar-nl .navbar-brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.25rem;
}
.navbar-nl .nav-link {
  font-weight: 500;
  font-size: 0.9rem;
  opacity: 0.9;
  border-radius: 6px;
  padding: 0.4rem 0.75rem !important;
  transition: background 0.15s, opacity 0.15s;
}
.navbar-nl .nav-link:hover,
.navbar-nl .nav-link:focus {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}
.navbar-nl .btn-register {
  background: #fff;
  color: var(--nl-primary-dark);
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 0.35rem 1rem;
  font-size: 0.875rem;
}
.navbar-nl .btn-register:hover {
  background: #f0f6ff;
  color: var(--nl-primary-dark);
}

/* ---------- Hero ---------- */
.hero-nl {
  background: linear-gradient(145deg, #0b5fff 0%, #0847c7 45%, #062e8a 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 5rem;
}
.hero-nl::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(255,255,255,0.12), transparent),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(0,180,216,0.15), transparent);
  pointer-events: none;
}
.hero-nl h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
}
.hero-nl .lead {
  opacity: 0.9;
  font-size: 1.1rem;
  max-width: 520px;
}
.hero-search {
  background: #fff;
  border-radius: 14px;
  padding: 0.4rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  display: flex;
  gap: 0.35rem;
  max-width: 520px;
}
.hero-search input {
  border: none !important;
  box-shadow: none !important;
  font-size: 1rem;
  flex: 1;
  padding: 0.65rem 1rem;
  background: transparent;
  color: #0f172a;
}
.hero-search input::placeholder {
  color: #94a3b8;
}
.hero-search .btn {
  border-radius: 10px;
  padding: 0.65rem 1.4rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Tool cards ---------- */
.tool-card {
  background: var(--nl-surface);
  border: 1px solid var(--nl-border);
  border-radius: var(--nl-radius);
  box-shadow: var(--nl-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  overflow: hidden;
}
.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--nl-shadow-lg);
}
.tool-card .card-body {
  padding: 1.5rem;
}
.icon-wrap {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}
.icon-wrap.icd { background: #e8f0ff; color: #0b5fff; }
.icon-wrap.denial { background: #ffe4e6; color: #e11d48; }
.icon-wrap.npi { background: #ccfbf1; color: #0d9488; }
[data-bs-theme="dark"] .icon-wrap.icd { background: #1e3a5f; color: #60a5fa; }
[data-bs-theme="dark"] .icon-wrap.denial { background: #4c1d24; color: #fb7185; }
[data-bs-theme="dark"] .icon-wrap.npi { background: #134e4a; color: #2dd4bf; }

/* ---------- Stats ---------- */
.stat-card {
  background: var(--nl-surface);
  border: 1px solid var(--nl-border);
  border-radius: var(--nl-radius);
  box-shadow: var(--nl-shadow);
  padding: 1.15rem 1.25rem;
  transition: box-shadow 0.15s;
}
.stat-card:hover { box-shadow: var(--nl-shadow-lg); }
.stat-card .stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.stat-card .stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--nl-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
}

/* ---------- Search form card ---------- */
.search-panel {
  background: var(--nl-surface);
  border: 1px solid var(--nl-border);
  border-radius: var(--nl-radius);
  box-shadow: var(--nl-shadow);
  padding: 1.25rem 1.5rem;
}

/* ---------- Results table ---------- */
.results-table {
  background: var(--nl-surface);
  border: 1px solid var(--nl-border);
  border-radius: var(--nl-radius);
  overflow: hidden;
  box-shadow: var(--nl-shadow);
}
.results-table table {
  margin-bottom: 0;
}
.results-table thead th {
  background: var(--nl-bg);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--nl-muted);
  border-bottom: 1px solid var(--nl-border);
  padding: 0.75rem 1rem;
  white-space: nowrap;
}
.results-table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-color: var(--nl-border);
}
.results-table tbody tr:hover {
  background: var(--nl-primary-soft);
}
.code-badge {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--nl-primary);
  text-decoration: none;
}
.code-badge:hover { text-decoration: underline; }

/* ---------- Detail card ---------- */
.detail-card {
  background: var(--nl-surface);
  border: 1px solid var(--nl-border);
  border-radius: var(--nl-radius);
  box-shadow: var(--nl-shadow);
  padding: 2rem;
}
.detail-card .code-hero {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--nl-primary);
  letter-spacing: -0.02em;
}

/* ---------- List group polish ---------- */
.list-group-nl .list-group-item {
  border-color: var(--nl-border);
  padding: 0.9rem 1.15rem;
  background: var(--nl-surface);
}
.list-group-nl .list-group-item:hover {
  background: var(--nl-primary-soft);
}
.list-group-nl {
  border-radius: var(--nl-radius);
  overflow: hidden;
  box-shadow: var(--nl-shadow);
  border: 1px solid var(--nl-border);
}

/* ---------- Auth cards ---------- */
.auth-card {
  background: var(--nl-surface);
  border: 1px solid var(--nl-border);
  border-radius: 16px;
  box-shadow: var(--nl-shadow-lg);
  padding: 2rem;
  max-width: 420px;
  margin: 0 auto;
}
.auth-card h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ---------- Page header ---------- */
.page-header {
  margin-bottom: 1.5rem;
}
.page-header h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.page-header p {
  color: var(--nl-muted);
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */
.footer-nl {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}
.footer-nl h5, .footer-nl h6 {
  color: #f1f5f9;
  font-weight: 600;
}
.footer-nl a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}
.footer-nl a:hover { color: #fff; }
.footer-nl .brand-mark {
  color: #3b82f6;
}

/* ---------- Autocomplete ---------- */
.autocomplete-dropdown {
  position: absolute;
  z-index: 1050;
  width: 100%;
  max-height: 320px;
  overflow-y: auto;
  background: var(--nl-surface);
  border: 1px solid var(--nl-border);
  border-radius: var(--nl-radius-sm);
  box-shadow: var(--nl-shadow-lg);
  margin-top: 4px;
}
.autocomplete-item {
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  border-bottom: 1px solid var(--nl-border);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover,
.autocomplete-item.active {
  background: var(--nl-primary);
  color: #fff;
}
.autocomplete-item:hover .code-badge,
.autocomplete-item.active .code-badge {
  color: #fff;
}

/* ---------- Badges ---------- */
.badge-billable {
  background: #d1fae5;
  color: #065f46;
  font-weight: 600;
  font-size: 0.7rem;
  padding: 0.3em 0.55em;
  border-radius: 6px;
}
.badge-header {
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  font-size: 0.7rem;
  padding: 0.3em 0.55em;
  border-radius: 6px;
}
[data-bs-theme="dark"] .badge-billable { background: #064e3b; color: #6ee7b7; }
[data-bs-theme="dark"] .badge-header { background: #334155; color: #cbd5e1; }

/* ---------- Section ---------- */
.section-soft {
  background: var(--nl-surface);
  border-top: 1px solid var(--nl-border);
  border-bottom: 1px solid var(--nl-border);
}

/* ---------- Feature pills ---------- */
.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  margin: 0.2rem;
}

/* ---------- Pagination ---------- */
.pagination .page-link {
  border-radius: 8px !important;
  margin: 0 2px;
  border-color: var(--nl-border);
  color: var(--nl-primary);
  font-weight: 500;
  font-size: 0.875rem;
}
.pagination .page-item.active .page-link {
  background: var(--nl-primary);
  border-color: var(--nl-primary);
}

/* ---------- Misc ---------- */
.btn-primary {
  background: var(--nl-primary);
  border-color: var(--nl-primary);
  font-weight: 600;
  border-radius: 8px;
}
.btn-primary:hover {
  background: var(--nl-primary-dark);
  border-color: var(--nl-primary-dark);
}
.form-control, .form-select {
  border-radius: 8px;
  border-color: var(--nl-border);
}
.form-control:focus, .form-select:focus {
  border-color: var(--nl-primary);
  box-shadow: 0 0 0 3px rgba(11, 95, 255, 0.15);
}
.alert {
  border-radius: var(--nl-radius-sm);
  border: none;
}
.breadcrumb {
  font-size: 0.85rem;
}
