/* Premium Modern Theme - Sophisticated and Professional */
:root {
  /* Premium Background Colors with Subtle Gradients */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --card-bg: #ffffff;
  --card-hover: rgba(248, 250, 252, 0.8);
  
  /* Rich Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  
  /* Premium Border System */
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --hover-bg: #f1f5f9;
  
  /* Sophisticated Blue Palette with Gradients */
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-color-alpha: rgba(37, 99, 235, 0.1);
  
  /* Refined Secondary Colors */
  --secondary-color: #f1f5f9;
  --secondary-hover: #e2e8f0;
  
  /* Premium Accent Colors */
  --accent-gold: #d4af37;
  --accent-blue: #2563eb;
  
  /* Enhanced Link Colors */
  --link-color: #2563eb;
  --link-hover: #1d4ed8;
  
  /* Input Styling */
  --input-bg: #ffffff;
  --input-border: #e2e8f0;
  --input-focus: #2563eb;
  
  /* Tag System */
  --tag-bg: #eff6ff;
  --tag-color: #1e40af;
  
  /* Status Colors */
  --success-color: #059669;
  --success-light: #d1fae5;
  --warning-color: #d97706;
  --warning-light: #fef3c7;
  --error-color: #dc2626;
  --error-light: #fee2e2;
  
  /* Premium Shadow System */
  --nav-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

body {
  background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
  min-height: 100vh;
}

.report-container {
  background-color: var(--bg-primary);
}

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
}

.card:hover {
  border-color: var(--border-hover);
}

.pick-card {
  background: linear-gradient(to bottom, var(--card-bg) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.pick-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: var(--primary-light);
}

/* Logo Styling */
.logo {
  height: 45px;
  width: auto;
}

.logo-wide {
  height: 46px;
  max-width: 260px;
  object-fit: contain;
}

.logo-small {
  height: 32px;
  width: auto;
}

.nav-product-title {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

/* Premium Navigation Header */
.app-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--nav-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 150ms ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--primary-color);
  font-weight: 600;
}

/* Enhanced Form Elements */
input, textarea, select {
  background: var(--input-bg);
  border-color: var(--input-border);
}

input:hover, textarea:hover, select:hover {
  border-color: var(--border-hover);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px var(--primary-color-alpha), 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Premium Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem;
}

.login-card {
  background: var(--card-bg);
  padding: 3rem;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 480px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  display: block;
  width: min(360px, 100%);
  height: auto;
  margin: 0 auto 2rem;
}

.login-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Enhanced Builder Interface */
.builder-header {
  background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-color);
}

.builder-admin {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
}

/* Premium Modal Styling */
.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
}

/* Author Preset Card Enhancements */
.author-preset-card {
  background: linear-gradient(to bottom, var(--card-bg) 0%, var(--bg-secondary) 100%);
  border: 1.5px solid var(--border-color);
}

.author-preset-card:hover {
  border-color: var(--primary-color);
  background: var(--card-bg);
}

/* Premium Disclaimer Card */
.disclaimer-preset-card {
  background: linear-gradient(to bottom, var(--card-bg) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-color);
}

.disclaimer-preset-card:hover {
  background: var(--card-bg);
  border-color: var(--primary-light);
}

/* Enhanced Report Display */
.report-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.badge-success {
  background-color: var(--success-light);
  color: var(--success-color);
}

.badge-warning {
  background-color: var(--warning-light);
  color: var(--warning-color);
}

.badge-error {
  background-color: var(--error-light);
  color: var(--error-color);
}

/* Loading States */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
  border-radius: 0.5rem;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Glassmorphism Effects */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Investment Thesis Content */
.pick-thesis {
  white-space: pre-line !important;
}

.pick-thesis p {
  margin-bottom: 15px;
  display: block;
  text-indent: 0;
}

.pick-thesis p:last-child {
  margin-bottom: 0;
}

/* TOC Sidebar - Desktop vertical list with zebra striping */
.toc-list li {
  margin-bottom: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.toc-list a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 14px 15px;
  border-radius: 0;
}

.toc-list li:nth-child(even) a {
  background-color: rgba(0, 0, 0, 0.03);
}

.toc-list a:hover {
  background-color: var(--primary-color-alpha);
  color: var(--primary-color);
}

/* TOC Pick Title - allow wrapping for long titles on desktop */
.toc-pick-title {
  display: block;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Tablet: 3-column grid button overrides (zebra stripes/pills) */
@media (min-width: 600px) and (max-width: 1024px) {
  .toc-list a {
    background-color: rgba(0, 0, 0, 0.05) !important;
    border-radius: 8px !important;
    padding: 12px 10px !important;
    white-space: normal !important;
    display: block !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .toc-list li:nth-child(even) a {
    background-color: rgba(0, 0, 0, 0.08) !important;
  }

  .toc-list li {
    overflow: visible !important;
    width: 100% !important;
  }
}

/* Mobile: 2-column grid button overrides */
@media (max-width: 599px) {
  .toc-list a {
    background-color: rgba(0, 0, 0, 0.05) !important;
    border-radius: 8px !important;
    padding: 12px 8px !important;
    white-space: normal !important;
    display: block !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .toc-list li:nth-child(even) a {
    background-color: rgba(0, 0, 0, 0.05) !important;
  }

  .toc-list li {
    overflow: visible !important;
    width: 100% !important;
  }
}

/* Premium Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
  border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}
