:root {
  --accent: #2563EB;
  --accent-soft: rgba(37, 99, 235, 0.14);
  --bg: #F3F5F9;
  --surface: #FFFFFF;
  --surface-subtle: #F8FAFC;
  --border: #E5E9F2;
  --text: #0B1220;
  --text-muted: #5B677D;
  --success: #059669;
  --success-bright: #10B981;
  --success-bg: #ECFDF5;
  --warning: #D97706;
  --danger: #DC2626;
  --danger-bg: #FEF2F2;
  --radius: 20px;
  --radius-sm: 13px;
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.04);
  --shadow: 0 4px 20px rgba(11, 18, 32, 0.06), 0 1px 3px rgba(11, 18, 32, 0.04);
  --shadow-lg: 0 14px 36px rgba(11, 18, 32, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px 56px;
}

.container-wide {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

/* ==================== HERO ==================== */
.hero {
  background: radial-gradient(120% 100% at 90% 0%, rgba(37, 99, 235, 0.45) 0%, rgba(15, 23, 42, 0) 55%),
              linear-gradient(160deg, #090F1E 0%, #111C33 55%, #0F172A 100%);
  color: #FFFFFF;
  padding: 22px 16px 64px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 88% 12%, var(--accent), transparent 52%);
  opacity: 0.42;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.35;
  pointer-events: none;
}

.hero-inner {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.shop-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.shop-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: cover;
  background: #FFFFFF;
  padding: 4px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.shop-monogram {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #1D4ED8);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.shop-name {
  font-size: 16.5px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-address {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.68);
  margin: 1px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folio-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 6px 12px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.hero-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.live-pill.status-ready { background: #10B981; }
.live-pill.status-waiting_parts { background: #F59E0B; color: #0F172A; }
.live-pill.status-delivered { background: #475569; }
.live-pill.status-cancelled { background: #EF4444; }

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  position: relative;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid currentColor;
  animation: ripple 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes ripple {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(1.9); opacity: 0; }
}

.hero-item-title {
  font-size: 26px;
  font-weight: 800;
  margin: 14px 0 4px;
  letter-spacing: -0.03em;
  line-height: 1.18;
}

.hero-item-sub {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.74);
  margin: 0;
}

/* Quick Above-The-Fold Summary Pills inside Hero */
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.hero-metric {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 10px 12px;
}

.hero-metric-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.62);
}

.hero-metric-val {
  font-size: 14.5px;
  font-weight: 800;
  color: #FFFFFF;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== CARDS STACK ==================== */
.cards-stack {
  margin-top: -40px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0;
}

.card-title svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ==================== PROGRESS BAR + STEPPER ==================== */
.progress-bar-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #E8EDF5;
  overflow: hidden;
  margin-bottom: 18px;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #38BDF8);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-pct {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.stepper {
  display: flex;
  flex-direction: column;
}

.step-row {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  padding-bottom: 16px;
}

.step-row:last-child { padding-bottom: 0; }

.step-row:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 30px;
  bottom: 0;
  width: 2px;
  background: #E2E8F0;
}

.step-row.done:not(:last-child)::before {
  background: var(--accent);
}

.step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #DCE3EE;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  color: #94A3B8;
  transition: all 0.2s ease;
}

.step-row.done .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.step-row.active .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.step-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

.step-label {
  font-size: 15px;
  font-weight: 500;
  color: #94A3B8;
}

.step-row.done .step-label {
  color: var(--text);
  font-weight: 600;
}

.step-row.active .step-label {
  color: var(--text);
  font-weight: 800;
}

.step-now-tag {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 999px;
}

/* ==================== APPROVAL CARD ==================== */
.approval-card {
  border: 1.5px solid var(--accent);
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFCFF 100%);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.1), 0 1px 3px rgba(15, 23, 42, 0.04);
}

.approval-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.banner {
  border-radius: 14px;
  padding: 16px;
  font-size: 14px;
}

.banner-approved {
  background: var(--success-bg);
  border: 1px solid #A7F3D0;
  color: #065F46;
}

.banner-declined, .banner-cancelled {
  background: var(--danger-bg);
  border: 1px solid #FECACA;
  color: #991B1B;
}

.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface-subtle);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.sig-wrap {
  border: 1.5px dashed #CBD5E1;
  border-radius: 14px;
  background: #FFFFFF;
  position: relative;
  overflow: hidden;
  touch-action: none;
}

.sig-guide {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 34px;
  border-bottom: 1px solid #E2E8F0;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
}

.sig-guide span {
  font-size: 15px;
  font-weight: 700;
  color: #CBD5E1;
  margin-bottom: 3px;
}

.sig-canvas {
  display: block;
  width: 100%;
  height: 170px;
  cursor: crosshair;
  touch-action: none;
  position: relative;
  z-index: 1;
}

.sig-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.btn-link:hover { background: var(--surface-subtle); color: var(--text); }

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 14px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #1D4ED8);
  color: #FFFFFF;
  flex: 1;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover { box-shadow: 0 8px 22px rgba(37, 99, 235, 0.36); }

.btn-whatsapp {
  background: linear-gradient(135deg, #16A34A, #15803D);
  color: #FFFFFF;
  flex: 1;
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.26);
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-danger-outline {
  background: #FFFFFF;
  color: var(--danger);
  border: 1.5px solid #FECACA;
}

.sig-preview {
  margin-top: 12px;
  background: #FFFFFF;
  border: 1px solid #D1FAE5;
  border-radius: 12px;
  padding: 10px;
  max-height: 110px;
  object-fit: contain;
  display: block;
}

.form-error {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid #FECACA;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
  display: none;
}

/* ==================== INFO GRID ==================== */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.info-cell {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.info-cell.full { grid-column: 1 / -1; }

.info-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-value {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==================== QUOTE TABLE ==================== */
.quote-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.quote-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border);
}

.quote-table th.right, .quote-table td.right { text-align: right; }

.quote-table td {
  padding: 12px 0;
  border-bottom: 1px solid #F1F5F9;
  font-size: 14.5px;
  font-weight: 600;
}

.item-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  margin-left: 6px;
}

.totals-box {
  margin-top: 14px;
  padding: 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-variant-numeric: tabular-nums;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
}

.total-row.balance {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1.5px solid var(--border);
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
}

/* ==================== PHOTOS ==================== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.photo-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  cursor: pointer;
  position: relative;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.photo-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.photo-card img {
  width: 100%;
  height: 156px;
  object-fit: cover;
  display: block;
}

.photo-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(11, 18, 32, 0.78);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  padding: 3px 9px;
  border-radius: 999px;
}

.photo-caption {
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ==================== TIMELINE ==================== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-item {
  position: relative;
  padding-left: 18px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 18px;
  bottom: -14px;
  width: 2px;
  background: var(--border);
}

.timeline-item:last-child::after { display: none; }

.timeline-status { font-size: 14.5px; font-weight: 700; }
.timeline-note { font-size: 13.5px; color: var(--text-muted); margin: 2px 0; }
.timeline-date { font-size: 12px; color: #94A3B8; font-variant-numeric: tabular-nums; }

/* ==================== FOOTER & LIGHTBOX ==================== */
.powered-footer {
  margin-top: 24px;
  text-align: center;
  padding: 15px 18px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}

.powered-footer a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
  margin-left: 4px;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(9, 15, 30, 0.92);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 14px; box-shadow: var(--shadow-lg); }

/* ==================== LANDING & LEGAL ==================== */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.lang-switch { display: flex; gap: 6px; }
.lang-switch a {
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
}
.lang-switch a.active { background: #0B1220; color: #FFFFFF; border-color: #0B1220; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.prose h1 { font-size: 28px; margin-top: 8px; letter-spacing: -0.03em; }
.prose h2 { font-size: 18px; margin-top: 24px; }
.prose p, .prose li { font-size: 15px; color: #334155; }

@media (max-width: 420px) {
  .hero-item-title { font-size: 22px; }
  .hero-metrics { grid-template-columns: 1fr 1fr; }
  .hero-metrics .hero-metric:last-child { grid-column: 1 / -1; }
  .btn-row { flex-direction: column; }
}
