/* ==========================================================================
   UNIMOTOS · Onboarding de Conductores (conductores.unimotos.app)
   Manual de Marca UNIGOU SAS v1.2 — Mango #FFB000 + Azul noche #0E1B2C + Arena #F5F1E8
   ========================================================================== */

:root {
  --ink: #0E1B2C;
  --ink-muted: #5B6472;
  --accent: #FFB000;
  --accent-hover: #E89E00;
  --accent-ink: #8A5800;
  --field: #F5F1E8;
  --field-focus: #EFE9DC;
  --surface: #FFFFFF;
  --border: rgba(14, 27, 44, 0.10);
  --border-strong: rgba(14, 27, 44, 0.18);
  --danger: #C53030;
  --font-sans: 'Sora', Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--field);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
a {
  font-family: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

/* Cabecera */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-brand img {
  display: block;
  height: 28px;
  width: auto;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Contenedor principal */
.page-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px calc(44px + env(safe-area-inset-bottom, 0px));
}

/* Hero */
.hero {
  margin-bottom: 20px;
}

.hero-eyebrow {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(25px, 5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ink);
}

.hero-sub {
  margin: 0 0 18px;
  font-size: 15px;
  color: var(--ink-muted);
}

.hero-sub strong {
  color: var(--ink);
}

/* Barra de 3 pasos */
.steps-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.step-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  line-height: 1.2;
}

.step-pill.is-active {
  border-color: var(--ink);
  color: var(--ink);
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--field);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-pill.is-active .step-num {
  background: var(--accent);
  color: var(--ink);
}

/* Tarjetas */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px 20px;
  margin-bottom: 16px;
}

.form-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-section + .form-section {
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.card-copy {
  margin: 6px 0 14px;
  font-size: 14px;
  color: var(--ink-muted);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.opt-tag {
  font-weight: 500;
  color: var(--ink-muted);
}

.field-input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  background: var(--field);
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.field-input::placeholder {
  color: #7A8390;
  font-weight: 400;
}

.field-input:focus {
  border-color: var(--ink);
  background: var(--field-focus);
}

.field-hint {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.35;
}

.phone-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.phone-prefix {
  position: absolute;
  left: 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  pointer-events: none;
}

.phone-input {
  padding-left: 52px;
  font-variant-numeric: tabular-nums;
}

.plate-input {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.select-wrap {
  position: relative;
}

.field-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
}

.select-chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}

/* Checkboxes */
.checks-section {
  gap: 12px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  color: #243244;
  cursor: pointer;
  line-height: 1.45;
}

.check-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  flex-shrink: 0;
  accent-color: var(--ink);
  cursor: pointer;
}

.check-row a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
}

.form-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(197, 48, 48, 0.09);
  border: 1px solid rgba(197, 48, 48, 0.28);
  color: var(--danger);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}

/* Botón primario Mango #FFB000 + Azul noche #0E1B2C (9,5:1) */
.cta-primary {
  width: 100%;
  height: 60px;
  border: none;
  border-radius: 16px;
  background: var(--accent);
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s ease, transform 0.12s ease, opacity 0.14s ease;
}

.cta-primary:hover {
  background: var(--accent-hover);
}

.cta-primary:active {
  transform: scale(0.985);
}

.cta-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* FAQ nativo <details> */
.faq-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
}

.faq-item summary {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: '−';
  color: var(--ink);
}

.faq-item p {
  margin: 10px 0 0;
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* ==========================================================================
   Vista 2 · Confirmación y Activación Shipday Drive
   ========================================================================== */

.success-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.success-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 4px;
}

.success-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.success-title {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.success-sub {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-muted);
}

/* Tarjeta oficial Piloto U (Manual v1.2, pág. 18) */
.pilot-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  background: var(--ink);
  color: #FFFFFF;
}

.pilot-num-box {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--ink);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pilot-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pilot-label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
}

.pilot-code {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.pilot-detail {
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Credenciales */
.cred-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.cred-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--field);
}

.cred-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cred-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.cred-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  word-break: break-all;
}

.cred-mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.copy-btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.copy-btn.is-copied {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}

.cred-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.45;
}

/* Botones de descarga Shipday Drive */
.store-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-btn {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.12s ease, opacity 0.14s ease;
}

.store-btn:active {
  transform: scale(0.985);
}

.store-btn-primary {
  background: var(--accent);
  color: var(--ink);
}

.store-btn-secondary {
  background: var(--ink);
  color: #FFFFFF;
}

/* Checklist final */
.checklist {
  margin: 12px 0 18px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: #243244;
}

.checklist strong {
  color: var(--ink);
}

.wa-btn {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--ink);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ghost-btn {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.ghost-btn:hover {
  background: var(--field);
  color: var(--ink);
}

.page-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--ink-muted);
}

.page-footer a {
  color: var(--ink);
  font-weight: 600;
}

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

  .steps-strip {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 18px 16px;
    border-radius: 20px;
  }
}
