/**
 * Veloris Global — Public Merchant Application
 *
 * Premium, brand-aligned styling. Self-contained — no external CSS
 * framework. Mirrors the visual language used in the velorisos.com
 * back-office so the public + internal experience feel consistent.
 *
 * Mobile-first. Single column under 640px; two-column rows above.
 */

/* ─── Tokens (mirror velorisos.com brand) ─────────────────────────── */
:root {
  --night-0: #0a0d11;
  --night-1: #11151b;
  --night-2: #161b22;
  --surface: #1b212a;
  --surface-2: #232a35;
  --line: #232a35;
  --ink: #e6ecf3;
  --ink-muted: #9aa5b3;
  --ink-dim: #6b7585;
  --brand-blue: #4d8fff;
  --brand-cyan: #4dd4ff;
  --status-green: #4ade80;
  --status-amber: #fbbf24;
  --status-red: #ef4444;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* ─── Reset + globals ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  background: var(--night-0);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Header ──────────────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--night-0);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
}
.brand-mark {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--brand-blue);
  color: var(--night-0);
  font-weight: 700;
  align-items: center;
  justify-content: center;
}

/* ─── Hero ────────────────────────────────────────────────────────── */
.hero {
  border-bottom: 1px solid var(--line);
  padding: 48px 0;
}
.hero h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
}
@media (min-width: 768px) {
  .hero h1 { font-size: 36px; }
}
.lead {
  font-size: 15px;
  color: var(--ink-muted);
  max-width: 640px;
  margin: 0 0 24px 0;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--ink-dim);
  list-style: none;
  padding: 0;
  margin: 0;
}
.trust-row li { display: inline-flex; align-items: center; gap: 6px; }
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.dot-green { background: var(--status-green); }

/* ─── Badge ───────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-muted);
  border: 1px solid var(--line);
}
.badge-neutral { background: var(--night-2); }
.badge-green { background: rgba(74, 222, 128, 0.15); color: var(--status-green); border-color: transparent; }

/* ─── Stepper ─────────────────────────────────────────────────────── */
.stepper {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 32px 0 24px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.stepper::-webkit-scrollbar { display: none; }
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  white-space: nowrap;
  color: var(--ink-dim);
  font-size: 12px;
  background: transparent;
}
.step.active {
  background: rgba(77, 143, 255, 0.15);
  color: var(--ink);
  outline: 1px solid rgba(77, 143, 255, 0.4);
}
.step.done { color: var(--status-green); }
.step-num {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--night-2);
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 600;
  align-items: center;
  justify-content: center;
}
.step.active .step-num {
  background: var(--brand-blue);
  color: var(--night-0);
}
.step.done .step-num {
  background: var(--status-green);
  color: var(--night-0);
}
.step.done .step-num::before { content: "✓"; }
.step.done .step-num > * { display: none; }
.step-label { font-weight: 500; }

/* ─── Form card ───────────────────────────────────────────────────── */
.card {
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 760px;
  margin: 0 auto 32px auto;
}
@media (max-width: 640px) { .card { padding: 20px; } }
.form-step h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px 0;
}
.step-subtitle {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0 0 24px 0;
}

/* ─── Fields ──────────────────────────────────────────────────────── */
.field {
  display: block;
  margin-bottom: 20px;
}
.label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.label em {
  font-style: normal;
  color: var(--status-red);
  margin-left: 2px;
}
.label .hint {
  font-size: 10px;
  color: var(--ink-dim);
  text-transform: none;
  letter-spacing: 0;
  font-style: normal;
}
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 0;
}
@media (max-width: 640px) {
  .row-2 { grid-template-columns: 1fr; }
}
input[type="text"], input[type="email"], input[type="url"],
input[type="number"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  background: var(--night-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(77, 143, 255, 0.15);
}
textarea { resize: vertical; min-height: 80px; }

/* ─── Chip groups ─────────────────────────────────────────────────── */
.chip-field {
  border: none;
  padding: 0;
  margin: 0 0 20px 0;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 6px 12px;
  background: var(--night-1);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--ink-muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { color: var(--ink); }
.chip.active {
  background: rgba(77, 143, 255, 0.15);
  color: var(--ink);
  border-color: rgba(77, 143, 255, 0.4);
}

/* ─── Document sections ───────────────────────────────────────────── */
.doc-section {
  background: var(--night-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}
.doc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.doc-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.doc-label .req { color: var(--status-red); font-style: normal; margin-left: 2px; }
.doc-hint {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 2px;
  max-width: 460px;
}
.doc-upload-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  background: rgba(77, 143, 255, 0.15);
  color: var(--ink);
  border-radius: var(--radius-md);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s;
}
.doc-upload-btn:hover:not(.disabled) { background: rgba(77, 143, 255, 0.25); }
.doc-upload-btn.disabled {
  background: var(--night-2);
  color: var(--ink-muted);
  cursor: wait;
}
.doc-file-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
}
.doc-file-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 10px;
  background: var(--night-2);
  border-radius: var(--radius-md);
  font-size: 11px;
  margin-bottom: 4px;
}
.doc-file-name { color: var(--ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.doc-file-size { color: var(--ink-dim); font-family: ui-monospace, "SF Mono", monospace; }
.doc-remove {
  background: none;
  border: none;
  color: var(--status-red);
  cursor: pointer;
  font-size: 11px;
  padding: 0;
}
.doc-remove:hover { text-decoration: underline; }

.upload-meta {
  font-size: 11px;
  color: var(--ink-dim);
  margin: 8px 0 0 0;
}
.upload-meta em { color: var(--status-red); font-style: normal; }

/* ─── Review grid ─────────────────────────────────────────────────── */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .review-grid { grid-template-columns: 1fr; }
}
.review-item {
  background: var(--night-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.review-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 4px;
}
.review-value {
  font-size: 13px;
  color: var(--ink);
  font-family: ui-monospace, "SF Mono", monospace;
}

/* ─── Errors ──────────────────────────────────────────────────────── */
.error-banner {
  margin-top: 16px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  color: var(--status-red);
  font-size: 12px;
}

/* ─── Nav buttons ─────────────────────────────────────────────────── */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.btn-primary, .btn-secondary {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--brand-blue);
  color: var(--night-0);
}
.btn-primary:hover:not(:disabled) { background: var(--brand-cyan); }
.btn-primary:disabled {
  background: var(--night-1);
  color: var(--ink-dim);
  cursor: not-allowed;
}
.btn-secondary {
  background: transparent;
  color: var(--ink-muted);
  padding: 8px 14px;
  font-size: 13px;
}
.btn-secondary:hover:not(:disabled) { color: var(--ink); }
.btn-secondary:disabled { color: var(--ink-dim); cursor: not-allowed; }

/* ─── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.site-footer p {
  font-size: 11px;
  color: var(--ink-dim);
  margin: 0;
}

/* ─── Submitted page extras ───────────────────────────────────────── */
.submitted-card {
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  max-width: 640px;
  margin: 48px auto;
}
.submitted-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.submitted-check svg {
  width: 32px;
  height: 32px;
  color: var(--status-green);
}
.submitted-card h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 12px 0;
}
.submitted-card .lead {
  margin: 0 auto 24px auto;
  max-width: 480px;
}
.reference-box {
  display: inline-block;
  background: var(--night-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  text-align: left;
  margin-bottom: 24px;
}
.reference-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 4px;
}
.reference-value {
  font-size: 13px;
  color: var(--ink);
  font-family: ui-monospace, "SF Mono", monospace;
}
.next-steps {
  text-align: left;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  max-width: 480px;
  margin: 0 auto;
}
.next-steps h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  font-weight: 500;
  margin: 0 0 16px 0;
}
.next-step-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.next-step-list li {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.step-number {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(77, 143, 255, 0.15);
  color: var(--brand-blue);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.next-step-title { color: var(--ink); font-weight: 500; font-size: 14px; }
.next-step-detail { color: var(--ink-muted); font-size: 12px; margin-top: 2px; }
