/* Printibly Customer Portal — modern SaaS aesthetic.
   Deep purple + orange, animated gradient backgrounds, micro-interactions.
   Reference: Linear · Stripe · Apple · Squadlocker.
   ─────────────────────────────────────────────────────────────────────── */

:root {
  --bg: #f8f7fb;
  --bg-2: #f1eef7;
  --surface: #ffffff;
  --surface-2: #f5f3f9;
  --surface-3: #efecf7;
  --border: #e6e2ed;
  --border-strong: #cbc4d6;
  --text: #0f0a1e;
  --text-2: #3d3454;
  --text-3: #6b6386;
  --text-4: #9a94ab;
  --purple: #6d28d9;
  --purple-2: #5b21b6;
  --purple-3: #4c1d95;
  --purple-4: #8b5cf6;
  --purple-tint: #ede9fe;
  --purple-glow: rgba(109, 40, 217, .18);
  --orange: #f97316;
  --orange-2: #ea580c;
  --orange-tint: #ffedd5;
  --orange-glow: rgba(249, 115, 22, .22);
  --green: #16a34a;
  --green-tint: #dcfce7;
  --amber: #d97706;
  --amber-tint: #fef3c7;
  --red: #dc2626;
  --red-tint: #fee2e2;
  --blue: #0284c7;
  --blue-tint: #e0f2fe;
  --shadow-xs: 0 1px 2px rgba(15, 10, 30, .04);
  --shadow-sm: 0 2px 6px rgba(15, 10, 30, .06);
  --shadow: 0 8px 24px rgba(15, 10, 30, .08);
  --shadow-lg: 0 24px 60px rgba(15, 10, 30, .14);
  --shadow-purple: 0 10px 32px rgba(109, 40, 217, .28);
  --shadow-orange: 0 10px 32px rgba(249, 115, 22, .32);
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: 220ms var(--ease);
  --transition-slow: 400ms var(--ease);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* ── Animated background blobs ───────────────────────────────────────── */
body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .55;
  animation: blob-float 22s ease-in-out infinite alternate;
}
body::before {
  width: 520px;
  height: 520px;
  top: -180px;
  left: -160px;
  background: radial-gradient(circle, var(--purple-4), transparent 70%);
}
body::after {
  width: 480px;
  height: 480px;
  top: 40%;
  right: -180px;
  background: radial-gradient(circle, var(--orange), transparent 70%);
  animation-delay: -8s;
  opacity: .28;
}
@keyframes blob-float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.1); }
  100% { transform: translate(-30px, -40px) scale(.95); }
}

a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }

/* ── App shell ───────────────────────────────────────────────────────── */
.app { min-height: 100vh; display: flex; flex-direction: column; position: relative; z-index: 1; }
.app-header {
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  background: rgba(248, 247, 251, .78);
  border-bottom: 1px solid rgba(230, 226, 237, .6);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -.01em;
  transition: transform var(--transition);
}
.brand:hover { text-decoration: none; transform: translateX(-2px); }
.brand-mark-svg {
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 11px;
  box-shadow: 0 8px 20px rgba(109, 40, 217, .3);
  transition: transform var(--transition);
}
.brand:hover .brand-mark-svg {
  transform: rotate(-4deg) scale(1.02);
}
@keyframes shimmer {
  0%, 45% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(100%); }
}
.brand-name { background: linear-gradient(120deg, var(--text) 40%, var(--purple-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.app-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}
.app-nav-name {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 600;
}
.app-nav-btn {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}
.app-nav-btn:hover { border-color: var(--purple); color: var(--purple); background: var(--purple-tint); }

.app-main {
  flex: 1;
  padding: 40px 24px 80px;
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
  position: relative;
}

.app-footer {
  border-top: 1px solid rgba(230, 226, 237, .6);
  padding: 24px;
  color: var(--text-4);
  font-size: 12px;
  background: rgba(248, 247, 251, .5);
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.app-footer a { color: var(--text-3); }
.app-footer a:hover { color: var(--purple); }

/* ── Loading ─────────────────────────────────────────────────────────── */
.loading-veil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 247, 251, .7);
  backdrop-filter: blur(4px);
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}
.loading-veil.show { opacity: 1; pointer-events: all; }
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--surface-2);
  border-top-color: var(--purple);
  border-right-color: var(--purple-4);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── View entrance ───────────────────────────────────────────────────── */
.view { animation: view-in 500ms var(--ease); }
@keyframes view-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Landing view ────────────────────────────────────────────────────── */
.view-landing {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: 70vh;
}
.hero {
  animation: view-in 600ms var(--ease);
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--purple-tint);
  color: var(--purple);
  border-radius: 24px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 22px;
  border: 1px solid rgba(109, 40, 217, .12);
}
.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
  animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(109, 40, 217, .6); }
  50% { box-shadow: 0 0 0 6px rgba(109, 40, 217, 0); }
}
.hero-title {
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.02;
  margin: 0 0 20px;
}
.hero-title-accent {
  background: linear-gradient(120deg, var(--purple-2) 20%, var(--orange) 55%, var(--purple-4));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 8s ease-in-out infinite;
  display: inline;
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero-sub {
  color: var(--text-3);
  font-size: 17px;
  margin: 0 0 32px;
  max-width: 460px;
  line-height: 1.55;
}
.hero-value-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 0;
  padding: 0;
  list-style: none;
}
.hero-value-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--text-2);
  font-weight: 600;
}
.hero-value-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--purple-tint), var(--surface));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.card {
  background: var(--surface);
  border: 1px solid rgba(230, 226, 237, .6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.auth-card {
  animation: card-in 700ms var(--ease-back) both;
  animation-delay: 100ms;
  position: relative;
  isolation: isolate;
}
.auth-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(109, 40, 217, .3), rgba(249, 115, 22, .2), rgba(139, 92, 246, .35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: .9;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-3);
  cursor: pointer;
  transition: all var(--transition);
}
.auth-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }

.auth-form { display: flex; flex-direction: column; gap: 18px; }
/* HTML5 [hidden] would normally set display:none, but the .auth-form
   display:flex above wins specificity — restore explicitly. */
.auth-form[hidden] { display: none; }
.magic-desc { color: var(--text-3); font-size: 13px; margin: 0; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.field-input {
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  transition: all var(--transition);
  outline: none;
}
.field-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px var(--purple-glow);
}
.field-input::placeholder { color: var(--text-4); }

.form-hint {
  color: var(--text-4);
  font-size: 12px;
  margin: 0;
  text-align: center;
}

.btn {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 13px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--purple-4) 0%, var(--purple-2) 55%, var(--purple-3));
  color: #fff;
  box-shadow: var(--shadow-purple);
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.25) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 600ms var(--ease);
  z-index: -1;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(109, 40, 217, .38);
}
.btn-primary:hover:not(:disabled)::before { transform: translateX(100%); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--purple); color: var(--purple); background: var(--purple-tint); }
.btn-orange {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-2));
  color: #fff;
  box-shadow: var(--shadow-orange);
}
.btn-orange:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(249, 115, 22, .4); }
.btn-block { width: 100%; }
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
.btn.loading .btn-label { visibility: hidden; }
.btn.loading .btn-spinner { display: inline-block !important; position: absolute; }
.btn-link {
  background: transparent;
  border: 0;
  color: var(--purple);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all var(--transition);
  align-self: center;
}
.btn-link:hover { background: var(--purple-tint); }

.link-back {
  background: transparent;
  border: 0;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 20px;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.link-back:hover { color: var(--purple); transform: translateX(-3px); }

/* ── Verify view ─────────────────────────────────────────────────────── */
.view-verify { max-width: 460px; margin: 40px auto 0; }
.verify-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.02em;
  margin: 0 0 8px;
  color: var(--text);
}
.verify-sub {
  color: var(--text-3);
  font-size: 14px;
  margin: 0 0 28px;
}
.verify-sub strong { color: var(--text); }
.code-input {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}
.code-digit {
  width: 48px;
  height: 60px;
  text-align: center;
  font-size: 26px;
  font-weight: 900;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  outline: none;
  transition: all var(--transition);
}
.code-digit:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px var(--purple-glow);
  transform: scale(1.04);
}
.code-digit.filled {
  border-color: var(--purple);
  background: var(--purple-tint);
  animation: bounce-in 350ms var(--ease-back);
}
@keyframes bounce-in {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ── Dashboard view ──────────────────────────────────────────────────── */
.section-head { margin-bottom: 32px; }
.section-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -.025em;
  margin: 0 0 6px;
  background: linear-gradient(120deg, var(--text) 30%, var(--purple-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-sub { color: var(--text-3); margin: 0; font-size: 15px; }

.order-list { display: flex; flex-direction: column; gap: 14px; }

.order-card {
  background: var(--surface);
  border: 1px solid rgba(230, 226, 237, .6);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
  animation: card-stagger 450ms var(--ease) both;
}
.order-card:nth-child(1) { animation-delay: 40ms; }
.order-card:nth-child(2) { animation-delay: 100ms; }
.order-card:nth-child(3) { animation-delay: 160ms; }
.order-card:nth-child(4) { animation-delay: 220ms; }
.order-card:nth-child(5) { animation-delay: 280ms; }
.order-card:nth-child(n+6) { animation-delay: 320ms; }
@keyframes card-stagger {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.order-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--purple-4), var(--purple-2));
  opacity: 0;
  transition: opacity var(--transition);
}
.order-card:hover {
  border-color: var(--purple);
  box-shadow: var(--shadow), 0 0 0 4px var(--purple-glow);
  transform: translateY(-2px);
}
.order-card:hover::after { opacity: 1; }

.order-card-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--purple-tint), var(--surface));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.order-card-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.order-card-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}
.order-card-num {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
}
.order-card-date { color: var(--text-3); font-size: 12px; font-weight: 600; }
.order-card-summary { color: var(--text-3); font-size: 13px; }
.order-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 140px;
}
.order-card-total {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
}

/* Status pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 22px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
  text-transform: uppercase;
}
.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px currentColor;
  --pulse-color: currentColor;
  opacity: 1;
}
.pill-awaiting-proof { background: var(--surface-3); color: var(--text-2); }
.pill-awaiting-approval { background: var(--amber-tint); color: var(--amber); }
.pill-awaiting-approval .pill-dot { animation: pill-pulse 1.6s ease-in-out infinite; }
.pill-revisions { background: var(--orange-tint); color: var(--orange-2); }
.pill-revisions .pill-dot { animation: pill-pulse 1.6s ease-in-out infinite; }
.pill-in-queue { background: var(--blue-tint); color: var(--blue); }
.pill-printing { background: var(--purple-tint); color: var(--purple); }
.pill-printing .pill-dot { animation: pill-pulse 1.4s ease-in-out infinite; }
.pill-dispatched { background: var(--green-tint); color: var(--green); }
.pill-cancelled { background: var(--red-tint); color: var(--red); }
.pill-connect { background: #ede9fe; color: #7c3aed; }
@keyframes pill-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,0,0,.15); transform: scale(1); }
  50% { box-shadow: 0 0 0 5px transparent; transform: scale(1.25); }
}

/* ── Order detail view ───────────────────────────────────────────────── */
.detail-hero {
  background: linear-gradient(135deg, var(--surface) 0%, var(--purple-tint) 90%);
  border: 1px solid rgba(230, 226, 237, .6);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.detail-hero::before {
  content: '';
  position: absolute;
  top: -140px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, .18), transparent 70%);
  pointer-events: none;
}
.detail-head {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.detail-title {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -.03em;
  margin: 0 0 4px;
  line-height: 1;
}
.detail-date { color: var(--text-3); font-size: 14px; font-weight: 600; }
.detail-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  gap: 24px;
}
.detail-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.detail-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* Status pipeline — hero version */
.pipeline {
  background: var(--surface);
  border: 1px solid rgba(230, 226, 237, .6);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0 0;
  box-shadow: var(--shadow-xs);
  position: relative;
  z-index: 1;
}
.pipeline-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 0 0 18px;
}
.pipeline-stages {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.pipeline-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding: 0 8px;
  min-width: 88px;
}
.pipeline-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-4);
  font-size: 20px;
  transition: all var(--transition);
}
.pipeline-label {
  font-size: 12px;
  color: var(--text-4);
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
}
.pipeline-stage.done .pipeline-icon {
  background: linear-gradient(135deg, var(--green-tint), #bbf7d0);
  border-color: var(--green);
  color: var(--green);
  transform: scale(1);
}
.pipeline-stage.done .pipeline-label { color: var(--text-2); }
.pipeline-stage.active .pipeline-icon {
  background: linear-gradient(135deg, var(--purple-4), var(--purple-2));
  border-color: var(--purple);
  color: #fff;
  animation: pipeline-glow 2.2s ease-in-out infinite;
  box-shadow: 0 10px 24px var(--purple-glow);
}
.pipeline-stage.active .pipeline-label {
  color: var(--purple-2);
  font-weight: 800;
}
.pipeline-connector {
  height: 3px;
  min-width: 20px;
  flex: 1;
  background: var(--border);
  transition: background var(--transition);
  align-self: center;
  margin-top: 24px;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.pipeline-connector.done {
  background: linear-gradient(90deg, var(--green), #22c55e);
}
.pipeline-connector.progressing {
  background: linear-gradient(90deg, var(--green) 0%, var(--purple-4) 100%);
  background-size: 200% 100%;
  animation: connector-flow 2.5s ease-in-out infinite;
}
@keyframes connector-flow {
  0% { background-position: 100% 0; }
  100% { background-position: 0% 0; }
}
@keyframes pipeline-glow {
  0%, 100% {
    box-shadow: 0 10px 24px var(--purple-glow), 0 0 0 0 rgba(109, 40, 217, .4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 12px 30px rgba(109, 40, 217, .5), 0 0 0 10px transparent;
    transform: scale(1.05);
  }
}

/* Info cards */
.info-card {
  background: var(--surface);
  border: 1px solid rgba(230, 226, 237, .6);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
}
.info-card:hover { box-shadow: var(--shadow-sm); }
.info-card-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 0 0 14px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.info-row:last-child { border-bottom: 0; padding-bottom: 0; }
.info-label { color: var(--text-3); font-weight: 500; }
.info-value { color: var(--text); font-weight: 700; text-align: right; }
.info-value a { color: var(--purple); }

/* Callout — Express shipping education */
.callout {
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.55;
  border: 1px solid transparent;
}
.callout-info {
  background: linear-gradient(135deg, var(--blue-tint), #e0f2fe);
  color: #075985;
  border-color: rgba(2, 132, 199, .18);
}
.callout-warn {
  background: linear-gradient(135deg, var(--amber-tint), #fef3c7);
  color: #78350f;
  border-color: rgba(217, 119, 6, .22);
}
.callout-success {
  background: linear-gradient(135deg, var(--green-tint), #d1fae5);
  color: #14532d;
  border-color: rgba(22, 163, 74, .22);
}
.callout-icon { font-size: 20px; flex-shrink: 0; line-height: 1.2; }
.callout-body { flex: 1; }
.callout-body strong { display: block; margin-bottom: 4px; font-weight: 800; font-size: 14px; }

/* Proof cards */
.proof-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  transition: all var(--transition);
}
.proof-card:hover { border-color: var(--purple); background: var(--purple-tint); }
.proof-card-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.proof-card-body { flex: 1; min-width: 0; }
.proof-card-title { font-size: 14px; font-weight: 700; margin: 0 0 3px; }
.proof-card-meta { font-size: 12px; color: var(--text-3); }

/* Garment table */
.garment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.garment-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  border: 1px solid transparent;
  transition: all var(--transition);
}
.garment-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #fff, var(--surface-3)) center/cover no-repeat;
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.garment-thumb-placeholder { font-size: 22px; opacity: .5; }
.garment-body { min-width: 0; }
.garment-qty {
  color: var(--purple);
  font-weight: 900;
  background: var(--purple-tint);
  padding: 1px 8px;
  border-radius: 8px;
  font-size: 12px;
  margin-right: 4px;
}
.garment-row:hover { border-color: var(--border); background: var(--surface-3); }
.garment-title { font-weight: 700; color: var(--text); }
.garment-variant { color: var(--text-3); font-size: 12px; margin-top: 1px; }
.garment-status {
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--surface-3);
  color: var(--text-3);
  white-space: nowrap;
}
.garment-status[data-status="Dispatched"], .garment-status[data-status="Ready for pickup"] { background: var(--green-tint); color: var(--green); }
.garment-status[data-status="Printed"] { background: var(--purple-tint); color: var(--purple); }
.garment-status[data-status="Pre-pressed"] { background: var(--purple-tint); color: var(--purple); }
.garment-status[data-status="In queue"] { background: var(--blue-tint); color: var(--blue); }
.garment-status[data-status="Cancelled"] { background: var(--red-tint); color: var(--red); }

/* Reorder CTA card */
.reorder-cta-card {
  background:
    radial-gradient(circle at 90% 20%, rgba(249, 115, 22, .18), transparent 55%),
    linear-gradient(135deg, var(--purple-2) 0%, var(--purple-3) 60%, #7c3aed);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-purple);
}
.reorder-cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 100%, rgba(255,255,255,.14), transparent 60%);
  pointer-events: none;
}
.reorder-cta-card p { position: relative; z-index: 1; }
.reorder-cta-title { font-size: 15px; font-weight: 800; margin: 0 0 4px; }
.reorder-cta-sub { font-size: 13px; color: rgba(255,255,255,.85); margin: 0 0 14px; }
.reorder-cta-btn {
  display: block;
  background: #fff;
  color: var(--purple-2);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
  z-index: 1;
  border: 0;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
}
.reorder-cta-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 24px rgba(0,0,0,.15); text-decoration: none; }

/* Reorder editor */
.reorder-body { display: flex; flex-direction: column; gap: 22px; max-width: 780px; margin: 0 auto; }
.reorder-intro { color: var(--text-3); font-size: 15px; margin: 0; }
.reorder-item {
  background: var(--surface);
  border: 1px solid rgba(230, 226, 237, .6);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  gap: 18px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
  animation: card-stagger 450ms var(--ease) both;
}
.reorder-item:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.reorder-item-thumb {
  width: 92px;
  height: 92px;
  border-radius: var(--radius);
  background: var(--surface-2) center/cover no-repeat;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.reorder-item-body { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.reorder-item-title { font-size: 15px; font-weight: 800; margin: 0; }
.reorder-item-variant { font-size: 13px; color: var(--text-3); margin: 0; }
.reorder-item-print {
  font-size: 12px;
  color: var(--purple);
  background: var(--purple-tint);
  padding: 5px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-weight: 700;
  border: 1px solid rgba(109, 40, 217, .1);
}
.reorder-qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 3px;
  border: 1px solid var(--border);
}
.qty-btn {
  width: 34px;
  height: 34px;
  border: 0;
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.qty-btn:hover { background: var(--purple-tint); color: var(--purple); transform: scale(1.05); }
.qty-btn:active { transform: scale(.95); }
.qty-input {
  width: 52px;
  text-align: center;
  border: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 800;
  font-family: inherit;
  color: var(--text);
  outline: none;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input[type=number] { -moz-appearance: textfield; }

.reorder-total-bar {
  position: sticky;
  bottom: 20px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2));
  border: 1px solid rgba(230, 226, 237, .6);
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(20px);
  z-index: 10;
}
.reorder-total-est {
  display: flex;
  flex-direction: column;
}
.reorder-total-est span {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.reorder-total-est strong {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -.02em;
  transition: color var(--transition);
}
.reorder-total-est strong.bump { animation: total-bump 400ms var(--ease-back); color: var(--purple-2); }
@keyframes total-bump {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Empty state */
.view-empty { display: flex; justify-content: center; align-items: center; min-height: 400px; }
.empty-state {
  text-align: center;
  max-width: 440px;
  padding: 40px;
  animation: view-in 600ms var(--ease);
}
.empty-icon {
  font-size: 72px;
  margin-bottom: 20px;
  display: inline-block;
  animation: gentle-float 3s ease-in-out infinite;
}
@keyframes gentle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.empty-title { font-size: 26px; font-weight: 900; letter-spacing: -.02em; margin: 0 0 10px; }
.empty-sub { color: var(--text-3); margin: 0 0 28px; font-size: 15px; }

/* Toasts */
.toast-host {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--text);
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  animation: toast-in .4s var(--ease-back);
  pointer-events: all;
  border: 1px solid rgba(255,255,255,.06);
}
.toast-error { background: linear-gradient(135deg, var(--red), #b91c1c); }
.toast-success { background: linear-gradient(135deg, var(--green), #15803d); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(20px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── ETA card ────────────────────────────────────────────────────────── */
.eta-card {
  margin: 20px 0 0;
  padding: 16px 18px;
  background: linear-gradient(135deg, #fff, #fef3c7 100%);
  border: 1px solid rgba(217, 119, 6, .18);
  border-radius: var(--radius);
  display: flex;
  gap: 14px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.eta-icon { font-size: 28px; line-height: 1; }
.eta-label { font-size: 11px; font-weight: 800; color: var(--amber); text-transform: uppercase; letter-spacing: .1em; }
.eta-value { font-size: 16px; font-weight: 800; color: var(--text); }

/* ── Timeline ────────────────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 14px; position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: linear-gradient(180deg, var(--purple-4), var(--purple-tint));
  border-radius: 2px;
}
.timeline-row {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--purple-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}
.timeline-label { font-size: 13.5px; font-weight: 700; color: var(--text); }
.timeline-when { font-size: 12px; color: var(--text-3); }

/* ── Tracking card ───────────────────────────────────────────────────── */
.tracking-card {
  background: linear-gradient(135deg, #fff, #dcfce7 100%);
  border-color: rgba(22, 163, 74, .2);
}

/* ── Detail price block ──────────────────────────────────────────────── */
.detail-price-block { text-align: right; }
.detail-price-label {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 3px;
}

/* ── Help grid ───────────────────────────────────────────────────────── */
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.help-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
}
.help-tile:hover {
  border-color: var(--purple);
  background: var(--purple-tint);
  color: var(--purple-2);
  text-decoration: none;
  transform: translateY(-1px);
}
.help-tile-icon { font-size: 18px; line-height: 1; }
.help-tile-title { flex: 1; line-height: 1.25; }

/* ── Artwork downloads ───────────────────────────────────────────────── */
.artwork-link {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}
.artwork-link:hover {
  border-color: var(--purple);
  background: var(--purple-tint);
  color: var(--purple);
  text-decoration: none;
}

/* ── Modal ───────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 30, .55);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .22s var(--ease);
}
.modal-overlay.open { opacity: 1; }
.modal-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: scale(.95);
  transition: transform .32s var(--ease-back);
  max-height: 88vh;
  overflow-y: auto;
}
.modal-overlay.open .modal-card { transform: scale(1); }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 0;
  background: var(--surface-2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-3);
  font-size: 15px;
  font-weight: 700;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--text); color: #fff; }
.modal-hero-emoji { font-size: 44px; text-align: center; margin-bottom: 6px; }
.modal-title { font-size: 24px; font-weight: 900; margin: 0 0 8px; text-align: center; letter-spacing: -.02em; }
.modal-sub { color: var(--text-3); margin: 0 0 24px; text-align: center; font-size: 14px; }
.care-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.care-list li {
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
  border: 1px solid var(--border);
}
.care-list strong { color: var(--text); font-weight: 800; }
.modal-footnote {
  text-align: center;
  font-size: 13px;
  color: var(--purple);
  font-weight: 700;
  margin: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .view-landing { grid-template-columns: 1fr; gap: 32px; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .app-main { padding: 24px 16px 60px; }
  .card { padding: 24px; }
  .code-digit { width: 44px; height: 56px; font-size: 22px; }
  .order-card { grid-template-columns: auto 1fr; gap: 14px; padding: 18px; }
  .order-card-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; width: 100%; min-width: 0; }
  .help-grid { grid-template-columns: 1fr; }
  .modal-card { padding: 24px; }
  .detail-hero { padding: 22px; border-radius: var(--radius-lg); }
  .detail-title { font-size: 26px; }
  .pipeline { padding: 16px; }
  .pipeline-stages { gap: 2px; }
  .pipeline-stage { min-width: 68px; padding: 0 4px; }
  .pipeline-icon { width: 38px; height: 38px; font-size: 16px; }
  .pipeline-label { font-size: 10.5px; }
  .pipeline-connector { min-width: 8px; margin-top: 19px; }
  .reorder-item { flex-direction: column; padding: 16px; }
  .reorder-item-thumb { width: 100%; height: 150px; }
  .reorder-total-bar { padding: 14px 16px; flex-direction: column; align-items: stretch; }
  .reorder-total-est { align-items: center; text-align: center; }
}
