/**
 * ReturnClaw — Styles v1.0.0
 * Copyright (c) 2026 Kelley Hunt, PLLC. All rights reserved.
 * Created with Perplexity Computer
 */

/* ============================================================
   ReturnClaw — Combined Landing Page + Demo
   Enterprise-grade dark theme with micro-animations
   ============================================================ */

/* ============================================================
   SECTION 1: LANDING PAGE STYLES
   ============================================================ */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #09090b;
  --surface: rgba(24, 24, 27, 0.5);
  --surface-solid: #18181b;
  --surface-elevated: #1c1c20;
  --border: #27272a;
  --border-light: #3f3f46;
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-dim: rgba(16, 185, 129, 0.15);
  --accent-glow: rgba(16, 185, 129, 0.3);
  --violet: #8b5cf6;
  --violet-dim: rgba(139, 92, 246, 0.15);
  --violet-glow: rgba(139, 92, 246, 0.4);
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-dim: #52525b;
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.15);
  --yellow: #eab308;
  --yellow-dim: rgba(234, 179, 8, 0.15);
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.15);

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;

  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Landing Section Wrapper === */
.landing-section {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Landing Hero === */
.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.landing-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(16, 185, 129, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 30% 70%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.landing-brand {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 2rem;
  position: relative;
}

.landing-orb-container {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-base);
}

.landing-orb-container:hover {
  transform: scale(1.05);
}

.landing-orb-container:active {
  transform: scale(0.98);
}

.landing-orb {
  position: relative;
  width: 120px;
  height: 120px;
}

.landing-orb-core {
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.4;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.landing-orb-container:hover .landing-orb-core {
  opacity: 0.6;
  transform: scale(1.15);
}

.landing-orb-container:active .landing-orb-core {
  transform: scale(0.95);
}

.landing-orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(16, 185, 129, 0.2);
}

.landing-orb-container:hover .landing-orb-ring {
  border-color: rgba(16, 185, 129, 0.4);
}

.landing-orb-ring:nth-child(1) {
  animation: pulse-ring 3s ease-in-out infinite;
}

.landing-orb-ring:nth-child(2) {
  animation: pulse-ring 3s ease-in-out infinite 0.5s;
  transform: scale(0.85);
}

.landing-orb-ring:nth-child(3) {
  animation: pulse-ring 3s ease-in-out infinite 1s;
  transform: scale(0.7);
}

@keyframes pulse-ring {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.15); }
}

.landing-orb-cta {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0.7;
  transition: opacity var(--transition-base);
}

.landing-orb-container:hover .landing-orb-cta {
  opacity: 1;
  color: var(--accent);
}

.landing-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  position: relative;
}

.landing-hero h1 .accent {
  background: linear-gradient(135deg, var(--accent), #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  position: relative;
}

.landing-cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-base), transform var(--transition-fast), box-shadow var(--transition-base);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(16, 185, 129, 0.3);
}

.btn-primary.large {
  padding: 1rem 2.5rem;
  font-size: 1.0625rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-base);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* === Stats Bar === */
.landing-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.landing-stats .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.landing-stats .stat-number {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.landing-stats .stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.landing-stats .stat-text {
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* === How It Works === */
.landing-how-it-works {
  padding: 5rem 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
}

.landing-how-it-works h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}

.landing-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.landing-step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow), transform var(--transition-slow), border-color var(--transition-base), box-shadow var(--transition-base);
}

.landing-step-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.landing-step-card:hover {
  border-color: var(--border-light);
  background: var(--surface-elevated);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.landing-step-icon {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

.landing-step-num {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.landing-step-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.landing-step-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* === Architecture Diagram === */
.landing-architecture {
  padding: 5rem 1.5rem;
  max-width: 48rem;
  margin: 0 auto;
}

.landing-architecture h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.landing-architecture .section-subtitle {
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.arch-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.arch-layer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity var(--transition-slow), transform var(--transition-slow), border-color var(--transition-base), background var(--transition-base);
}

.arch-layer.visible {
  opacity: 1;
  transform: translateX(0);
}

.arch-layer:hover {
  border-color: var(--accent);
  background: var(--surface-elevated);
}

.arch-layer-num {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.arch-layer-content {
  flex: 1;
}

.arch-layer-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
}

.arch-layer-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* === Supported Retailers === */
.landing-retailers {
  padding: 5rem 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
}

.landing-retailers h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
}

.retailer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: center;
}

.retailer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition-base);
}

.retailer-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

/* === Voice Commands Table === */
.landing-commands {
  padding: 5rem 1.5rem;
  max-width: 48rem;
  margin: 0 auto;
}

.landing-commands h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
}

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

.commands-table th,
.commands-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.875rem;
}

.commands-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.commands-table td:first-child {
  color: var(--accent);
  font-weight: 500;
  font-style: italic;
}

.commands-table td:last-child {
  color: var(--text-secondary);
}

.commands-table tr {
  border-bottom: 1px solid var(--border);
}

.commands-table tbody tr:hover {
  background: var(--surface);
}

/* === The Moat === */
.landing-moat {
  padding: 5rem 1.5rem;
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

.landing-moat h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.landing-moat .moat-tagline {
  font-size: 0.875rem;
  color: var(--violet);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.landing-moat p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* === CTA to Demo === */
.landing-try-it {
  text-align: center;
  padding: 5rem 1.5rem;
}

.landing-try-it h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.landing-try-it p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* === Section Separator === */
.section-separator {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 1.5rem;
  max-width: 48rem;
  margin: 0 auto;
}

.separator-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.separator-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
}

/* === Scroll Animations === */
.landing-fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.landing-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Footer === */
.landing-footer {
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.landing-footer p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.landing-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.landing-footer a:hover { color: var(--accent); }

/* === Landing Responsive === */
@media (max-width: 768px) {
  .landing-hero {
    padding: 4rem 1.25rem 3rem;
    min-height: auto;
  }
  .landing-hero h1 { font-size: 1.75rem; }
  .landing-subtitle { font-size: 0.9375rem; }
  .landing-steps { grid-template-columns: 1fr; }
  .landing-stats {
    gap: 1.5rem;
    padding: 2rem 1rem;
  }
  .landing-stats .stat-number { font-size: 1.5rem; }
  .commands-table td, .commands-table th { padding: 0.625rem 0.5rem; font-size: 0.8125rem; }
  .landing-orb-container { width: 130px; height: 130px; }
  .landing-orb { width: 100px; height: 100px; }
}

@media (max-width: 480px) {
  .landing-hero h1 { font-size: 1.5rem; }
  .landing-cta-row { flex-direction: column; align-items: center; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; max-width: 280px; }
  .retailer-grid { gap: 0.5rem; }
  .retailer-badge { font-size: 0.75rem; padding: 0.375rem 0.75rem; }
}


/* ============================================================
   SECTION 2: DEMO APP STYLES
   ============================================================ */

/* Demo wrapper recreates the original body layout */
#demo-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto 2rem;
  height: 90vh;
  min-height: 600px;
  max-height: 900px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.03);
}

/* === Header === */
.header {
  position: relative;
  z-index: 10;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(9, 9, 11, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon { flex-shrink: 0; }

.logo-text {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  transition: all var(--transition-base);
  min-height: 32px;
}

.header-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* === Quick Action Bar === */
.quick-action-bar {
  display: flex;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: rgba(24, 24, 27, 0.3);
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.quick-action-bar::-webkit-scrollbar { display: none; }

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-base);
  min-height: 32px;
}

.quick-action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-1px);
}

.quick-action-btn:active {
  transform: scale(0.97);
}

.quick-action-btn svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.quick-action-btn:hover svg {
  opacity: 1;
}

/* === Main === */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  padding-bottom: 0.5rem;
}

.main::-webkit-scrollbar { width: 4px; }
.main::-webkit-scrollbar-track { background: transparent; }
.main::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

/* === Orb === */
.orb-area {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem 1.5rem;
  transition: all var(--transition-slow);
}

.orb-area.minimized {
  padding: 1rem 1rem 0.5rem;
}

.orb-area.minimized .orb {
  width: 44px;
  height: 44px;
  border-width: 1.5px;
}

.orb-area.minimized .orb-glow {
  width: 56px;
  height: 56px;
}

.orb-area.minimized .orb-mic-icon {
  width: 18px;
  height: 18px;
}

.orb-area.minimized .orb-label {
  font-size: 0.6875rem;
  margin-top: 0.25rem;
}

.orb-area.minimized .orb-ready-badge {
  display: none;
}

.orb-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.orb {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: radial-gradient(circle at 40% 35%, rgba(16, 185, 129, 0.12), transparent 60%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  z-index: 1;
  animation: orb-idle-pulse 3s ease-in-out infinite;
}

@keyframes orb-idle-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(16, 185, 129, 0.15); }
  50% { box-shadow: 0 0 24px rgba(16, 185, 129, 0.3); }
}

.orb:hover {
  transform: scale(1.05);
  border-color: #34d399;
  box-shadow: 0 0 32px rgba(16, 185, 129, 0.35);
}

.orb:active { transform: scale(0.97); }

.orb.listening {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 40px var(--accent-glow);
  animation: orb-listening 1.5s ease-in-out infinite;
}

.orb.speaking {
  border-color: var(--violet);
  background: var(--violet-dim);
  box-shadow: 0 0 40px var(--violet-glow);
  animation: orb-speaking 0.8s ease-in-out infinite alternate;
}

@keyframes orb-listening {
  0%, 100% { box-shadow: 0 0 30px var(--accent-glow); transform: scale(1); }
  50% { box-shadow: 0 0 50px var(--accent-glow); transform: scale(1.08); }
}

@keyframes orb-speaking {
  0% { box-shadow: 0 0 25px var(--violet-glow); transform: scale(1); }
  100% { box-shadow: 0 0 45px var(--violet-glow); transform: scale(1.05); }
}

.orb-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb-glow {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.orb:hover ~ .orb-glow,
.orb.listening ~ .orb-glow,
.orb.speaking ~ .orb-glow {
  opacity: 1;
}

.orb-mic-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
  transition: color var(--transition-base);
}

.orb.speaking .orb-mic-icon {
  color: var(--violet);
}

.orb-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  transition: all var(--transition-base);
}

.orb-ready-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.625rem;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  animation: ready-pulse 2s ease-in-out infinite;
}

@keyframes ready-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* === Pipeline === */
.pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0.75rem 1rem;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--transition-base), transform var(--transition-base);
  pointer-events: none;
}

.pipeline.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  position: relative;
}

.pipeline-step span {
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  transition: color var(--transition-base);
}

.pipeline-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-dim);
  transition: all var(--transition-base);
}

.pipeline-step.active .pipeline-icon {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.pipeline-step.done .pipeline-icon {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.pipeline-step.active span { color: var(--accent); }
.pipeline-step.done span { color: var(--accent); }

.pipeline-connector {
  width: 24px;
  height: 2px;
  background: var(--border);
  position: relative;
  margin-top: -14px;
  border-radius: 1px;
  overflow: hidden;
}

.pipeline-connector-fill {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}

.pipeline-step.done + .pipeline-connector .pipeline-connector-fill {
  transform: scaleX(1);
}

.pipeline-step.active + .pipeline-connector .pipeline-connector-fill {
  transform: scaleX(0.5);
}

/* === Chat Area === */
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-area::-webkit-scrollbar { width: 3px; }
.chat-area::-webkit-scrollbar-track { background: transparent; }
.chat-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

.message {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  animation: msg-in 0.3s ease-out;
}

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

.message.user {
  align-items: flex-end;
}

.message-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 0 0.25rem;
}

.message.agent .message-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 0.25rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-primary);
  max-width: 95%;
}

.message.user .message-bubble {
  background: var(--accent-dim);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-lg) var(--radius-lg) 0.25rem var(--radius-lg);
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-primary);
  max-width: 80%;
}

/* === Action Cards === */
.action-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-top: 0.375rem;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.action-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(24, 24, 27, 0.5);
}

.card-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.card-status-dot.green { background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }
.card-status-dot.red { background: var(--red); box-shadow: 0 0 6px rgba(239, 68, 68, 0.3); }
.card-status-dot.yellow { background: var(--yellow); box-shadow: 0 0 6px rgba(234, 179, 8, 0.3); }
.card-status-dot.blue { background: var(--blue); box-shadow: 0 0 6px rgba(59, 130, 246, 0.3); }

.card-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 0.875rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.375rem 0;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.card-row-label { color: var(--text-muted); }
.card-row-value { color: var(--text-primary); font-weight: 500; text-align: right; flex-shrink: 0; max-width: 60%; }

.card-divider {
  height: 1px;
  background: var(--border);
  margin: 0.625rem 0;
}

.card-conditions {
  margin-top: 0.375rem;
}

.card-conditions-title {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.375rem;
}

.card-conditions ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card-conditions li {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding-left: 1rem;
  position: relative;
}

.card-conditions li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--text-dim);
}

/* Buttons inside cards */
.card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 100%;
  padding: 0.625rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
}

.card-btn.primary {
  background: var(--accent);
  color: #fff;
}

.card-btn.primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.card-btn.secondary {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.card-btn.secondary:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.3);
}

.card-btn.outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.card-btn.outline:hover {
  border-color: var(--text-muted);
  color: var(--text-secondary);
  background: var(--surface);
}

.card-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.card-btn-icon { font-size: 1rem; }

.card-btn-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-top: 0.375rem;
}

.card-btn-row {
  display: flex;
  gap: 0.375rem;
}

.card-btn-row .card-btn { flex: 1; }

/* Gmail-style button */
.gmail-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.75rem;
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}

.gmail-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.gmail-btn svg { flex-shrink: 0; }

/* Outlook-style button */
.outlook-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.75rem;
  background: #0078d4;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}

.outlook-btn:hover {
  background: #106ebe;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Location card */
.location-item {
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
}

.location-item:last-child { border-bottom: none; }

.location-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.location-distance {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

.location-address {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.125rem;
}

.location-hours {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.location-link {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.location-link:hover { color: var(--accent-hover); }

/* Order card detail */
.order-detail {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.5rem 0;
}

.order-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.order-info {
  flex: 1;
  min-width: 0;
}

.order-item-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
}

.order-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Steps list */
.steps-list {
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.625rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* Summary card */
.summary-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.summary-label { color: var(--text-muted); }
.summary-value { color: var(--text-primary); font-weight: 500; }

/* Pickup confirmation */
.pickup-detail {
  padding: 0.625rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pickup-detail .pickup-line {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.pickup-detail .pickup-line strong {
  color: var(--text-primary);
}

/* === Typing Indicator === */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.25rem 0;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: typing-dot 1.2s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* === Shimmer Loading State === */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--border) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* === Input Bar === */
.input-bar {
  position: relative;
  z-index: 10;
  padding: 0.625rem 1rem;
  border-top: 1px solid var(--border);
  background: rgba(9, 9, 11, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.input-bar-inner {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.text-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  min-height: 44px;
}

.text-input::placeholder { color: var(--text-dim); }

.text-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.send-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

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

.footer-text {
  font-size: 0.625rem;
  color: var(--text-dim);
  text-align: center;
  padding-top: 0.5rem;
  line-height: 1.5;
}

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

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

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  transform: translateY(12px);
  transition: transform var(--transition-base);
}

.modal-overlay.visible .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.modal-close:hover {
  background: var(--surface);
  color: var(--text-primary);
}

.modal-body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-step {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.modal-step-num {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.modal-step h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.modal-step p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* === Return History Panel === */
.history-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: var(--surface-solid);
  border-left: 1px solid var(--border);
  z-index: 50;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-base);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
}

.history-panel.open {
  transform: translateX(0);
}

.history-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.history-panel-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.history-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.125rem;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.history-close-btn:hover {
  background: var(--surface);
  color: var(--text-primary);
}

.history-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-dim);
}

.history-empty p {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.history-empty span {
  font-size: 0.6875rem;
  color: var(--text-dim);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.75rem;
  transition: all var(--transition-base);
}

.history-item:hover {
  border-color: var(--border-light);
  background: var(--surface-elevated);
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.history-item-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.history-item-price {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.history-item-meta {
  font-size: 0.625rem;
  color: var(--text-muted);
}

.history-item-status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.375rem;
  padding: 0.125rem 0.5rem;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.5625rem;
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === Loading Spinner === */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* === Inline Inputs in Cards === */
.card-input-row {
  display: flex;
  gap: 0.375rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.card-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.625rem;
  font-size: 0.8125rem;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-base);
  min-height: 36px;
}

.card-input::placeholder { color: var(--text-dim); }
.card-input:focus { border-color: var(--accent); }

.card-input-btn {
  padding: 0.5rem 0.875rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-base);
  white-space: nowrap;
  min-height: 36px;
}

.card-input-btn:hover { background: var(--accent-hover); }

/* Simulated Gmail screen */
.gmail-sim {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  background: var(--bg);
  margin-bottom: 0.5rem;
}

.gmail-sim-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  font-size: 0.875rem;
}

.gmail-sim-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.gmail-sim-perms {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.gmail-sim-perms div {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.gmail-sim-perms .check {
  color: var(--accent);
  font-weight: bold;
}

.gmail-sim-spinner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================================
   ADDRESS FORM
   ============================================================ */
.address-form {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.address-row {
  display: flex;
  gap: 0.375rem;
}

.address-row .card-input { flex: 1; }

.address-row .card-input.sm { max-width: 5rem; }
.address-row .card-input.md { max-width: 8rem; }

.card-hint {
  font-size: 0.6875rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* ============================================================
   ORDER SELECTION
   ============================================================ */
.order-select-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.order-select-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--bg);
  min-height: 44px;
}

.order-select-item:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.order-select-item .order-thumb {
  width: 36px;
  height: 36px;
  font-size: 1.125rem;
}

.order-select-item .order-info {
  flex: 1;
  min-width: 0;
}

.order-select-item .order-meta {
  font-size: 0.6875rem;
}

.order-select-item .select-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.order-select-item:hover .select-indicator {
  border-color: var(--accent);
}

/* ============================================================
   RETURN REASON SELECTOR
   ============================================================ */
.reason-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.375rem;
}

.reason-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.625rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: left;
  min-height: 44px;
}

.reason-btn:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.reason-btn.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.reason-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* ============================================================
   REFUND OPTIONS
   ============================================================ */
.refund-option {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--bg);
  margin-bottom: 0.375rem;
  min-height: 44px;
}

.refund-option:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.refund-option-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.refund-option-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.refund-option-time {
  font-size: 0.6875rem;
  color: var(--accent);
  font-weight: 500;
}

/* ============================================================
   MULTI-ITEM RETURN
   ============================================================ */
.multi-item-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 0.625rem;
}

.multi-item-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  font-size: 0.8125rem;
}

.multi-item-check {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  cursor: pointer;
  transition: all var(--transition-base);
  color: transparent;
  flex-shrink: 0;
}

.multi-item-check.checked {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.multi-item-check.non-returnable {
  background: var(--red-dim);
  border-color: transparent;
  color: var(--red);
  cursor: default;
  font-weight: bold;
}

.multi-item-name {
  flex: 1;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-item-price {
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.multi-item-badge {
  font-size: 0.5625rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.multi-item-badge.eligible {
  background: var(--accent-dim);
  color: var(--accent);
}

.multi-item-badge.non-returnable {
  background: var(--red-dim);
  color: var(--red);
}

.multi-item-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 600;
}

.multi-item-total .total-label { color: var(--text-muted); }
.multi-item-total .total-value { color: var(--accent); }

/* ============================================================
   SMS TRACKING
   ============================================================ */
.sms-preview {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
}

.sms-msg {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.375rem 0;
}

.sms-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 0.375rem;
  flex-shrink: 0;
}

.sms-dot.green { background: var(--accent); }
.sms-dot.yellow { background: var(--yellow); }

.sms-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.sms-benefits {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sms-benefits li {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding-left: 0;
}

.sms-benefits li::before {
  content: '✓';
  color: var(--accent);
  font-weight: bold;
  font-size: 0.625rem;
}

/* ============================================================
   TRACKING DASHBOARD
   ============================================================ */
.tracking-timeline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  padding: 0 0.5rem;
  margin-bottom: 0.75rem;
}

.tracking-timeline::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 0.5rem;
  right: 0.5rem;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.tracking-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  position: relative;
  z-index: 1;
}

.tracking-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface-solid);
  border: 2px solid var(--border);
  transition: all var(--transition-base);
}

.tracking-dot.filled {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.tracking-dot.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: tracking-pulse 1.5s ease-in-out infinite;
}

@keyframes tracking-pulse {
  0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
  50% { box-shadow: 0 0 16px var(--accent-glow); }
}

.tracking-label {
  font-size: 0.5625rem;
  color: var(--text-dim);
  text-align: center;
  max-width: 60px;
  line-height: 1.3;
  font-weight: 500;
  transition: color var(--transition-base);
}

.tracking-dot.filled + .tracking-label,
.tracking-dot.active + .tracking-label {
  color: var(--accent);
}

/* Progress bar behind nodes */
.tracking-progress {
  position: absolute;
  top: 8px;
  left: 0.5rem;
  height: 2px;
  background: var(--accent);
  z-index: 0;
  transition: width var(--transition-slow);
  border-radius: 1px;
}

.tracking-detail-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  margin-bottom: 0.5rem;
}

.tracking-detail-grid .td-label { color: var(--text-muted); }
.tracking-detail-grid .td-value { color: var(--text-primary); font-weight: 500; }

.tracking-update {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.625rem;
  margin-bottom: 0.375rem;
}

.tracking-update-title {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.tracking-update-text {
  font-size: 0.8125rem;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
}

.tracking-update-loc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.refund-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.refund-status-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.refund-status-value {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--yellow);
}

.refund-expected {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

/* ============================================================
   EMAIL CONNECTED BADGE
   ============================================================ */
.email-connected {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--accent-dim);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.email-connected .check-icon {
  font-size: 1rem;
}

/* ============================================================
   PRIVACY NOTE
   ============================================================ */
.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  font-size: 0.6875rem;
  color: var(--text-dim);
  line-height: 1.4;
  margin-top: 0.375rem;
}

.privacy-note svg {
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* === Demo Mode Banner === */
.demo-banner {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  background: var(--yellow-dim);
  border: 1px solid rgba(234, 179, 8, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  color: var(--yellow);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* === Credit Card Protection Tip === */
.cc-protection-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  background: var(--blue-dim);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-md);
  margin-top: 0.375rem;
}

.cc-protection-tip-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.cc-protection-tip-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cc-protection-tip-text strong {
  color: var(--blue);
}

/* === Responsive Demo === */
@media (max-width: 768px) {
  #demo-wrapper {
    max-width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    height: 85vh;
    min-height: 550px;
  }

  .history-panel {
    width: 100%;
  }

  .quick-action-btn span {
    display: none;
  }

  .quick-action-btn {
    padding: 0.5rem;
    min-width: 44px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .reason-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-step span {
    font-size: 0.5rem;
  }

  .pipeline-connector {
    width: 16px;
  }

  .pipeline-icon {
    width: 24px;
    height: 24px;
  }

  .pipeline-icon svg {
    width: 12px;
    height: 12px;
  }
}

/* Fix for bottom safe area on iOS */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .input-bar {
    padding-bottom: calc(0.625rem + env(safe-area-inset-bottom));
  }
}

/* Ensure main has bottom padding for input bar */
.main {
  padding-bottom: 0.5rem;
}

/* Landing orb clickable enhancement */
.landing-orb-container {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
