/* ==========================================================================
   Pub2PDF Global Design System & Stylesheet
   ========================================================================== */

:root {
  /* Color Palette (HSL Tailored for Navy Blue & Gold Theme on Baby Blue Background) */
  --bg-dark: hsl(205, 90%, 96%); /* Very light baby blue background! */
  --bg-card: rgba(255, 255, 255, 0.75); /* Highly polished glassmorphic white card! */
  --bg-card-hover: rgba(255, 255, 255, 0.9);
  --border-light: rgba(10, 25, 47, 0.08); /* Dark subtle border using navy base! */
  --border-focus: rgba(212, 175, 55, 0.4); /* Gold focus glow! */
  
  --primary: hsl(43, 90%, 50%); /* Rich Gold base color! */
  --primary-hover: hsl(40, 95%, 45%); /* Deeper rich gold color! */
  --primary-glow: rgba(212, 175, 55, 0.25);
  
  --accent: hsl(217, 85%, 15%); /* Premium Royal Navy Blue! */
  --accent-hover: hsl(217, 85%, 10%);
  --accent-glow: rgba(10, 25, 47, 0.15);
  
  --success: hsl(142, 65%, 25%); /* Dark green for accessible light theme contrast */
  --warning: hsl(38, 90%, 30%); /* Dark amber for accessible light theme contrast */
  --danger: hsl(350, 80%, 35%); /* Dark red for accessible light theme contrast */
  
  --text-primary: hsl(217, 85%, 15%); /* Navy Blue primary text for ultimate branding cohesion! */
  --text-secondary: hsl(217, 45%, 22%); /* Dark slate navy for readable secondary text! */
  --text-muted: hsl(217, 30%, 34%); /* Deep dark gray-slate for high contrast muted labels! */
  
  /* Shiny Metallic Real Gold Gradients */
  --gold-gradient: linear-gradient(135deg, #BF953F 0%, #FCF6BA 25%, #B38728 50%, #FBF5B7 75%, #AA771C 100%);
  --gold-gradient-hover: linear-gradient(135deg, #A67C1E 0%, #FDF8C7 25%, #9E741B 50%, #FDF7B9 75%, #8E6010 100%);
  
  /* Inner highlights containers (accessible overlays) */
  --bg-card-inner: rgba(255, 255, 255, 0.85);
  --bg-card-inner-hover: rgba(255, 255, 255, 0.98);
  --bg-marketing: rgba(255, 255, 255, 0.95);
  --bg-marketing-hover: #ffffff;
  --bg-footer: rgba(255, 255, 255, 0.45);
  --bg-header: rgba(255, 255, 255, 0.45);
  
  /* Layout tokens */
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --border-radius-sm: 6px;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --container-width: 1200px;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Background Glowing Orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.3;
  pointer-events: none;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -10%;
  right: -5%;
  animation: floatOrb 25s infinite alternate ease-in-out;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  bottom: 10%;
  left: -10%;
  animation: floatOrb 20s infinite alternate-reverse ease-in-out;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: hsl(205, 90%, 80%);
  top: 40%;
  right: 25%;
  animation: floatOrb 30s infinite alternate ease-in-out;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 60px) scale(1.1); }
}

/* Header */
.app-header {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  background-color: var(--bg-header);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-version {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent); /* Premium gold color matching the logo branding */
  letter-spacing: 0.5px;
  margin-top: -24px; /* Pulls the version text up beautifully without overlapping solid graphics */
  position: relative;
  z-index: 10; /* Ensures it sits on top of any overlapping image bounding boxes */
}

.logo-img-nav {
  height: 165px;
  width: 165px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.25));
  transition: var(--transition-smooth);
}

.logo-container:hover .logo-img-nav {
  transform: scale(1.02);
}

/* Hero Section Logo & Layout */
.hero-body-row {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 24px;
}

.hero-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.hero-logo {
  width: 190px;
  height: 190px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.25));
  transition: var(--transition-smooth);
}

.hero-logo:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.45));
}

.hero-version {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
  display: block;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* Responsive breakpoint for side-by-side logo layout */
@media (max-width: 768px) {
  .hero-body-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
}

/* User Profile Header Section */
.user-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  animation: fadeIn 0.3s ease-out;
}

.user-email {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-light);
}

/* Main Layout */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 48px;
  padding-bottom: 48px;
}

/* Common Card Styles (Glassmorphism) */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 12px 48px rgba(10, 25, 47, 0.06);
  padding: 32px;
  transition: var(--transition-smooth);
}

.card-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
  background: linear-gradient(to right, var(--text-primary), hsl(217, 85%, 35%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-header p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--border-radius-md);
  border: none;
  cursor: pointer;
  padding: 12px 24px;
  gap: 8px;
  font-size: 15px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gold-gradient);
  color: hsl(217, 85%, 15%); /* Navy text for perfect contrast on gold button */
  border: 1px solid rgba(170, 119, 28, 0.4);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.6);
  background: var(--gold-gradient-hover);
}

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

.btn-secondary {
  background: rgba(10, 25, 47, 0.05);
  color: var(--accent);
  border: 1px solid rgba(10, 25, 47, 0.15);
}

.btn-secondary:hover {
  background: rgba(10, 25, 47, 0.1);
  border-color: var(--accent);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--border-radius-sm);
}

.btn-full {
  width: 100%;
}

.btn-icon-right {
  width: 16px;
  height: 16px;
}

/* Auth Section */
.auth-card-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
  max-width: 950px;
  margin: 0 auto;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-light);
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 16px;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.auth-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.auth-tab.active {
  color: var(--accent);
  background: rgba(10, 25, 47, 0.04);
  border-bottom: 2px solid var(--accent);
}

.auth-body {
  padding: 40px;
}

.auth-headline {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.auth-subline {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
}

/* Form Styling */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition-smooth);
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  padding: 12px 16px 12px 44px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: var(--transition-smooth);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--border-focus);
  background: rgba(255, 255, 255, 0.95);
}

.form-input:focus + .input-icon {
  color: var(--primary);
}

/* Auth Value Proposition Panel */
.auth-value-props {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.prop-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  padding: 24px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  transition: var(--transition-smooth);
}

.prop-card:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateX(4px);
}

.prop-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-sm);
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(43, 90%, 40%);
}

.prop-icon-wrapper svg {
  width: 22px;
  height: 22px;
}

.prop-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.prop-card p {
  color: var(--text-secondary);
  font-size: 13px;
  grid-column: 2;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  font-size: 14px;
  margin-bottom: 24px;
  font-weight: 500;
  animation: fadeIn 0.3s ease-out;
  border: 1px solid transparent;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: hsl(142, 65%, 25%);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: hsl(350, 80%, 30%);
}

/* Dashboard Layout */
.dashboard-container {
  animation: fadeIn 0.5s ease-out;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

/* Drop Zone Styles */
.drop-zone {
  border: 2px dashed rgba(0, 0, 0, 0.15);
  border-radius: var(--border-radius-lg);
  padding: 48px 24px;
  text-align: center;
  background: var(--bg-card-inner);
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.drop-zone:hover {
  border-color: var(--primary);
  background: rgba(212, 175, 55, 0.04);
}

.drop-zone[drag-over="true"] {
  border-color: var(--accent);
  background: rgba(10, 25, 47, 0.04);
  transform: scale(1.01);
}

.file-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-icon-container {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.drop-zone:hover .upload-icon-container {
  color: var(--primary);
  background: rgba(212, 175, 55, 0.05);
  border-color: rgba(212, 175, 55, 0.2);
  transform: translateY(-4px);
}

.upload-icon {
  width: 32px;
  height: 32px;
}

.parachute-path {
  fill: none;
  stroke: var(--text-secondary);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s ease, stroke-width 0.3s ease;
}

.drop-zone:hover .parachute-path {
  stroke: var(--primary);
}

.drop-zone[drag-over="true"] {
  border-color: #f97316 !important;
  background: rgba(249, 115, 22, 0.04) !important;
  box-shadow: 0 0 24px rgba(249, 115, 22, 0.15) !important;
  transform: scale(1.02);
}

.drop-zone[drag-over="true"] .upload-icon-container {
  transform: translateY(-8px) scale(1.1);
  border-color: rgba(249, 115, 22, 0.3) !important;
}

.drop-zone[drag-over="true"] .parachute-path {
  stroke: #f97316 !important;
}

.drop-zone h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.drop-zone-sub {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 12px;
}

.drop-zone-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

.file-constraints {
  color: var(--text-muted);
  font-size: 12px;
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

/* Selected File Panel */
.selected-file-info {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  animation: slideUp 0.3s ease-out;
  margin-top: 24px;
}

/* Stripe Payment Element Adaptations */
#card-element {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-light);
  padding: 14px 12px;
  border-radius: var(--border-radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#card-element.StripeElement--focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.2);
}

.file-details {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0; /* Ensures overflow text truncation works */
}

.pub-file-icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
  flex-shrink: 0;
}

.file-meta {
  min-width: 0;
}

.file-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  font-size: 12px;
  color: var(--text-muted);
}

.upload-actions {
  display: flex;
  gap: 8px;
}

/* Conversion History Queue List */
.scrollable-body {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Scrollbar customizations */
.scrollable-body::-webkit-scrollbar {
  width: 6px;
}

.scrollable-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
}

.scrollable-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.scrollable-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}

.empty-icon {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 13px;
  max-width: 320px;
}

/* Queue List Container */
.queue-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.4s ease-out;
}

.queue-item {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition-smooth);
}

.queue-item:hover {
  background: var(--bg-card-inner-hover);
  border-color: rgba(0, 0, 0, 0.12);
}

.queue-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.queue-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  align-items: center;
}

/* Badges / Pill Tags */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-uploaded {
  background: rgba(10, 25, 47, 0.08);
  color: hsl(217, 85%, 15%);
  border: 1px solid rgba(10, 25, 47, 0.15);
}

.badge-received {
  background: rgba(212, 175, 55, 0.1);
  color: hsl(43, 90%, 30%);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.badge-converting {
  background: rgba(245, 158, 11, 0.1);
  color: hsl(38, 90%, 30%);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-completed {
  background: rgba(16, 185, 129, 0.1);
  color: hsl(142, 65%, 25%);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-failed {
  background: rgba(239, 68, 68, 0.1);
  color: hsl(350, 80%, 30%);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Progress Section */
.queue-progress-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-label-bar {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px var(--accent-glow);
}

.progress-fill.converting {
  background: linear-gradient(90deg, var(--warning) 0%, hsl(45, 100%, 50%) 100%);
  animation: pulseProgress 1.5s infinite alternate ease-in-out;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.progress-fill.completed {
  background: var(--success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.progress-fill.failed {
  background: var(--danger);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

@keyframes pulseProgress {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Action button in list */
.item-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.btn-download {
  color: var(--accent);
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.2);
  padding: 6px 14px;
  font-size: 12px;
  border-radius: var(--border-radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-download:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: hsl(43, 90%, 40%);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
  transform: translateY(-1px);
}

/* Footer styling */
.app-footer {
  border-top: 1px solid var(--border-light);
  background: var(--bg-footer);
  padding: 24px 0;
  margin-top: auto;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* Spinners and Helpers */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Persuasive Marketing & Copy Styling
   ========================================================================== */

.landing-marketing-panel {
  display: flex;
  flex-direction: column;
  gap: 28px;
  animation: fadeIn 0.8s ease-out;
  padding-right: 12px;
}

.marketing-badge-container {
  display: flex;
}

.marketing-badge {
  background: rgba(10, 25, 47, 0.05);
  border: 1px solid rgba(10, 25, 47, 0.12);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 10px rgba(10, 25, 47, 0.03);
}

.marketing-headline {
  font-family: 'Outfit', sans-serif;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.2px;
  background: linear-gradient(135deg, var(--text-primary) 30%, hsl(217, 85%, 25%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.2));
}

.marketing-lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.marketing-section {
  background: var(--bg-marketing);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  padding: 24px;
  transition: var(--transition-smooth);
}

.marketing-section:hover {
  background: var(--bg-marketing-hover);
  border-color: rgba(0, 0, 0, 0.12);
}

.marketing-section h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
}

.marketing-section p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.process-step {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-number {
  background: var(--gold-gradient);
  color: hsl(217, 85%, 15%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(170, 119, 28, 0.3);
  text-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 10px rgba(212, 175, 55, 0.25);
}

.step-header-row h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.step-description {
  margin-left: 40px; /* Perfectly aligns the text right below the header text, keeping the circle distinct */
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.getting-started-banner {
  border-color: rgba(10, 25, 47, 0.15);
  background: rgba(10, 25, 47, 0.03);
}

.getting-started-banner h3 {
  color: var(--accent);
  border-bottom-color: rgba(10, 25, 47, 0.1);
}

/* Sunset Warning Callout Banner */
.sunset-warning-banner {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.03);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.04);
}

.sunset-warning-banner:hover {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.4);
}

.sunset-warning-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.12);
  padding-bottom: 8px;
}

.sunset-warning-header h3 {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
  color: var(--warning);
  font-size: 16px;
  font-weight: 700;
}

.sunset-alert-badge {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--warning);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 4px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.05);
}

/* Sidebar Wrapper for Right Column Auth and Steps */
.auth-sidebar-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Media Queries for Responsiveness */
@media (max-width: 900px) {
  .auth-card-container {
    grid-template-columns: 1fr;
    max-width: 500px;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .header-container, .footer-container {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .auth-body {
    padding: 24px;
  }
  
  .card {
    padding: 20px;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Shake warning animation for bad code input */
.shake-warning {
  animation: shake 0.4s ease-in-out;
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* Pricing Callout Banner */
.pricing-banner {
  border-color: rgba(212, 175, 55, 0.25);
  background: rgba(212, 175, 55, 0.03);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.04);
}

.pricing-banner:hover {
  background: rgba(212, 175, 55, 0.05);
  border-color: rgba(212, 175, 55, 0.4);
}

.pricing-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  padding-bottom: 8px;
}

.pricing-header h3 {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
}

.pricing-tag-badge {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: hsl(43, 90%, 35%);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 4px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.05);
}

/* Human Touch Banner */
.human-touch-banner {
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.03);
}

.human-touch-banner:hover {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.4);
}

.human-touch-banner h3 {
  color: var(--success);
  border-bottom-color: rgba(16, 185, 129, 0.1);
}

/* ==========================================================================
   Dark Mode Theme System & Floating Toggle Button
   ========================================================================== */

[data-theme="dark"] {
  --bg-dark: hsl(217, 85%, 8%); /* Deep navy blue background! */
  --bg-card: rgba(10, 25, 47, 0.75); /* Glassmorphic dark card overlay! */
  --bg-card-hover: rgba(10, 25, 47, 0.9);
  --border-light: rgba(255, 255, 255, 0.08); /* White border in dark mode */
  --border-focus: rgba(212, 175, 55, 0.5);
  
  --primary: hsl(43, 90%, 55%); /* Shiny Gold remains bright! */
  --primary-hover: hsl(40, 95%, 50%);
  --primary-glow: rgba(212, 175, 55, 0.35);
  
  --accent: hsl(205, 90%, 85%); /* Glowing light baby blue accent */
  --accent-hover: hsl(205, 90%, 95%);
  --accent-glow: rgba(255, 255, 255, 0.15);
  
  --success: hsl(142, 70%, 45%);
  --warning: hsl(38, 90%, 50%);
  --danger: hsl(350, 80%, 55%);
  
  --text-primary: hsl(205, 90%, 96%); /* Light baby blue for dark mode primary contrast */
  --text-secondary: hsl(205, 45%, 85%); /* High contrast slate baby blue for readability */
  --text-muted: hsl(205, 30%, 72%); /* Accessible bright baby blue for secondary labels */
  
  /* Charcoal grays for inner highlights in dark mode */
  --bg-card-inner: hsl(217, 12%, 14%);
  --bg-card-inner-hover: hsl(217, 12%, 18%);
  --bg-marketing: hsl(217, 12%, 14%);
  --bg-marketing-hover: hsl(217, 12%, 18%);
  --bg-footer: hsl(217, 12%, 14%);
  --bg-header: hsl(217, 12%, 14%);
}

/* Floating Glassmorphic Theme Toggle Button */
.theme-toggle-btn {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(10, 25, 47, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  transform: scale(1.1) rotate(-15deg);
  border-color: var(--primary);
  box-shadow: 0 12px 24px rgba(212, 175, 55, 0.3);
  color: var(--primary);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  transition: fill 0.3s ease, stroke 0.3s ease;
}

/* SVG Toggle States (Light vs Dark visibility) */
.theme-toggle-btn .sun-icon {
  display: none;
}

.theme-toggle-btn .moon-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle-btn .sun-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle-btn .moon-icon {
  display: none;
}

/* Adjust orbs in dark mode for subtler backdrop glow */
[data-theme="dark"] .glow-orb {
  opacity: 0.15;
}

/* Make forms and inputs pop beautifully in dark mode */
[data-theme="dark"] .form-input {
  background: hsl(217, 12%, 10%);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .form-input:focus {
  background: hsl(217, 12%, 14%);
  border-color: var(--primary);
}

[data-theme="dark"] .drop-zone {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Tooltip Custom styling */
.theme-toggle-btn::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: rgba(10, 25, 47, 0.95);
  color: hsl(205, 90%, 96%);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 12px rgba(10, 25, 47, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-toggle-btn::after {
  content: '';
  position: absolute;
  right: 54px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(10, 25, 47, 0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.theme-toggle-btn:hover::before,
.theme-toggle-btn:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Tooltip dark mode adaptations */
[data-theme="dark"] .theme-toggle-btn::before {
  background: rgba(255, 255, 255, 0.98);
  color: hsl(217, 85%, 15%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(10, 25, 47, 0.1);
}

[data-theme="dark"] .theme-toggle-btn::after {
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.98);
}

/* Pipeline Support Callout Box */
.pipeline-support-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(212, 175, 55, 0.06);
  border: 1px dashed rgba(212, 175, 55, 0.4);
  border-radius: var(--border-radius-md);
  padding: 14px 18px;
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.05);
}

.pipeline-support-callout:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.15);
}

.pipeline-support-callout a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.pipeline-support-callout a:hover {
  color: var(--primary-hover);
}

.pipeline-support-icon {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
  animation: pulseGlow 2s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(212, 175, 55, 0.3)); }
  100% { transform: scale(1.08); filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.6)); }
}

[data-theme="dark"] .pipeline-support-callout {
  background: rgba(212, 175, 55, 0.05);
  border-color: rgba(212, 175, 55, 0.3);
  color: var(--text-secondary);
}

[data-theme="dark"] .pipeline-support-callout a {
  color: var(--accent);
}

/* ==========================================================================
   App Loader & Screen FOUC Shield
   ========================================================================== */
.app-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.app-loader.hidden-fade {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: fadeIn 0.5s ease-out;
}

.loader-logo {
  animation: pulseLogo 2s infinite ease-in-out;
  filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.3));
}

@keyframes pulseLogo {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.3)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 25px rgba(212, 175, 55, 0.5)); }
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3.5px solid var(--border-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

.loader-text {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

/* ==========================================================================
   Glassmorphic Toast Notifications System
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 380px;
  width: calc(100vw - 48px);
}

.toast-card {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px) saturate(190%);
  -webkit-backdrop-filter: blur(14px) saturate(190%);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  box-shadow: 0 10px 30px rgba(10, 25, 47, 0.08);
  overflow: hidden;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  transform: translateX(120%);
  opacity: 0;
}

[data-theme="dark"] .toast-card {
  background: rgba(10, 25, 47, 0.75);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.toast-enter {
  transform: translateX(0);
  opacity: 1;
}

.toast-exit {
  transform: translateX(120%);
  opacity: 0;
}

.toast-body {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 14px;
}

.toast-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.toast-icon {
  width: 18px;
  height: 18px;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-message {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--transition-smooth);
  opacity: 0.6;
}

.toast-close:hover {
  opacity: 1;
  background: rgba(10, 25, 47, 0.05);
}

[data-theme="dark"] .toast-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Toast Progress Bar animation */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--primary);
  animation: shrinkProgress 3s linear forwards;
  transform-origin: left;
}

@keyframes shrinkProgress {
  0% { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}

/* Status-Specific Theme Modifications */
.toast-success {
  border-left: 4px solid var(--success);
}
.toast-success .toast-icon-wrapper {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}
.toast-success .toast-progress {
  background: var(--success);
}

.toast-failed {
  border-left: 4px solid #EF4444;
}
.toast-failed .toast-icon-wrapper {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
}
.toast-failed .toast-progress {
  background: #EF4444;
}

.toast-converting {
  border-left: 4px solid var(--accent);
}
.toast-converting .toast-icon-wrapper {
  background: rgba(212, 175, 55, 0.15);
  color: hsl(43, 90%, 40%);
}
.toast-converting .toast-progress {
  background: var(--primary);
}
.toast-spin {
  animation: spin 2s infinite linear;
}

.toast-warning {
  border-left: 4px solid var(--warning);
}
.toast-warning .toast-icon-wrapper {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}
.toast-warning .toast-progress {
  background: var(--warning);
}

.toast-info {
  border-left: 4px solid var(--accent);
}
.toast-info .toast-icon-wrapper {
  background: rgba(10, 25, 47, 0.08);
  color: var(--accent);
}
.toast-info .toast-progress {
  background: var(--accent);
}

[data-theme="dark"] .toast-info .toast-icon-wrapper {
  background: rgba(255, 255, 255, 0.08);
  color: hsl(205, 90%, 80%);
}
[data-theme="dark"] .toast-info .toast-progress {
  background: hsl(205, 90%, 80%);
}


