:root {
  --bg: #080b14;
  --surface: rgba(15, 23, 42, 0.85);
  --border: rgba(99, 102, 241, 0.2);
  --accent: #6366f1;
  --accent2: #8b5cf6;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --success: #34d399;
  --error: #f87171;
  --radius: 16px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Background orbs ─────────────────────────────────────────────── */
.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: float 12s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: #6366f1; top: -150px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: #8b5cf6; bottom: -100px; right: -80px; animation-delay: 4s; }
.orb-3 { width: 300px; height: 300px; background: #06b6d4; top: 50%; left: 50%; animation-delay: 8s; opacity: 0.1; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

/* ── Layout ─────────────────────────────────────────────────────── */
.container {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ── Header ─────────────────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 32px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.logo em { color: var(--accent); font-style: normal; }
.badge {
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--border);
  color: #a5b4fc;
}

/* ── Hero ───────────────────────────────────────────────────────── */
.hero { text-align: center; margin-bottom: 32px; }
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #e2e8f0, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.hero p { color: var(--muted); font-size: 1.05rem; margin-bottom: 20px; }
.hero strong { color: var(--text); }
.trust-pills { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.trust-pills span {
  font-size: 0.8rem;
  padding: 5px 14px;
  border-radius: 99px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ── Steps ──────────────────────────────────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.step { display: flex; align-items: center; gap: 10px; }
.step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; flex-shrink: 0;
}
.step-info { display: flex; flex-direction: column; }
.step-info strong { font-size: 0.85rem; }
.step-info span { font-size: 0.75rem; color: var(--muted); }
.step-divider {
  width: 32px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0.4;
  border-radius: 2px;
}

/* ── Card ───────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* ── Form ───────────────────────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } .card { padding: 24px; } }

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.2px;
}
.req { color: var(--accent); }
.hint { font-size: 0.75rem; color: var(--muted); }

input[type="text"], input[type="email"], input[type="url"], input[type="number"] {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 11px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
input::placeholder { color: rgba(148,163,184,0.5); }

/* ── Toggle tabs ────────────────────────────────────────────────── */
.toggle-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 4px;
  margin-top: 4px;
}
.tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}
.tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.tab:not(.active):hover { color: var(--text); background: rgba(255,255,255,0.06); }

/* ── Input panels ───────────────────────────────────────────────── */
.input-panel { display: none; margin-bottom: 20px; }
.input-panel.active { display: block; }

/* ── Dropzone ───────────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed rgba(99, 102, 241, 0.35);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(99, 102, 241, 0.04);
  position: relative;
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
}
.dropzone.has-file { border-color: var(--success); background: rgba(52, 211, 153, 0.06); }
.dropzone-icon { font-size: 2rem; margin-bottom: 10px; }
.dropzone-text { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.dropzone-text strong { color: var(--accent); }
.dropzone-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 14px;
  background: rgba(52, 211, 153, 0.1);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--success);
}
.remove-file {
  background: rgba(248,113,113,0.2);
  border: none;
  border-radius: 50%;
  width: 22px; height: 22px;
  cursor: pointer;
  color: var(--error);
  font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.remove-file:hover { background: rgba(248,113,113,0.35); }

/* ── Line count input ───────────────────────────────────────────── */
.line-count-input { display: flex; align-items: center; gap: 8px; }
.line-count-input input { max-width: 180px; }
.unit { font-size: 0.85rem; color: var(--muted); }

/* ── Price card ─────────────────────────────────────────────────── */
.price-card {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
  transition: all 0.3s;
}
.price-card.has-value {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.1);
}
.price-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 4px 0;
  color: var(--muted);
}
.price-row span:last-child { color: var(--text); font-weight: 500; }
.price-divider { height: 1px; background: var(--border); margin: 10px 0; }
.price-row.total { font-size: 1.1rem; }
.price-row.total span { font-weight: 700; }
.price-row.total span:last-child { color: var(--success); font-size: 1.2rem; }

/* ── Error message ──────────────────────────────────────────────── */
.error-msg {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius-sm);
  color: var(--error);
  font-size: 0.875rem;
  padding: 12px 16px;
  margin-bottom: 16px;
  animation: shake 0.3s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ── Submit button ──────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.5);
  filter: brightness(1.1);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Fine print ─────────────────────────────────────────────────── */
.fine-print {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 14px;
}
.fine-print a { color: var(--accent); text-decoration: none; }
.fine-print a:hover { text-decoration: underline; }

/* ── Footer ─────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.8rem;
  color: rgba(148,163,184,0.5);
}

/* ── Success / Cancel page specifics ────────────────────────────── */
.result-card {
  text-align: center;
  padding: 48px 36px;
}
.result-icon { font-size: 4rem; margin-bottom: 16px; animation: pulse 2s ease infinite; }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.1)} }
.result-card h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 12px; }
.result-card p { color: var(--muted); font-size: 1rem; margin-bottom: 8px; }
.order-details {
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 20px;
  margin: 24px auto;
  max-width: 400px;
  text-align: left;
}
.order-details p { font-size: 0.88rem; color: var(--muted); margin-bottom: 8px; display: flex; justify-content: space-between; }
.order-details p span { color: var(--text); font-weight: 500; }
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  background: transparent;
  cursor: pointer;
  margin-top: 10px;
}
.btn-back:hover { background: rgba(99,102,241,0.1); transform: translateX(-2px); }
.loading-dots::after {
  content: '...';
  animation: dots 1.2s steps(4, end) infinite;
}
@keyframes dots { 0%,20%{content:'.'} 40%{content:'..'} 60%,100%{content:'...'} }
