/* ==========================================================================
   New Era Drug Testing — UI layer
   Sits on top of the Phoenix (Bootstrap 5) theme. Loaded after theme.min.css
   and newera.css from layout/head.blade.php.

   1. Tokens (light + dark)
   2. Base
   3. App shell: sidebar, topbar, content, footer
   4. Client company header + tab strip
   5. Component polish (cards, buttons, forms, tables, DataTables, modals…)
   6. Utilities
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --ne-sidebar-w: 264px;
  --ne-sidebar-w-collapsed: 78px;
  --ne-topbar-h: 72px;

  --ne-navy-950: #071530;
  --ne-navy-900: #0a1b3a;
  --ne-navy-800: #0f2447;
  --ne-nav-text: #b8c4dc;
  --ne-nav-muted: #6f7f9f;

  --ne-primary: var(--phoenix-primary, #3874ff);
  --ne-primary-rgb: 56, 116, 255;
  --ne-primary-soft: rgba(var(--ne-primary-rgb), .10);
  --ne-orange: #f97316;

  --ne-bg: #f4f6fb;
  --ne-surface: #ffffff;
  --ne-surface-2: #f8f9fc;
  --ne-border: #e5e8f0;
  --ne-text: #18213a;
  --ne-muted: #6b7489;

  --ne-radius: 14px;
  --ne-radius-sm: 10px;
  --ne-shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --ne-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 6px rgba(16, 24, 40, .05);
  --ne-shadow-lg: 0 16px 40px rgba(16, 24, 40, .14);
  --ne-ring: 0 0 0 4px rgba(var(--ne-primary-rgb), .15);

  --ne-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Swap Phoenix's font for Inter everywhere */
  --phoenix-font-sans-serif: var(--ne-font);
  --phoenix-body-font-family: var(--ne-font);
}

html.dark {
  --ne-primary-rgb: 133, 169, 255;
  --ne-bg: #0e1119;
  --ne-surface: #161b27;
  --ne-surface-2: #1b2130;
  --ne-border: #262d3e;
  --ne-text: #e3e7f0;
  --ne-muted: #8a94ad;
  --ne-navy-950: #070a12;
  --ne-navy-900: #0b0f1a;
  --ne-navy-800: #111726;
  --ne-shadow-sm: none;
  --ne-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --ne-shadow-lg: 0 16px 40px rgba(0, 0, 0, .5);
}

/* 2. Base ------------------------------------------------------------------ */
body.ne-body {
  font-family: var(--ne-font);
  background: var(--ne-bg);
  color: var(--ne-text);
  -webkit-font-smoothing: antialiased;
  font-size: .9375rem;
}
.ne-body h1, .ne-body h2, .ne-body h3, .ne-body h4, .ne-body h5, .ne-body h6 {
  font-family: var(--ne-font);
  letter-spacing: -.01em;
}
.ne-body a { text-decoration: none; }

/* 3. App shell ------------------------------------------------------------- */

/* ---- Sidebar ---- */
.ne-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--ne-sidebar-w);
  background: linear-gradient(180deg, var(--ne-navy-800) 0%, var(--ne-navy-900) 55%, var(--ne-navy-950) 100%);
  color: var(--ne-nav-text);
  display: flex;
  flex-direction: column;
  z-index: 1045;
  transition: width .2s ease, transform .25s ease;
}
.ne-sidebar__brand {
  height: var(--ne-topbar-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.ne-sidebar__brand img { height: 40px; width: auto; display: block; }
.ne-sidebar__brand .ne-brand-mark { display: none; }

.ne-sidebar__company {
  margin: 14px 14px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .07);
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.ne-sidebar__company small { display: block; color: var(--ne-nav-muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.ne-sidebar__company strong { display: block; font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ne-sidebar__scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 14px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .15) transparent;
}
.ne-sidebar__scroll::-webkit-scrollbar { width: 6px; }
.ne-sidebar__scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); border-radius: 6px; }

.ne-nav, .ne-subnav { list-style: none; margin: 0; padding: 0; }
.ne-nav-section {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--ne-nav-muted);
  padding: 18px 12px 6px;
  white-space: nowrap;
}
.ne-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  margin: 2px 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ne-nav-text);
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.ne-nav-link:hover, .ne-nav-link:focus-visible { background: rgba(255, 255, 255, .07); color: #fff; outline: none; }
.ne-nav-link.active {
  background: #3874ff; /* fixed (not theme var) so it stays strong in dark mode */
  color: #fff;
  box-shadow: 0 8px 18px rgba(56, 116, 255, .35);
}
.ne-nav-link.is-open-parent { color: #fff; }
.ne-nav-icon { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; line-height: 1; }
.ne-nav-text { overflow: hidden; text-overflow: ellipsis; }
.ne-nav-caret { margin-left: auto; font-size: .75rem; opacity: .7; transition: transform .2s ease; }
.ne-nav-link[aria-expanded="true"] .ne-nav-caret { transform: rotate(180deg); }
.ne-nav-link .ne-ext { margin-left: auto; font-size: .8rem; opacity: .6; }

.ne-subnav {
  margin: 2px 0 6px 23px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, .09);
}
.ne-subnav .ne-nav-link { padding: 8px 12px; font-size: .855rem; font-weight: 400; margin: 1px 0; }
.ne-subnav .ne-nav-link.active { box-shadow: none; font-weight: 500; }

.ne-sidebar__footer { flex-shrink: 0; padding: 12px 14px 16px; border-top: 1px solid rgba(255, 255, 255, .06); }
.ne-help-card {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
.ne-help-card__title { color: #fff; font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ne-help-card__title i { color: #7fa6ff; font-size: 1.1rem; }
.ne-help-card p { font-size: .78rem; color: var(--ne-nav-text); margin-bottom: 10px; line-height: 1.45; }
.ne-collapse-btn { color: var(--ne-nav-muted); font-size: .82rem; }
.ne-collapse-btn .ne-nav-icon { transition: transform .2s ease; }

/* Short screens: drop the help card so nav items stay visible */
@media (max-height: 820px) { .ne-help-card { display: none; } }

/* ---- Main column ---- */
.ne-main {
  margin-left: var(--ne-sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left .2s ease;
  min-width: 0;
}

/* ---- Topbar ---- */
.ne-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--ne-topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 28px;
  background: rgba(244, 246, 251, .85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--ne-border);
}
html.dark .ne-topbar { background: rgba(14, 17, 25, .85); }
.ne-topbar__title { min-width: 0; flex: 1 1 auto; }
.ne-topbar__title h1 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  color: var(--ne-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ne-topbar__title p { margin: 2px 0 0; font-size: .82rem; color: var(--ne-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ne-topbar__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ne-topbar__divider { width: 1px; height: 32px; background: var(--ne-border); margin: 0 6px; }

.ne-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ne-border);
  background: var(--ne-surface);
  color: var(--ne-text);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
  flex-shrink: 0;
}
.ne-icon-btn:hover { background: var(--ne-surface-2); border-color: #cfd5e3; color: var(--ne-text); }

/* theme toggle — Phoenix listens for clicks on the checkbox itself */
.ne-theme-toggle { position: relative; }
.ne-theme-toggle input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.ne-theme-toggle .ne-theme-dark { display: none; }
html.dark .ne-theme-toggle .ne-theme-light { display: none; }
html.dark .ne-theme-toggle .ne-theme-dark { display: inline-flex; }

.ne-user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 4px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ne-text);
  transition: background-color .15s ease;
}
.ne-user-btn:hover, .ne-user-btn[aria-expanded="true"] { background: var(--ne-surface); border-color: var(--ne-border); }
.ne-user-btn__name { font-weight: 600; font-size: .875rem; line-height: 1.2; text-align: left; }
.ne-user-btn__role { font-size: .75rem; color: var(--ne-muted); line-height: 1.2; text-align: left; }

.ne-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  background: var(--ne-primary-soft);
  color: var(--ne-primary);
  flex-shrink: 0;
  letter-spacing: .02em;
}
.ne-avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; border-radius: 16px; }
.ne-avatar-sm { width: 32px; height: 32px; font-size: .75rem; }
.ne-sidebar .ne-avatar { background: rgba(255, 255, 255, .1); color: #fff; }

.ne-dropdown-user { min-width: 240px; }
.ne-dropdown-user__head { padding: 12px 14px; border-bottom: 1px solid var(--ne-border); margin: -.4rem -.4rem .4rem; display: flex; gap: 10px; align-items: center; }

/* ---- Content + footer ---- */
.ne-content { flex: 1 1 auto; padding: 28px; min-width: 0; }
.ne-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-top: 1px solid var(--ne-border);
  font-size: .8rem;
  color: var(--ne-muted);
}
.ne-footer a { color: var(--ne-muted); }
.ne-footer a:hover { color: var(--ne-primary); }
.ne-footer__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ---- Flash alerts ---- */
.ne-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid transparent;
  font-size: .9rem;
}
.ne-alert > i { font-size: 1.2rem; line-height: 1.2; flex-shrink: 0; }
.ne-alert__body { flex: 1 1 auto; min-width: 0; }
.ne-alert__body ul { margin: 0; padding-left: 1.1rem; }
.ne-alert .btn-close { flex-shrink: 0; font-size: .7rem; margin-top: 3px; }
.ne-alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.ne-alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.ne-alert-warning { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
html.dark .ne-alert-danger { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .3); color: #fca5a5; }
html.dark .ne-alert-success { background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .3); color: #6ee7b7; }
html.dark .ne-alert-warning { background: rgba(249, 115, 22, .12); border-color: rgba(249, 115, 22, .3); color: #fdba74; }
.ne-alert-pastdue { align-items: center; }
html.dark .ne-alert .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.ne-alert-pastdue .btn { white-space: nowrap; }

/* ---- Backdrop (mobile drawer) ---- */
.ne-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 17, 38, .5);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

/* ---- Collapsed sidebar (desktop) ---- */
@media (min-width: 992px) {
  html.ne-sidebar-collapsed .ne-sidebar { width: var(--ne-sidebar-w-collapsed); }
  html.ne-sidebar-collapsed .ne-main { margin-left: var(--ne-sidebar-w-collapsed); }
  html.ne-sidebar-collapsed .ne-sidebar:hover { width: var(--ne-sidebar-w); box-shadow: var(--ne-shadow-lg); }
  html.ne-sidebar-collapsed .ne-sidebar:not(:hover) .ne-nav-text,
  html.ne-sidebar-collapsed .ne-sidebar:not(:hover) .ne-nav-caret,
  html.ne-sidebar-collapsed .ne-sidebar:not(:hover) .ne-ext,
  html.ne-sidebar-collapsed .ne-sidebar:not(:hover) .ne-help-card,
  html.ne-sidebar-collapsed .ne-sidebar:not(:hover) .ne-sidebar__company > div,
  html.ne-sidebar-collapsed .ne-sidebar:not(:hover) .ne-subnav-wrap { display: none !important; }
  html.ne-sidebar-collapsed .ne-sidebar:not(:hover) .ne-nav-section { font-size: 0; padding: 10px 0 4px; }
  html.ne-sidebar-collapsed .ne-sidebar:not(:hover) .ne-nav-section::after { content: ""; display: block; height: 1px; margin: 0 12px; background: rgba(255, 255, 255, .08); }
  html.ne-sidebar-collapsed .ne-sidebar:not(:hover) .ne-nav-link { justify-content: center; padding-left: 0; padding-right: 0; }
  html.ne-sidebar-collapsed .ne-sidebar:not(:hover) .ne-nav-link.is-open-parent { background: rgba(56, 116, 255, .22); }
  html.ne-sidebar-collapsed .ne-sidebar:not(:hover) .ne-sidebar__company { justify-content: center; padding: 8px 0; }
  html.ne-sidebar-collapsed .ne-sidebar:not(:hover) .ne-sidebar__brand { justify-content: center; padding: 0; }
  html.ne-sidebar-collapsed .ne-sidebar:not(:hover) .ne-brand-full { display: none; }
  html.ne-sidebar-collapsed .ne-sidebar:not(:hover) .ne-brand-mark { display: flex; }
  html.ne-sidebar-collapsed .ne-collapse-btn .ne-nav-icon { transform: rotate(180deg); }
  .ne-brand-mark {
    width: 40px; height: 40px; border-radius: 12px; align-items: center; justify-content: center;
    background: var(--ne-primary); color: #fff; font-weight: 800; font-size: .95rem;
  }
}

/* ---- Tablet / mobile ---- */
@media (max-width: 991.98px) {
  .ne-sidebar { transform: translateX(-100%); width: min(86vw, 300px); box-shadow: none; }
  html.ne-sidebar-open .ne-sidebar { transform: translateX(0); box-shadow: var(--ne-shadow-lg); }
  html.ne-sidebar-open .ne-backdrop { opacity: 1; visibility: visible; }
  html.ne-sidebar-open, html.ne-sidebar-open body { overflow: hidden; }
  .ne-main { margin-left: 0; }
  .ne-topbar { padding: 0 20px; }
  .ne-content { padding: 22px 20px; }
  .ne-footer { padding: 16px 20px; }
}
@media (max-width: 575.98px) {
  :root { --ne-topbar-h: 64px; }
  .ne-topbar { padding: 0 12px; gap: 8px; }
  .ne-topbar__title h1 { font-size: 1.05rem; }
  .ne-topbar__title p { display: none; }
  .ne-topbar__divider { display: none; }
  .ne-content { padding: 16px 12px; }
  .ne-footer { padding: 14px 16px; justify-content: center; text-align: center; }
  .ne-footer__links { justify-content: center; }
  .ne-icon-btn { width: 38px; height: 38px; border-radius: 10px; }
}

/* 4. Client company header + tab strip ------------------------------------ */
.ne-company {
  padding: 0; /* Phoenix pads <section> by default */
  background: var(--ne-surface);
  border: 1px solid var(--ne-border);
  border-radius: var(--ne-radius);
  box-shadow: var(--ne-shadow);
  margin-bottom: 24px;
  overflow: hidden;
}
.ne-company__head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 20px 22px; }
.ne-company__info { flex: 1 1 260px; min-width: 0; }
.ne-company__name { font-size: 1.25rem; font-weight: 700; margin: 0 0 6px; color: var(--ne-text); }
.ne-company__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--ne-muted); }
.ne-company__meta span { display: inline-flex; align-items: center; gap: 6px; }
.ne-company__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.ne-tabs {
  display: flex;
  gap: 4px;
  padding: 0 14px;
  border-top: 1px solid var(--ne-border);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.ne-tabs::-webkit-scrollbar { display: none; }
.ne-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px;
  color: var(--ne-muted);
  font-size: .86rem;
  font-weight: 500;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: color .15s ease;
}
.ne-tab i { font-size: 1rem; }
.ne-tab:hover { color: var(--ne-text); }
.ne-tab.active { color: var(--ne-primary); font-weight: 600; }
.ne-tab.active::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--ne-primary);
}
.ne-tab-warning { color: var(--ne-orange); }
.ne-tab-staff { border-left: 1px solid var(--ne-border); margin-left: 6px; padding-left: 16px; }
.ne-tab-staff ~ .ne-tab-staff { border-left: 0; margin-left: 0; padding-left: 12px; }

@media (max-width: 575.98px) {
  .ne-company__head { padding: 16px; gap: 12px; }
  .ne-company__name { font-size: 1.05rem; }
  .ne-company__actions { width: 100%; }
  .ne-company__actions > * { flex: 1 1 0; min-width: 0; }
  .ne-company__actions .btn { width: 100%; }
  .ne-tabs { padding: 0 6px; }
}

/* Company section buttons (clientDashboardHead) — grouped, colour-coded, wrap instead of scroll */
.ne-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--ne-border);
  background: var(--ne-surface-2);
}
.ne-sec-group { --c-rgb: 56, 116, 255; --c: rgb(var(--c-rgb)); min-width: 0; }
.ne-sec-group.is-blue   { --c-rgb: 56, 116, 255; }
.ne-sec-group.is-purple { --c-rgb: 124, 58, 237; }
.ne-sec-group.is-green  { --c-rgb: 5, 150, 105; }
.ne-sec-group.is-orange { --c-rgb: 234, 88, 12; }
html.dark .ne-sec-group.is-blue   { --c-rgb: 120, 160, 255; }
html.dark .ne-sec-group.is-purple { --c-rgb: 167, 139, 250; }
html.dark .ne-sec-group.is-green  { --c-rgb: 52, 211, 153; }
html.dark .ne-sec-group.is-orange { --c-rgb: 251, 146, 60; }
.ne-sec-group__label {
  display: flex; align-items: center; gap: 6px;
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ne-muted); margin-bottom: 8px;
}
.ne-sec-group__label::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.ne-sec-group__items { display: flex; flex-wrap: wrap; gap: 8px; }
.ne-sec-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 14px 6px 6px;
  border-radius: 12px;
  background: var(--ne-surface);
  border: 1px solid rgba(var(--c-rgb), .25);
  color: var(--ne-text);
  font-size: .86rem; font-weight: 600; line-height: 1.2;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.ne-sec-btn__icon {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(var(--c-rgb), .12); color: var(--c); font-size: 1rem;
  transition: background-color .15s ease, color .15s ease;
}
.ne-sec-btn:hover, .ne-sec-btn:focus-visible {
  border-color: var(--c); background: rgba(var(--c-rgb), .06); color: var(--ne-text); outline: none;
  box-shadow: 0 4px 12px rgba(var(--c-rgb), .15);
}
.ne-sec-btn.active { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 6px 16px rgba(var(--c-rgb), .35); }
.ne-sec-btn.active .ne-sec-btn__icon { background: rgba(255, 255, 255, .22); color: #fff; }
html.dark .ne-sec-btn.active { color: #0b0f1a; }
html.dark .ne-sec-btn.active .ne-sec-btn__icon { color: #0b0f1a; background: rgba(0, 0, 0, .12); }

@media (max-width: 767.98px) {
  .ne-sections { flex-direction: column; gap: 14px; padding: 14px 14px 16px; }
  .ne-sec-group__items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ne-sec-btn { white-space: normal; min-height: 44px; }
  .ne-sec-btn__text { overflow: hidden; text-overflow: ellipsis; }
}

/* Labelled menu button on phones/tablets so the sidebar is easy to find */
.ne-menu-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px 0 12px; border-radius: 12px; border: 0;
  background: var(--ne-primary); color: #fff; font-weight: 600; font-size: .9rem;
  box-shadow: 0 4px 12px rgba(var(--ne-primary-rgb), .3); flex-shrink: 0;
}
.ne-menu-btn i { font-size: 1.25rem; line-height: 1; }
.ne-menu-btn:hover { color: #fff; filter: brightness(1.05); }

/* 5. Component polish ------------------------------------------------------ */

/* Page header helper for individual pages */
.ne-page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 22px; }
.ne-page-header h2 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.ne-page-header p { margin: 4px 0 0; color: var(--ne-muted); font-size: .88rem; }

/* Cards */
.ne-app .card {
  border: 1px solid var(--ne-border);
  border-radius: var(--ne-radius);
  box-shadow: var(--ne-shadow);
  background-color: var(--ne-surface);
}
.ne-app .card .card { box-shadow: none; }
.ne-app .card-header {
  background: transparent;
  border-bottom: 1px solid var(--ne-border);
  padding: 16px 20px;
  font-weight: 600;
}
.ne-app .card-header:first-child { border-radius: var(--ne-radius) var(--ne-radius) 0 0; }
.ne-app .card-footer { background: transparent; border-top: 1px solid var(--ne-border); }
.ne-app .card-body { padding: 20px; }
@media (max-width: 575.98px) { .ne-app .card-body { padding: 16px; } }

/* Buttons */
.ne-app .btn {
  border-radius: var(--ne-radius-sm);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
.ne-app .btn:active { transform: translateY(1px); }
.ne-app .btn-sm { border-radius: 8px; }
.ne-app .btn-lg { border-radius: 12px; }
.ne-app .btn-primary { box-shadow: 0 4px 12px rgba(var(--ne-primary-rgb), .25); }
.ne-app .btn i + *, .ne-app .btn svg + * { margin-left: .15rem; }
.ne-app .btn-soft {
  background: var(--ne-primary-soft);
  color: var(--ne-primary);
  border: 1px solid transparent;
}
.ne-app .btn-soft:hover { background: rgba(var(--ne-primary-rgb), .16); color: var(--ne-primary); }
.ne-app .btn-outline-light-ne {
  background: var(--ne-surface);
  border: 1px solid var(--ne-border);
  color: var(--ne-text);
}
.ne-app .btn-outline-light-ne:hover { background: var(--ne-surface-2); color: var(--ne-text); }
.ne-app .btn-orange { background: var(--ne-orange); border-color: var(--ne-orange); color: #fff; box-shadow: 0 4px 12px rgba(249, 115, 22, .25); }
.ne-app .btn-orange:hover { background: #ea580c; border-color: #ea580c; color: #fff; }

/* Forms */
.ne-app .form-control,
.ne-app .form-select {
  border-radius: var(--ne-radius-sm);
  border-color: var(--ne-border);
  min-height: 42px;
  font-size: .9rem;
  background-color: var(--ne-surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ne-app textarea.form-control { min-height: 84px; }
.ne-app .form-control-sm, .ne-app .form-select-sm { min-height: 34px; border-radius: 8px; }
.ne-app .form-control:focus,
.ne-app .form-select:focus { border-color: var(--ne-primary); box-shadow: var(--ne-ring); }
.ne-app .form-label, .ne-app label { font-weight: 600; font-size: .82rem; color: var(--ne-text); }
.ne-app .form-check-label { font-weight: 500; }
.ne-app .input-group-text { border-radius: var(--ne-radius-sm); border-color: var(--ne-border); background: var(--ne-surface-2); }

/* Tables */
.ne-app .table { --phoenix-table-bg: transparent; margin-bottom: 0; color: var(--ne-text); }
.ne-app .table > thead > tr > th,
.ne-app .table > thead > tr > td {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ne-muted);
  background: var(--ne-surface-2);
  border-bottom: 1px solid var(--ne-border);
  padding: 12px 14px;
  white-space: nowrap;
}
.ne-app .table > tbody > tr > td,
.ne-app .table > tbody > tr > th { padding: 13px 14px; vertical-align: middle; border-color: var(--ne-border); font-size: .875rem; }
.ne-app .table-hover > tbody > tr:hover > * {
  --phoenix-table-accent-bg: transparent;
  --bs-table-accent-bg: transparent;
  box-shadow: none;
  background-color: rgba(var(--ne-primary-rgb), .04);
}
.ne-app .table-responsive { border-radius: var(--ne-radius-sm); }

/* DataTables */
.ne-app .dataTables_wrapper .row { row-gap: 10px; }
.ne-app .dataTables_wrapper .dataTables_length label,
.ne-app .dataTables_wrapper .dataTables_filter label { font-weight: 500; color: var(--ne-muted); font-size: .85rem; }
.ne-app .dataTables_wrapper .dataTables_filter input,
.ne-app .dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--ne-border);
  border-radius: var(--ne-radius-sm);
  min-height: 38px;
  padding: 6px 12px;
  background-color: var(--ne-surface);
  color: var(--ne-text);
}
.ne-app .dataTables_wrapper .dataTables_filter input:focus { outline: none; border-color: var(--ne-primary); box-shadow: var(--ne-ring); }
.ne-app .dataTables_wrapper .dataTables_info { color: var(--ne-muted); font-size: .82rem; }
.ne-app .dataTables_wrapper .pagination { gap: 4px; flex-wrap: wrap; }
.ne-app .page-link {
  border-radius: 8px !important;
  border: 1px solid var(--ne-border);
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  color: var(--ne-text);
  background: var(--ne-surface);
}
.ne-app .page-item.active .page-link { background: var(--ne-primary); border-color: var(--ne-primary); color: #fff; }
.ne-app .page-item.disabled .page-link { opacity: .5; }
.ne-app .dt-buttons .btn { margin-bottom: 4px; }
@media (max-width: 767.98px) {
  .ne-app .dataTables_wrapper .dataTables_filter,
  .ne-app .dataTables_wrapper .dataTables_length,
  .ne-app .dataTables_wrapper .dataTables_info,
  .ne-app .dataTables_wrapper .dataTables_paginate { text-align: left !important; }
  .ne-app .dataTables_wrapper .dataTables_filter input { width: 100%; margin-left: 0 !important; margin-top: 4px; }
  .ne-app .dataTables_wrapper .dataTables_filter label { width: 100%; }
  .ne-app .dataTables_wrapper .pagination { justify-content: flex-start !important; }
}

/* Badges */
.ne-app .badge { border-radius: 999px; font-weight: 600; padding: .4em .75em; letter-spacing: .01em; }

/* Soft status pills: <span class="ne-badge is-success">Completed</span> */
.ne-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 600; line-height: 1.5; white-space: nowrap;
  background: var(--ne-surface-2); color: var(--ne-muted);
}
.ne-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ne-badge.is-success   { background: rgba(16, 185, 129, .12); color: #047857; }
.ne-badge.is-warning   { background: rgba(249, 115, 22, .12); color: #c2410c; }
.ne-badge.is-danger    { background: rgba(239, 68, 68, .12);  color: #b91c1c; }
.ne-badge.is-primary   { background: var(--ne-primary-soft);  color: var(--ne-primary); }
.ne-badge.is-secondary { background: rgba(107, 116, 137, .14); color: var(--ne-muted); }
html.dark .ne-badge.is-success { color: #6ee7b7; }
html.dark .ne-badge.is-warning { color: #fdba74; }
html.dark .ne-badge.is-danger  { color: #fca5a5; }

/* Modals, dropdowns, tooltips */
.ne-body .modal-content { border: 0; border-radius: 16px; box-shadow: var(--ne-shadow-lg); background: var(--ne-surface); }
.ne-body .modal-header { border-bottom: 1px solid var(--ne-border); padding: 18px 22px; }
.ne-body .modal-body { padding: 22px; }
.ne-body .modal-footer { border-top: 1px solid var(--ne-border); padding: 14px 22px; gap: 8px; }
.ne-body .modal-backdrop.show { opacity: .45; }
.ne-body .dropdown-menu {
  border: 1px solid var(--ne-border);
  border-radius: 12px;
  box-shadow: var(--ne-shadow-lg);
  padding: .4rem;
  background: var(--ne-surface);
}
.ne-body .dropdown-item { border-radius: 8px; padding: .55rem .75rem; font-size: .875rem; display: flex; align-items: center; gap: 10px; color: var(--ne-text); }
.ne-body .dropdown-item i { width: 18px; text-align: center; color: var(--ne-muted); }
.ne-body .dropdown-item:hover { background: var(--ne-surface-2); }
.ne-body .dropdown-item.text-danger i { color: inherit; }
.ne-body .dropdown-divider { border-color: var(--ne-border); margin: .35rem 0; }

/* Nav tabs/pills inside pages */
.ne-app .nav-tabs { border-bottom-color: var(--ne-border); }
.ne-app .nav-pills .nav-link { border-radius: 10px; }

/* jQuery UI datepicker */
.ne-body .ui-datepicker { border-radius: 12px; border: 1px solid var(--ne-border); box-shadow: var(--ne-shadow-lg); padding: 8px; z-index: 1060 !important; }

/* Full-width media never overflows on phones */
.ne-content img { max-width: 100%; height: auto; }

/* 6. Utilities ------------------------------------------------------------- */
.ne-muted { color: var(--ne-muted) !important; }
.ne-strong { color: var(--ne-text) !important; }
.ne-surface { background: var(--ne-surface) !important; }
.min-w-0 { min-width: 0 !important; }
.ne-stat {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ne-stat__icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  background: var(--ne-primary-soft); color: var(--ne-primary);
  flex-shrink: 0;
}
.ne-stat__icon.is-success { background: rgba(16, 185, 129, .12); color: #059669; }
.ne-stat__icon.is-warning { background: rgba(249, 115, 22, .12); color: #ea580c; }
.ne-stat__icon.is-purple  { background: rgba(124, 58, 237, .12); color: #7c3aed; }
.ne-stat__value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; color: var(--ne-text); }
.ne-stat__label { font-size: .82rem; color: var(--ne-muted); }

/* 7. Dashboard components ------------------------------------------------- */
.flex-1 { flex: 1 1 0%; }
.ne-stat__icon.is-danger { background: rgba(239, 68, 68, .12); color: #dc2626; }
.ne-stat__icon--sm { width: 38px; height: 38px; border-radius: 11px; font-size: 1.05rem; }

/* clickable KPI tiles */
a.ne-kpi { color: inherit; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
a.ne-kpi:hover { border-color: rgba(var(--ne-primary-rgb), .35); box-shadow: var(--ne-shadow-lg); transform: translateY(-1px); }
@media (max-width: 575.98px) {
  .ne-kpi .ne-stat { flex-direction: column; align-items: flex-start; gap: 10px; }
  .ne-kpi .ne-stat__value { font-size: 1.35rem; }
}

/* empty states */
.ne-empty { text-align: center; padding: 18px 8px; }
.ne-empty > i { font-size: 1.8rem; color: var(--ne-muted); display: block; margin-bottom: 8px; }

/* callout strip */
.ne-callout { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 14px; border-radius: 12px; font-size: .875rem; background: var(--ne-surface-2); }
.ne-callout > i { font-size: 1.1rem; }
.ne-callout.is-warning { background: rgba(249, 115, 22, .08); }
.ne-callout.is-warning > i { color: #ea580c; }
.ne-callout.is-success { background: rgba(16, 185, 129, .08); }
.ne-callout.is-success > i { color: #059669; }

/* progress */
.ne-progress { height: 10px; border-radius: 999px; background: var(--ne-surface-2); overflow: hidden; border: 1px solid var(--ne-border); }
.ne-progress__bar { height: 100%; border-radius: 999px; background: var(--ne-primary); transition: width .6s ease; }
.ne-progress__bar.is-success { background: #10b981; }

/* list rows inside cards */
.ne-list { list-style: none; margin: 0; padding: 6px 8px; }
.ne-list > li + li { border-top: 1px solid var(--ne-border); }
.ne-list__item { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 10px; color: inherit; }
a.ne-list__item:hover { background: var(--ne-surface-2); }
.ne-note.is-unread { background: rgba(var(--ne-primary-rgb), .04); }
.ne-note__body { font-size: .875rem; white-space: pre-line; word-break: break-word; }

/* section label */
.ne-section-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ne-muted); margin-bottom: 10px; }

/* vertical bar chart (single series) */
.ne-barchart { display: flex; align-items: stretch; gap: 2px; height: 180px; padding-top: 8px; border-bottom: 1px solid var(--ne-border); }
.ne-barchart__col { position: relative; flex: 1 1 0; display: flex; flex-direction: column; outline: none; cursor: default; }
.ne-barchart__track { flex: 1 1 auto; display: flex; align-items: flex-end; justify-content: center; padding: 0 18%; border-radius: 6px; }
.ne-barchart__bar { width: 100%; max-width: 34px; background: var(--ne-primary); border-radius: 4px 4px 0 0; opacity: .9; transition: opacity .15s ease; }
.ne-barchart__label { text-align: center; font-size: .7rem; color: var(--ne-muted); padding: 6px 0 4px; }
.ne-barchart__col:hover .ne-barchart__track,
.ne-barchart__col:focus-visible .ne-barchart__track { background: var(--ne-surface-2); }
.ne-barchart__col:hover .ne-barchart__bar { opacity: 1; }
.ne-barchart__col::after {
  content: none; /* only exists while hovered, so it can never widen the page */
  position: absolute; bottom: calc(100% - 4px); left: 0;
  background: var(--ne-navy-900); color: #fff; font-size: .75rem; font-weight: 500; white-space: nowrap;
  padding: 6px 10px; border-radius: 8px; box-shadow: var(--ne-shadow-lg);
  pointer-events: none; z-index: 5;
}
.ne-barchart__col:nth-child(n+7)::after { left: auto; right: 0; }
.ne-barchart__col:hover::after, .ne-barchart__col:focus-visible::after { content: attr(data-tip); }
@media (max-width: 575.98px) {
  .ne-barchart { height: 140px; }
  .ne-barchart__label { font-size: .62rem; }
  .ne-barchart__track { padding: 0 8%; }
}

/* horizontal bars */
.ne-hbar + .ne-hbar { margin-top: 10px; }
.ne-hbar__track { height: 8px; border-radius: 999px; background: var(--ne-surface-2); overflow: hidden; }
.ne-hbar__bar { height: 100%; border-radius: 999px; background: var(--ne-primary); }

/* filter chips (scroll sideways on phones) */
.ne-chips { display: flex; gap: 8px; padding: 14px 20px 0; overflow-x: auto; scrollbar-width: none; }
.ne-chips::-webkit-scrollbar { display: none; }
.ne-chip {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--ne-border);
  background: var(--ne-surface); color: var(--ne-text); font-size: .82rem; font-weight: 500;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.ne-chip:hover { border-color: rgba(var(--ne-primary-rgb), .4); }
.ne-chip.active { background: var(--ne-primary); border-color: var(--ne-primary); color: #fff; }
.ne-chip__count { font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--ne-surface-2); color: var(--ne-muted); }
.ne-chip.active .ne-chip__count { background: rgba(255, 255, 255, .22); color: #fff; }

/* definition list */
.ne-dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; font-size: .875rem; }
.ne-dl dt { font-weight: 500; color: var(--ne-muted); }
.ne-dl dd { margin: 0; text-align: right; font-weight: 600; }

/* timeline */
.ne-scroll { overflow-y: auto; }
.ne-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; }
.ne-timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: var(--ne-border); }
.ne-timeline li { position: relative; padding-bottom: 14px; }
.ne-timeline li::before { content: ""; position: absolute; left: -18px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--ne-surface); border: 2px solid var(--ne-primary); }

/* DataTables: hide the "Search:" label text when a placeholder is used */
.ne-app .dataTables_filter input::placeholder { color: var(--ne-muted); }

/* 8. Lab Tests page ------------------------------------------------------- */
.ne-statbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ne-statbar__item {
  display: flex; align-items: center; gap: 14px;
  padding: 6px 20px; border: 0; background: transparent; text-align: left; color: inherit;
  border-left: 1px solid var(--ne-border);
}
.ne-statbar__item:first-child { border-left: 0; padding-left: 4px; }
button.ne-statbar__item { border-radius: 12px; transition: background-color .15s ease; }
button.ne-statbar__item:hover { background: var(--ne-surface-2); }
.ne-statbar .ne-stat__icon { width: 52px; height: 52px; border-radius: 50%; font-size: 1.35rem; }
.ne-statbar__label { font-size: .85rem; font-weight: 600; color: var(--ne-text); }
.ne-statbar__value { font-size: 1.75rem; font-weight: 700; line-height: 1.15; color: var(--ne-text); }
.ne-statbar__hint { font-size: .78rem; color: var(--ne-muted); }
.ne-btn-cta { font-size: .95rem; padding: .75rem 1rem; display: flex; align-items: center; justify-content: center; gap: 8px; }
@media (max-width: 991.98px) {
  .ne-statbar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ne-statbar__item { border-left: 0; padding: 10px; border-radius: 12px; background: var(--ne-surface-2); }
  .ne-statbar__item:first-child { padding-left: 10px; }
}
@media (max-width: 575.98px) {
  .ne-statbar__item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .ne-statbar .ne-stat__icon { width: 42px; height: 42px; font-size: 1.1rem; }
  .ne-statbar__value { font-size: 1.4rem; }
  .ne-btn-cta { font-size: .88rem; }
}

/* date range + search inputs with a leading icon */
.ne-daterange, .ne-search { position: relative; }
.ne-daterange {
  display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 10px;
  border: 1px solid var(--ne-border); border-radius: var(--ne-radius-sm); background: var(--ne-surface);
}
.ne-daterange:focus-within { border-color: var(--ne-primary); box-shadow: var(--ne-ring); }
.ne-daterange > i { color: var(--ne-muted); }
.ne-daterange input { flex: 1 1 0; min-width: 0; border: 0; background: transparent; color: var(--ne-text); font-size: .85rem; outline: none; padding: 8px 0; }
html.dark .ne-daterange input { color-scheme: dark; }
.ne-search > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ne-muted); pointer-events: none; }
.ne-search .form-control { padding-left: 38px; }

/* table */
.ne-app .form-label { text-transform: none; letter-spacing: 0; font-size: .85rem; font-weight: 600; }
.ne-labtable > thead > tr > th { padding-left: 10px; padding-right: 10px; }
.ne-labtable > tbody > tr > td { padding: 14px 10px; font-size: .86rem; }
.ne-labtable .btn { white-space: nowrap; }
.ne-labtable .btn-sm { padding: .3rem .6rem; font-size: .78rem; }
.ne-labtable td.dtr-control { cursor: pointer; }
.ne-labtable .dtr-details { width: 100%; }
.ne-labtable .dtr-details li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0 !important; border-bottom: 1px solid var(--ne-border) !important; }
.ne-labtable .dtr-details .dtr-title { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ne-muted); }
.ne-lab-logo { display: inline-flex; align-items: center; background: #fff; border-radius: 8px; padding: 2px 6px; }
.ne-lab-logo img { height: 22px; width: auto; max-width: 96px; object-fit: contain; }
.ne-status { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ne-status__dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--ne-muted); }
.ne-status.is-success .ne-status__dot { background: #10b981; }
.ne-status.is-warning .ne-status__dot { background: #f59e0b; }
.ne-status.is-danger .ne-status__dot { background: #ef4444; }
.ne-status.is-primary .ne-status__dot { background: var(--ne-primary); }
.ne-kebab { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.ne-dt-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 6px; border-top: 1px solid var(--ne-border); margin-top: 4px; }
.ne-dt-footer .dataTables_info { padding-top: 0 !important; }
.ne-dt-footer .pagination { margin: 0 !important; }

@media print {
  .ne-sidebar, .ne-topbar, .ne-footer, .ne-backdrop, .ne-tabs, .ne-company__actions { display: none !important; }
  .ne-main { margin-left: 0 !important; }
  .ne-content { padding: 0 !important; }
}

/* ==========================================================================
   Staff top-bar search (layout/topbar.blade.php, New Era staff only)
   ========================================================================== */
.ne-gs { position: relative; flex: 0 1 400px; min-width: 0; }
.ne-gs__open, .ne-gs__close { display: none; }
.ne-gs__box { position: relative; display: flex; align-items: center; }
.ne-gs__icon { position: absolute; left: 14px; color: var(--ne-muted); pointer-events: none; }
.ne-gs__input {
  width: 100%; height: 42px; padding: 0 40px 0 40px;
  border: 1px solid var(--ne-border); border-radius: 12px;
  background: var(--ne-surface-2); color: var(--ne-text); font-size: .88rem;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.ne-gs__input::placeholder { color: var(--ne-muted); }
.ne-gs__input:focus { outline: 0; border-color: var(--ne-primary); box-shadow: var(--ne-ring); background: var(--ne-surface); }
.ne-gs__input::-webkit-search-cancel-button { display: none; }
.ne-gs__kbd, .ne-gs__foot kbd {
  font-family: inherit; font-size: .7rem; font-weight: 600; line-height: 1;
  padding: 3px 6px; border-radius: 6px; border: 1px solid var(--ne-border);
  background: var(--ne-surface); color: var(--ne-muted); box-shadow: none;
}
.ne-gs__kbd { position: absolute; right: 12px; pointer-events: none; }
.ne-gs__input:focus ~ .ne-gs__kbd { display: none; }

.ne-gs__results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 1060;
  min-width: 340px; max-height: min(70vh, 520px); overflow-y: auto;
  background: var(--ne-surface); border: 1px solid var(--ne-border);
  border-radius: 14px; box-shadow: var(--ne-shadow-lg); padding: 6px;
}
.ne-gs__group + .ne-gs__group { border-top: 1px solid var(--ne-border); margin-top: 4px; padding-top: 4px; }
.ne-gs__label { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ne-muted); padding: 8px 10px 4px; }
.ne-gs__label i { margin-right: 4px; }
.ne-gs__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: inherit; text-decoration: none; }
.ne-gs__item:hover, .ne-gs__item.is-active { background: var(--ne-primary-soft); color: inherit; }
.ne-gs__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ne-gs__title { font-weight: 600; font-size: .87rem; color: var(--ne-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ne-gs__sub { font-size: .76rem; color: var(--ne-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ne-gs__item .ne-badge { flex-shrink: 0; }
.ne-gs__empty { padding: 18px 12px; text-align: center; color: var(--ne-muted); font-size: .85rem; }
.ne-gs__foot { display: flex; gap: 14px; justify-content: flex-end; padding: 8px 10px 4px; border-top: 1px solid var(--ne-border); margin-top: 4px; font-size: .72rem; color: var(--ne-muted); }
.ne-gs__foot kbd { margin-right: 2px; }

@media (max-width: 1199.98px) { .ne-gs { flex-basis: 300px; } }
/* phones/tablets: icon button that expands into a full-width search over the top bar */
@media (max-width: 767.98px) {
  .ne-gs { position: static; flex: 0 0 auto; }
  .ne-gs__open { display: inline-flex; }
  .ne-gs__box, .ne-gs__kbd, .ne-gs__foot { display: none; }
  .ne-gs.is-open .ne-gs__box {
    display: flex; position: absolute; inset: 0; z-index: 1061; padding: 0 12px; gap: 8px;
    background: var(--ne-surface);
  }
  .ne-gs.is-open .ne-gs__icon { left: 26px; }
  .ne-gs.is-open .ne-gs__close { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--ne-surface-2); color: var(--ne-text); }
  .ne-gs__input { padding-right: 12px; }
  .ne-gs__results { position: fixed; top: calc(var(--ne-topbar-h) - 4px); left: 8px; right: 8px; min-width: 0; max-height: calc(100vh - var(--ne-topbar-h) - 16px); }
}
