/* PumpsBad — Attio-inspired light mode design system */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=DM+Mono:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ── Core surfaces ─────────────────────────────── */
  --bg:           #fafaf8;
  --surface:      #f0efeb;
  --surface-2:    #e8e6e0;
  --border:       #e0ded8;
  --border-focus: #c4c2bb;

  /* ── Text ──────────────────────────────────────── */
  --text-primary:   #0f1e2e;
  --text-secondary: #64748b;
  --text-muted:     #94a3b8;

  /* ── Accent — pump blue ────────────────────────── */
  --accent:        #2f7cf6;
  --accent-dim:    #2570e0;
  --accent-ghost:  rgba(47,124,246,.08);
  --accent-subtle: rgba(47,124,246,.08);

  /* ── Status ────────────────────────────────────── */
  --success: #16a34a;
  --warning: #d97706;
  --danger:  #dc2626;
  --info:    #0891b2;

  /* ── Compat aliases (semantic flip: dark→light) ── */
  --navy-950: #fafaf8;
  --navy-900: #f0efeb;
  --navy-800: #e8e6e0;
  --navy-700: #e0ded8;
  --navy-600: #c4c2bb;
  --navy-500: #94a3b8;
  --gray-50:  #f0efeb;
  --gray-100: #e8e6e0;
  --gray-200: #e0ded8;
  --gray-300: #c4c2bb;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #64748b;
  --gray-700: #334155;
  --gray-800: #0f1e2e;
  --green:    #16a34a;
  --yellow:   #d97706;
  --red:      #dc2626;

  /* ── Manufacturer dots ─────────────────────────── */
  --bell-gossett: #e63946;
  --grundfos:     #0066cc;
  --taco:         #e07b39;
  --armstrong:    #2a9d8f;
  --aurora:       #7c3aed;

  /* ── Typography ────────────────────────────────── */
  --font-ui:      'Inter', system-ui, sans-serif;
  --font-mono:    'DM Mono', monospace;
  --font-display: 'DM Mono', monospace;
  --font-code:    'JetBrains Mono', monospace;

  /* ── Spacing ───────────────────────────────────── */
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:20px;
  --s6:24px; --s8:32px; --s10:40px; --s12:48px;

  /* ── Radius ────────────────────────────────────── */
  --r:    4px;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-pill: 9999px;

  /* ── Motion ────────────────────────────────────── */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 80ms;
  --t-base: 150ms;
  --t-slow: 250ms;
}

/* ── RESET ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ── GRAIN TEXTURE ───────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.038;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.72" numOctaves="4" stitchTiles="stitch"/></filter><rect width="300" height="300" filter="url(%23n)"/></svg>');
  background-size: 300px 300px;
}

/* ── NAV ─────────────────────────────────────────── */
.hn-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 var(--s4);
  gap: var(--s3);
  position: sticky;
  top: 0;
  z-index: 100;
}
.hn-logo {
  display: flex;
  align-items: center;
  gap: var(--s2);
  text-decoration: none;
  flex-shrink: 0;
  margin-right: var(--s2);
}
.hn-logo-mark {
  width: 26px;
  height: 26px;
  background: #0f1e2e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hn-logo-mark svg { width: 14px; height: 14px; }
.hn-logo-text {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.hn-logo-text span { color: var(--accent); }
.hn-search-wrap {
  flex: 1;
  max-width: 560px;
  display: flex;
  position: relative;
}
.hn-search {
  width: 100%;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 13px;
  padding: 0 70px 0 32px;
  outline: none;
  transition: border-color var(--t-base) var(--ease-out);
}
.hn-search::placeholder { color: var(--text-muted); }
.hn-search:focus { border-color: var(--border-focus); }
.hn-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
  pointer-events: none;
}
.hn-search-btn {
  position: absolute;
  right: 0;
  top: 0;
  height: 32px;
  width: 36px;
  background: var(--accent);
  border: none;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background var(--t-fast);
}
.hn-search-btn:hover { background: var(--accent-dim); }
.hn-search-kbd {
  position: absolute;
  right: 44px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1px 5px;
  pointer-events: none;
}
.hn-nav-links {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: var(--s1);
}
.hn-nav-link {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--r-md);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
  border: none;
  background: none;
}
.hn-nav-link:hover { background: var(--surface); color: var(--text-primary); }
.hn-nav-link.active { background: var(--surface); color: var(--text-primary); }
.hn-nav-divider { width: 1px; height: 20px; background: var(--border); margin: 0 var(--s2); }
.hn-nav-user { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.hn-nav-role {
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  margin-left: var(--s2);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.hn-nav-role.admin       { background: rgba(220,38,38,.1); color: #b91c1c; border: 1px solid rgba(220,38,38,.2); }
.hn-nav-role.distributor { background: var(--accent-subtle); color: var(--accent); border: 1px solid rgba(47,124,246,.2); }

/* ── CATBAR ──────────────────────────────────────── */
.hn-catbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: 38px;
  display: flex;
  align-items: center;
  padding: 0 var(--s4);
  gap: var(--s1);
  overflow-x: auto;
}
.hn-catbar::-webkit-scrollbar { display: none; }
.hn-cat {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
  border: none;
  background: none;
}
.hn-cat:hover { background: var(--surface); color: var(--text-secondary); }
.hn-cat.active {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid rgba(47,124,246,.2);
}

/* ── BRAND STRIP ─────────────────────────────────── */
.hn-brand-strip {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--s4);
  height: 40px;
  display: flex;
  align-items: center;
  gap: var(--s5);
  overflow-x: auto;
  flex-shrink: 0;
}
.hn-brand-strip::-webkit-scrollbar { display: none; }
.hn-brand-strip-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.hn-brand-divider { width: 1px; height: 18px; background: var(--border); flex-shrink: 0; }
.hn-brand-logo {
  display: flex;
  align-items: center;
  gap: var(--s2);
  opacity: .45;
  transition: opacity var(--t-base);
  flex-shrink: 0;
}
.hn-brand-logo:hover { opacity: .85; }
.hn-brand-name {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: .07em;
  text-transform: uppercase;
}

/* ── RESULTS LAYOUT ──────────────────────────────── */
.hn-results-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
}
.hn-filters {
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.hn-filters::-webkit-scrollbar { display: none; }
.hn-filter-header {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s4);
  border-bottom: 1px solid var(--border);
}
.hn-filter-header, .hn-filter-header * { background: var(--surface); }
.hn-filter-clear {
  font-size: 11px;
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  font-weight: 400;
  padding: 0;
}
.hn-filter-clear:hover { color: var(--accent-dim); }
.hn-filter-group { border-bottom: 1px solid var(--border); }
.hn-filter-group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s2) var(--s4);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.hn-filter-options { padding: var(--s1) var(--s4) var(--s3); }
.hn-filter-opt {
  display: flex;
  align-items: center;
  gap: var(--s2);
  height: 26px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}
.hn-filter-opt:hover { color: var(--text-primary); }
.hn-filter-opt input[type=checkbox] { accent-color: var(--accent); width: 13px; height: 13px; cursor: pointer; }
.hn-filter-count { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }
.hn-results-panel { overflow: hidden; display: flex; flex-direction: column; }
.hn-results-toolbar {
  height: 40px;
  padding: 0 var(--s4);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--s3);
  background: var(--surface);
  flex-shrink: 0;
}
.hn-results-count { font-size: 12px; color: var(--text-secondary); font-family: var(--font-mono); }
.hn-results-count strong { color: var(--text-primary); }
.hn-sort-select {
  height: 26px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-secondary);
  padding: 0 var(--s2);
  background: var(--bg);
  outline: none;
  cursor: pointer;
}

/* ── TABLE ───────────────────────────────────────── */
.hn-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hn-table thead tr { border-bottom: 1px solid var(--border); }
.hn-table th {
  background: var(--surface);
  padding: 0 var(--s3);
  height: 36px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 2;
}
.hn-table th:hover { color: var(--text-secondary); }
.hn-table td {
  padding: 0 var(--s3);
  height: 36px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
  white-space: nowrap;
}
.hn-table tbody tr { transition: background var(--t-fast) var(--ease-out); cursor: pointer; }
.hn-table tbody tr:hover td { background: var(--surface-2); }
.hn-table tbody tr.stale { border-left: 3px solid var(--warning); }
.hn-table tbody tr.stale td { opacity: .65; }
.hn-part-num { font-family: var(--font-code); font-size: 11px; color: var(--text-muted); }
.hn-part-link { color: var(--text-primary); font-weight: 500; font-size: 13px; cursor: pointer; }
.hn-part-link:hover { color: var(--accent); }
.hn-spec-pill {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1px 6px;
  font-family: var(--font-code);
  font-size: 11px;
  color: var(--text-secondary);
}
.qty-num { font-family: var(--font-mono); font-weight: 500; }
.table-wrap { overflow-x: auto; }
.hn-results-scroll { overflow-y: auto; flex: 1; max-height: calc(100vh - 230px); }

/* ── BADGES ──────────────────────────────────────── */
.hn-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-mono);
  white-space: nowrap;
  border: 1px solid transparent;
}
.hn-badge-green  { background: rgba(22,163,74,.1);  color: #15803d; border-color: rgba(22,163,74,.25); }
.hn-badge-yellow { background: rgba(217,119,6,.1);  color: #b45309; border-color: rgba(217,119,6,.25); }
.hn-badge-red    { background: rgba(220,38,38,.1);  color: #b91c1c; border-color: rgba(220,38,38,.25); }
.hn-badge-gray   { background: var(--surface-2);    color: var(--text-secondary); border-color: var(--border); }
.hn-badge-stale  { background: rgba(217,119,6,.08); color: #b45309; border-color: rgba(217,119,6,.2); }
.hn-badge-blue   { background: var(--accent-subtle); color: var(--accent); border-color: rgba(47,124,246,.2); }
.hn-badge-success { background: rgba(22,163,74,.1);  color: #15803d; border-color: rgba(22,163,74,.25); }
.hn-badge-warning { background: rgba(217,119,6,.1);  color: #b45309; border-color: rgba(217,119,6,.25); }
.hn-badge-danger  { background: rgba(220,38,38,.1);  color: #b91c1c; border-color: rgba(220,38,38,.25); }
.hn-badge-accent  { background: var(--accent-subtle); color: var(--accent); border-color: rgba(47,124,246,.2); }

/* ── BUTTONS ─────────────────────────────────────── */
.hn-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 5px 12px;
  border-radius: var(--r-md);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
  height: auto;
}
.hn-btn-sm { padding: 3px 10px; font-size: 12px; }
.hn-btn-lg { padding: 8px 18px; font-size: 14px; }

.hn-btn-primary, .hn-btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.hn-btn-primary:hover, .hn-btn-accent:hover { background: var(--accent-dim); border-color: var(--accent-dim); }

.hn-btn-secondary, .hn-btn-outline {
  background: var(--bg);
  color: var(--text-secondary);
  border-color: var(--border);
}
.hn-btn-secondary:hover, .hn-btn-outline:hover {
  background: var(--surface-2);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.hn-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.hn-btn-ghost:hover { background: var(--surface); color: var(--text-primary); }

.hn-btn-danger {
  background: rgba(220,38,38,.08);
  color: #b91c1c;
  border-color: rgba(220,38,38,.25);
}
.hn-btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.hn-btn-green { background: var(--success); color: #fff; border-color: var(--success); }
.hn-btn-green:hover { opacity: .9; }

/* ── STAT CARDS ──────────────────────────────────── */
.hn-stats-row {
  display: grid;
  grid-template-columns: repeat(var(--cols,4), 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.hn-stat { background: var(--bg); padding: var(--s4) var(--s5); }
.hn-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: var(--s1);
}
.hn-stat-val {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.2;
}
.hn-stat-sub { font-size: 11px; color: var(--text-muted); margin-top: var(--s1); }
.hn-stat-delta { font-size: 11px; font-family: var(--font-mono); }
.hn-stat-delta.up   { color: var(--success); }
.hn-stat-delta.warn { color: var(--warning); }
.hn-stat-delta.bad  { color: var(--danger); }

/* ── DETAIL PANEL ────────────────────────────────── */
.hn-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.hn-detail-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  padding: var(--s4) var(--s5);
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
}
.hn-detail-logo {
  width: 42px;
  height: 42px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  color: var(--text-secondary);
  flex-shrink: 0;
  letter-spacing: .04em;
}
.hn-detail-meta { flex: 1; }
.hn-detail-mfr {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.hn-detail-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.hn-detail-pn { font-family: var(--font-code); font-size: 11px; color: var(--text-secondary); margin-top: 3px; }
.hn-specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}
.hn-spec-cell { padding: var(--s3) var(--s4); border-right: 1px solid var(--border); }
.hn-spec-cell:last-child { border-right: none; }
.hn-spec-key { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 3px; }
.hn-spec-val { font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--text-primary); }
.hn-detail-body { padding: var(--s4) var(--s5); }
.hn-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--s3);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--border);
}
.hn-vendor-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s2);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.hn-vendor-card:hover { border-color: var(--border-focus); background: var(--surface-2); }
.hn-vendor-name { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.hn-vendor-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.hn-vendor-qty { font-family: var(--font-mono); font-weight: 500; }

/* ── ALERTS ──────────────────────────────────────── */
.hn-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-md);
  font-size: 12px;
  border: 1px solid;
}
.hn-alert-stale   { background: rgba(217,119,6,.06);  border-color: rgba(217,119,6,.2);  color: #b45309; }
.hn-alert-info    { background: rgba(8,145,178,.06);   border-color: rgba(8,145,178,.2);  color: #0e7490; }
.hn-alert-success { background: rgba(22,163,74,.06);   border-color: rgba(22,163,74,.2);  color: #15803d; }
.hn-alert-error   { background: rgba(220,38,38,.06);   border-color: rgba(220,38,38,.2);  color: #b91c1c; }

/* ── TABS ────────────────────────────────────────── */
.hn-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s5);
  gap: 0;
}
.hn-tab {
  display: flex;
  align-items: center;
  padding: 0 var(--s4);
  height: 36px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--t-fast), border-color var(--t-fast);
  user-select: none;
  white-space: nowrap;
  gap: var(--s2);
}
.hn-tab:hover { color: var(--text-secondary); }
.hn-tab.active { color: var(--text-primary); border-bottom-color: var(--accent); }
.hn-tab-panel { display: none; }
.hn-tab-panel.active { display: block; }

/* ── FORMS ───────────────────────────────────────── */
.hn-field { margin-bottom: var(--s4); }
.hn-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.hn-input, .hn-select, .hn-textarea {
  width: 100%;
  height: 34px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 13px;
  padding: 0 var(--s3);
  outline: none;
  transition: border-color var(--t-base) var(--ease-out);
}
.hn-input::placeholder { color: var(--text-muted); }
.hn-input:focus, .hn-select:focus, .hn-textarea:focus { border-color: var(--border-focus); }
.hn-textarea { height: auto; padding: var(--s2) var(--s3); resize: vertical; min-height: 80px; }
.hn-form-grid { display: grid; grid-template-columns: repeat(var(--cols,2), 1fr); gap: var(--s3); }
.hn-form-row { display: flex; gap: var(--s3); }
.hn-select option { background: var(--surface); color: var(--text-primary); }

/* ── MODAL ───────────────────────────────────────── */
.hn-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,30,46,.35);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s5);
  animation: hn-fade-in var(--t-base) var(--ease-out);
}
.hn-modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  animation: hn-slide-up var(--t-slow) var(--ease-out);
}
.hn-modal-header {
  height: 48px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--s5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hn-modal-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.hn-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
  border-radius: var(--r-sm);
  transition: color var(--t-fast);
}
.hn-modal-close:hover { color: var(--text-primary); }
.hn-modal-body { padding: var(--s5); }
.hn-modal-footer {
  padding: var(--s3) var(--s5);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: var(--s2);
  background: var(--surface);
}

@keyframes hn-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes hn-slide-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── CARD ────────────────────────────────────────── */
.hn-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s5);
}
.hn-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--s4);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--border);
}

/* ── DROP ZONE ───────────────────────────────────── */
.hn-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  padding: var(--s10) var(--s8);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-base), background var(--t-base);
}
.hn-dropzone:hover, .hn-dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-subtle);
}
.hn-dropzone-icon { font-size: 28px; margin-bottom: var(--s3); color: var(--text-muted); }
.hn-dropzone-text { font-size: 14px; font-weight: 500; color: var(--text-secondary); margin-bottom: 4px; }
.hn-dropzone-sub  { font-size: 12px; color: var(--text-muted); }

/* ── EMPTY STATE ─────────────────────────────────── */
.hn-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--s12) var(--s8);
}
.hn-empty-icon { color: var(--text-muted); margin-bottom: var(--s3); }
.hn-empty-msg, .hn-empty-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: var(--s2); }
.hn-empty-sub { font-size: 13px; color: var(--text-secondary); max-width: 300px; line-height: 1.55; margin-bottom: var(--s4); }

/* ── TOAST ───────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: var(--s6);
  right: var(--s6);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  pointer-events: none;
}
.toast-item {
  padding: var(--s3) var(--s4);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  pointer-events: auto;
  animation: hn-slide-up var(--t-base) var(--ease-out);
  border: 1px solid;
  max-width: 320px;
}
.toast-success { background: rgba(22,163,74,.08);  color: #15803d; border-color: rgba(22,163,74,.25); }
.toast-error   { background: rgba(220,38,38,.08);  color: #b91c1c; border-color: rgba(220,38,38,.25); }
.toast-info    { background: rgba(47,124,246,.08); color: var(--accent); border-color: rgba(47,124,246,.25); }

/* ── SPINNER ─────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--border-focus);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: hn-spin .6s linear infinite;
}
@keyframes hn-spin { to { transform: rotate(360deg); } }

/* ── SKELETON ────────────────────────────────────── */
.hn-skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 400% 100%;
  animation: hn-shimmer 1.4s ease infinite;
  border-radius: var(--r-sm);
  height: 12px;
}
@keyframes hn-shimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }

/* ── IMPORT PROGRESS ─────────────────────────────── */
.import-progress { height: 3px; background: var(--border); border-radius: var(--r-pill); overflow: hidden; margin-top: var(--s3); }
.import-progress-bar { height: 100%; background: var(--accent); transition: width 300ms linear; }

/* ── RFQ CARD ────────────────────────────────────── */
.rfq-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s2);
  transition: border-color var(--t-fast);
  background: var(--surface);
}
.rfq-card:hover { border-color: var(--border-focus); }
.rfq-card.pending { border-left: 3px solid var(--warning); }
.rfq-card.replied { border-left: 3px solid var(--success); }
.rfq-card.closed  { border-left: 3px solid var(--border); opacity: .6; }

/* ── ADMIN / DISTRIBUTOR SPECIFIC ────────────────── */
.user-avatar {
  width: 26px; height: 26px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.status-dot.active   { background: var(--success); }
.status-dot.inactive { background: var(--border-focus); }
.import-col-map { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s3) var(--s4); margin-top: var(--s3); font-size: 12px; }
.import-col-row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid var(--border); }
.import-col-row:last-child { border: none; }

/* ── UTILITIES ───────────────────────────────────── */
.flex           { display: flex; }
.gap-4          { gap: var(--s1); }
.gap-8          { gap: var(--s2); }
.gap-12         { gap: var(--s3); }
.gap-16         { gap: var(--s4); }
.items-center   { align-items: center; }
.justify-between{ justify-content: space-between; }
.mt-4           { margin-top: var(--s1); }
.mt-8           { margin-top: var(--s2); }
.mt-12          { margin-top: var(--s3); }
.mt-16          { margin-top: var(--s4); }
.mt-24          { margin-top: var(--s6); }
.mb-8           { margin-bottom: var(--s2); }
.mb-12          { margin-bottom: var(--s3); }
.mb-16          { margin-bottom: var(--s4); }
.ml-auto        { margin-left: auto; }
.text-mono      { font-family: var(--font-mono); }
.text-code      { font-family: var(--font-code); }
.text-sm        { font-size: 12px; }
.text-xs        { font-size: 11px; }
.text-muted     { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent    { color: var(--accent); }
.text-green     { color: var(--success); }
.text-yellow    { color: var(--warning); }
.text-red       { color: var(--danger); }
.fw-500         { font-weight: 500; }
.fw-600         { font-weight: 600; }
.w-full         { width: 100%; }
.hidden         { display: none !important; }
.page-wrap      { padding: var(--s5); max-width: 1280px; margin: 0 auto; }
.hn-tabs-container { padding: var(--s5); max-width: 1280px; margin: 0 auto; }

/* ── APP SHELL ───────────────────────────────────── */
.hn-app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.hn-body { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.hn-main { flex: 1; overflow-y: auto; min-width: 0; background: var(--bg); }

.hn-main-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.hn-main-header .hn-stats-row { border: none; border-radius: 0; }
.hn-main-header .hn-stat { border-right: 1px solid var(--border); background: var(--surface); }
.hn-main-header .hn-stat:last-child { border-right: none; }

.hn-panel { display: none; padding: var(--s5); }
.hn-panel.active { display: block; }
.hn-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--s5);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--border);
}
.hn-page-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.hn-page-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ── SIDEBAR ─────────────────────────────────────── */
.hn-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: var(--s2);
}
.hn-sidebar::-webkit-scrollbar { display: none; }
.hn-sidebar-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  padding: var(--s2) var(--s3) var(--s1);
}
.hn-sidebar-divider { height: 1px; background: var(--border); margin: var(--s1) 0; }
.hn-sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--s2);
  height: 32px;
  padding: 0 var(--s3);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
  user-select: none;
  font-family: var(--font-ui);
}
.hn-sidebar-item:hover { background: var(--surface-2); color: var(--text-primary); }
.hn-sidebar-item.active { background: var(--surface-2); color: var(--text-primary); }
.hn-sidebar-item-icon {
  color: var(--text-muted);
  display: flex;
  width: 16px; height: 16px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}
.hn-sidebar-item.active .hn-sidebar-item-icon { color: var(--text-secondary); }
.hn-sidebar-item-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  min-width: 16px;
  text-align: center;
  line-height: 1.4;
}
.hn-sidebar-spacer { flex: 1; }

/* Manufacturer color dots */
.mfr-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; margin-right: 5px; }
.mfr-dot-bg  { background: var(--bell-gossett); }
.mfr-dot-gf  { background: var(--grundfos); }
.mfr-dot-tc  { background: var(--taco); }
.mfr-dot-ar  { background: var(--armstrong); }
.mfr-dot-au  { background: var(--aurora); }
