/* ================================================
   PARTSIQ - COMPLETE CSS RESET AND LAYOUT
   ================================================ */

/* RESET */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

.navbar {
  min-height: 70px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.navbar-container {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  padding: 0 24px;
  transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar--compact {
  min-height: 50px !important;
  background: rgba(11, 23, 38, 0.95);
  border-bottom: 1px solid rgba(96, 165, 250, 0.12);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar--compact .navbar-container {
  padding: 0 20px;
  gap: 8px !important;
}

.navbar--compact .brand-link {
  font-size: 1.1rem !important;
}

.navbar--compact .google-play-button-nav svg {
  height: 32px !important;
}

.navbar--compact .theme-toggle-nav {
  width: 32px;
  height: 32px;
}

.navbar-brand {
  flex-shrink: 0 !important;
}

.navbar-list {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 0 !important;
  justify-content: center !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.google-play-button-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 0;
  background: transparent;
  border-radius: 5px;
  transform: translateY(4px);
}

.google-play-button-nav:hover {
  transform: translateY(3px);
  opacity: 0.85;
  filter: brightness(1.1);
}

.google-play-button-nav svg {
  display: block;
  height: 40px;
  width: auto;
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
  height: 40px;
  width: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  padding: 10px 14px;
  background: #0f172a;
  color: #ffffff !important;
  border-radius: 10px;
  border: 1px solid rgba(96, 165, 250, 0.5);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  z-index: 2000;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.theme-toggle-nav {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  border-radius: 10px !important;
  background: rgba(96, 165, 250, 0.12) !important;
  border: 1px solid rgba(96, 165, 250, 0.42) !important;
  color: #e2e8f0 !important;
  font-size: 22px !important;
  line-height: 1 !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22) !important;
  position: relative !important;
  top: 4px !important;
  left: 0 !important;
  margin-left: 6px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
}

.theme-toggle-nav:hover {
  background: rgba(96, 165, 250, 0.2) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 10px 22px rgba(96, 165, 250, 0.32) !important;
}

/* Policies page */
.policies-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 18px 96px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.policy-hero { display: flex; flex-direction: column; gap: 8px; }
.policy-title { margin: 0; font-size: 2.2rem; line-height: 1.15; color: var(--text-primary); }
.policy-lede { margin: 0; color: var(--text-secondary); max-width: 720px; line-height: 1.55; }

.policy-section { background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-soft); }
.policy-section + .policy-section { margin-top: 6px; }
.policy-heading { margin: 0 0 8px; color: var(--text-primary); font-size: 1.3rem; letter-spacing: -0.01em; }
.policy-section p { margin: 0 0 10px; color: var(--text-secondary); line-height: 1.6; }
.policy-section a { color: var(--accent); }

/* Dark mode CTA buttons */
body[data-theme="dark"], .dark {
  --accent: #0f2a6b;
  --accent-strong: #0b1f55;
}

/* Ensure button text stays white in dark mode */
body[data-theme="dark"] .pv-btn--primary,
.dark .pv-btn--primary,
body[data-theme="dark"] .pv-btn--primary *,
.dark .pv-btn--primary * {
  color: #ffffff !important;
}



:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #e2e8f0;
  --hero: #ffffff;
  --card: #ffffff;
  --text: #0b1f55;
  --text-primary: #0b1f55;
  --text-secondary: #0b1f55;
  --muted: #0b1f55;
  --accent: #0f2a6b;
  --accent-strong: #0b1f55;
  --accent-soft: #8ec7ff;
  --link: #0b1f55;
  --link-hover: #0b1f55;
  --link-strong: #2563eb;
  --card-ink: #1d4ed8;
  --border-soft: rgba(15, 23, 42, 0.08);
  --border-glow: rgba(96, 165, 250, 0.35);
  --overlay: rgba(15, 23, 42, 0.2);
  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 14px;
  --space-lg: 18px;
  --space-xl: 24px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --shadow-soft: 0 6px 20px rgba(15, 23, 42, 0.12);
  --shadow-deep: 0 10px 28px rgba(15, 23, 42, 0.16);
  --motion-xfast: 120ms;
  --motion-fast: 160ms;
  --motion-base: 220ms;
  --motion-slow: 320ms;
  --motion-xslow: 420ms;
  --ease-emphasized: cubic-bezier(0.18, 0.9, 0.3, 1);
  --ease-standard: cubic-bezier(0.2, 0.8, 0.3, 1);
  --ease-exit: cubic-bezier(0.2, 0, 0, 1);
  color: var(--text) !important;
  --ring: rgba(96, 165, 250, 0.35);
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  --card-text-dark: #1f2937;
}

[data-theme="dark"],
.dark {
  --bg: #0b1220;
  --surface: #111827;
  --surface-2: #1b2435;
  --hero: #1b2435;
  --card: #111827;
  --text: #a5d8ff;
  --text-primary: #a5d8ff;
  --text-secondary: #a5d8ff;
  --muted: #a5d8ff;
  --accent: #a5d8ff;
  --accent-strong: #7cc5f8;
  --card-ink: #cfe3ff;
  --border-soft: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(124, 197, 248, 0.4);
  --overlay: rgba(7, 11, 20, 0.55);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-deep: 0 12px 32px rgba(0, 0, 0, 0.35);
}

body:not([data-theme="light"]) :is(
  .surface,
  [class*="card"],
  [class*="panel"],
  [class*="box"],
  [class*="cta"],
  [class*="feature"],
  .hero-card,
  .scan-card,
  .piq-quick-card,
  .step-content,
  .step-visual,
  .cta-section
) * {
  color: var(--card-ink) !important;
}

body,
body *:not(.btn):not(.btn *):not(.btn-primary):not(.btn-primary *):not(.hero-upload-btn):not(.hero-upload-btn *):not(.hero-search-btn):not(.hero-search-btn *):not(.preview-btn):not(.preview-btn *):not(.scan-btn):not(.scan-btn *):not(.chat-send-btn):not(.chat-send-btn *):not(input):not(select):not(textarea):not(input *):not(select *):not(textarea *) {
  color: var(--text);
}

/* Force navbar/footer text & icons light blue across themes */
body .navbar .nav-link,
body .navbar .nav-link:visited {
  color: #60a5fa !important;
}

body .navbar .nav-link:hover,
body .navbar .nav-link:focus-visible {
  color: #8ec7ff !important;
}

body footer .footer-link,
body footer .footer-link:visited,
body footer .footer-copy,
body footer .copyright-text {
  color: inherit !important;
}

body footer .footer-link:hover,
body footer .footer-link:focus-visible {
  color: #8ec7ff !important;
  gap: 1.1rem;
}

body footer svg {
  fill: inherit !important;
}

/* Footer background: white in light mode, same as page bg in dark mode */
footer, .site-footer, #site-footer, .footer {
  background: var(--bg) !important;
  color: var(--text) !important;
  border-top: 1px solid var(--border-soft);
}
  margin: 0 auto 0.3rem auto;
/* Ensure footer links readable against footer background */
  order: 0;
footer .footer-link,
footer .footer-copy,
footer .copyright-text {
  color: var(--text) !important;
}

/* Keep accent for footer links but ensure contrast in light mode */
body[data-theme="light"] footer .footer-link {
  order: 1;
  color: #0b1f55 !important; /* dark link on white footer */
}

body[data-theme="dark"] footer .footer-link {
  color: #60a5fa !important; /* keep light-blue links in dark mode */
}
/* Navbar brand text matches theme */
body[data-theme="light"] .navbar .brand-link {
  color: #1e3a5f !important;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

body[data-theme="dark"] .navbar .brand-link,
body:not([data-theme]) .navbar .brand-link {
  color: #8ec7ff !important; /* light blue title in dark mode */
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

/* Dark-mode navbar background tint when compact for readability */
body[data-theme="dark"] .navbar.navbar--compact,
body:not([data-theme]) .navbar.navbar--compact {
  background: rgba(15, 23, 42, 0.9) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(142, 199, 255, 0.16) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3) !important;
}

body .navbar .brand-link:hover {
  opacity: 0.8;
}

/* Final clamp: navbar brand always matches theme */
body .navbar a,
body .navbar a:visited,
body .navbar .brand-link,
body .navbar .brand-link * {
  color: var(--link-strong, #60a5fa) !important;
  text-shadow: none !important;
  text-decoration: none !important;
}

/* Light-mode navbar underline and subtle shadow on scroll/compact */
body[data-theme="light"] .navbar {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05) !important;
}
body[data-theme="light"] .navbar.navbar--compact {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08) !important;
  border-bottom-color: rgba(15, 23, 42, 0.1) !important;
}

/* Override brand color in dark mode to stay light blue even with generic link clamp */
body[data-theme="dark"] .navbar .brand-link,
body[data-theme="dark"] .navbar .brand-link * {
  color: #8ec7ff !important;
}

/* Override brand color in light mode to stay dark blue even with generic link clamp */
body[data-theme="light"] .navbar .brand-link,
body[data-theme="light"] .navbar .brand-link * {
  color: #0b1f55 !important;
}

body .navbar a:hover,
body .navbar a:focus-visible,
body .navbar .nav-link:hover,
body .navbar .nav-link:focus-visible,
body .navbar .brand-link:hover,
body .navbar .brand-link:focus-visible,
body .navbar .brand-link *:hover,
body .navbar .brand-link *:focus-visible {
  color: var(--accent-soft, #8ec7ff) !important;
}

/* Scans page interaction polish */
.scans-filter-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.scans-filter-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(59, 130, 246, 0.25);
  border-color: rgba(96, 165, 250, 0.45);
}

.scans-search-btn {
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.scans-search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(59, 130, 246, 0.35);
  filter: brightness(1.05);
}

.scan-card-outer {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
  animation: scanCardIn 0.35s ease forwards;
  opacity: 0;
}

.scan-card-outer:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(59, 130, 246, 0.22);
  border-color: rgba(96, 165, 250, 0.5);
}

.scan-card-outer:nth-of-type(1) { animation-delay: 0.02s; }
.scan-card-outer:nth-of-type(2) { animation-delay: 0.06s; }
.scan-card-outer:nth-of-type(3) { animation-delay: 0.10s; }
.scan-card-outer:nth-of-type(4) { animation-delay: 0.14s; }
.scan-card-outer:nth-of-type(5) { animation-delay: 0.18s; }
.scan-card-outer:nth-of-type(6) { animation-delay: 0.22s; }

@keyframes scanCardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .scan-card-outer { animation: none; opacity: 1; }
}

/* Ensure scans search button stays white in dark mode */
body:not([data-theme="light"]) .scans-search-btn,
body:not([data-theme="light"]) .scans-search-btn * {
  color: #ffffff !important;
}

/* Scans header text light blue in dark mode */
body:not([data-theme="light"]) .scans-title,
body:not([data-theme="light"]) .scans-subtitle {
  color: #60a5fa !important;
}

/* Scans numbering white across themes */
.scan-part-list,
.scan-price-list {
  color: #ffffff !important;
}

/* Consistent keyboard focus ring */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

/* UI primitives */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.surface {
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(96, 165, 250, 0.22);
  box-shadow: var(--shadow);
  border-radius: 16px;
}

.input {
  appearance: none;
  background: rgba(255, 255, 255, 0.98);
  color: #19223a;
  border-radius: 0.85em;
  padding: 0.72em 1.2em;
  font-size: 1.05em;
  border: 2px solid rgba(96, 165, 250, 0.65);
  box-shadow: 0 2px 12px rgba(96, 165, 250, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.input:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(96, 165, 250, 0.18);
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22), 0 14px 34px rgba(96, 165, 250, 0.18);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.9em;
  padding: 0.7em 1.5em;
  font-size: 1.02em;
  font-weight: 800;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  user-select: none;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff !important;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-primary,
.btn-primary *,
.btn-primary span {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  opacity: 1 !important;
  font-weight: 700 !important;
}

.btn-primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(96, 165, 250, 0.38);
  color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:hover *,
.btn-primary:hover span {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}


.btn-outline {
  background: #60a5fa !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  font-weight: 600 !important;
}

.btn-outline,
.btn-outline *,
.btn-outline span {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.btn-outline:hover {
  background: #3b82f6 !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.btn-outline:hover,
.btn-outline:hover *,
.btn-outline:hover span {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.btn,
.btn *,
.btn-primary,
.btn-outline,
.hero-upload-btn,
.hero-upload-btn *,
.hero-search-btn,
.hero-search-btn *,
.preview-btn,
.preview-btn *,
.scan-btn,
.scan-btn *,
.chat-send-btn,
.chat-send-btn * {
  color: #ffffff !important;
}

/* MAXIMUM SPECIFICITY OVERRIDES */
button.btn.btn-primary,
button.btn.btn-primary *,
button.btn.btn-primary span,
button.hero-upload-btn.scan-btn,
button.hero-upload-btn.scan-btn *,
button.hero-upload-btn.scan-btn span,
button#submit-btn,
button#submit-btn *,
button#submit-btn span,
button.btn.btn-outline,
button.btn.btn-outline *,
button.btn.btn-outline span {
  color: #ffffff !important;
  opacity: 1 !important;
  filter: none !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6) !important;
  font-weight: 800 !important;
}

/* FORCE WHITE TEXT ON ALL BUTTON ELEMENTS */
.btn-outline,
.btn-outline:hover,
.btn-outline:focus,
.btn-outline:active,
.btn,
.btn:hover,
.btn:focus,
.btn:active {
  color: #ffffff !important;
}

.btn-outline *,
.btn-outline:hover *,
.btn-outline:focus *,
.btn-outline:active *,
.btn *,
.btn:hover *,
.btn:focus *,
.btn:active * {
  color: #ffffff !important;
}
.chat-send-btn * {
  color: #ffffff !important;
}

.ai-tagline {
  color: #60a5fa !important;
}

body[data-theme="light"] .btn-outline {
  background: #60a5fa !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
}

body[data-theme="light"] .btn-outline:hover {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
}

body:not([data-theme="light"]) .btn-outline:hover {
  background: rgba(96,165,250,0.24);
  border-color: rgba(96,165,250,0.8);
}

/* Pagination sizing */
.pagination .btn {
  padding: 0.6em 1.1em;
  border-radius: 0.85em;
}

/* Page panels */
.page-panel {
  max-width: 900px;
  margin: 2.5rem auto 2rem auto;
  padding: 2.2rem 2rem;
}

.panel-header {
  padding: 1.15rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.panel-title {
  color: var(--accent);
  font-size: 2.4rem;
  font-weight: 800;
  text-align: center;
  margin: 0;
  letter-spacing: -0.5px;
}

.brand-gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Search result cards */
.search-results .scans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.8rem;
}

.search-results .scan-card {
  background: linear-gradient(135deg, rgba(42, 63, 95, 0.95) 0%, rgba(26, 40, 64, 0.95) 100%);
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.2rem 1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-results .scan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(96, 165, 250, 0.18), 0 10px 30px rgba(0, 0, 0, 0.35);
  border-color: rgba(96, 165, 250, 0.5);
}

.search-results .scan-thumb {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 1rem;
  background: rgba(96, 165, 250, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.search-results .scan-thumb img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.search-results .file-name {
  color: var(--accent);
  font-weight: 800;
}

.search-results .upload-time {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

/* Footer bar (static at document end) */
footer {
  position: relative !important;
  width: 100% !important;
  margin: 0;
  background: #ffffff !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  padding: 2.4rem 2rem 2.9rem 2rem;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  z-index: 10 !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 190px;
}

footer, footer .footer-link, footer .footer-copy, footer .footer-brand {
  color: #1e293b !important;
}

footer .footer-content,
footer .footer-inner {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.35rem;
  margin: 0 auto;
  text-align: center;
}

footer .footer-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: #1e293b !important;
  margin-bottom: 0.2rem;
  letter-spacing: -0.01em;
}

footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem 1.4rem;
  width: 100%;
  max-width: 520px;
  margin: 0 auto 0.5rem auto;
  text-align: center;
  order: 0;
  padding-top: 0.5rem;
}

footer .footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  justify-content: center;
  width: 100%;
  order: 1;
}

footer .footer-social-link {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: transparent;
  border: none;
  cursor: pointer;
  pointer-events: auto;
  color: #8ec7ff !important;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

footer .footer-social-link svg {
  width: 22px;
  height: 22px;
  fill: #8ec7ff !important;
  color: #8ec7ff !important;
}

footer .footer-social-link svg path {
  fill: #8ec7ff !important;
}

footer .footer-copy,
footer .footer-inner .footer-copy,
footer .footer-content .footer-copy {
  order: 2;
}

@media (max-width: 640px) {
  footer {
    padding: 2rem 1.4rem 2.4rem 1.4rem;
    min-height: 210px;
  }
  footer .footer-content,
  footer .footer-inner {
    gap: 1.15rem;
  }
  footer .footer-links {
    gap: 0.8rem 1.1rem;
    margin-bottom: 0.65rem;
  }
  footer .footer-social {
    gap: 0.9rem;
    margin-top: 0.65rem;
    flex-wrap: wrap;
  }
}

footer .footer-social-link:hover {
  background: inherit;
  border-color: rgba(142, 199, 255, 0.45);
  color: inherit !important;
  transform: scale(1.04);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

footer .footer-social-link:hover svg,
footer .footer-social-link:hover svg path {
  fill: inherit !important;
  color: inherit !important;
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  padding: 0.65rem 1.1rem;
  border-radius: 12px;
  background: #1f2937;
  color: #ffffff !important;
  font-weight: 700;
  text-decoration: none !important;
  border: 1px solid #111827;
  box-shadow: 0 8px 18px rgba(17,24,39,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-cta:visited,
.contact-cta:focus,
.contact-cta:focus-visible,
.contact-cta:hover,
.contact-cta * {
  color: #ffffff !important;
  text-decoration: none !important;
}

.contact-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(17,24,39,0.3);
  background: #111827;
}

footer .footer-link {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 0.3rem 0.6rem;
  margin: 0;
  border-radius: 6px;
  color: #475569 !important;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: inline-flex;
  align-items: center;
  will-change: transform;
}

footer .footer-link::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 0.12rem;
  height: 2px;
  background: #60a5fa;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

footer .footer-link:hover {
  background: rgba(59,130,246,0.08);
  color: #1e293b !important;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.15);
}

footer .footer-link:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

footer .footer-link:active {
  transform: translateY(0);
}

footer .footer-link:focus-visible {
  outline: none;
  color: #8ec7ff !important;
}

footer .footer-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding-top: 0.4rem;
  order: 2;
  width: 100%;
  font-size: 0.85rem;
  color: #64748b !important;
}

footer .footer-divider {
  width: 100%;
  max-width: 300px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(96,165,250,0.6), transparent);
  margin-bottom: 0.25rem;
}


footer .copyright-text {
  color: #1f2937 !important;
  font-size: 0.94rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.45;
  letter-spacing: 0.3px;
  font-variant: small-caps;
  opacity: 0.96;
}

/* Copyright tagline */
footer .copyright-tag {
  color: rgba(31,41,55,0.7) !important;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.12px;
}

/* Light mode: ensure footer items use landing dark blue */
body[data-theme="light"] footer .copyright-text {
  color: #1f2937 !important;
}

body[data-theme="light"] footer .footer-link {
  color: #1f2937 !important;
  text-decoration: underline !important;
  text-decoration-color: #0b1f55 !important;
  text-decoration-thickness: 1.5px !important;
}

body[data-theme="light"] footer .footer-link:hover {
  color: #2563eb !important;
  background: transparent;
  text-decoration: underline !important;
  text-decoration-color: #0b1f55 !important;
  text-decoration-thickness: 2px !important;
}

body[data-theme="light"] footer .footer-social-link,
body[data-theme="light"] footer .footer-social-link svg {
  color: #1f2937 !important;
  fill: currentColor !important;
}

body[data-theme="light"] footer .footer-social-link:hover {
  background: inherit !important;
  border: inherit !important;
  color: #1f2937 !important;
  fill: #1f2937 !important;
}

/* Dark mode social icon color lock */
body:not([data-theme="light"]) footer .footer-social-link,
body:not([data-theme="light"]) footer .footer-social-link svg {
  color: #8ec7ff !important;
  fill: #8ec7ff !important;
  background: transparent !important;
  border: none !important;
}

body:not([data-theme="light"]) footer .footer-social-link:hover {
  background: transparent !important;
  border: none !important;
  color: #8ec7ff !important;
  fill: #8ec7ff !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

body[data-theme="light"] footer .footer-divider {
  background: linear-gradient(90deg, transparent, rgba(96,165,250,0.6), transparent);
}

footer .brand-gradient {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  transition: all 0.3s ease;
}

footer .footer-tagline {
  color: rgba(148, 163, 184, 0.7);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* cleaned redundant footer overrides */

/* --- Final light-mode footer polish and color lock --- */
body[data-theme="light"] footer {
  background: #ffffff !important;
  border-top: 1px solid #e6eef8 !important;
  padding: 32px 16px !important;
  gap: 12px !important;
}

body[data-theme="light"] footer .footer-links {
  gap: 0.75rem !important;
  margin-bottom: 0.25rem !important;
}

body[data-theme="light"] footer .footer-social {
  gap: 0.6rem !important;
}

body[data-theme="light"] footer .footer-brand,
body[data-theme="light"] footer .footer-link,
body[data-theme="light"] footer .footer-link:visited,
body[data-theme="light"] footer .footer-link:focus-visible,
body[data-theme="light"] footer .footer-copy,
body[data-theme="light"] footer .copyright-text,
body[data-theme="light"] footer .copyright-tag,
body[data-theme="light"] footer .footer-social-link,
body[data-theme="light"] footer .footer-social-link svg,
body[data-theme="light"] footer .footer-social-link .social-icon,
body[data-theme="light"] footer .footer-social-link path {
  color: #1f2937 !important;
  fill: #1f2937 !important;
}

body[data-theme="light"] footer .footer-link:hover {
  color: #8ec7ff !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-theme="light"] footer .footer-social-link:hover {
  background: inherit !important;
  border: inherit !important;
  color: #1f2937 !important;
  fill: #1f2937 !important;
}

body[data-theme="light"] footer .copyright-text {
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px !important;
  color: #1f2937 !important;
}

body[data-theme="light"] footer .copyright-tag {
  font-size: 0.78rem !important;
  color: #60a5fa !important;
  font-weight: 500 !important;
}

/* Dark mode: ensure footer brand and copyright match link accent */
body[data-theme="dark"] footer .footer-brand,
body[data-theme="dark"] footer .copyright-text {
  color: #8ec7ff !important;
}

/* BODY - DEFAULT DARK MODE */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: #1f2937;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  z-index: 10000;
}
.skip-to-content:focus {
  top: 0;
}

body {
    background: #f5f7fb;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #0f172a;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* DARK MODE BACKGROUND GRADIENT - DISABLED TO PREVENT OVERLAY */
body::before {
  content: '';
    border-color: #3b82f6;
    box-shadow: 0 10px 24px rgba(59,130,246,0.25);
    background: #edf2ff;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: -1;
  pointer-events: none;
}

/* NAVBAR */
.navbar {
  background: #1e293b;
  padding: 0.6rem 0;
  border-bottom: 2px solid rgba(59,130,246,0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Light mode navbar should be white (not gray) */
body[data-theme="light"] .navbar {
  background: #ffffff !important;
  border-bottom: 1px solid #e6eef8 !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08) !important;
}

.navbar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.navbar-list {
  display: flex;
  gap: 1rem;
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

/* NAVBAR BRAND - FIXED POSITION */
.navbar-brand {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1001;
}

.navbar-brand .brand-link {
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
}

.brand-parts {
  color: #60a5fa;
}

.brand-nexus {
  color: #9acbff; /* Light blue in light mode */
}

.nav-link {
  color: #60a5fa !important;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 1.05rem;
}

.nav-link:hover {
  color: #8ec7ff !important;
}

/* Light mode: keep navbar links light blue */
body[data-theme="light"] .nav-link {
  color: #60a5fa !important;
}

/* Light mode: homepage hero title (Parts Nexus) in light blue */
body[data-theme="light"] .home-hero-title {
  color: #60a5fa !important;
  text-shadow: none !important;
}

/* Force nav/foot light blue across themes */
body .navbar .nav-link,
body .navbar .nav-link:visited {
  color: #60a5fa !important;
}

body .navbar .nav-link:hover {
  color: #8ec7ff !important;
  background: rgba(96,165,250,0.12);
}

body footer .footer-link,
body footer .footer-link:visited {
  color: #60a5fa !important;
}

body footer .footer-link:hover,
body footer .footer-link:focus-visible {
  color: #8ec7ff !important;
  background: rgba(96,165,250,0.2);
}

body footer .footer-divider {
  background: linear-gradient(90deg, transparent, rgba(96,165,250,0.6), transparent) !important;
}

body footer .copyright-text {
  color: inherit !important;
}

body[data-theme="light"] footer .footer-link,
body[data-theme="light"] footer .footer-link:visited {
  color: #60a5fa !important;
}

body[data-theme="light"] footer .footer-link:hover,
body[data-theme="light"] footer .footer-link:focus-visible {
  color: #8ec7ff !important;
  background: rgba(96,165,250,0.2);
}

body[data-theme="light"] footer .footer-divider {
  background: linear-gradient(90deg, transparent, rgba(96,165,250,0.6), transparent) !important;
}

body[data-theme="light"] footer .copyright-text {
  color: #1f2937 !important;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-left {
  display: flex;
  align-items: center;
}

.theme-toggle-nav {
  background: transparent;
  border: 2px solid rgba(96,165,250,0.3);
  color: #e2e8f0;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1001;
}

.theme-toggle-nav:hover {
  background: rgba(96,165,250,0.1);
  border-color: #60a5fa;
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 2rem 9rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* HERO CARD */
.hero-card {
  background: #1e293b !important;
  color: white;
  border-radius: 32px;
  padding: 3.2rem 2.6rem;
  max-width: 800px;
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(96,165,250, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* FORCE SAME BLUE AS FOOTER IN DARK MODE */
body:not([data-theme="light"]) .hero-card {
  background: #1e293b !important;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.85rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-tagline {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.9rem;
  line-height: 1.4;
  opacity: 0.95;
}

.hero-description {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 2.2rem;
  line-height: 1.6;
  opacity: 0.9;
}

/* UPLOAD BUTTON */
.hero-upload-btn {
  background: transparent;
  color: #ffffff !important;
  border: 3px solid #ffffff;
  border-radius: 25px;
  padding: 18px 36px;
  font-weight: 600;
  cursor: pointer;
  font-size: 17px;
  transition: all 0.3s ease;
  margin-bottom: 2.2rem;
  display: inline-block;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  position: relative;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-upload-btn {
    animation: pv-cta-pulse 5s ease-in-out 1.5s 2;
  }
}

@keyframes pv-cta-pulse {
  0% { box-shadow: 0 0 0 0 rgba(142, 199, 255, 0.38); transform: translateY(0); }
  40% { box-shadow: 0 0 0 18px rgba(142, 199, 255, 0); transform: translateY(-1px); }
  100% { box-shadow: 0 0 0 0 rgba(142, 199, 255, 0); transform: translateY(0); }
}

.hero-upload-btn,
.hero-upload-btn *,
.hero-upload-btn .btn-label,
.hero-upload-btn span {
  color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
  filter: none !important;
  font-weight: 700 !important;
}

.hero-upload-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: #60a5fa;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,255,255,0.2);
}

.hero-upload-btn:hover,
.hero-upload-btn:hover *,
.hero-upload-btn:hover .btn-label,
.hero-upload-btn:hover span {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
}
  width: 100%;
}

.hero-search-form {
  display: flex;
  gap: 1rem;
}

/* Search input styling - white background with dark text */
.stunning-search-form input[type="search"],
.search-form input[type="search"] {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 2px solid #60a5fa !important;
  border-radius: 0.85em !important;
  padding: 0.72em 1.2em !important;
  font-size: 1.05em !important;
  font-weight: 500 !important;
}

.stunning-search-form input[type="search"]::placeholder,
.search-form input[type="search"]::placeholder {
  color: rgba(30, 41, 59, 0.6) !important;
  font-weight: 500 !important;
}

.hero-search-input {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 2px solid #60a5fa !important;
  border-radius: 25px;
  padding: 14px 20px;
  width: 280px;
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
}

.hero-search-input::placeholder {
  color: rgba(255,255,255,0.7);
}

.hero-search-input:focus {
  border-color: #60a5fa;
  background: rgba(255,255,255,0.15);
  box-shadow: 0 0 0 3px rgba(96,165,250,0.3);
}

.hero-search-btn {
  background: #60a5fa;
  color: #ffffff;
  border: 2px solid #60a5fa;
  border-radius: 25px;
  padding: 14px 24px;
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.3s ease;
}

.hero-search-btn:hover {
  background: #3b82f6;
  border-color: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(96,165,250,0.4);
}



.footer-brand {
  color: #60a5fa;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-link {
  background: none;
  border: none;
  color: #60a5fa !important;
  text-decoration: none;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: #8ec7ff !important;
  background: rgba(96,165,250,0.12);
}

.footer-copyright {
  color: #60a5fa !important;
  font-size: 0.6rem;
  text-align: center;
  line-height: 1.45;
  letter-spacing: 0.2px;
}

/* Text utilities */
.text-light-blue {
  color: #60a5fa;
  font-weight: 700;
}

.text-light-blue-glow {
  color: #60a5fa;
  text-shadow: 0 1px 6px rgba(96,165,250,0.35);
}

/* Final overrides: keep navbar/footer text & icons light blue in all themes */
body .navbar .nav-link,
body .navbar .nav-link:visited {
  color: #60a5fa !important;
}

body .navbar .nav-link:hover,
body .navbar .nav-link:focus-visible {
  color: #8ec7ff !important;
}

body footer .footer-link,
body footer .footer-link:visited,
body footer .footer-copy,
body footer .copyright-text {
  color: #60a5fa !important;
}

body footer .footer-link:hover,
body footer .footer-link:focus-visible {
  color: #8ec7ff !important;
  background: rgba(96,165,250,0.16) !important;
}

body footer svg {
  fill: #60a5fa !important;
}

/* MODAL STYLES */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  box-sizing: border-box;
}

.modal-content {
  background: rgba(15, 23, 42, 0.96);
  color: #dbeafe;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(96, 165, 250, 0.4);
  margin: auto;
}

.modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 2rem;
  background: transparent;
  border-bottom: 1px solid rgba(96, 165, 250, 0.2);
}

.modal-header h2 {
  margin: 0 auto;
  color: inherit;
  font-size: 1.5rem;
  text-align: center;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #bfdbfe;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.modal-close:hover {
  background: rgba(96, 165, 250, 0.14);
  color: #ffffff;
}

.modal-body {
  padding: 2rem;
  line-height: 1.7;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #dbeafe;
}

.modal-body h3 {
  margin: 2rem 0 1rem 0;
  color: inherit;
  text-align: center;
  width: 100%;
}

.modal-body h3:first-child {
  margin-top: 0;
}

.modal-body p {
  margin: 0 0 1.5rem 0;
  color: inherit;
  text-align: center;
  max-width: 600px;
}

.modal-body ul {
  text-align: left;
  display: inline-block;
  margin: 0 auto 1.5rem auto;
  max-width: 500px;
  color: inherit;
}

.modal-body li {
  margin-bottom: 0.5rem;
  color: inherit;
}

.modal-body a {
  color: #60a5fa;
  text-decoration: none;
}

.modal-body a:hover {
  text-decoration: underline;
  color: #bfdbfe;
}

.modal-body * {
  color: inherit;
}

.modal-body h3,
.modal-body h2,
.modal-body h1 {
  color: inherit;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .navbar-container {
    padding: 0 1rem;
  }
  

/* Search hint color (both themes) */
.search-hint {
  color: #60a5fa !important;
}

/* Scans page header light blue (both themes) */
.scans-title,
.upload-title {
  color: #60a5fa !important;
}
  .navbar-list {
    gap: 1rem;
  }
  
  .main-content {
    padding: 2rem 1rem 8rem;
  }
  
  .hero-card {
    margin: 0;
    padding: 3rem 2rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-search-form {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-search-input {
    width: 100%;
    max-width: 320px;
  }
  
  .footer-links {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-card {
    padding: 2rem 1.5rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }
}
/* ================================================
   UPLOAD PAGE STYLING
   ================================================ */

/* UPLOAD SECTION */
.upload-section {
    width: 100%;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modern-dropzone {
    display: block;
    width: 100%;
    max-width: 600px;
    padding: 3rem 2rem;
    border: 3px dashed rgba(255,255,255,0.3);
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.05);
    margin-bottom: 2rem;
}

.modern-dropzone:hover, .modern-dropzone.dragover {
    border-color: #60a5fa;
    background: rgba(96,165,250,0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(96,165,250,0.2);
}

.dropzone-content {
    margin-bottom: 1rem;
}

.drop-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.drop-text {
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1.5;
}

.drop-text strong {
    color: #60a5fa;
}

.drop-text small {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.dropzone-info {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* PREVIEW CONTAINER */
.preview-container {
    background: rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    border: 1px solid rgba(96,165,250,0.3);
    width: 100%;
    max-width: 600px;
}

.preview-frame {
    margin-bottom: 1rem;
}

.preview-frame img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.preview-meta {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.preview-btn {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.preview-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: #60a5fa;
    transform: translateY(-1px);
}

.remove-btn:hover {
    background: rgba(239,68,68,0.2);
    border-color: #ef4444;
    color: #ef4444;
}

/* VALIDATION MESSAGE */
.validation-msg {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
}

/* UPLOAD AGREEMENT */
.upload-agreement {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    width: 100%;
    max-width: 600px;
}

.upload-agreement small {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* SCAN BUTTON OVERRIDE */
.scan-btn {
    background: #60a5fa;
    color: #ffffff;
    border: 2px solid #60a5fa;
    border-radius: 25px;
    padding: 16px 32px;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    margin: 2rem auto;
    display: block;
    min-width: 160px;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  filter: none !important;
}

.scan-btn,
.scan-btn *,
.scan-btn .btn-label,
.scan-btn span {
  color: #ffffff !important;
  filter: none !important;
  text-shadow: none !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
  z-index: 10 !important;
  position: relative !important;
}

.scan-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(96,165,250,0.4);
}

.scan-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ================================================
   PIQ ASSISTANT WIDGET STYLING
   ================================================ */

/* CHAT WIDGET ROOT */
.partsiq-chat-root {
    position: fixed !important;
    bottom: 90px !important;
    right: 20px !important;
    z-index: 10000 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* CHAT ICON */
.partsiq-chat-icon {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: #1e40af !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    box-shadow: 0 8px 25px rgba(30,64,175,0.3) !important;
    transition: all 0.3s ease !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.partsiq-chat-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(30,64,175,0.4);
}

.partsiq-chat-icon__text {
    color: #ffffff;
    font-weight: 700;
    font-size: 18px;
}

.partsiq-chat-icon__glow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96,165,250,0.2) 0%, transparent 70%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* CHAT WINDOW */
.partsiq-chat-window {
    position: fixed;
    bottom: 160px;
    right: 20px;
    width: 420px;
    height: 600px;
    max-height: calc(100vh - 160px);
    background: #1e293b;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    border: 1px solid rgba(96,165,250,0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.partsiq-chat-window[aria-hidden="false"] {
    display: flex;
}

/* CHAT HEADER */
.partsiq-chat-header {
    background: #1e293b;
    color: #ffffff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-primary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.piq-logo-badge {
    background: rgba(255,255,255,0.2);
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.piq-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.piq-subtitle {
    margin: 0;
    font-size: 12px;
    color: rgba(255,255,255,0.8);
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.partsiq-icon-button {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: 500;
}

.partsiq-icon-button:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
    color: #ffffff;
}

/* CHAT CONTENT */
.partsiq-chat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* QUICK CARDS */
.piq-quick-cards {
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.piq-quick-card {
    background: rgba(96,165,250,0.1);
    border: 1px solid rgba(96,165,250,0.2);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.piq-quick-card:hover {
    background: rgba(96,165,250,0.2);
    border-color: rgba(96,165,250,0.4);
    transform: translateY(-2px);
}

.piq-quick-card__icon {
    font-size: 24px;
    display: block;
    margin-bottom: 0.5rem;
}

.piq-quick-card__title {
    color: #60a5fa;
    font-weight: 600;
    font-size: 14px;
    display: block;
    margin-bottom: 0.25rem;
}

.piq-quick-card__body {
    color: #e2e8f0;
    font-size: 12px;
    line-height: 1.4;
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .partsiq-chat-window {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }
    
    .piq-quick-cards {
        grid-template-columns: 1fr;
    }
}

/* HIDE ON SMALL SCREENS */
@media (max-height: 500px) {
    .partsiq-chat-root {
        display: none;
    }
}

/* ================================================
   CHAT INTERFACE STYLING
   ================================================ */

/* CHAT MESSAGES */
.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.chat-message.user {
    align-items: flex-end;
}

.chat-message.assistant {
    align-items: flex-start;
}

.message-content {
    background: rgba(96,165,250,0.1);
    color: #e2e8f0;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    max-width: 85%;
    line-height: 1.4;
    font-size: 14px;
}

.chat-message.user .message-content {
    background: #60a5fa;
    color: #ffffff;
}

.chat-message.assistant .message-content {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(96,165,250,0.3);
}

/* CHAT INPUT */
.chat-input-container {
    padding: 1rem;
    border-top: 1px solid rgba(96,165,250,0.2);
    background: rgba(0,0,0,0.1);
}

.chat-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(96,165,250,0.3);
    border-radius: 20px;
    padding: 0.75rem 1rem;
    color: #e2e8f0;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.chat-input::placeholder {
    color: rgba(226,232,240,0.6);
}

.chat-input:focus {
    border-color: #60a5fa;
    background: rgba(255,255,255,0.15);
    box-shadow: 0 0 0 2px rgba(96,165,250,0.2);
}

.chat-send-btn {
    background: #60a5fa;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 0.75rem 1.5rem;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-send-btn:hover {
    background: #3b82f6;
    transform: translateY(-1px);
}

/* TYPING INDICATOR */
.typing-indicator {
    display: flex;
    gap: 3px;
    align-items: center;
    margin-top: 4px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #60a5fa;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
.typing-indicator span:nth-child(3) { animation-delay: 0s; }

@keyframes typing {
    0%, 80%, 100% { opacity: 0.3; transform: scale(1); }
    40% { opacity: 1; transform: scale(1.2); }
}

/* RESPONSIVE CHAT */
@media (max-width: 480px) {
    .chat-input-wrapper {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .chat-input {
        width: 100%;
    }
    
    .chat-send-btn {
        width: 100%;
        justify-content: center;
        display: flex;
    }
}
