:root {
  --purple:           #6225CC;
  --purple-glow:      #9B6BFF;
  --purple-2:         #7B3FE4;
  --heading-p:        #6300C7;
  --grape-rich:       #3F0697;
  --grape-dark:       #32175C;
  --crunchberry:      #E30C79;
  --cb-rich:          #D00064;
  --cb-medium:        #F50B7C;
  --cb-xlight:        #FDECF4;
  --grape-xlt:        #FAF5FF;

  --text-primary:     #1a0f2e;
  --text-secondary:   #4a3870;
  --text-muted:       #8b7aaa;
  --bg:               var(--grape-xlt);
  --surface:          #ffffff;
  --border:           rgba(98,37,204,0.1);
  --border-strong:    rgba(98,37,204,0.24);
  --radius:           10px;
  --radius-lg:        14px;

  --solv-purple-deep:   var(--grape-dark);
  --solv-purple:        var(--purple);
  --solv-purple-mid:    var(--purple-2);
  --solv-purple-light:  #EDE5FF;
  --solv-purple-subtle: var(--grape-xlt);
  --solv-pink:          var(--crunchberry);
  --solv-pink-dark:     var(--cb-rich);
  --solv-pink-light:    var(--cb-xlight);
  --teal:               var(--purple);
  --teal-dark:          var(--grape-dark);
  --teal-light:         #EDE5FF;
  --blue-light:         #EDE5FF;
  --blue-dark:          var(--purple);
  --purple-light:       #EDE5FF;
  --purple-dark:        var(--purple);
  --amber-light:        #FEF3E2;
  --amber-dark:         #92540a;
  --red-light:          #FDECEC;
  --red-dark:           #9B1C1C;
}

@media (prefers-color-scheme: dark) {
  :root {
    --solv-purple-deep:   #E0D4F7;
    --solv-purple:        #9B6BFF;
    --solv-purple-mid:    #7B3FE4;
    --solv-purple-light:  #1E0F3A;
    --solv-purple-subtle: #160B2E;
    --solv-pink:          #F050A0;
    --solv-pink-dark:     #E30C79;
    --solv-pink-light:    #2D0F24;
    --text-primary:       #F0EBF8;
    --text-secondary:     #B8A8D0;
    --text-muted:         #7A6A90;
    --bg:                 #160B2E;
    --surface:            #1E1040;
    --border:             rgba(155,107,255,0.15);
    --border-strong:      rgba(155,107,255,0.3);
    --teal:               #9B6BFF;
    --teal-dark:          #E0D4F7;
    --teal-light:         #1E0F3A;
    --blue-light:         #1E0F3A;
    --blue-dark:          #9B6BFF;
    --purple-light:       #1E0F3A;
    --purple-dark:        #9B6BFF;
    --amber-light:        #2D1F00;
    --amber-dark:         #FCD34D;
    --red-light:          #2D0F0F;
    --red-dark:           #FCA5A5;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.5;
}

/* ── TOPBAR ── */
.topbar {
  background: var(--grape-dark);
  padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  height: 54px;
  width: 100%;
  box-sizing: border-box;
  border-bottom: 2px solid var(--purple);
  overflow: hidden;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--crunchberry);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.logo-icon.large { width: 56px; height: 56px; border-radius: 14px; }
.logo-text { font-size: 14px; font-weight: 600; color: #fff; letter-spacing: -0.01em; }
.logo-sub { font-size: 11px; color: rgba(255,255,255,0.4); }
.user-pill {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 22px; padding: 5px 14px;
  font-size: 13px; color: rgba(255,255,255,0.8);
}
.avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--crunchberry); color: #fff;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.logout-link { color: rgba(255,255,255,0.38); font-size: 12px; text-decoration: none; margin-left: 2px; }
.logout-link:hover { color: #fff; }

/* ── NAV ── */
.nav {
  background: var(--grape-rich);
  padding: 0 28px; display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-item {
  padding: 10px 16px; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.55);
  border-bottom: 2px solid transparent;
  text-decoration: none; display: flex; align-items: center; gap: 6px;
  transition: color 0.15s; white-space: nowrap;
}
.nav-item:hover { color: rgba(255,255,255,0.9); }
.nav-item.active { color: #fff; border-bottom-color: var(--crunchberry); }
.nav-group-label { display: none; }
.nav-group-sep {
  width: 1px; background: rgba(255,255,255,0.1); margin: 8px 4px; align-self: stretch;
}
.nav-group-sep:last-child { display: none; }

/* ── SEARCH HERO ── */
.search-hero {
  background: linear-gradient(135deg, #32175C 0%, #3F0697 60%, #6225CC 100%);
  padding: 32px 28px 24px;
  text-align: center;
  position: relative; overflow: hidden;
}
.search-hero::before {
  content: '';
  position: absolute; top: -50px; right: -50px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(227,12,121,0.2) 0%, transparent 65%);
  pointer-events: none;
}
.search-hero::after {
  content: '';
  position: absolute; bottom: -40px; left: 25%;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(155,107,255,0.15) 0%, transparent 65%);
  pointer-events: none;
}
.search-hero-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.38); margin-bottom: 14px;
}
.search-hero-bar {
  max-width: 580px; margin: 0 auto;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 14px; padding: 0 18px;
  display: flex; align-items: center; gap: 10px;
  height: 50px; cursor: text;
  transition: border-color 0.2s, background 0.2s;
  position: relative; z-index: 1;
}
.search-hero-bar:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.3);
}
.search-hero-bar svg { color: rgba(255,255,255,0.45); flex-shrink: 0; }
.search-hero-input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 14px; color: #fff; padding: 0;
  caret-color: var(--crunchberry); cursor: text;
}
.search-hero-input::placeholder { color: rgba(255,255,255,0.38); }
.search-hero-kbd {
  font-size: 10px; background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px; padding: 2px 7px;
  color: rgba(255,255,255,0.4); white-space: nowrap; flex-shrink: 0;
}
.search-pulse {
  display: flex; align-items: center; justify-content: center;
  gap: 18px; margin-top: 13px; flex-wrap: wrap;
  font-size: 11px; color: rgba(255,255,255,0.35);
  position: relative; z-index: 1;
}
.search-pulse-item { display: flex; align-items: center; gap: 5px; }
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  animation: pulse-glow 2s ease-in-out infinite;
}
.pulse-dot.green { background: #22c55e; }
.pulse-dot.amber { background: #f59e0b; }
.pulse-dot.red   { background: #ef4444; }
@keyframes pulse-glow { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ── PAGE LAYOUT ── */
.page-layout { display: flex; align-items: flex-start; max-width: 1360px; margin: 0 auto; }
.page-layout .content { flex: 1; min-width: 0; margin: 0; max-width: none; }

/* ── CONTENT ── */
.content {
  max-width: 980px; margin: 0 auto;
  padding: 24px 24px;
  display: flex; flex-direction: column; gap: 20px;
}
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--purple-2); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.section-label::before {
  content: '';
  width: 3px; height: 13px;
  background: var(--crunchberry);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── SECTION ENTRANCE ANIMATION ── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.content > section {
  animation: fade-up 0.32s ease both;
}
.content > section:nth-child(2) { animation-delay: 0.06s; }
.content > section:nth-child(3) { animation-delay: 0.12s; }
.content > section:nth-child(4) { animation-delay: 0.18s; }
.content > section:nth-child(5) { animation-delay: 0.22s; }
@media (prefers-reduced-motion: reduce) {
  .content > section { animation: none; }
}

/* ── SOC2 TRACKER — dark card ── */
.tracker-card {
  background: linear-gradient(135deg, #32175C 0%, #4A1080 100%);
  border-radius: 18px; padding: 22px 26px;
  position: relative; overflow: hidden;
  box-shadow: 0 6px 28px rgba(50,23,92,0.22);
}
.tracker-card::after {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(227,12,121,0.22) 0%, transparent 65%);
  pointer-events: none;
}
.tracker-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; position: relative; z-index: 1; }
.tracker-title { font-size: 15px; font-weight: 600; color: #fff; }
.tracker-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.03em;
  background: var(--crunchberry); color: #fff;
  border-radius: 20px; padding: 3px 10px;
}
.tracker-sub { font-size: 12px; color: rgba(255,255,255,0.45); margin-bottom: 20px; position: relative; z-index: 1; }
.pizza-track { display: flex; align-items: flex-start; margin-bottom: 10px; position: relative; z-index: 1; }
.step { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 0; }
.step-circle {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  border: 2px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.35); flex-shrink: 0;
}
.step-circle.done { background: var(--purple); border-color: #9B6BFF; color: #fff; }
.step-circle.active { background: rgba(227,12,121,0.2); border-color: var(--crunchberry); color: #F50B7C; }
.step-circle.pending { background: rgba(255,255,255,0.05); }
.step-label { font-size: 9px; color: rgba(255,255,255,0.4); margin-top: 6px; text-align: center; line-height: 1.3; padding: 0 3px; }
.step-label.active-label { color: #F50B7C; font-weight: 600; }
.step-conn { flex: 1; height: 2px; margin-top: 17px; align-self: flex-start; min-width: 6px; }
.step-conn.done { background: var(--purple); }
.step-conn.pending { background: rgba(255,255,255,0.12); }
.tracker-progress-bar { height: 4px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; margin-top: 6px; position: relative; z-index: 1; }
.tracker-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6225CC 0%, #E30C79 100%);
  border-radius: 4px;
  transition: width 0.9s cubic-bezier(0.4,0,0.2,1);
}

/* ── METRICS ── */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 18px;
  box-shadow: 0 1px 6px rgba(50,23,92,0.05);
  position: relative; overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.metric::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--metric-accent, var(--purple));
  opacity: 0.85;
}
.metric:hover {
  box-shadow: 0 5px 20px rgba(50,23,92,0.11);
  transform: translateY(-1px);
}
.metric-label { font-size: 11px; color: var(--text-muted); margin-bottom: 5px; font-weight: 500; }
.metric-value { font-size: 24px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
.metric-value.green { color: #15803d; }
.metric-value.amber { color: #d97706; }
.metric-value.purple { color: var(--purple); }
.metric-denom { font-size: 14px; color: var(--text-muted); font-weight: 400; }
.metric-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ── QUICK LINKS — lift on hover ── */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px;
  cursor: pointer; display: flex; align-items: center; gap: 13px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  box-shadow: 0 1px 4px rgba(50,23,92,0.04);
}
.quick-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(50,23,92,0.14);
  border-color: rgba(98,37,204,0.3);
  background: linear-gradient(135deg, #fff 0%, #FAF5FF 100%);
}
.quick-icon {
  width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  transition: transform 0.2s ease;
}
.quick-card:hover .quick-icon { transform: scale(1.1); }
.green-icon  { background: linear-gradient(135deg, #EDE5FF, #DDD6FE); }
.blue-icon   { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.amber-icon  { background: linear-gradient(135deg, #FEF3E2, #FDE68A); }
.purple-icon { background: linear-gradient(135deg, #EDE5FF, #DDD6FE); }
.red-icon    { background: linear-gradient(135deg, #FDECEC, #FECACA); }
.teal-icon   { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.quick-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.quick-desc  { font-size: 11px; color: var(--text-secondary); line-height: 1.4; }

/* ── EVIDENCE BREAKDOWN BARS — semantic color ── */
.breakdown-bar-track {
  height: 6px; background: #EDE5FF; border-radius: 4px; overflow: hidden;
}
.breakdown-bar-fill {
  height: 100%; border-radius: 4px;
  transition: width 0.7s ease;
}
.breakdown-bar-fill.red   { background: #ef4444; }
.breakdown-bar-fill.amber { background: #f59e0b; }
.breakdown-bar-fill.green { background: #22c55e; }

/* ── DOC LIST ── */
.card-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 4px 20px;
}
.doc-list { display: flex; flex-direction: column; }
.doc-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.doc-row:last-child { border-bottom: none; }
.doc-tag {
  font-size: 10px; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; white-space: nowrap; letter-spacing: 0.03em;
}
.tag-policy   { background: #EDE5FF; color: var(--purple); }
.tag-training { background: var(--cb-xlight); color: var(--cb-rich); }
.tag-audit    { background: #FEF3E2; color: #92540a; }
.doc-name { flex: 1; font-size: 13px; color: var(--text-primary); text-decoration: none; }
.doc-name:hover { color: var(--purple); }
.doc-date { font-size: 11px; color: var(--text-muted); }

/* ── LOGIN ── */
.login-body { background: var(--grape-dark); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-wrap { width: 100%; max-width: 400px; padding: 24px; }
.login-card {
  background: var(--surface); border-radius: 20px; padding: 44px 40px;
  text-align: center; box-shadow: 0 24px 64px rgba(0,0,0,0.35);
}
.login-logo { display: flex; justify-content: center; margin-bottom: 22px; }
.login-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); letter-spacing: -0.02em; }
.login-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 28px; }
.google-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border: 1.5px solid var(--border-strong);
  border-radius: 10px; font-size: 14px; font-weight: 600;
  color: var(--text-primary); text-decoration: none; background: var(--surface);
  transition: all 0.15s; width: 100%; justify-content: center;
}
.google-btn:hover { background: #EDE5FF; border-color: var(--purple); }
.login-notice { font-size: 12px; color: var(--text-muted); margin-top: 14px; }

/* ── NEWS SIDEBAR ── */
.news-sidebar {
  width: 260px; min-width: 260px;
  max-height: calc(100vh - 64px);
  overflow-y: auto; position: sticky; top: 64px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  transition: width 0.3s ease, min-width 0.3s ease; flex-shrink: 0;
}
.news-sidebar.collapsed { width: 36px; min-width: 36px; overflow: hidden; }
.news-sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; font-size: 12px; font-weight: 600;
  color: var(--grape-dark); border-bottom: 1px solid var(--border);
  white-space: nowrap; background: var(--grape-xlt);
  position: sticky; top: 0; z-index: 1;
}
#news-toggle {
  background: none; border: 1px solid var(--border-strong);
  color: var(--purple); width: 22px; height: 22px; border-radius: 5px;
  cursor: pointer; font-size: 13px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; transition: background 0.15s;
}
#news-toggle:hover { background: #EDE5FF; }
.news-sidebar.collapsed .news-sidebar-header span { display: none; }
.news-sidebar.collapsed #news-list { display: none; }
.news-item {
  display: block; padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-decoration: none; transition: background 0.15s;
}
.news-item:hover { background: var(--grape-xlt); }
.news-source {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--crunchberry); margin-bottom: 3px;
}
.news-title { font-size: 12px; font-weight: 500; color: var(--grape-dark); line-height: 1.4; margin-bottom: 3px; }
.news-desc {
  font-size: 11px; color: var(--text-muted); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-loading, .news-empty { padding: 18px 14px; font-size: 12px; color: var(--text-muted); text-align: center; }
.news-cat {
  display: inline-block; font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; padding: 1px 5px; border-radius: 3px; margin-right: 3px;
}
.news-cat-health   { background: #e8f4fd; color: #1a6fa8; }
.news-cat-security { background: var(--cb-xlight); color: #a8001a; }

.news-settings-panel {
  position: absolute; top: 44px; right: 0; left: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  z-index: 10; box-shadow: 0 4px 16px rgba(50,23,92,0.12);
}
.news-sidebar { position: relative; }
.news-settings-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; font-size: 12px; font-weight: 600;
  color: var(--grape-dark); border-bottom: 1px solid var(--border); background: var(--grape-xlt);
}
.news-settings-body { padding: 10px 14px; display: flex; flex-direction: column; gap: 10px; }
.news-settings-group { display: flex; flex-direction: column; gap: 5px; }
.news-settings-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 2px; }
.news-settings-footer {
  display: flex; justify-content: flex-end; gap: 6px;
  padding: 8px 14px; border-top: 1px solid var(--border); background: var(--grape-xlt);
}

/* ── DOCUMENT REPOSITORY ── */
.doc-repo-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 4px; border-bottom: 1px solid var(--border);
  transition: background 0.15s; border-radius: 6px;
}
.doc-repo-row:hover { background: var(--grape-xlt); }
.doc-repo-row:last-child { border-bottom: none; }
.doc-repo-icon { font-size: 15px; flex-shrink: 0; }
.doc-repo-name {
  flex: 1; font-size: 13px; color: var(--grape-dark); text-decoration: none;
  font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.doc-repo-name:hover { text-decoration: underline; color: var(--crunchberry); }
.doc-repo-date { font-size: 11px; color: var(--text-muted); flex-shrink: 0; white-space: nowrap; }
.doc-repo-badge {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; background: var(--cb-xlight); color: #a8001a;
  padding: 2px 5px; border-radius: 3px; flex-shrink: 0;
}
.doc-repo-btn {
  background: none; border: none; cursor: pointer;
  text-align: left; padding: 0; font-size: inherit; font-family: inherit;
}
.doc-repo-btn:hover { text-decoration: underline; color: var(--crunchberry); }

/* ── PDF MODAL ── */
.pdf-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
  z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.pdf-overlay.hidden { display: none !important; }
.pdf-modal {
  background: var(--surface); border-radius: 16px;
  width: 100%; max-width: 900px; height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(50,23,92,0.3); overflow: hidden;
}
.pdf-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  background: var(--grape-xlt); gap: 12px; flex-shrink: 0;
}
.pdf-modal-title {
  font-size: 14px; font-weight: 600; color: var(--grape-dark);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.pdf-modal-body { flex: 1; position: relative; overflow: hidden; user-select: none; -webkit-user-select: none; }
.pdf-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-muted); background: var(--grape-xlt);
}
.pdf-frame { width: 100%; height: 100%; border: none; display: block; }
.pdf-block-overlay { position: absolute; inset: 0; z-index: 1; cursor: default; background: transparent; pointer-events: none; }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .news-sidebar { display: none; }
  .search-hero { padding: 22px 16px 18px; }
}
@media (max-width: 540px) {
  .quick-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .content { padding: 16px; }
}

/* ── DARK MODE ── */
@media (prefers-color-scheme: dark) {
  .topbar { background: #1a0d38; }
  .nav { background: #240e52; }
  .search-hero { background: linear-gradient(135deg, #1a0d38 0%, #240e52 60%, #3a1880 100%); }
  .tracker-card { background: linear-gradient(135deg, #1a0d38 0%, #2a0e5a 100%); }
  .news-sidebar { background: var(--surface); border-color: var(--border); }
  .news-sidebar-header { background: var(--bg); color: var(--text-primary); }
  .news-item:hover { background: rgba(155,107,255,0.06); }
  .news-title { color: var(--text-primary); }
  .pdf-modal-header { background: var(--bg); border-color: var(--border); }
  .pdf-modal-title { color: var(--text-primary); }
  .pdf-loading { background: var(--surface); }
  .doc-repo-name { color: var(--text-primary); }
  .doc-repo-row:hover { background: rgba(155,107,255,0.06); }
  .breakdown-bar-track { background: rgba(155,107,255,0.15); }
  .news-settings-panel { background: var(--surface); border-color: var(--border); }
  .news-settings-header { background: var(--bg); color: var(--text-primary); }
  .news-settings-footer { background: var(--bg); }
  .metric { background: var(--surface); }
  .quick-card { background: var(--surface); }
  .quick-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,0.3); background: var(--surface); }
  .card-wrap { background: var(--surface); }
  .attention-item.attention-red   { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.25); }
  .attention-item.attention-amber { background: rgba(245,158,11,0.06); border-color: rgba(245,158,11,0.22); }
  .attention-item.attention-green { background: rgba(34,197,94,0.06);  border-color: rgba(34,197,94,0.22); }
}


/* ── HOME HERO ── */
.search-hero-eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.38); margin-bottom: 8px;
}
.search-hero-title {
  font-size: 28px; font-weight: 700; color: #fff;
  letter-spacing: -0.03em; margin-bottom: 6px;
  text-wrap: balance;
}
.search-hero-subtitle {
  font-size: 14px; color: rgba(255,255,255,0.5); margin-bottom: 18px;
  line-height: 1.5;
}

/* ── TICKET STRIP ── */
.ticket-strip {
  max-width: 580px; margin: 8px auto 0;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px; padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  position: relative; z-index: 1;
}
.ticket-strip:hover {
  background: rgba(255,255,255,0.11);
  border-color: rgba(255,255,255,0.24);
}
.ticket-strip-icon { font-size: 22px; flex-shrink: 0; }
.ticket-strip-text { flex: 1; }
.ticket-strip-title { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.85); margin-bottom: 2px; }
.ticket-strip-sub { font-size: 11px; color: rgba(255,255,255,0.4); }
.ticket-strip-btn {
  background: var(--crunchberry); color: #fff; border: none;
  border-radius: 8px; padding: 7px 14px;
  font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background 0.15s;
}
.ticket-strip-btn:hover { background: var(--cb-rich); }

/* ── SOC2 STATUS STRIP ── */
.soc2-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 22px;
  display: flex; align-items: center; gap: 16px;
  cursor: pointer; text-decoration: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(50,23,92,0.06);
}
.soc2-strip:hover {
  box-shadow: 0 8px 28px rgba(50,23,92,0.13);
  border-color: rgba(98,37,204,0.3);
  transform: translateY(-2px);
}
.soc2-strip-badge {
  background: linear-gradient(135deg, #32175C, #6225CC);
  color: #fff; border-radius: 10px; padding: 10px 14px;
  font-size: 20px; font-weight: 700; line-height: 1; white-space: nowrap; flex-shrink: 0;
}
.soc2-strip-badge span { font-size: 10px; font-weight: 500; opacity: 0.7; display: block; margin-top: 2px; }
.soc2-strip-info { flex: 1; min-width: 0; }
.soc2-strip-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.soc2-strip-sub { font-size: 12px; color: var(--text-muted); }
.soc2-strip-pills { display: flex; gap: 6px; flex-shrink: 0; }
.soc2-pill { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.pill-amber { background: #FEF3E2; color: #92540a; }
.pill-green { background: #dcfce7; color: #15803d; }
.pill-red   { background: #FDECEC; color: #9B1C1C; }
.soc2-strip-cta { font-size: 12px; font-weight: 600; color: var(--purple); white-space: nowrap; flex-shrink: 0; }

/* ── QUICK LINK ARROW ── */
.quick-arrow { font-size: 18px; color: var(--border-strong); margin-left: auto; align-self: center; flex-shrink: 0; }
.quick-card:hover .quick-arrow { color: var(--purple); }

/* ── SOC2 HERO ── */
.soc2-hero {
  background: linear-gradient(135deg, #32175C 0%, #3F0697 60%, #6225CC 100%);
  padding: 28px 28px 24px;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; overflow: hidden;
}
.soc2-hero::before {
  content: '';
  position: absolute; top: -40px; right: 120px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(227,12,121,0.18) 0%, transparent 65%);
  pointer-events: none;
}
.soc2-hero-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.38); margin-bottom: 6px; }
.soc2-hero-title { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -0.02em; margin-bottom: 4px; }
.soc2-hero-sub { font-size: 13px; color: rgba(255,255,255,0.45); }
.soc2-big-pct { font-size: 52px; font-weight: 700; color: #fff; letter-spacing: -0.03em; line-height: 1; }
.soc2-big-label { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 4px; text-align: right; }

/* ── STUB PAGES ── */
.stub-hero {
  background: linear-gradient(135deg, #32175C 0%, #3F0697 100%);
  padding: 24px 28px;
  display: flex; align-items: center; gap: 16px;
}
.stub-hero-icon { font-size: 36px; }
.stub-hero-title { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 3px; letter-spacing: -0.01em; }
.stub-hero-sub { font-size: 13px; color: rgba(255,255,255,0.5); }
.stub-grid { display: flex; flex-direction: column; gap: 8px; }
.stub-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  box-shadow: 0 1px 3px rgba(50,23,92,0.04);
}
.stub-card:hover {
  transform: translateX(3px);
  box-shadow: 0 3px 14px rgba(50,23,92,0.09);
  border-color: rgba(98,37,204,0.25);
}
.stub-card-icon { font-size: 22px; flex-shrink: 0; width: 40px; text-align: center; }
.stub-card-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.stub-card-desc { font-size: 12px; color: var(--text-muted); }

/* ── DOCUMENT OPEN BUTTON ── */
.doc-open-btn {
  font-size: 11px; font-weight: 600; color: var(--purple);
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  padding: 4px 10px; border: 1px solid var(--border-strong);
  border-radius: 6px; transition: background 0.15s;
}
.doc-open-btn:hover { background: var(--solv-purple-light); }



/* ── THREAT TICKER ── */
.threat-ticker-wrap {
  max-width: 580px; margin: 8px auto 0;
  display: flex; align-items: center; gap: 10px;
  overflow: hidden; position: relative; z-index: 1;
}
.threat-ticker-label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5); white-space: nowrap; flex-shrink: 0;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px; padding: 2px 7px;
}
.threat-ticker {
  flex: 1; overflow: hidden; position: relative; height: 20px;
}
.threat-ticker-inner {
  display: inline-block; white-space: nowrap;
  font-size: 11px; color: rgba(255,255,255,0.55);
  animation: ticker-scroll 40s linear infinite;
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.threat-ticker:hover .threat-ticker-inner { animation-play-state: paused; }

/* ── ATTENTION WIDGET ── */
.attention-widget { display: flex; flex-direction: column; gap: 8px; }
.attention-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 12px 16px;
  box-shadow: 0 1px 4px rgba(50,23,92,0.04);
}
.attention-item.attention-red   { border-color: rgba(239,68,68,0.35); background: linear-gradient(135deg, #fff 0%, #fff5f5 100%); }
.attention-item.attention-amber { border-color: rgba(245,158,11,0.3);  background: linear-gradient(135deg, #fff 0%, #fffdf5 100%); }
.attention-item.attention-green { border-color: rgba(34,197,94,0.3);   background: linear-gradient(135deg, #fff 0%, #f5fff8 100%); }
.attention-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  animation: pulse-glow 2s ease-in-out infinite;
}
.attention-red   .attention-dot { background: #ef4444; }
.attention-amber .attention-dot { background: #f59e0b; }
.attention-green .attention-dot { background: #22c55e; }
.attention-text { flex: 1; }
.attention-title { font-size: 13px; font-weight: 600; color: var(--text-primary); display: block; margin-bottom: 1px; }
.attention-desc  { font-size: 11px; color: var(--text-muted); }
.attention-cta { font-size: 11px; font-weight: 600; color: var(--purple); text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.attention-cta:hover { text-decoration: underline; }

/* ── SHORTCUTS MODAL ── */
.shortcuts-modal { max-width: 420px; }
.shortcut-group { margin-bottom: 18px; }
.shortcut-group:last-child { margin-bottom: 0; }
.shortcut-group-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 8px; }
.shortcut-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-secondary); }
.shortcut-row:last-child { border-bottom: none; }
.shortcut-row kbd {
  background: var(--grape-xlt); border: 1px solid var(--border-strong);
  border-radius: 5px; padding: 2px 8px; font-size: 12px; font-family: inherit;
  color: var(--grape-dark); font-weight: 600;
}
.shortcut-key {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px; padding: 1px 5px; font-size: 10px; color: rgba(255,255,255,0.5);
}

/* ── SOC2 COUNTDOWN ── */
.countdown-wrap { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.countdown-block {
  font-size: 36px; font-weight: 700; color: #fff;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px; padding: 6px 16px; letter-spacing: -0.02em; line-height: 1;
}
.countdown-label { font-size: 12px; color: rgba(255,255,255,0.45); }

/* ── FOLLOW-UP CHIPS ── */
.followup-row { display: flex; align-items: center; gap: 7px; margin-top: 12px; flex-wrap: wrap; }
.followup-label { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.followup-chip {
  font-size: 12px; background: var(--solv-purple-light); color: var(--purple);
  border: 1px solid var(--border-strong); border-radius: 20px;
  padding: 4px 12px; cursor: pointer; font-family: inherit;
  transition: background 0.15s;
}
.followup-chip:hover { background: #d4c2f7; }

/* ── DARK MODE FORCE ── */
html.force-dark {
  filter: none;
}
html.force-dark body {
  --text-primary:   #F0EBF8;
  --text-secondary: #B8A8D0;
  --text-muted:     #7A6A90;
  --bg:             #160B2E;
  --surface:        #1E1040;
  --border:         rgba(155,107,255,0.15);
  --border-strong:  rgba(155,107,255,0.3);
}
html.force-dark .topbar { background: #1a0d38; }
html.force-dark .nav { background: #240e52; }
html.force-dark .search-hero { background: linear-gradient(135deg, #1a0d38 0%, #240e52 60%, #3a1880 100%); }
html.force-dark .tracker-card { background: linear-gradient(135deg, #1a0d38 0%, #2a0e5a 100%); }
html.force-dark .metric,
html.force-dark .quick-card,
html.force-dark .card-wrap,
html.force-dark .soc2-strip,
html.force-dark .stub-card { background: #1E1040; border-color: rgba(155,107,255,0.15); }
html.force-dark .attention-item { background: #1E1040; border-color: rgba(155,107,255,0.15); }
html.force-dark .attention-item.attention-red   { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.28); }
html.force-dark .attention-item.attention-amber { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.25); }
html.force-dark .attention-item.attention-green { background: rgba(34,197,94,0.08);  border-color: rgba(34,197,94,0.25); }
html.force-dark .news-sidebar,
html.force-dark .news-sidebar-header { background: #1E1040; }
html.force-dark .soc2-hero,
html.force-dark .stub-hero { background: linear-gradient(135deg, #1a0d38, #240e52); }



/* ── DOC VIEWER MODAL ── */
.doc-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(20,8,50,0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.doc-modal-overlay.hidden { display: none !important; }
.doc-modal {
  background: #1a0f2e;
  border-radius: 16px;
  width: 100%; max-width: 960px;
  height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
  overflow: hidden;
  border: 1px solid rgba(155,107,255,0.2);
}
.doc-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: #32175C;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  gap: 12px;
}
.doc-modal-title {
  font-size: 14px; font-weight: 600; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.doc-modal-body {
  flex: 1; position: relative; background: #fff;
}
.doc-modal-frame {
  width: 100%; height: 100%; border: none; display: block;
}

/* ── INCIDENTS HERO ── */
.incident-hero {
  background: linear-gradient(135deg, #32175C 0%, #3F0697 60%, #6225CC 100%);
  padding: 26px 28px;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; overflow: hidden;
}
.incident-hero::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(227,12,121,0.2) 0%, transparent 65%);
  pointer-events: none;
}
.incident-hero-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.38); margin-bottom: 6px; }
.incident-hero-title { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -0.02em; margin-bottom: 4px; }
.incident-hero-sub { font-size: 13px; color: rgba(255,255,255,0.45); }
.incident-severity-key { display: flex; gap: 8px; align-items: center; }
.sev-chip {
  font-size: 11px; font-weight: 600; padding: 4px 12px;
  border-radius: 20px; white-space: nowrap;
}
.sev-chip.sev-critical { background: rgba(239,68,68,0.2); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.sev-chip.sev-high     { background: rgba(249,115,22,0.2); color: #fdba74; border: 1px solid rgba(249,115,22,0.3); }
.sev-chip.sev-medium   { background: rgba(245,158,11,0.2); color: #fde68a; border: 1px solid rgba(245,158,11,0.3); }
.sev-chip.sev-low      { background: rgba(59,130,246,0.2); color: #bfdbfe; border: 1px solid rgba(59,130,246,0.3); }

/* ── INCIDENT FORM ── */
.incident-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  box-shadow: 0 1px 6px rgba(50,23,92,0.05);
}
.incident-form-intro {
  font-size: 13px; color: var(--text-secondary);
  background: var(--grape-xlt); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px; margin-bottom: 22px;
  line-height: 1.5;
}
.incident-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  transition: opacity 0.3s;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-full { grid-column: 1 / -1; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.form-label .required { color: var(--crunchberry); }
.form-input, .form-select, .form-textarea {
  border: 1.5px solid var(--border-strong);
  border-radius: 8px; padding: 9px 12px;
  font-size: 13px; font-family: inherit;
  color: var(--text-primary); background: var(--surface);
  outline: none; transition: border-color 0.15s;
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(98,37,204,0.1);
}
.form-textarea { resize: vertical; line-height: 1.5; }

/* ── SEVERITY PICKER ── */
.severity-picker { display: flex; gap: 8px; }
.sev-btn {
  flex: 1; padding: 8px 4px; border-radius: 8px; font-size: 12px;
  font-weight: 600; font-family: inherit; cursor: pointer;
  border: 1.5px solid var(--border-strong);
  background: var(--surface); color: var(--text-secondary);
  transition: all 0.15s;
}
.sev-btn:hover { border-color: var(--purple); color: var(--purple); }
.sev-btn-active[data-sev="low"]      { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; }
.sev-btn-active[data-sev="medium"]   { background: #fffbeb; border-color: #f59e0b; color: #92400e; }
.sev-btn-active[data-sev="high"]     { background: #fff7ed; border-color: #f97316; color: #9a3412; }
.sev-btn-active[data-sev="critical"] { background: #fef2f2; border-color: #ef4444; color: #991b1b; }

/* ── FORM FOOTER ── */
.incident-form-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--border);
}
.incident-form-note { font-size: 12px; color: var(--text-muted); }
.incident-submit {
  padding: 11px 24px; font-size: 14px; font-weight: 600;
  background: var(--crunchberry); color: #fff;
  border: none; border-radius: 9px; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.incident-submit:hover { background: var(--cb-rich); transform: translateY(-1px); }
.incident-submit:active { transform: translateY(0); }
.incident-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── SUCCESS STATE ── */
.incident-success {
  display: flex; align-items: flex-start; gap: 14px;
  background: #dcfce7; border: 1px solid #86efac;
  border-radius: 10px; padding: 16px 18px; margin-top: 16px;
}
.incident-success.hidden { display: none !important; }
.incident-success-icon { font-size: 22px; flex-shrink: 0; }
.incident-success-title { font-size: 14px; font-weight: 600; color: #14532d; margin-bottom: 3px; }
.incident-success-sub { font-size: 13px; color: #166534; }
.incident-success-sub a { color: #15803d; font-weight: 600; }

@media (max-width: 640px) {
  .incident-form-grid { grid-template-columns: 1fr; }
  .incident-form-footer { flex-direction: column; gap: 12px; align-items: flex-start; }
  .severity-picker { flex-wrap: wrap; }
  .incident-hero { flex-direction: column; gap: 14px; align-items: flex-start; }
}


/* ── VENDOR DIRECTORY ── */
.vendor-hero {
  background: linear-gradient(135deg, #32175C 0%, #3F0697 60%, #6225CC 100%);
  padding: 26px 28px;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; overflow: hidden; gap: 24px;
}
.vendor-hero::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(227,12,121,0.2) 0%, transparent 65%);
  pointer-events: none;
}
.vendor-hero-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.38); margin-bottom: 6px; }
.vendor-hero-title { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -0.02em; margin-bottom: 4px; }
.vendor-hero-sub { font-size: 13px; color: rgba(255,255,255,0.45); }
.vendor-hero-left { flex: 1; min-width: 0; }
.vendor-hero-stats { display: flex; gap: 6px; flex-shrink: 0; }
.vendor-stat {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px; padding: 10px 16px; text-align: center; min-width: 72px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.vendor-stat[onclick]:hover {
  background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.35);
  transform: translateY(-1px);
}
.vendor-stat-val { font-size: 22px; font-weight: 700; color: #fff; line-height: 1; margin-bottom: 3px; }
.vendor-stat-lbl { font-size: 10px; color: rgba(255,255,255,0.45); white-space: nowrap; }

/* Controls */
.vendor-controls {
  display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px;
}
.vendor-controls-sticky {
  position: sticky;
  top: 54px; /* height of topbar */
  z-index: 50;
  background: var(--bg);
  padding: 14px 0 10px;
  margin-top: -14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.vendor-search-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--border-strong);
  border-radius: 10px; padding: 0 14px; height: 44px;
  transition: border-color 0.15s;
}
.vendor-search-wrap:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(98,37,204,0.1); }
.vendor-search-input { flex: 1; border: none; outline: none; font-size: 14px; background: none; color: var(--text-primary); }
.vendor-search-input::placeholder { color: var(--text-muted); }
.vendor-filters { display: flex; gap: 7px; flex-wrap: wrap; }
.vendor-filter {
  font-size: 12px; font-weight: 500; padding: 6px 14px;
  border-radius: 20px; border: 1.5px solid var(--border-strong);
  background: var(--surface); color: var(--text-secondary);
  cursor: pointer; font-family: inherit; transition: all 0.15s; white-space: nowrap;
}
.vendor-filter:hover { border-color: var(--purple); color: var(--purple); }
.vendor-filter.active { background: var(--purple); border-color: var(--purple); color: #fff; }
.filter-count { opacity: 0.7; margin-left: 3px; }
.vendor-count { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }

/* Grid */
.vendor-grid {
  display: block;
}
.vendor-empty { text-align: center; padding: 40px; font-size: 14px; color: var(--text-muted); }
.vendor-empty.hidden { display: none; }

/* Category chips */
.vendor-categories { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 4px; }
.cat-chip {
  padding: 4px 12px; border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text-secondary); font-size: 12px;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.cat-chip:hover { border-color: var(--purple); color: var(--purple); }
.cat-chip.active { background: var(--purple); border-color: var(--purple); color: #fff; }

/* Group headers */
.vendor-group-header {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  padding: 20px 0 8px; display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border); margin-bottom: 12px;
}
.vendor-group-count {
  background: var(--grape-xlt); color: var(--purple);
  font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px;
}
.vendor-grid-inner {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 8px;
}

/* Cards */
.vendor-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 12px; transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
  box-shadow: 0 1px 4px rgba(50,23,92,0.04);
}
.vendor-card:hover {
  box-shadow: 0 6px 20px rgba(50,23,92,0.1);
  border-color: rgba(98,37,204,0.22);
  transform: translateY(-2px);
}
.vendor-card-top {
  display: flex; align-items: center; gap: 10px;
}
.vendor-card-info { flex: 1; min-width: 0; }
.vendor-icon-fallback {
  width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0;
  background: var(--solv-purple-light); color: var(--purple);
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.vendor-name {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  line-height: 1.3; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vendor-badges { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.vendor-baa { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 20px; white-space: nowrap; }
.vendor-baa-yes { background: #dcfce7; color: #15803d; }
.vendor-baa-no  { background: #fef2f2; color: #991b1b; }
.vendor-phi   { font-size: 11px; line-height: 1; }
.vendor-renew { font-size: 11px; line-height: 1; }
.vendor-actions {
  display: flex; gap: 8px; align-items: center;
}
.vendor-btn-primary {
  flex: 1; background: var(--purple); color: #fff; border: none;
  border-radius: 7px; height: 32px; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: background 0.15s;
  display: flex; align-items: center; justify-content: center; white-space: nowrap;
}
.vendor-btn-primary:hover { background: var(--purple-2); }
.vendor-btn-ghost {
  font-size: 12px; font-weight: 500; color: var(--purple);
  text-decoration: none; border: 1.5px solid var(--border-strong);
  border-radius: 7px; height: 32px; padding: 0 10px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s; white-space: nowrap; flex-shrink: 0;
}
.vendor-btn-ghost:hover { background: var(--solv-purple-light); }
.vendor-info-only-badge {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  border: 1.5px solid var(--border); border-radius: 7px;
  padding: 0 10px; height: 32px; display: flex; align-items: center;
  white-space: nowrap; flex: 1; justify-content: center;
}
.vendor-type-chip { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.04em; }
.type-software  { background: var(--solv-purple-light); color: var(--purple); }
.type-saas      { background: var(--cb-xlight);         color: var(--cb-rich); }
.type-service   { background: #FEF3E2;                  color: #92540a; }
.type-hardware  { background: #f0fdf4;                  color: #166534; }

@media (max-width: 900px) { .vendor-grid-inner { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 580px) { .vendor-grid-inner { grid-template-columns: 1fr; } .vendor-hero { flex-direction: column; } }




.vendor-favicon {
  width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0;
  object-fit: contain;
}
