/* ==========================================
   Home Dashboard Styles - Redesigned
   Clean, minimal, Claude-style aesthetic
   ========================================== */

/* ==========================================
   NEW REDESIGNED DASHBOARD
   ========================================== */

/* Home view container - now a sibling of jobs-section at main-layout level */
.home-view,
#home-view {
  width: 100%;
  min-height: calc(100vh - 120px);
  display: none; /* Hidden by default, shown by router */
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 2rem;
}

/* When home-view is active (display: flex set by JS) */
#home-view.active,
.home-view[style*="display: flex"] {
  display: flex !important;
}

.home-dashboard-new {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ==========================================
   EDITORIAL HERO GREETING
   Magazine-style typography that makes the
   user feel like the cover story
   ========================================== */

.home-greeting {
  text-align: center;
  padding: 1.5rem 0 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

/* "Good morning," - warm opener, slightly prominent */
.home-greeting-time {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.375rem; /* 22px */
  font-weight: 400;
  color: var(--text-secondary, #52525b);
  letter-spacing: 0.04em; /* Refined spacing */
  margin-bottom: 0.25rem;
  opacity: 0;
  animation: greetingFadeIn 0.6s ease forwards;
}

/* "Mikail" - hero, commanding, editorial serif */
.home-greeting-name {
  font-family: 'Newsreader', 'Georgia', serif;
  font-size: 3.5rem;
  font-weight: 600;
  letter-spacing: 0.05em; /* Luxurious spacing */
  line-height: 1.1;
  margin: 0;
  /* Warm gradient matching brand */
  background: linear-gradient(135deg, #1a1a1a 0%, #3d2c29 50%, #c45a47 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Animation */
  opacity: 0;
  transform: translateY(8px);
  animation: nameFadeIn 0.7s ease 0.15s forwards;
}

/* Subtitle - tagline, breathing room */
.home-greeting-subtitle {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.1875rem; /* 19px - slightly smaller than greeting time */
  color: var(--text-secondary, #71717a);
  margin: 0.75rem 0 0 0;
  font-weight: 400;
  letter-spacing: 0.03em; /* Refined spacing */
  opacity: 0;
  animation: subtitleFadeIn 0.6s ease 0.3s forwards;
}

/* Animations */
@keyframes greetingFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes nameFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes subtitleFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Dark mode adjustments */
body.dark-mode .home-greeting-time {
  color: #a1a1aa;
}

body.dark-mode .home-greeting-name {
  background: linear-gradient(135deg, #fafafa 0%, #e8c4a0 50%, #d4735e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.dark-mode .home-greeting-subtitle {
  color: #a1a1aa;
}

/* Hero URL Input */
.home-hero-input {
  width: 100%;
}

.home-hero-input-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.home-hero-input-container:focus-within {
  border-color: #d4735e;
  box-shadow: 0 0 0 4px rgba(212, 115, 94, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.9);
}

.home-hero-input-icon {
  color: var(--text-tertiary, #a1a1aa);
  flex-shrink: 0;
  transition: color 0.2s;
}

.home-hero-input-container:focus-within .home-hero-input-icon {
  color: #d4735e;
}

.home-hero-input-field {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.0625rem;
  color: var(--text-primary, #1a1a1a);
  outline: none;
  font-weight: 400;
}

.home-hero-input-field::placeholder {
  color: var(--text-tertiary, #a1a1aa);
}

.home-hero-input-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #d4735e 0%, #c45a47 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.home-hero-input-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 115, 94, 0.35);
}

.home-hero-input-btn:active {
  transform: translateY(0);
}

/* Quick Actions Grid */
.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* 6-item grid for more quick actions */
.home-quick-grid--6 {
  grid-template-columns: repeat(3, 1fr);
}

.home-quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.home-quick-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
}

.home-quick-card:active {
  transform: translateY(-1px);
}

.home-quick-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.home-quick-card:hover .home-quick-card-icon {
  transform: scale(1.05);
}

/* Pastel icon backgrounds */
.home-quick-card-icon--cv {
  background: rgba(212, 165, 154, 0.2);
  color: #c45a47;
}

.home-quick-card-icon--board {
  background: rgba(157, 184, 205, 0.25);
  color: #5b7a8c;
}

.home-quick-card-icon--analytics {
  background: rgba(168, 200, 154, 0.25);
  color: #5d8c4d;
}

.home-quick-card-icon--email {
  background: rgba(232, 196, 138, 0.25);
  color: #9a7d3d;
}

.home-quick-card-icon--voice {
  background: rgba(208, 155, 141, 0.25);
  color: #9a5d4d;
}

.home-quick-card-icon--preferences {
  background: rgba(180, 160, 200, 0.25);
  color: #7a5a9a;
}

.home-quick-card-icon--timeline {
  background: rgba(157, 184, 205, 0.25);
  color: #5b7a8c;
}

.home-quick-card-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
}

.home-quick-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 6px;
  background: rgba(168, 200, 154, 0.3);
  color: #4a7c3a;
  border-radius: 4px;
}

/* Stats Row */
.home-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
}

.home-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0 1.5rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.home-stat-item:hover {
  opacity: 0.7;
}

.home-stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary, #1a1a1a);
  line-height: 1;
}

.home-stat-number--success {
  color: #4a7c3a;
}

.home-stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-tertiary, #a1a1aa);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(0, 0, 0, 0.08);
}

/* ==========================================
   CV UPLOAD POPUP
   ========================================== */

.cv-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 1rem;
}

.cv-popup-overlay.cv-popup-visible {
  opacity: 1;
  visibility: visible;
}

.cv-popup-content {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.cv-popup-visible .cv-popup-content {
  transform: scale(1) translateY(0);
}

.cv-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary, #71717a);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.cv-popup-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-primary, #1a1a1a);
}

.cv-popup-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: rgba(212, 165, 154, 0.15);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d4735e;
}

.cv-popup-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary, #1a1a1a);
  margin: 0 0 0.75rem 0;
}

.cv-popup-text {
  font-size: 0.9375rem;
  color: var(--text-secondary, #71717a);
  margin: 0 0 1.75rem 0;
  line-height: 1.5;
}

.cv-popup-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.cv-popup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.cv-popup-btn--primary {
  background: linear-gradient(135deg, #d4735e 0%, #c45a47 100%);
  color: white;
}

.cv-popup-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 115, 94, 0.35);
}

.cv-popup-btn--secondary {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary, #71717a);
}

.cv-popup-btn--secondary:hover {
  background: rgba(0, 0, 0, 0.08);
}

.cv-popup-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-tertiary, #a1a1aa);
  cursor: pointer;
}

.cv-popup-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #d4735e;
  cursor: pointer;
}

/* Highlight animation for CV section */
@keyframes highlight-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 115, 94, 0); }
  50% { box-shadow: 0 0 0 8px rgba(212, 115, 94, 0.2); }
}

.highlight-section {
  animation: highlight-pulse 0.8s ease 2;
}

/* ==========================================
   DARK MODE
   ========================================== */

/* Note: Editorial greeting dark mode is defined above with the greeting styles */

body.dark-mode .home-hero-input-container {
  background: rgba(39, 39, 42, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .home-hero-input-container:focus-within {
  background: rgba(39, 39, 42, 0.95);
  border-color: #d4735e;
}

body.dark-mode .home-hero-input-field {
  color: #fafafa;
}

body.dark-mode .home-quick-card {
  background: rgba(39, 39, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .home-quick-card:hover {
  background: rgba(39, 39, 42, 0.8);
}

body.dark-mode .home-quick-card-label {
  color: #fafafa;
}

body.dark-mode .home-stats-row {
  background: rgba(39, 39, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .home-stat-number {
  color: #fafafa;
}

body.dark-mode .home-stat-divider {
  background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .cv-popup-content {
  background: #27272a;
}

body.dark-mode .cv-popup-title {
  color: #fafafa;
}

body.dark-mode .cv-popup-text {
  color: #a1a1aa;
}

body.dark-mode .cv-popup-close {
  background: rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
}

body.dark-mode .cv-popup-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fafafa;
}

body.dark-mode .cv-popup-btn--secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
}

body.dark-mode .cv-popup-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ==========================================
   MOBILE RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
  /* Home view - layout handled by mobile-layout.css CSS Grid system */
  #home-view,
  .home-view {
    padding: 0 !important;
    align-items: stretch !important; /* Let CSS Grid handle centering */
  }

  .home-dashboard-new {
    padding: 0;
    gap: 1.5rem;
    max-width: 100%;
    width: 100%;
  }

  /* Editorial Hero - Mobile sizes */
  .home-greeting {
    padding: 1rem 0 1.5rem 0;
  }

  .home-greeting-time {
    font-size: 1.1875rem; /* 19px */
    letter-spacing: 0.03em;
  }

  .home-greeting-name {
    font-size: 3.375rem; /* 54px - bold but not overwhelming */
    letter-spacing: 0.04em;
  }

  .home-greeting-subtitle {
    font-size: 1.0625rem; /* 17px - slightly smaller than greeting time */
    margin-top: 0.5rem;
    letter-spacing: 0.025em;
  }

  .home-hero-input-container {
    flex-direction: column;
    padding: 1rem;
    gap: 0.875rem;
  }

  .home-hero-input-field {
    width: 100%;
    text-align: center;
  }

  .home-hero-input-icon {
    display: none;
  }

  .home-hero-input-btn {
    width: 100%;
    justify-content: center;
    padding: 1rem;
  }

  .home-quick-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .home-quick-grid--6 {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.625rem;
  }

  .home-quick-card {
    padding: 1.25rem 0.75rem;
  }

  .home-quick-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .home-quick-card-icon svg {
    width: 20px;
    height: 20px;
  }

  .home-quick-card-label {
    font-size: 0.8125rem;
  }

  .home-stats-row {
    flex-wrap: wrap;
    padding: 1rem;
    gap: 0.5rem;
  }

  .home-stat-item {
    flex: 1 1 45%;
    padding: 0.75rem 0.5rem;
  }

  .home-stat-divider {
    display: none;
  }

  .home-stat-number {
    font-size: 1.5rem;
  }

  /* CV Popup Mobile */
  .cv-popup-content {
    padding: 2rem 1.5rem;
    margin: 0.5rem;
    border-radius: 16px;
  }

  .cv-popup-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1.25rem;
  }

  .cv-popup-icon svg {
    width: 36px;
    height: 36px;
  }

  .cv-popup-title {
    font-size: 1.25rem;
  }

  .cv-popup-text {
    font-size: 0.875rem;
  }

  /* FIX: Add scroll room at bottom so page doesn't feel "frozen" */
  .home-dashboard-new {
    padding-bottom: 100px !important; /* Extra space below content */
    min-height: calc(100vh + 50px) !important; /* Force scrollable height */
  }

  /* FIX: Reduce touch sensitivity on quick action cards */
  .home-quick-card {
    touch-action: manipulation; /* Prevent double-tap zoom, reduce sensitivity */
    -webkit-tap-highlight-color: transparent; /* Remove iOS tap highlight */
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  }

  /* Only show active state after deliberate press (not accidental swipes) */
  .home-quick-card:active {
    transform: scale(0.97);
    transition-delay: 0.05s; /* Small delay to prevent accidental triggers */
  }
}

/* ==========================================
   LEGACY STYLES (keeping for backwards compatibility)
   ========================================== */

/* Main Container */
.home-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Welcome Header */
.home-welcome-header {
  margin-bottom: 0.5rem;
}

.home-welcome-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary, #1a1a1a);
  margin: 0 0 0.5rem 0;
}

.home-welcome-subtitle {
  font-size: 1rem;
  color: var(--text-secondary, #71717a);
  margin: 0;
}

/* Compact Analyzer */
.home-analyzer-compact {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem;
  background: transparent;
  border-radius: 16px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.home-analyzer-compact:focus-within {
  border-color: #d4735e;
  box-shadow: 0 0 0 3px rgba(212, 115, 94, 0.1);
}

.home-analyzer-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  position: relative;
}

.home-analyzer-icon {
  color: var(--text-tertiary, #a1a1aa);
  flex-shrink: 0;
}

.home-analyzer-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.9375rem;
  color: var(--text-primary, #1a1a1a);
  outline: none;
}

.home-analyzer-input::placeholder {
  color: var(--text-tertiary, #a1a1aa);
}

.home-analyzer-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #d4735e 0%, #b8513d 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.home-analyzer-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 115, 94, 0.3);
}

.home-analyzer-btn:active {
  transform: translateY(0);
}

/* Stats Section */
.home-stats-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.home-stats-scroll::-webkit-scrollbar {
  display: none;
}

.home-stats-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  min-width: 600px;
}

.home-stat-card {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.home-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-color: #d4735e;
}

.home-stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.home-stat-icon {
  font-size: 1.25rem;
}

.home-stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary, #1a1a1a);
  line-height: 1;
  margin-bottom: 0.375rem;
}

.home-stat-sublabel {
  font-size: 0.8125rem;
  color: var(--text-tertiary, #a1a1aa);
}

/* Section Headers */
.home-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.home-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary, #1a1a1a);
  margin: 0;
}

.home-section-link {
  font-size: 0.9375rem;
  color: #d4735e;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.home-section-link:hover {
  color: #b8513d;
  text-decoration: underline;
}

/* What's Next Section */
.home-whats-next {
  margin-top: 1rem;
}

.home-action-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.home-action-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.home-action-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

/* Urgency colors - soft palette */
.home-action-item.urgency-high::before {
  background: #D9A09A;
}

.home-action-item.urgency-medium::before {
  background: #E8C48A;
}

.home-action-item.urgency-low::before {
  background: #A8C89A;
}

.home-action-item:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.12);
}

.home-action-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.urgency-high .home-action-indicator {
  background: #D9A09A;
}

.urgency-medium .home-action-indicator {
  background: #E8C48A;
}

.urgency-low .home-action-indicator {
  background: #A8C89A;
}

.home-action-content {
  flex: 1;
}

.home-action-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
  margin-bottom: 0.25rem;
}

.home-action-description {
  font-size: 0.8125rem;
  color: var(--text-secondary, #71717a);
}

.home-action-arrow {
  color: var(--text-tertiary, #a1a1aa);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.home-action-item:hover .home-action-arrow {
  transform: translateX(4px);
}

/* Recent Activity Timeline */
.home-recent-activity {
  margin-top: 1rem;
}

.home-activity-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.home-activity-date-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary, #71717a);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.home-activity-date-header:first-child {
  margin-top: 0;
}

.home-activity-item {
  display: flex;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  transition: all 0.2s;
  position: relative;
}

.home-activity-item:hover {
  background: rgba(255, 255, 255, 0.5);
}

.home-activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4735e;
  flex-shrink: 0;
  margin-top: 0.5rem;
}

.home-activity-content {
  flex: 1;
}

.home-activity-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
  margin-bottom: 0.25rem;
}

.home-activity-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-secondary, #71717a);
}

.home-activity-company {
  font-weight: 500;
}

.home-activity-time {
  color: var(--text-tertiary, #a1a1aa);
}

/* Quick Actions */
.home-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.home-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  background: rgba(255, 255, 255, 0.4);
  color: var(--text-primary, #1a1a1a);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.home-action-btn.primary {
  background: linear-gradient(135deg, #d4735e 0%, #b8513d 100%);
  color: white;
  border-color: transparent;
}

.home-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.home-action-btn.primary:hover {
  box-shadow: 0 4px 12px rgba(212, 115, 94, 0.3);
}

.home-action-btn:active {
  transform: translateY(0);
}

/* Empty States */
.home-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
}

.home-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.home-empty-text {
  font-size: 0.9375rem;
  color: var(--text-secondary, #71717a);
  margin: 0;
}

/* Legacy Dark Mode */
body.dark-mode .home-welcome-title {
  color: #fafafa;
}

body.dark-mode .home-welcome-subtitle {
  color: #a1a1aa;
}

body.dark-mode .home-analyzer-compact {
  background: #27272a;
  border-color: #3f3f46;
}

body.dark-mode .home-analyzer-input {
  color: #fafafa;
}

body.dark-mode .home-stat-card {
  background: #27272a;
  border-color: #3f3f46;
}

body.dark-mode .home-stat-value,
body.dark-mode .home-section-title,
body.dark-mode .home-action-title,
body.dark-mode .home-activity-title {
  color: #fafafa;
}

body.dark-mode .home-action-item,
body.dark-mode .home-activity-item {
  background: #27272a;
}

body.dark-mode .home-activity-item:hover {
  background: #3f3f46;
}

body.dark-mode .home-action-btn {
  background: #27272a;
  color: #fafafa;
  border-color: #3f3f46;
}

body.dark-mode .home-action-btn.primary {
  background: linear-gradient(135deg, #d4735e 0%, #b8513d 100%);
  color: white;
  border-color: transparent;
}

/* Legacy Mobile Responsive */
@media (max-width: 768px) {
  .home-dashboard {
    padding: 1rem;
    gap: 1.5rem;
  }

  .home-welcome-title {
    font-size: 1.5rem;
  }

  .home-welcome-subtitle {
    font-size: 0.875rem;
  }

  .home-analyzer-compact {
    flex-direction: column;
    align-items: stretch;
    padding: 0.875rem;
  }

  .home-analyzer-btn {
    width: 100%;
    justify-content: center;
  }

  .home-stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    min-width: auto;
  }

  .home-stat-value {
    font-size: 1.75rem;
  }

  .home-section-title {
    font-size: 1.125rem;
  }

  .home-action-item {
    padding: 0.875rem 1rem;
  }

  .home-quick-actions {
    grid-template-columns: 1fr;
    gap: 0.625rem;
  }

  .home-action-btn {
    padding: 1rem;
  }

  .home-empty-state {
    padding: 2rem 1rem;
  }

  .home-empty-icon {
    font-size: 2.5rem;
  }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
  .home-dashboard {
    padding: 1.5rem;
  }

  .home-stats-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-quick-actions {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   FLOATING ANALYZE BUTTON (Desktop Only)
   Appears when hero input scrolls out of view
   ========================================== */

.floating-analyze-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  display: none; /* Hidden by default, shown via JS */
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #d4735e 0%, #c4634e 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(212, 115, 94, 0.4), 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-analyze-btn.visible {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.floating-analyze-btn:hover {
  background: linear-gradient(135deg, #c4634e 0%, #b4533e 100%);
  box-shadow: 0 6px 28px rgba(212, 115, 94, 0.5), 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px) scale(1.02);
}

.floating-analyze-btn:active {
  transform: translateY(0) scale(0.98);
}

.floating-analyze-btn svg {
  flex-shrink: 0;
}

/* Hide on mobile - already has button in header */
@media (max-width: 768px) {
  .floating-analyze-btn {
    display: none !important;
  }
}

/* Floating Analyze Modal */
.floating-analyze-modal {
  position: fixed;
  bottom: 100px;
  right: 32px;
  width: 380px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-analyze-modal.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.floating-analyze-modal__content {
  padding: 0;
}

.floating-analyze-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.floating-analyze-modal__header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
}

.floating-analyze-modal__close {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-tertiary, #a1a1aa);
  border-radius: 6px;
  transition: all 0.2s;
}

.floating-analyze-modal__close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary, #1a1a1a);
}

.floating-analyze-modal__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.floating-analyze-modal__input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
}

.floating-analyze-modal__input:focus {
  border-color: #d4735e;
  box-shadow: 0 0 0 4px rgba(212, 115, 94, 0.1);
}

.floating-analyze-modal__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #d4735e 0%, #c4634e 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.floating-analyze-modal__btn:hover {
  background: linear-gradient(135deg, #c4634e 0%, #b4533e 100%);
}

/* Dark mode support */
body.dark-mode .floating-analyze-modal {
  background: #1a1a1a;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

body.dark-mode .floating-analyze-modal__header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .floating-analyze-modal__header h3 {
  color: #e4e4e7;
}

body.dark-mode .floating-analyze-modal__input {
  background: #262626;
  border-color: #3a3a3a;
  color: #e4e4e7;
}

body.dark-mode .floating-analyze-modal__input:focus {
  border-color: #d4735e;
}

/* Hide modal on mobile */
@media (max-width: 768px) {
  .floating-analyze-modal {
    display: none !important;
  }
}
