@tailwind base;
@tailwind components;
@tailwind utilities;

@layer components {
  /* Custom prose variants for chat messages */
  .prose-chat {
    @apply prose w-full max-w-full;
  }
  
  .prose-chat p {
    @apply my-2 leading-[23px];
  }
  
  .prose-chat ul {
    @apply my-3 list-disc pl-6;
  }
  
  .prose-chat ol {
    @apply my-3 list-decimal pl-6;
  }
  
  .prose-chat h1, .prose-chat h2, .prose-chat h3, .prose-chat h4 {
    @apply font-semibold mt-6 mb-2;
  }

  .prose-chat h2 {
    @apply text-[1.1rem] mb-4;
  }

  .prose-chat h3 {
    @apply text-[1rem];
  }
  
  .prose-chat h4 {
    @apply text-[0.9rem];
  }

  .prose-chat hr {
    @apply my-7;
  }
  
  .prose-chat pre {
    @apply my-3 p-3 bg-gray-100 rounded-md text-sm overflow-x-auto;
  }
  
  .prose-chat code {
    @apply px-1.5 py-0.5 bg-gray-100 rounded text-sm font-normal;
  }
  
  .prose-chat blockquote {
    @apply pl-4 border-l-4 border-gray-300 italic my-3;
  }
  
  .prose-chat a {
    @apply text-purple-400 hover:text-purple-300 no-underline;
  }

  .field {
    @apply mb-4;
  }

  .field label {
    @apply block text-sm font-medium text-gray-500 mb-1;
  }

  .field input[type='text'],
  .field input[type='email'],
  .field input[type='password'] {
    @apply block w-full rounded-lg border-gray-300 shadow-sm focus:border-purple-300 focus:ring-purple-300 sm:text-sm;
  }

  #error_explanation {
    @apply rounded-md bg-red-50 p-4 mb-6 border border-red-200;
  }

  #error_explanation h2 {
    @apply text-sm font-medium text-red-800 mb-2;
  }

  #error_explanation ul {
    @apply list-none;
  }

  #error_explanation ul li:before {
    content: '-';
    @apply mr-2;
  }

  #error_explanation ul li {
    @apply text-sm text-red-700;
  }

  .field_with_errors label {
    @apply text-red-700;
  }

  .field_with_errors input {
    @apply border-red-300 text-red-900 placeholder-red-300 focus:border-red-500 focus:ring-red-500;
  }

  .error-message {
    @apply mt-2 text-sm text-red-600;
  }

  /* Chat textarea customization */
  .chat-input-container {
    @apply transition-all duration-300 ease-in-out hover:border-purple-200 hover:ring-1 hover:ring-purple-200 hover:shadow-[0_0_20px_rgba(147,51,234,0.2)];
  }
  
  .chat-input-container textarea {
    @apply w-full border-0 focus:ring-0 focus:outline-none resize-none p-0;
  }

  .chat-input-container .form-group {
    @apply m-0 p-0 w-full;
  }

  /* Add purple border to container when focused */
  .chat-input-container.focused {
    @apply border-purple-200 ring-1 ring-purple-200 shadow-[0_0_20px_rgba(147,51,234,0.2)] transition-shadow duration-300 ease-in-out;
  }

  .hint {
    @apply mt-2 text-sm text-gray-500;
  }

  .primary-button {
    @apply rounded-lg bg-purple-400 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-purple-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-purple-400;
  }

  .danger-button {
    @apply rounded-lg bg-red-600 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-red-600;
  }

  .back-link {
    @apply mt-6 inline-block text-sm text-gray-500 hover:text-gray-500;
  }

  .nav-item {
    @apply flex items-center h-[51px] text-xs font-medium rounded-full hover:bg-purple-100/50;
  }

  .nav-item-active {
    @apply bg-purple-100/50 text-gray-500 font-bold;
  }

  .nav-item-icon {
    @apply w-[23px] ml-[20px] mr-[18px];
  }

  /* Responsive sidebar utilities */
  .sidebar-toggle-button {
    @apply md:hidden flex items-center justify-center p-2 rounded-md text-gray-500 hover:text-gray-600 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-purple-300;
  }

  /* Mobile nav menu */
  .mobile-nav-menu {
    @apply fixed inset-0 z-40 flex md:hidden;
  }

  .mobile-nav-backdrop {
    @apply fixed inset-0 bg-gray-600 bg-opacity-75 transition-opacity ease-in-out duration-300;
  }

  .mobile-nav-panel {
    @apply relative flex-1 flex flex-col max-w-xs w-full bg-white transition ease-in-out duration-300 transform;
  }

  .feed-item-insight {
    @apply text-[#778295] text-[14px] font-light leading-tight;
  }

  .feed-item-insight ul {
    @apply mt-[14px] flex flex-col gap-3;
  }
  .feed-item-insight ul li {
    @apply relative pl-5;
  }

  .feed-item-insight ul li::before {
    @apply content-[''] absolute left-0 top-[3px] w-3 h-3 rounded-full bg-[#FFAD5C];
  }

  .feed-item-insight ul li strong {
    @apply font-semibold;
  }

  .breadcrumbs {
    @apply flex items-center;
  }

  .breadcrumbs-item {
    @apply relative text-slate-500 truncate max-w-[220px];
  }

  .breadcrumbs-item:not(:first-child) {
    @apply pl-6;
  }

  .breadcrumbs-item:not(:first-child)::before {
    @apply content-['/'] absolute left-2 top-1/2 -translate-y-1/2;
  }

  .breadcrumbs-item a {
    @apply text-black underline underline-offset-[5px] decoration-1 decoration-slate-300;
  }

  .highlighted-text {
    @apply relative inline cursor-pointer;
    -webkit-tap-highlight-color: transparent !important;
    background-image: linear-gradient(0deg, #3a809b 0%, #3aa0b5 2px, transparent 2px, transparent 100%) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 90% !important;
    background-position: 0 75% !important;
    visibility: visible !important;
    background-color: rgb(150, 251, 218);
  }

  /* Thinking content styles */
  .thinking-content {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    transition: max-height 0.3s ease;
  }
  
  .thinking-content code {
    background-color: transparent;
    border-radius: 0.25rem;
    padding: 0.125rem 0.25rem;
  }
  
  .thinking-content pre {
    overflow-x: auto;
  }

  /* Mention functionality styles */
  .mention-dropdown {
    @apply absolute top-full left-0 right-0 bg-white border border-gray-200 rounded-lg shadow-lg max-h-60 overflow-y-auto z-50 mt-1;
    animation: mention-dropdown-fade-in 0.15s ease-out;
  }

  .mention-dropdown.mention-dropdown-up {
    animation: mention-dropdown-fade-in-up 0.15s ease-out;
  }

  .mention-dropdown.hidden {
    animation: mention-dropdown-fade-out 0.1s ease-in;
  }

  .mention-dropdown.mention-dropdown-up.hidden {
    animation: mention-dropdown-fade-out-up 0.1s ease-in;
  }

  @keyframes mention-dropdown-fade-in {
    from {
      opacity: 0;
      transform: translateY(-4px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes mention-dropdown-fade-in-up {
    from {
      opacity: 0;
      transform: translateY(4px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes mention-dropdown-fade-out {
    from {
      opacity: 1;
      transform: translateY(0);
    }
    to {
      opacity: 0;
      transform: translateY(-4px);
    }
  }

  @keyframes mention-dropdown-fade-out-up {
    from {
      opacity: 1;
      transform: translateY(0);
    }
    to {
      opacity: 0;
      transform: translateY(4px);
    }
  }

  .mention-user-item {
    @apply px-4 py-3 cursor-pointer transition-all duration-200 ease-in-out border-b border-gray-50;
  }

  .mention-user-item:last-child {
    @apply border-b-0;
  }

  .mention-user-item:hover {
    @apply bg-gray-50 transform scale-[1.01];
  }

  .mention-user-item.selected {
    @apply bg-purple-50 text-purple-700 shadow-sm;
  }

  .mention-user-item.selected:hover {
    @apply bg-purple-100;
  }

  .mention-user-avatar {
    @apply w-8 h-8 bg-gradient-to-br from-purple-400 to-purple-600 rounded-full flex items-center justify-center mr-3 shadow-sm;
  }

  .mention-user-avatar-text {
    @apply text-xs font-semibold text-white;
  }

  .mention-user-name {
    @apply text-sm font-medium text-gray-900 transition-colors duration-200;
  }

  .mention-user-item.selected .mention-user-name {
    @apply text-purple-800;
  }

  /* Mentioned text styling in textarea (for future enhancement) */
  .mention-highlight {
    @apply bg-purple-100 text-purple-700 px-1 py-0.5 rounded font-medium;
  }

  /* Loading state for mention dropdown */
  .mention-loading {
    @apply px-4 py-3 text-sm text-gray-500 flex items-center;
  }

  .mention-loading::before {
    content: '';
    @apply w-4 h-4 border-2 border-purple-200 border-t-purple-400 rounded-full animate-spin mr-2;
  }

  /* Empty state styling */
  .mention-empty {
    @apply px-4 py-3 text-sm text-gray-500 italic text-center;
  }

  /* Responsive adjustments for mention dropdown */
  @media (max-width: 640px) {
    .mention-dropdown {
      @apply left-0 right-0 mx-2;
    }
    
    .mention-user-item {
      @apply px-3 py-2;
    }
    
    .mention-user-avatar {
      @apply w-7 h-7 mr-2;
    }
    
    .mention-user-name {
      @apply text-xs;
    }
  }
}

.pagy {
  @apply flex space-x-1 text-sm text-gray-500;
}
.pagy a:not(.gap) {
  @apply block px-[13px] py-[6px] border border-gray-300 rounded-full;
}
.pagy a:not(.gap):hover {
  @apply bg-purple-300 text-white;
}
.pagy a:not(.gap):not([href]) {
  @apply text-gray-300 bg-gray-100 cursor-default;
}
.pagy a:not(.gap).current {
  @apply text-white bg-purple-300;
}

.pagy label {
  @apply inline-block whitespace-nowrap bg-gray-200 rounded-lg px-3 py-0.5;
}
.pagy label input {
  @apply bg-gray-100 border-none rounded-md;
}

.reader-mode-body {
  /* @apply max-w-[650px]; */
}
.reader-mode-body img {
  @apply w-full max-h-[580px] object-contain object-left;
}

/* Responsive utilities */
@media (max-width: 768px) {
  .content-card {
    @apply mx-0 !important;
  }
  
  .content-grid {
    @apply grid-cols-1 !important;
  }
  
  .table-responsive {
    @apply block w-full overflow-x-auto;
  }
  
  .table-responsive table {
    @apply min-w-full;
  }
}

/* No scrollbar utility */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.highlight-tooltip {
  @apply fixed bg-white rounded-lg shadow-lg p-2 flex gap-2 items-center z-50 border border-gray-200;
  transform: translate(-50%, -130%);
}

.highlight-tooltip-button {
  @apply p-2 rounded-full hover:bg-gray-100 transition-colors duration-200;
}

.highlight {
  position: relative;
  @apply bg-[rgb(238,224,251)]/80 cursor-pointer transition-all duration-200;
  text-decoration: none !important;
  border-radius: 0.125rem;
  color: inherit !important;
  display: inline;
  padding: 2px 0;
  margin: 0 1px;
  z-index: 5;
}

.highlight.has-note {
  @apply bg-green-200 bg-opacity-80;
}

.highlight.has-note:hover {
  @apply bg-green-300 bg-opacity-90;
}

.highlight-note-icon {
  display: inline-block;
  margin-left: 2px;
  position: relative;
  top: -8px;
  font-size: 10px;
  z-index: 6;
}

.highlight-note-form {
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.highlight-note-indicator {
  z-index: 1000;
  max-width: 300px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

.highlight:hover {
  @apply bg-purple-100 bg-opacity-90;
}

/* Flash animation for duplicate highlights */
@keyframes highlight-flash {
  0%, 100% { 
    background-color: rgb(238 224 251 / 0.8);
  }
  50% { 
    background-color: rgba(255, 133, 0, 0.8); /* orange-500 */
  }
}

.highlight-flash {
  animation: highlight-flash 1s ease-in-out 3;
}

/* Make sure highlights work inside links and other elements */
a .highlight, 
strong .highlight, 
em .highlight, 
span .highlight,
.highlight a,
.highlight strong,
.highlight em,
.highlight span {
  color: inherit !important;
  text-decoration: inherit;
  font-weight: inherit;
  font-style: inherit;
}

.google-search-suggestion {
  @apply flex items-center px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 cursor-pointer;
}

.google-search-suggestion:hover {
  @apply bg-gray-100;
}

.google-search-suggestion span {
  @apply ml-3;
}

.citation-link {
  @apply bg-purple-100 bg-opacity-40 ml-[2px] mr-[1px] rounded px-1 py-0.5 text-[0.8em] no-underline relative -top-[1px] font-medium text-purple-400 transition-all duration-200 whitespace-nowrap;
}

.citation-link:hover {
  @apply bg-purple-100 bg-opacity-70 shadow-[0_0_0_1px_rgba(168,85,247,0.3)];
}
/* Competitive Intelligence Shared Styles */

:root {
  /* Revolutionary Design System */
  --gradient-mesh: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  --gradient-cyber: linear-gradient(135deg, #1a0d2e 0%, #2d1b3d 25%, #4c1d95 50%, #6366f1 75%, #8b5cf6 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);

  /* Advanced Color Palette */
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-200: #bae6fd;
  --primary-300: #7dd3fc;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-800: #075985;
  --primary-900: #0c4a6e;

  /* Competitive Intelligence Colors */
  --intelligence-dominant: #6366f1;
  --intelligence-competitive: #f59e0b;
  --intelligence-opportunity: #10b981;
  --intelligence-threat: #ef4444;
  --intelligence-neutral: #6b7280;

  /* Executive Grade Shadows */
  --shadow-executive: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-float: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-glass: 0 8px 32px rgba(31, 38, 135, 0.37);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

  /* Typography Scale */
  --font-display: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --text-6xl: clamp(3.75rem, 5vw, 6rem);
  --text-5xl: clamp(3rem, 4vw, 4rem);
  --text-4xl: clamp(2.25rem, 3vw, 3rem);
  --text-3xl: clamp(1.875rem, 2.5vw, 2.25rem);

  /* Animation Variables */
  --animation-fast: 150ms;
  --animation-base: 250ms;
  --animation-slow: 350ms;
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Font Override */
.competitive-intelligence * {
  font-family: var(--font-display);
}

/* Revolutionary Component System */
.command-center-bg {
  background: var(--gradient-cyber);
  position: relative;
  overflow: hidden;
}

.glass-panel-executive {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-glass);
  transition: all var(--animation-base) var(--ease-smooth);
}

.glass-panel-executive:hover {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

/* Hero Typography */
.hero-title {
  font-size: var(--text-5xl);
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  line-height: 1.6;
}

/* Status Indicators */
.status-indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2rem;
  transition: all var(--animation-base) var(--ease-smooth);
  cursor: pointer;
}

.status-indicator:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  margin-right: 0.75rem;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    transform: scale(1.1);
  }
}

.animated-number {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 2rem;
  color: white;
  transition: all var(--animation-base) var(--ease-bounce);
}

/* Data Badges */
.data-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.data-badge.platform {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.data-badge.status {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.data-badge.theme {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

.data-badge.competitor {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

/* Action Buttons */
.action-button {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
  transition: all var(--animation-base) var(--ease-smooth);
  margin-right: 0.5rem;
  white-space: nowrap;
}

.action-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.action-button.view {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.action-button.view:hover {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.5);
}

.action-button.external {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.action-button.external:hover {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.5);
}

/* Text Color Overrides for Dark Panels */
.glass-panel-executive,
.glass-panel-executive *,
.status-indicator,
.status-indicator *,
.matrix-container,
.matrix-container *,
.matrix-header-cell,
.matrix-header-cell *,
.matrix-cell,
.matrix-cell *,
.executive-table,
.executive-table *,
.command-center-bg,
.command-center-bg * {
  color: white !important;
}

/* Preserve colored elements */
.pulse-dot,
.data-badge,
.action-button {
  color: inherit !important;
}

/* Text Opacity Overrides */
.glass-panel-executive .text-white\/80,
.status-indicator .text-white\/80,
.executive-table .text-white\/80,
.matrix-container .text-white\/80,
.command-center-bg .text-white\/80 {
  color: rgba(255, 255, 255, 0.8) !important;
}

.glass-panel-executive .text-white\/70,
.status-indicator .text-white\/70,
.executive-table .text-white\/70,
.matrix-container .text-white\/70,
.command-center-bg .text-white\/70 {
  color: rgba(255, 255, 255, 0.7) !important;
}

.glass-panel-executive .text-white\/60,
.status-indicator .text-white\/60,
.executive-table .text-white\/60,
.matrix-container .text-white\/60,
.command-center-bg .text-white\/60 {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Matrix-specific Styles */
.matrix-container {
  display: grid;
  gap: 12px;
  padding: 32px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(25px);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-glass);
  transition: all var(--animation-base) var(--ease-smooth);
}

.matrix-header-row {
  display: contents;
}

.matrix-header-cell {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-float);
  transition: all var(--animation-base) var(--ease-smooth);
  color: white;
}

.matrix-corner-cell {
  background: #1a0d2e;
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.3), var(--shadow-float);
  transition: all var(--animation-base) var(--ease-smooth);
  color: white;
  position: sticky;
  left: 0;
  z-index: 30;
}

.matrix-row {
  display: contents;
}

.matrix-cell {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-float);
  transition: all var(--animation-base) var(--ease-smooth);
  position: relative;
  overflow: hidden;
  color: white;
  min-width: 150px;
  cursor: pointer;
}

.matrix-cell:hover {
  background: rgba(99, 102, 241, 0.2);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.4), var(--shadow-glow);
  border-color: rgba(99, 102, 241, 0.6);
}

.matrix-cell:focus {
  outline: none;
  background: rgba(99, 102, 241, 0.25);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5), 0 0 0 3px rgba(99, 102, 241, 0.8);
  border-color: rgba(99, 102, 241, 0.8);
  z-index: 5;
}

.matrix-row-header {
  background: #1a0d2e;
  border-radius: 20px;
  padding: 24px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.3), var(--shadow-float);
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  position: sticky;
  left: 0;
  z-index: 20;
  transition: all var(--animation-base) var(--ease-smooth);
}

/* Matrix Cell Background Gradients - Improved Competitiveness Colors */
.cell-dominant {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(220, 38, 38, 0.12) 100%);
  border-color: rgba(239, 68, 68, 0.25);
}

.cell-competitive {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.12) 100%);
  border-color: rgba(245, 158, 11, 0.25);
}

.cell-opportunity {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(21, 128, 61, 0.12) 100%);
  border-color: rgba(34, 197, 94, 0.25);
}

/* Radial Progress Indicators */
.radial-progress {
  position: relative;
  width: 48px;
  height: 48px;
  margin: 8px auto;
}

.radial-progress svg {
  transform: rotate(-90deg);
}

.radial-progress-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 3;
}

.radial-progress-fill {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 0.8s ease-in-out;
}

.progress-dominant {
  stroke: #EF4444;
}

.progress-competitive {
  stroke: #F59E0B;
}

.progress-opportunity {
  stroke: #22C55E;
}

/* Table-specific Styles */
.executive-table {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-glass);
  border-radius: 1.5rem;
  overflow: hidden;
}

.executive-table-header {
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.5rem;
}

.executive-table table {
  width: 100%;
  border-collapse: collapse;
}

.executive-table th {
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.9);
  padding: 1rem 1.5rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.executive-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}

.executive-table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.executive-table tr:last-child td {
  border-bottom: none;
}

.table-footer {
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-footer .stat {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.table-footer .meta {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

.date-cell {
  white-space: nowrap;
  font-family: var(--font-mono);
}

/* Filter Form Styles */
.filter-form {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1.5rem;
  padding: 2rem;
  margin-bottom: 2rem;
}

.filter-form label {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
}

.filter-form select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.5rem;
  color: white;
  padding: 0.75rem;
  width: 100%;
  backdrop-filter: blur(10px);
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M2 4L6 8L10 4" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px 12px;
  padding-right: 2.5rem;
}

.filter-form input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.5rem;
  color: white;
  padding: 0.75rem;
  width: 100%;
  backdrop-filter: blur(10px);
  appearance: none;
}

.filter-form select:focus,
.filter-form input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.filter-form option {
  background: #1a0d2e;
  color: white;
}

.filter-submit {
  background: linear-gradient(135deg, #10b981, #059669);
  border: 3px solid #10b981;
  border-radius: 12px;
  color: white;
  padding: 1rem 2.5rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--animation-base) var(--ease-smooth);
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.filter-submit:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 40px rgba(16, 185, 129, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: #059669;
}

/* Multi-select Enhanced Styling */
.multiselect-enhanced {
  box-shadow: var(--shadow-glass);
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.multiselect-enhanced:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), var(--shadow-glow);
  border-color: rgba(99, 102, 241, 0.6) !important;
  background: rgba(0, 0, 0, 0.4) !important;
}

.multiselect-enhanced option {
  background: rgba(26, 13, 46, 0.95) !important;
  color: white !important;
  padding: 8px 14px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: all 0.2s ease !important;
  font-weight: 500 !important;
}

.multiselect-enhanced option:hover {
  background: rgba(99, 102, 241, 0.3) !important;
  color: #ffffff !important;
}

.multiselect-enhanced option:checked,
.multiselect-enhanced option:selected {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.4)) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

/* Date Preset Button Styles */
.date-preset-btn {
  position: relative;
  overflow: hidden;
}

.date-preset-btn:hover {
  transform: translateY(-2px);
}

.date-preset-btn.active-preset {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(139, 92, 246, 0.4) 100%);
  border-color: rgba(99, 102, 241, 0.8);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.5);
  position: relative;
}

/* Empty State Styles */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: rgba(255, 255, 255, 0.8);
}

.empty-state svg {
  margin: 0 auto 1rem;
  opacity: 0.6;
}

/* Animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Opportunity Radar Specific Styles */
.opportunity-card {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1.5rem;
  padding: 1.5rem;
  transition: all var(--animation-base) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.opportunity-card:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Priority Level Indicators */
.priority-high {
  border-left: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.priority-medium {
  border-left: 4px solid #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.priority-low {
  border-left: 4px solid #10b981;
  background: rgba(16, 185, 129, 0.1);
}

/* Score Rings */
.score-ring {
  position: relative;
  width: 80px;
  height: 80px;
}

.score-ring svg {
  transform: rotate(-90deg);
}

.score-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 4;
}

.score-ring-fill {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease-in-out;
}

.score-ring-fill.high {
  stroke: #ef4444;
}

.score-ring-fill.medium {
  stroke: #f59e0b;
}

.score-ring-fill.low {
  stroke: #10b981;
}

/* Pulse Animation for Opportunities */
.opportunity-pulse {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation: opportunity-pulse 2s ease-in-out infinite;
}

@keyframes opportunity-pulse {
  0%, 100% { 
    background: var(--intelligence-opportunity);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  50% { 
    background: var(--intelligence-competitive);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

/* Radar Visualization Styles */
.radar-container {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
}

.radar-grid {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.radar-grid::before,
.radar-grid::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
}

.radar-grid::before {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  transform: translateY(-50%);
}

.radar-grid::after {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
}

.radar-sweep {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 50%;
  background: linear-gradient(to bottom, rgba(16, 185, 129, 0.8), transparent);
  transform-origin: bottom center;
  animation: radar-sweep 4s linear infinite;
}

@keyframes radar-sweep {
  0% { transform: translate(-50%, -100%) rotate(0deg); }
  100% { transform: translate(-50%, -100%) rotate(360deg); }
}

.radar-blip {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: radar-blip 2s ease-in-out infinite;
}

@keyframes radar-blip {
  0%, 100% { 
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1);
  }
  50% { 
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

.radar-blip.high { background: #ef4444; }
.radar-blip.medium { background: #f59e0b; }
.radar-blip.low { background: #10b981; }

/* Enhanced Opportunity Cards */
.opportunity-card-enhanced {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1.5rem;
  padding: 2rem;
  transition: all var(--animation-base) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.opportunity-card-enhanced:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.opportunity-card-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: card-shimmer 3s ease-in-out infinite;
}

@keyframes card-shimmer {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.score-ring-enhanced {
  position: relative;
  width: 100px;
  height: 100px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-ring-enhanced svg {
  position: absolute;
  transform: rotate(-90deg);
}

.live-pulse-indicator {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #10b981;
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    transform: scale(1.1);
  }
}

/* Interactive Filter Styles */
.filter-tab {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: all var(--animation-base) var(--ease-smooth);
  cursor: pointer;
  border: 1px solid transparent;
}

.filter-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-tab.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.sort-select {
  transition: all var(--animation-base) var(--ease-smooth);
}

.sort-select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.sort-select option {
  background: #1a0d2e;
  color: white;
}

/* Card Filtering Animation */
.opportunity-card-enhanced {
  transition: all var(--animation-base) var(--ease-smooth), opacity 0.3s ease;
}

.opportunity-card-enhanced.hidden {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
}

.opportunity-card-enhanced.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Enhanced Action Items */
.action-item-enhanced {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1.5rem;
  padding: 2rem;
  transition: all var(--animation-base) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.action-item-enhanced:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.action-item-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981);
  animation: priority-gradient 3s ease-in-out infinite;
}

@keyframes priority-gradient {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.priority-number {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Index/Dashboard Specific Styles */
.metric-card {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1.5rem;
  padding: 1.5rem;
  transition: all var(--animation-base) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.metric-card:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.competitive-pulse {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation: competitive-pulse 3s ease-in-out infinite;
}

@keyframes competitive-pulse {
  0%, 100% { 
    background: var(--intelligence-opportunity);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  25% { 
    background: var(--intelligence-competitive);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.4);
  }
  50% { 
    background: var(--intelligence-threat);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.3);
  }
  75% { 
    background: var(--intelligence-dominant);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.4);
  }
}

.floating-nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-float);
  transition: all var(--animation-base) var(--ease-smooth);
  color: #374151 !important;
}

.floating-nav svg {
  color: #374151 !important;
  stroke: #374151 !important;
}

.floating-nav:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-executive);
  color: #111827 !important;
}

.floating-nav:hover svg {
  color: #111827 !important;
  stroke: #111827 !important;
}

/* Post Detail Specific Styles */
.theme-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 1.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
  transition: all var(--animation-base) var(--ease-smooth);
}

.theme-badge:hover {
  background: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.analysis-section {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.analysis-section h3 {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.analysis-content {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.screenshot-container {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-glass);
}

/* Text color overrides for all components */
.opportunity-card,
.opportunity-card *,
.opportunity-card-enhanced,
.opportunity-card-enhanced *,
.action-item-enhanced,
.action-item-enhanced *,
.metric-card,
.metric-card * {
  color: white !important;
}

/* Preserve some specific colored elements */
.pulse-dot,
.competitive-pulse {
  color: inherit !important;
}

.opportunity-card .text-white\/80,
.opportunity-card-enhanced .text-white\/80,
.action-item-enhanced .text-white\/80,
.metric-card .text-white\/80 {
  color: rgba(255, 255, 255, 0.8) !important;
}

.opportunity-card .text-white\/70,
.opportunity-card-enhanced .text-white\/70,
.action-item-enhanced .text-white\/70,
.metric-card .text-white\/70 {
  color: rgba(255, 255, 255, 0.7) !important;
}

.opportunity-card .text-white\/60,
.opportunity-card-enhanced .text-white\/60,
.action-item-enhanced .text-white\/60,
.metric-card .text-white\/60 {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .status-indicator {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  .matrix-container {
    grid-template-columns: 150px repeat(auto-fit, minmax(120px, 1fr)) !important;
    gap: 4px;
  }
  
  .matrix-header-cell,
  .matrix-cell {
    padding: 12px 8px;
  }
  
  .executive-table {
    font-size: 0.875rem;
  }
  
  .executive-table th,
  .executive-table td {
    padding: 0.75rem 1rem;
  }
  
  .multiselect-enhanced {
    height: 140px !important;
    min-height: 140px !important;
  }

  .radar-container {
    width: 220px;
    height: 220px;
  }
  
  .opportunity-card-enhanced {
    padding: 1.5rem;
  }
  
  .score-ring-enhanced {
    width: 80px;
    height: 80px;
  }
}

/* Market Matrix Specific Styles */
.matrix-cell * {
  pointer-events: none;
}

.matrix-cell {
  pointer-events: auto;
}

/* Preserve specific colored elements */
.glass-panel-executive .bg-indigo-500 {
  background-color: #6366f1 !important;
}

.glass-panel-executive .bg-orange-500 {
  background-color: #f97316 !important;
}

.glass-panel-executive .bg-emerald-500 {
  background-color: #10b981 !important;
}

/* Enhanced hover states with shimmer effect */
.matrix-cell::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent 30%, rgba(99, 102, 241, 0.3) 50%, transparent 70%);
  opacity: 0;
  transition: opacity var(--animation-base) var(--ease-smooth);
  border-radius: inherit;
  z-index: 1;
  pointer-events: none;
}

.matrix-cell:hover::before {
  opacity: 1;
  animation: shimmer 2s ease-in-out infinite;
}

/* Loading state for clicked cells */
.matrix-cell.loading {
  cursor: wait;
  opacity: 0.8;
  pointer-events: none;
  background: rgba(99, 102, 241, 0.2) !important;
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.matrix-cell.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 10;
}

/* Page-level loading overlay with smooth transitions */
.navigation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 40, 0.9));
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.05);
}

.navigation-overlay.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.navigation-spinner {
  width: 56px;
  height: 56px;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top: 5px solid #6366f1;
  border-right: 5px solid #8b5cf6;
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
  filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5));
}

/* Smooth page transition preparation */
body {
  transition: opacity 0.2s ease-out;
}

body.page-transitioning {
  opacity: 0.95;
}

/* Enhanced Interactive Effects */
.matrix-container:hover {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

/* Date preset button glow effect */
.date-preset-btn.active-preset::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.6), rgba(139, 92, 246, 0.6));
  border-radius: inherit;
  z-index: -1;
  animation: pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
  0% { opacity: 0.6; }
  100% { opacity: 0.8; }
}

.date-preset-btn.active-preset svg {
  color: #c7d2fe;
}

.date-preset-btn.active-preset span {
  color: #ffffff;
  font-weight: 600;
}

.date-preset-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.date-preset-btn:hover::before {
  left: 100%;
}

/* Table Specific Styles */
/* Filter submit shimmer effect */
.filter-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s;
}

.filter-submit:hover::before {
  left: 100%;
}

.filter-reset {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  padding: 0.4rem 0.8rem;
  font-weight: 400;
  cursor: pointer;
  transition: all var(--animation-base) var(--ease-smooth);
  backdrop-filter: blur(5px);
  font-size: 0.7rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.filter-reset:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* Dark Theme Pagination Styling */
.dark-pagination .pagy {
  @apply flex justify-center items-center space-x-2 mt-8;
}

.dark-pagination .pagy a:not(.gap) {
  @apply block px-4 py-2 border border-white/30 rounded-lg text-white/90 backdrop-blur-sm;
  background: rgba(0, 0, 0, 0.3);
  transition: all var(--animation-base) var(--ease-smooth);
}

.dark-pagination .pagy a:not(.gap):hover {
  @apply text-white transform -translate-y-0.5;
  background: rgba(99, 102, 241, 0.4);
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.dark-pagination .pagy a:not(.gap).current {
  @apply text-white;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.dark-pagination .pagy a:not(.gap):not([href]) {
  @apply text-white/40 cursor-default;
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-pagination .pagy .gap {
  @apply text-white/60 px-2;
}

.action-item-enhanced {
  padding: 1.5rem;
}
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* Custom styles for SimpleMDE Markdown Editor */
.CodeMirror {
  border-radius: 0.375rem;
  border-color: #D1D5DB;
  min-height: 200px;
}

.CodeMirror-focused {
  border-color: #A5B4FC;
  box-shadow: 0 0 0 3px rgba(165, 180, 252, 0.5);
}

.CodeMirror-scroll {
  height: auto !important;
}

.editor-toolbar {
  border-top-left-radius: 0.375rem;
  border-top-right-radius: 0.375rem;
  border-color: #D1D5DB;
}

.editor-toolbar a {
  color: #4B5563 !important;
}

.editor-toolbar a.active, 
.editor-toolbar a:hover {
  background-color: #F3F4F6;
  border-color: #D1D5DB;
}

.editor-preview {
  background-color: #F9FAFB;
  border-bottom-left-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
  border-color: #D1D5DB;
  padding: 1rem;
}

.editor-preview h1,
.editor-preview h2,
.editor-preview h3 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.editor-preview h1 {
  font-size: 1.5rem;
}

.editor-preview h2 {
  font-size: 1.25rem;
}

.editor-preview h3 {
  font-size: 1.125rem;
}

.editor-preview p {
  margin-bottom: 1rem;
}

.editor-preview ul,
.editor-preview ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

.editor-preview li {
  margin-bottom: 0.5rem;
}

.editor-preview a {
  color: #6366F1;
  text-decoration: underline;
}

.editor-preview blockquote {
  border-left: 4px solid #D1D5DB;
  padding-left: 1rem;
  margin-left: 0;
  color: #6B7280;
}

/* Hide the SimpleMDE textarea when editor is initialized */
.CodeMirror ~ textarea {
  display: none;
}

/* Markdown Table Styles */
.markdown-table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
  overflow-x: auto;
  display: block;
}

.markdown-table th,
.markdown-table td {
  padding: 0.5rem;
  border: 1px solid #D7DBEC;
  text-align: left;
}

.markdown-table th {
  background-color: #F5F6FA;
  font-weight: 600;
}

.markdown-table tr:nth-child(even) {
  background-color: #F9FAFB;
}

.prose-chat table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 1rem 0;
}

.prose-chat th,
.prose-chat td {
  padding: 0.5rem;
  border: 1px solid #D7DBEC;
  text-align: left;
  word-wrap: break-word;
}

.prose-chat th {
  background-color: #F5F6FA;
  font-weight: 600;
}

.prose-chat tr:nth-child(even) {
  background-color: #F9FAFB;
}
