/*
 * Morse Design Language Override for Pulse Intelligence
 * Version: 1.0
 * Applied as a post-bundle override layer
 * 
 * This file transforms the existing Pulse Intelligence blue theme
 * into the Morse by Promowise design language:
 * - Black & white foundation with selective accent colors
 * - Editorial serif display typography (Playfair Display)
 * - Clean sans-serif body text (Inter)
 * - Generous whitespace and content-first hierarchy
 */

/* ============================================
   1. CSS CUSTOM PROPERTIES OVERRIDE
   ============================================ */

:root {
  /* Morse Background & Surface */
  --background: 0 0% 100%;           /* #FFFFFF */
  --foreground: 0 0% 10%;            /* #1A1A1A */
  --card: 0 0% 100%;                 /* #FFFFFF */
  --card-foreground: 0 0% 10%;       /* #1A1A1A */
  --popover: 0 0% 100%;
  --popover-foreground: 0 0% 10%;
  
  /* Morse Primary = Teal for accents */
  --primary: 180 100% 30%;           /* #009999 */
  --primary-foreground: 0 0% 100%;   /* White */
  
  /* Morse Secondary */
  --secondary: 40 6% 95%;            /* #F5F5F3 */
  --secondary-foreground: 0 0% 10%;  /* #1A1A1A */
  
  /* Morse Muted */
  --muted: 40 6% 95%;                /* #F5F5F3 */
  --muted-foreground: 0 0% 40%;      /* #666666 */
  
  /* Morse Accent = Teal */
  --accent: 180 100% 30%;            /* #009999 */
  --accent-foreground: 0 0% 100%;
  
  /* Morse Destructive */
  --destructive: 0 84% 60%;          /* #EF4444 */
  --destructive-foreground: 0 0% 100%;
  
  /* Morse Borders */
  --border: 0 0% 90%;                /* #E5E5E5 */
  --input: 0 0% 90%;                 /* #E5E5E5 */
  --ring: 180 100% 30%;              /* #009999 */
  
  /* Morse Border Radius */
  --radius: 0.5rem;                  /* 8px */
  
  /* Signal Strength - keep functional colors */
  --signal-very-strong: 0 84% 60%;
  --signal-strong: 25 95% 53%;
  --signal-moderate: 48 96% 53%;
  --signal-weak: 0 0% 80%;
  
  /* Sidebar */
  --sidebar-background: 0 0% 100%;
  --sidebar-foreground: 0 0% 10%;
  --sidebar-primary: 180 100% 30%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 40 6% 95%;
  --sidebar-accent-foreground: 0 0% 10%;
  --sidebar-border: 0 0% 90%;
  --sidebar-ring: 180 100% 30%;
  
  /* Charts */
  --chart-1: 180 100% 30%;           /* Teal */
  --chart-2: 142 71% 45%;            /* Green */
  --chart-3: 340 75% 52%;            /* Pink #D6336C */
  --chart-4: 48 96% 53%;             /* Amber */
  --chart-5: 0 0% 10%;               /* Black */

  /* Font families as CSS variables */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, Arial, sans-serif;
  --font-mono: 'Consolas', 'Courier New', monospace;
}

/* ============================================
   2. GLOBAL TYPOGRAPHY
   ============================================ */

body {
  font-family: var(--font-sans) !important;
  color: #1A1A1A !important;
  background-color: #FFFFFF !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   3. NAVBAR — Morse Style
   ============================================ */

/* The header bar → white with bottom border */
.pulse-header,
header,
header.bg-\[\#008CF4\],
nav {
  background-color: #FFFFFF !important;
  background: #FFFFFF !important;
  border-bottom: 1px solid #E5E5E5 !important;
  box-shadow: none !important;
  height: 60px !important;
}

/* Nav container background fix — the header specifically */
header.bg-\[\#008CF4\] {
  background-color: #FFFFFF !important;
  background: #FFFFFF !important;
}

/* Logo/brand text in nav */
.pulse-header .text-white,
.pulse-header a,
nav .text-white,
header .text-white,
header a.text-white,
header span.text-white {
  color: #1A1A1A !important;
}

/* "Pulse Intelligence" brand name — make it editorial */
.pulse-header .font-bold,
.pulse-header .text-lg,
.pulse-header .text-xl,
header .font-bold,
header .text-lg,
header .text-xl {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-style: italic !important;
  color: #1A1A1A !important;
}

/* Nav links — all of them */
.pulse-header a,
.pulse-header button,
header a,
header button,
nav a,
nav button {
  color: #1A1A1A !important;
  font-family: var(--font-sans) !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  background-color: transparent !important;
  border-radius: 0 !important;
  padding: 8px 12px !important;
  transition: color 0.15s ease !important;
  border: none !important;
}

/* Active nav link — teal underline instead of blue pill */
.pulse-header a.bg-white\/20,
.pulse-header a[class*="bg-white"],
.pulse-header [class*="bg-white\/20"],
header a.bg-white\/20,
header a[class*="bg-white"],
header [class*="bg-white\/20"],
nav a.bg-white\/20,
nav a[class*="bg-white"],
.pulse-header .bg-white\/20,
.pulse-nav-link.active,
a[class*="rounded-full"][class*="bg-white"] {
  background-color: transparent !important;
  color: #1A1A1A !important;
  border: none !important;
  border-bottom: 2.5px solid #009999 !important;
  border-radius: 0 !important;
  padding-bottom: 6px !important;
}

/* Nav link hover */
.pulse-header a:hover,
.pulse-header button:hover,
header a:hover,
header button:hover,
nav a:hover,
nav button:hover {
  color: #009999 !important;
  background-color: transparent !important;
}

/* Search input in nav */
.pulse-header input,
nav input[type="text"],
nav input[type="search"],
input[placeholder*="Search"] {
  background-color: #FFFFFF !important;
  border: 1px solid #E5E5E5 !important;
  border-radius: 6px !important;
  color: #1A1A1A !important;
  height: 36px !important;
  font-size: 14px !important;
}

.pulse-header input::placeholder,
nav input::placeholder {
  color: #999999 !important;
}

/* Remove white-on-blue icon colors in nav */
.pulse-header svg,
.pulse-header .text-white svg,
header svg,
header .text-white svg,
nav svg.text-white {
  color: #666666 !important;
}

/* Fix the header hover bg */
header .hover\:bg-\[\#0077D4\]:hover {
  background-color: transparent !important;
}

/* ============================================
   4. PAGE HEADERS — Morse Editorial Style
   ============================================ */

/* Main page title (h1) — large editorial serif */
h1, .text-3xl, .text-2xl {
  font-family: var(--font-display) !important;
  font-weight: 900 !important;
  color: #1A1A1A !important;
  letter-spacing: -0.01em !important;
}

/* Page titles should be large */
h1 {
  font-size: 48px !important;
  line-height: 1.1 !important;
}

.text-3xl {
  font-size: 36px !important;
  line-height: 1.15 !important;
}

/* Page subtitle/description */
h1 + p, h1 + div > p,
.text-\[\#5A6B7A\],
.text-\[\#6D7480\],
.text-\[\#9EA8B3\] {
  color: #999999 !important;
  font-family: var(--font-sans) !important;
  font-size: 15px !important;
}

/* Section headers */
h2, h3, .text-xl, .text-lg.font-bold, .text-lg.font-semibold {
  font-family: var(--font-sans) !important;
  font-weight: 700 !important;
  color: #1A1A1A !important;
}

/* ============================================
   5. CARDS — Morse Style
   ============================================ */

/* All cards */
.pulse-card,
.bg-card,
.bg-white.rounded-xl,
.bg-white.rounded-lg,
div[class*="rounded-xl"][class*="border"],
div[class*="rounded-lg"][class*="border"],
div[class*="shadow"][class*="rounded"] {
  background: #FFFFFF !important;
  border: 1px solid #E5E5E5 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

/* Card hover effect — subtle shadow increase */
.pulse-card:hover,
.bg-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  transition: box-shadow 0.2s ease !important;
}

/* KPI stat cards on dashboard */
.shadow-\[0_6px_18px_rgba\(2\,18\,36\,0\.06\)\] {
  box-shadow: none !important;
  border: 1px solid #E5E5E5 !important;
}

/* Card titles */
.pulse-card .font-bold,
.pulse-card .font-semibold {
  font-family: var(--font-sans) !important;
  color: #1A1A1A !important;
}

/* Card text colors */
.text-\[\#22262A\] {
  color: #1A1A1A !important;
}

.text-\[\#5A6B7A\] {
  color: #666666 !important;
}

.text-\[\#6D7480\] {
  color: #666666 !important;
}

.text-\[\#9EA8B3\] {
  color: #999999 !important;
}

/* ============================================
   6. METRIC DISPLAYS — Morse Style
   ============================================ */

/* Metric labels — uppercase, letter-spaced, muted */
.uppercase,
.text-xs.uppercase,
.tracking-wider,
.tracking-widest {
  font-family: var(--font-sans) !important;
  letter-spacing: 0.15em !important;
  font-weight: 600 !important;
}

/* Large metric numbers */
.text-3xl.font-bold,
.text-2xl.font-bold {
  font-family: var(--font-sans) !important;
  color: #1A1A1A !important;
  font-weight: 900 !important;
}

/* Positive change indicators */
.text-green-500, .text-green-600, .text-emerald-500, .text-emerald-700 {
  color: #22C55E !important;
}

/* Negative change indicators */
.text-red-500, .text-red-600 {
  color: #EF4444 !important;
}

/* ============================================
   7. BUTTONS — Morse Style
   ============================================ */

/* Primary CTA (Pink) - currently teal/blue buttons */
button.bg-\[\#008CF4\],
button.bg-primary,
main .bg-primary:not(nav):not(header),
a.bg-\[\#008CF4\]:not(header a),
button[class*="bg-\[\#008CF4\]"],
main button.bg-\[\#22C55E\],
main a.bg-\[\#22C55E\] {
  background-color: #D6336C !important;
  color: #FFFFFF !important;
  border-radius: 7px !important;
  border: none !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  box-shadow: none !important;
  transition: background-color 0.15s ease !important;
}

button.bg-\[\#008CF4\]:hover,
button.bg-primary:hover,
main .bg-primary:hover:not(nav) {
  background-color: #C12D60 !important;
}

/* The "Run Scan" button */
.bg-\[\#22C55E\],
button.bg-\[\#22C55E\] {
  background-color: #000000 !important;
  color: #FFFFFF !important;
  border-radius: 7px !important;
  box-shadow: none !important;
}

.hover\:bg-\[\#16A34A\]:hover {
  background-color: #1A1A1A !important;
}

/* Ghost/Secondary buttons */
button.bg-white,
button[class*="border"][class*="bg-white"],
.bg-secondary {
  background-color: #FFFFFF !important;
  border: 1px solid #1A1A1A !important;
  border-radius: 7px !important;
  color: #1A1A1A !important;
}

/* Pill-shaped buttons → 7px radius */
.rounded-full:not(.h-8):not(.h-10):not(.w-8):not(.w-10):not(.h-6):not(.w-6):not(.h-7):not(.w-7):not(.h-9):not(.w-9):not(.h-12):not(.w-12):not(.h-5):not(.w-5):not(.h-4):not(.w-4):not(.h-3):not(.w-3):not(img):not(svg):not(.aspect-square) {
  border-radius: 7px !important;
}

/* ============================================
   8. SIGNAL STRENGTH BADGES — Morse Style
   ============================================ */

/* Very Strong signal */
.signal-very-strong {
  color: #EF4444 !important;
  background-color: transparent !important;
  border: 1px solid #EF4444 !important;
  border-radius: 9999px !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  font-weight: 600 !important;
}

/* Strong signal */
.signal-strong {
  color: #F59E0B !important;
  background-color: transparent !important;
  border: 1px solid #F59E0B !important;
  border-radius: 9999px !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  font-weight: 600 !important;
}

/* Moderate signal */
.signal-moderate {
  color: #EAB308 !important;
  background-color: transparent !important;
  border: 1px solid #EAB308 !important;
  border-radius: 9999px !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  font-weight: 600 !important;
}

/* Weak signal */
.signal-weak {
  color: #999999 !important;
  background-color: transparent !important;
  border: 1px solid #E5E5E5 !important;
  border-radius: 9999px !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  font-weight: 600 !important;
}

/* ============================================
   9. BACKGROUND COLORS — Morse Style
   ============================================ */

/* Main page background — pure white */
.bg-background,
.bg-\[\#F4F8FA\],
.bg-\[\#E8F0F8\] {
  background-color: #FFFFFF !important;
}

/* Light gray section backgrounds */
.bg-\[\#E8EEF3\] {
  background-color: #F5F5F3 !important;
}

/* Blue accents → teal */
.bg-\[\#008CF4\]\/10,
.bg-blue-50 {
  background-color: rgba(0, 153, 153, 0.08) !important;
}

/* Colored circle avatars — make them more muted */
.bg-indigo-500, .bg-pink-500, .bg-purple-500, .bg-teal-500,
.bg-orange-500, .bg-red-500, .bg-yellow-500 {
  opacity: 0.85;
}

/* ============================================
   10. BORDERS — Morse Style
   ============================================ */

/* All borders should be #E5E5E5 */
.border-\[\#D9E2EA\],
.border-\[\#E8EEF3\],
.border-gray-200 {
  border-color: #E5E5E5 !important;
}

.divide-\[\#E8EEF3\] > :not([hidden]) ~ :not([hidden]) {
  border-color: #E5E5E5 !important;
}

/* ============================================
   11. BLUE TEXT → TEAL or BLACK
   ============================================ */

/* Blue text accents → teal */
.text-\[\#008CF4\] {
  color: #009999 !important;
}

/* Blue link hovers → teal */
.hover\:text-\[\#008CF4\]:hover {
  color: #009999 !important;
}

/* Active tabs — teal instead of blue */
.sub-tab-active {
  color: #009999 !important;
  border-bottom-color: #009999 !important;
}

/* Blue focus rings → teal */
.focus\:border-\[\#008CF4\]:focus {
  border-color: #009999 !important;
}

.focus\:ring-\[\#008CF4\]\/30:focus {
  --tw-ring-color: rgba(0, 153, 153, 0.3) !important;
}

/* ============================================
   12. TAGS & CHIPS — Morse Style
   ============================================ */

/* Tag pills — outlined, no fill */
.pulse-pill,
span[class*="rounded-full"][class*="px-"],
span[class*="rounded-full"][class*="py-"] {
  border: 1px solid #E5E5E5 !important;
  background-color: transparent !important;
  color: #666666 !important;
  font-size: 12px !important;
  letter-spacing: 0.05em !important;
}

/* ============================================
   13. INPUTS — Morse Style
   ============================================ */

input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  border: 1px solid #E5E5E5 !important;
  border-radius: 7px !important;
  font-family: var(--font-sans) !important;
  color: #1A1A1A !important;
  font-size: 14px !important;
}

input:focus:not([type="checkbox"]):not([type="radio"]),
textarea:focus,
select:focus {
  border-color: #1A1A1A !important;
  outline: none !important;
  box-shadow: none !important;
}

input::placeholder,
textarea::placeholder {
  color: #999999 !important;
}

/* ============================================
   14. LAYOUT & SPACING — Morse Style  
   ============================================ */

/* Main content container — cap at 1200px */
.max-w-\[1280px\] {
  max-width: 1200px !important;
}

/* Section spacing increase */
.space-y-6 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 2rem !important;
}

/* Page content padding */
.px-6, .px-8 {
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}

/* ============================================
   15. FOOTER — Morse Style
   ============================================ */

/* "Created with Perplexity Computer" footer */
footer, .text-center.text-sm.text-gray-500,
.text-center.text-xs {
  color: #999999 !important;
  font-size: 12px !important;
  letter-spacing: 0.05em !important;
}

/* ============================================
   16. TABLE STYLES — Morse Style
   ============================================ */

table {
  border-collapse: collapse !important;
}

table th {
  font-family: var(--font-sans) !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.15em !important;
  color: #999999 !important;
  border-bottom: 1px solid #E5E5E5 !important;
}

table td {
  border-bottom: 1px solid #E5E5E5 !important;
  color: #1A1A1A !important;
  font-size: 14px !important;
}

table tr:hover td {
  background-color: #F5F5F3 !important;
}

/* ============================================
   17. SCROLLBAR — Subtle
   ============================================ */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #E5E5E5;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #999999;
}

/* ============================================
   18. CATEGORY BADGES — Morse Page Headers
   ============================================ */

/* Add Morse-style category badge effect to page headers */
/* We'll add these via a small JS injection in index.html */

/* ============================================
   19. ADDITIONAL OVERRIDES FOR MORSE
   ============================================ */

/* Blue icon backgrounds → teal */
.bg-\[\#008CF4\]\/10 svg,
.text-\[\#008CF4\] svg {
  color: #009999 !important;
}

/* Chart colors — adjust blue → teal */
.bg-\[\#008CF4\] .recharts-layer,
.recharts-cartesian-axis-tick text {
  fill: #666666 !important;
}

/* Remove any remaining blue backgrounds from non-nav elements */
div:not(.pulse-header):not(nav):not(header) > .bg-\[\#008CF4\] {
  background-color: #009999 !important;
}

/* Status/progress bars & generic blue backgrounds → teal (except nav which is handled separately) */
/* The .bg-[#008CF4] class in the original Tailwind was blue - we change it to teal for non-nav usage */
/* Nav is overridden to white via .pulse-header rules */

/* Alert colors */
.bg-green-50 { background-color: rgba(34, 197, 94, 0.08) !important; }
.bg-red-50 { background-color: rgba(239, 68, 68, 0.08) !important; }
.bg-orange-50 { background-color: rgba(245, 158, 11, 0.08) !important; }
.bg-yellow-50 { background-color: rgba(234, 179, 8, 0.08) !important; }

/* Dialog/Modal overlays */
.bg-black\/80 {
  background-color: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(4px) !important;
}

/* ============================================
   20. RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
  h1 {
    font-size: 32px !important;
  }
  
  .text-3xl {
    font-size: 28px !important;
  }
  
  .px-6, .px-8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* ============================================
   21. PULSE-SPECIFIC COMPONENT TWEAKS
   ============================================ */

/* The nav link hover background (blue tint) → remove */
.pulse-header:hover .pulse-nav-link:hover {
  background-color: transparent !important;
}

/* White/20 background on nav items → transparent */
.bg-white\/10,
.bg-white\/20,
.hover\:bg-white\/10:hover {
  background-color: transparent !important;
}

/* Focus state for nav search → dark border instead of blue */
.focus\:bg-white\/20:focus {
  background-color: #FFFFFF !important;
  border-color: #1A1A1A !important;
}

.focus\:border-white\/40:focus {
  border-color: #1A1A1A !important;
}

.placeholder-white\/50::placeholder {
  color: #999999 !important;
}

.text-white\/50,
.text-white\/70 {
  color: #666666 !important;
}

/* Border divider colors */
.border-white\/20,
.border-white\/30 {
  border-color: #E5E5E5 !important;
}

/* ============================================
   22. NAVBAR DEEP OVERRIDES
   ============================================ */

/* Force ALL nav container backgrounds to white - deep cascade */
.pulse-header,
.pulse-header > *,
.pulse-header > * > *,
header,
header > *,
header > * > *,
header > * > * > *,
header > * > * > * > *,
header.bg-\[\#008CF4\],
header.bg-\[\#008CF4\] > *,
header.bg-\[\#008CF4\] > * > *,
header.bg-\[\#008CF4\] > * > * > *,
nav,
nav > *,
[class*="pulse-header"] {
  background-color: transparent !important;
  background: transparent !important;
}

/* Re-apply white on the main header element itself */
.pulse-header,
header,
header.bg-\[\#008CF4\] {
  background-color: #FFFFFF !important;
  background: #FFFFFF !important;
  border-bottom: 1px solid #E5E5E5 !important;
  box-shadow: none !important;
}

/* The search input in the nav should be white */
.pulse-header input,
header input {
  background-color: #FFFFFF !important;
  background: #FFFFFF !important;
}

/* Any rounded-full pill in the nav → flat + transparent */
.pulse-header .rounded-full,
.pulse-header [class*="rounded-full"],
nav .rounded-full {
  border-radius: 0 !important;
  background-color: transparent !important;
  background: transparent !important;
}

/* Icon colors in KPI cards — teal instead of blue */
.pulse-card svg,
.bg-card svg {
  color: #009999 !important;
}

/* Recent discoveries bullet indicators — NOT the header */
:not(header).bg-\[\#008CF4\],
header ~ * .bg-\[\#008CF4\],
main .bg-\[\#008CF4\],
section .bg-\[\#008CF4\] {
  background-color: #009999 !important;
}

/* ============================================
   23. ITERATION 1 — UX POLISH IMPROVEMENTS
   ============================================ */

/* --- KPI Metric Labels: uppercase, letter-spaced, muted per Morse --- */
.pulse-card .text-xs,
.pulse-card .text-sm.text-muted-foreground,
.pulse-card .text-\[\#9EA8B3\],
.pulse-card .text-\[\#5A6B7A\] {
  text-transform: uppercase !important;
  letter-spacing: 0.15em !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  color: #999999 !important;
}

/* --- KPI Large Numbers: heavier weight, slight letter-spacing --- */
.pulse-card .text-3xl,
.pulse-card .text-2xl,
.text-3xl.font-bold,
.text-2xl.font-bold {
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
  color: #1A1A1A !important;
}

/* --- KPI Card Icons: refined teal with subtle bg circle --- */
.pulse-card svg.lucide {
  color: #009999 !important;
}

/* --- Active Nav: make teal underline thicker and more visible --- */
header a.bg-white\/20,
header [class*="bg-white\/20"],
a[class*="rounded-full"][class*="bg-white"] {
  border-bottom: 3px solid #009999 !important;
  padding-bottom: 4px !important;
  font-weight: 600 !important;
}

/* --- Signal Badges: stronger visual differentiation --- */
/* Very Strong: solid red outline, bold */
.signal-very-strong {
  border-width: 1.5px !important;
  font-weight: 700 !important;
  padding: 3px 10px !important;
}

/* Strong: slightly lighter */  
.signal-strong {
  border-width: 1.5px !important;
  font-weight: 600 !important;
  padding: 3px 10px !important;
}

/* --- Recent Discoveries: teal left border bar thicker + subtle hover --- */
.pulse-card .border-l-2,
.pulse-card .border-l-\[3px\],
.pulse-card div[class*="border-l"] {
  border-left-width: 3px !important;
  border-left-color: #009999 !important;
}

/* --- Card Section Headers: Morse-style with subtle uppercase label above --- */
.pulse-card > div > .font-semibold:first-child,
.pulse-card > .font-semibold:first-child,
.pulse-card h3,
.pulse-card .text-lg.font-semibold {
  font-family: var(--font-sans) !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  letter-spacing: 0.02em !important;
  color: #1A1A1A !important;
}

/* --- Footer: ultra-subtle --- */
footer,
.text-center.text-sm,
.text-center.text-xs,
[class*="text-center"][class*="text-gray"] {
  opacity: 0.4 !important;
  font-size: 11px !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}

/* --- Page subtitle: slightly more visible --- */
h1 + p,
h1 + div > p:first-child,
.text-\[\#5A6B7A\]:not(.pulse-card .text-\[\#5A6B7A\]) {
  font-size: 15px !important;
  color: #666666 !important;
  line-height: 1.5 !important;
}

/* --- Signal Distribution Bar: taller, more readable --- */
.bg-\[\#EF4444\],
.bg-\[\#F97316\],
.bg-\[\#EAB308\],
.bg-gray-200 {
  min-height: 6px !important;
  border-radius: 3px !important;
}

/* --- Company Avatar Circles: refined with slight border --- */
.rounded-full.w-10.h-10,
.rounded-full.w-8.h-8,
.rounded-full[class*="bg-"][class*="text-white"] {
  font-weight: 700 !important;
  font-size: 13px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

/* --- Hover states on company rows --- */
.pulse-card > div > div:hover {
  background-color: #F5F5F3 !important;
  transition: background-color 0.15s ease !important;
}

/* --- Subtle dividers between items in lists --- */
.pulse-card .divide-y > *:not(:first-child),
.pulse-card > div > div + div {
  border-top: 1px solid #F5F5F3 !important;
}

/* --- External link arrows: muted, become teal on hover --- */
.lucide-arrow-up-right,
.lucide-external-link {
  color: #999999 !important;
  transition: color 0.15s ease !important;
}

.pulse-card div:hover .lucide-arrow-up-right,
.pulse-card div:hover .lucide-external-link {
  color: #009999 !important;
}

/* ============================================
   24. ITERATION 2 — INFORMATION HIERARCHY & FLOW
   ============================================ */

/* --- Feed Items: stronger title hierarchy --- */
.pulse-card a .font-semibold,
.pulse-card a .font-bold,
a.font-semibold,
a.font-bold {
  font-family: var(--font-sans) !important;
  font-weight: 700 !important;
  color: #1A1A1A !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
}

/* Feed item hover: whole card gets subtle left border */
.pulse-card a:hover,
.pulse-card > div > div:hover {
  border-left: 3px solid #009999 !important;
  padding-left: 12px !important;
  transition: all 0.15s ease !important;
}

/* --- Publisher/company name in feed items: muted --- */
.text-\[\#6D7480\] {
  color: #666666 !important;
  font-size: 13px !important;
}

/* --- Date in feed items: very muted --- */
.text-\[\#9EA8B3\] {
  color: #999999 !important;
  font-size: 12px !important;
}

/* --- Card padding: Morse-standard 24-32px --- */
.pulse-card > .p-4,
.pulse-card > .p-5,
.pulse-card > .p-6 {
  padding: 28px !important;
}

/* --- Section gaps: Morse-standard 48-64px --- */
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 1.5rem !important;
}

/* Main content sections */
main > .space-y-6 > :not([hidden]) ~ :not([hidden]),
main > div > .space-y-6 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 2.5rem !important;
}

/* --- Search input: subtle warmth --- */
header input[placeholder*="Search"],
input[placeholder*="Search"] {
  background-color: #F5F5F3 !important;
  border: 1px solid #E5E5E5 !important;
  padding-left: 36px !important;
  font-size: 13px !important;
  height: 36px !important;
  border-radius: 6px !important;
  transition: all 0.15s ease !important;
}

header input[placeholder*="Search"]:focus,
input[placeholder*="Search"]:focus {
  background-color: #FFFFFF !important;
  border-color: #1A1A1A !important;
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.05) !important;
}

/* --- Company cards hover: lift effect --- */
.pulse-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
  transform: translateY(-1px) !important;
  transition: all 0.2s ease !important;
}

/* --- Tab styling: Morse-style with thick underline --- */
button[role="tab"],
.sub-tab {
  font-family: var(--font-sans) !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.12em !important;
  color: #999999 !important;
  padding: 8px 16px !important;
  border-bottom: 2px solid transparent !important;
  transition: all 0.15s ease !important;
}

button[role="tab"][aria-selected="true"],
button[role="tab"]:hover,
.sub-tab.sub-tab-active,
.sub-tab:hover {
  color: #1A1A1A !important;
  border-bottom: 2px solid #009999 !important;
}

/* --- Brand text refinement --- */
header .font-bold,
header .text-lg {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-style: italic !important;
  font-size: 18px !important;
  color: #1A1A1A !important;
  letter-spacing: -0.01em !important;
}

/* --- Clickable items: pointer cursor --- */
.pulse-card [class*="cursor-pointer"],
.pulse-card a,
.pulse-card button {
  cursor: pointer !important;
}

/* --- Chart bar colors: refined palette --- */
/* Top publisher bars should use contrasting colors */
.recharts-bar-rectangle {
  rx: 3;
}

/* --- Horizontal bar chart labels: better readability --- */
.recharts-text {
  font-family: var(--font-sans) !important;
  font-size: 12px !important;
  fill: #666666 !important;
}

/* --- Stats page KPI numbers: larger --- */
.text-4xl {
  font-family: var(--font-sans) !important;
  font-weight: 900 !important;
  font-size: 42px !important;
  color: #1A1A1A !important;
}

/* --- Stats page KPI labels: uppercase Morse style --- */
.text-4xl + .text-sm,
.text-4xl ~ .text-sm,
.text-3xl + .text-sm {
  text-transform: uppercase !important;
  letter-spacing: 0.15em !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  color: #999999 !important;
}

/* --- Content type labels in stats: refined --- */
.text-right.text-sm,
.text-left.text-sm {
  font-size: 12px !important;
  color: #666666 !important;
}

/* --- Tooltip refinement --- */
[role="tooltip"],
.tooltip-content {
  background-color: #1A1A1A !important;
  color: #FFFFFF !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  padding: 6px 12px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* --- Empty state refinement --- */
.text-center.text-muted-foreground {
  color: #999999 !important;
  font-size: 14px !important;
}

/* --- Selection/focus: teal ring --- */
*:focus-visible {
  outline: 2px solid #009999 !important;
  outline-offset: 2px !important;
}

/* ============================================
   25. ANIMATION REFINEMENTS
   ============================================ */

/* Smooth transitions on interactive elements */
a, button, input, select, textarea, .pulse-card {
  transition: all 0.15s ease !important;
}

/* Subtle hover lift on cards */
.pulse-card:hover {
  transform: translateY(-1px);
}

/* ============================================
   26. ITERATION 1 IMPROVEMENTS
   ============================================ */

/* Remove "Created with Perplexity Computer" footer text */
footer,
.text-center.text-gray-400,
[class*="text-gray-400"][class*="tracking-widest"],
p.tracking-widest {
  display: none !important;
}

/* Signal strength left-border on feed items (applied via JS) */
.morse-signal-border {
  border-left-width: 4px !important;
  border-left-style: solid !important;
}
.morse-signal-very-strong { border-left-color: #EF4444 !important; }
.morse-signal-strong { border-left-color: #F97316 !important; }
.morse-signal-moderate { border-left-color: #EAB308 !important; }
.morse-signal-weak { border-left-color: #D1D5DB !important; }

/* ============================================
   27. ITERATION 2 — POLISH & MICRO-INTERACTIONS
   ============================================ */

/* Feed item hover effect */
[data-testid^="feed-item-"] {
  transition: background-color 0.15s ease, box-shadow 0.15s ease !important;
}
[data-testid^="feed-item-"]:hover {
  background-color: #FAFAFA !important;
}

/* Feed item title emphasis */
[data-testid^="feed-item-"] p.font-semibold {
  font-size: 0.95rem !important;
  line-height: 1.4 !important;
  color: #1A1A1A !important;
}

/* Feed item metadata (dates) — more muted */
[data-testid^="feed-item-"] p.text-xs {
  color: #999999 !important;
  letter-spacing: 0.02em !important;
}

/* Company page cards — improved hover */
a[href*="#/companies/"].border {
  transition: all 0.15s ease !important;
}
a[href*="#/companies/"].border:hover {
  border-color: #009999 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

/* Page subtitles — Morse-consistent */
main h1 + p,
main .text-3xl + p,
main [class*="text-3xl"] ~ p:first-of-type {
  color: #999999 !important;
  font-size: 0.875rem !important;
  letter-spacing: 0.04em !important;
  font-weight: 400 !important;
}

/* Company avatar with logo — smooth fallback */
.morse-company-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Dashboard Recent Discoveries — better title display */
main [class*="Recent Discoveries"] li,
main .space-y-3 > div {
  transition: background-color 0.15s ease !important;
}
main .space-y-3 > div:hover {
  background-color: #FAFAFA !important;
}

/* ============================================
   28. ITERATION 3 — PERFECTION & ACCESSIBILITY
   ============================================ */

/* Improve signal badge contrast */
/* Weak badge — darker text */
.signal-weak,
[class*="text-gray-500"][class*="border-gray-200"],
span:has(+ .bg-gray-400) {
  color: #666666 !important;
}

/* Moderate badge — slightly darker yellow text */
[class*="text-yellow-600"] {
  color: #B8860B !important;
}

/* Keyboard focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #009999 !important;
  outline-offset: 2px !important;
  border-radius: 4px !important;
}

/* Consistent page header layout */
main > div:first-child {
  margin-bottom: 24px !important;
}

/* Page titles — standardize */
h1[class*="text-3xl"],
h1.text-3xl {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-weight: 700 !important;
  font-size: 2rem !important;
  color: #1A1A1A !important;
  line-height: 1.2 !important;
  margin-bottom: 4px !important;
}

/* Scrollbar styling — subtle Morse feel */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Better badge pill spacing */
span[class*="rounded-full"][class*="text-xs"] {
  padding: 3px 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
}

/* Dashboard KPI card icons — consistent teal tint */
.bg-\[\#008CF4\]\/10 {
  background-color: rgba(0, 153, 153, 0.08) !important;
}

/* Footer completely hidden */
body > div:last-child:not(#root) {
  display: none !important;
}

/* ============================================
   29. FILTER BARS — COMPANIES & FEED
   ============================================ */

/* Filter bar container — subtle background */
#morse-feed-filter-bar {
  background: #FAFAFA !important;
  border: 1px solid #F0F0F0 !important;
  border-radius: 10px !important;
  padding: 10px 16px !important;
}

#morse-companies-filter-bar {
  background: #FAFAFA !important;
  border: 1px solid #F0F0F0 !important;
  border-radius: 10px !important;
  padding: 10px 16px !important;
}

/* Signal filter pills — base styling override */
#morse-companies-filter-bar button,
#morse-feed-filter-bar button {
  transition: all 0.15s ease !important;
}

#morse-companies-filter-bar button:hover,
#morse-feed-filter-bar button:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08) !important;
}

/* Select dropdowns — consistent Morse styling */
#morse-companies-filter-bar select,
#morse-feed-filter-bar select {
  transition: border-color 0.15s ease !important;
}

#morse-companies-filter-bar select:focus,
#morse-feed-filter-bar select:focus {
  border-color: #1A1A1A !important;
}

/* Publisher search input in feed filters */
#morse-feed-filter-bar input {
  transition: all 0.15s ease !important;
}

#morse-feed-filter-bar input:focus {
  border-color: #1A1A1A !important;
  background-color: #FFFFFF !important;
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.05) !important;
}

/* Divider lines between filter groups */
#morse-feed-filter-bar > span[style*="width:1px"] {
  flex-shrink: 0 !important;
}

/* Active filter indicator */
.morse-filter-count {
  background: #009999 !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  min-width: 18px !important;
  height: 18px !important;
  border-radius: 9px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 5px !important;
  margin-left: 6px !important;
  font-family: Inter, system-ui, sans-serif !important;
}

/* Results counter */
.morse-results-count {
  font-size: 11px !important;
  color: #999 !important;
  font-weight: 500 !important;
  letter-spacing: 0.05em !important;
  font-family: Inter, system-ui, sans-serif !important;
  white-space: nowrap !important;
}

/* Responsive filter bar */
@media (max-width: 768px) {
  #morse-companies-filter-bar,
  #morse-feed-filter-bar {
    gap: 8px !important;
    padding: 8px 12px !important;
  }
  
  #morse-companies-filter-bar button,
  #morse-feed-filter-bar button {
    padding: 4px 10px !important;
    font-size: 11px !important;
  }
  
  #morse-feed-filter-bar input {
    width: 120px !important;
  }
}
