/* =========================================================
   VINITEX · FACTURACIÓN — estilos
   Sitio independiente (facturacion.vinitexcustom.com)
   ========================================================= */
:root {
  --tinta: #0B0F14; --texto: #1F2933; --gris: #5B6670; --gris2: #8A949E; --linea: #E5E7EB; --suave: #F5F7F9;
  --oscuro: #0F1B26; --acento: #0284C7; --acento-h: #0369A1; --celeste: #38BDF8;
  --ok: #15803D; --ok-f: #ECFDF3; --mal: #B42318; --mal-f: #FEF3F2; --info-f: #F0F9FF; --aviso-f: #FFF8E6; --aviso-t: #7A5300;
  --radio: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 16px; line-height: 1.5; color: var(--texto); background: #FFFFFF; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #7DD3FC; outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--tinta); color: #FFFFFF; }
.skip:focus { left: 8px; }
.muted { color: var(--gris); }
.small { font-size: 14px; }

/* ---------- Encabezado ---------- */
.fh-in { max-width: 1400px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; }
.fh-topbar { background: var(--tinta); color: #E5E7EB; font-size: 13px; }
.fh-topbar .fh-in { height: 40px; justify-content: space-between; gap: 16px; }
.fh-seguro, .fh-horario { display: inline-flex; align-items: center; gap: 8px; }
.fh-horario { color: #9CA3AF; }
.fh-header { border-bottom: 1px solid var(--linea); background: #FFFFFF; }
.fh-header .fh-in { height: 88px; gap: 20px; }
.fh-logo { display: flex; align-items: center; text-decoration: none; }
.fh-logo img { height: 56px; width: auto; }
.fh-logo-txt { font-size: 22px; font-weight: 900; letter-spacing: .04em; color: var(--tinta); }
.fh-sep { width: 1px; height: 32px; background: var(--linea); }
.fh-pagina { display: flex; flex-direction: column; line-height: 1.25; }
.fh-pagina strong { font-size: 16px; font-weight: 700; color: var(--tinta); }
.fh-pagina span { font-size: 13px; color: var(--gris); }
.fh-nav { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.fh-link { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 10px; font-size: 15px; font-weight: 600; color: #374151; text-decoration: none; }
.fh-link:hover { background: var(--suave); color: var(--tinta); }
.fh-volver { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px; background: var(--tinta); color: #FFFFFF; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.fh-volver:hover { background: #26303A; }
.fh-solo-movil { display: none; }

/* ---------- Contenido ---------- */
.wrap { max-width: 1400px; margin: 0 auto; padding: 32px 32px 56px; }
.fx-hero { display: flex; align-items: center; gap: 40px; padding: 56px 52px; border-radius: 24px; background: var(--oscuro); color: #FFFFFF; }
.fx-hero > div { flex: 1; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 14px; font-weight: 800; letter-spacing: .08em; color: var(--acento); }
.eyebrow span { width: 26px; height: 2px; background: currentColor; }
.eyebrow.light { color: var(--celeste); }
.fx-hero h1 { margin: 0; font-size: clamp(38px, 6vw, 64px); line-height: 1; font-weight: 900; letter-spacing: -.01em; text-transform: uppercase; }
.fx-hero p { max-width: 580px; margin: 18px 0 0; font-size: 19px; line-height: 1.6; color: #CBD5E1; }
.fx-hero-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 17px; font-weight: 700; }
.fx-hero-steps li { display: flex; align-items: center; gap: 14px; }
.fx-hero-steps span { width: 36px; height: 36px; flex: none; border: 2px solid var(--celeste); border-radius: 50%; display: grid; place-items: center; color: var(--celeste); font-size: 15px; }

.fx-layout { display: grid; grid-template-columns: minmax(0, 1fr) 352px; gap: 32px; margin-top: 36px; align-items: start; }
.fx-main, .fx-form { display: flex; flex-direction: column; gap: 20px; }
.fx-form[hidden], .fx-done[hidden], [hidden] { display: none !important; }
.card { border: 1px solid var(--linea); border-radius: var(--radio); background: #FFFFFF; }
.fx-step { padding: 28px; }
.fx-step-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.fx-step-head h2 { margin: 0; font-size: 22px; font-weight: 700; color: var(--tinta); }
.fx-step-head p { margin: 4px 0 0; }
.fx-num { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--tinta); color: #FFFFFF; font-weight: 800; }

.fx-rfc { display: flex; gap: 12px; align-items: flex-end; }
.fx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.fx-field { display: flex; flex-direction: column; gap: 8px; font-size: 15px; font-weight: 600; color: var(--tinta); }
.fx-field.grow { flex: 1; }
.fx-field.span-2 { grid-column: span 2; }
.fx-field .opt { font-weight: 400; color: var(--gris); }
.fx-field input, .fx-field select { width: 100%; height: 54px; padding: 0 14px; border: 1.5px solid #D1D5DB; border-radius: 12px; background: #FFFFFF;
  font-size: 16px; font-weight: 400; color: var(--tinta); transition: border-color .15s, box-shadow .15s; }
.fx-field input::placeholder { color: var(--gris2); }
.fx-field input:focus, .fx-field select:focus { outline: none; border-color: var(--acento); box-shadow: 0 0 0 4px rgba(2, 132, 199, .15); }
#rfc { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; }
.fx-field .is-invalid, .is-invalid { border-color: var(--mal) !important; box-shadow: 0 0 0 4px rgba(180, 35, 24, .12) !important; }

.fx-status { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.fx-status.ok { background: var(--ok-f); color: #05603A; }
.fx-status.bad { background: var(--mal-f); color: #912018; }
.fx-status.info { background: var(--info-f); color: #075985; }
.fx-error { padding: 14px 16px; border-radius: 12px; background: var(--mal-f); color: #912018; font-size: 15px; font-weight: 500; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 22px; border: 0; border-radius: 12px;
  font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn:disabled { opacity: .7; cursor: progress; }
.btn-lg { height: 58px; padding: 0 26px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-dark { background: var(--tinta); color: #FFFFFF; }
.btn-dark:hover { background: #26303A; }
.btn-accent { background: var(--acento); color: #FFFFFF; box-shadow: 0 10px 22px -10px rgba(2, 132, 199, .8); }
.btn-accent:hover { background: var(--acento-h); }
.btn-line { background: #FFFFFF; border: 1.5px solid #D1D5DB; color: var(--tinta); }
.btn-line:hover { border-color: var(--tinta); }
.btn-soft { background: var(--suave); color: var(--tinta); }
.btn-soft:hover { background: #EBEEF2; }
.fx-submit { width: 100%; white-space: normal; text-align: center; }
.link-btn { border: 0; background: none; padding: 8px; color: var(--acento-h); font-weight: 600; text-decoration: underline; cursor: pointer; }

/* ---------- Resultado ---------- */
.fx-done { padding: 44px 32px; text-align: center; }
.thanks-icon { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-f); color: var(--ok); }
.h2 { margin: 0; font-size: 28px; font-weight: 800; color: var(--tinta); }
.h3 { margin: 0 0 14px; font-size: 22px; font-weight: 700; color: var(--tinta); }
.lead { margin: 8px 0 0; font-size: 17px; color: var(--gris); }
.fx-uuid { margin: 24px auto; max-width: 520px; padding: 14px 16px; border-radius: 12px; background: var(--suave); }
.fx-uuid dt { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gris); }
.fx-uuid dd { margin: 4px 0 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; color: var(--tinta); overflow-wrap: anywhere; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-row.center { justify-content: center; margin-bottom: 14px; }

/* ---------- Columna lateral ---------- */
.fx-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 20px; }
.fx-tips, .fx-help { padding: 26px 28px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 16px; }
.checks li { display: flex; gap: 12px; }
.checks svg { flex: none; margin-top: 2px; color: var(--acento); }
.fx-warn { padding: 22px 28px; border-color: #F5E2B0; background: var(--aviso-f); }
.fx-warn strong { display: block; font-size: 17px; color: var(--tinta); }
.fx-warn p { margin: 8px 0 0; font-size: 15px; color: var(--aviso-t); }
.fx-help { display: flex; flex-direction: column; gap: 12px; }
.fx-help strong { font-size: 17px; color: var(--tinta); }

/* ---------- Pie ---------- */
.fh-pie { border-top: 1px solid var(--linea); background: var(--suave); font-size: 14px; color: var(--gris); }
.fh-pie .fh-in { padding-top: 24px; padding-bottom: 24px; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.fh-pie-datos, .fh-pie-legal { display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; }
.fh-pie-datos strong { color: var(--tinta); }
.fh-pie a, .fh-pie span { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.fh-pie a:hover { color: var(--tinta); text-decoration: underline; }

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .fx-layout { grid-template-columns: 1fr; }
  .fx-side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .fx-hero { flex-direction: column; align-items: flex-start; gap: 28px; padding: 44px 36px; }
}

/* ---------- Celular ---------- */
@media (max-width: 680px) {
  .fh-in { padding: 0 16px; }
  .fh-topbar .fh-in { height: 34px; justify-content: center; font-size: 12px; }
  .fh-header .fh-in { height: 68px; gap: 12px; }
  .fh-logo img { height: 40px; }
  .fh-sep { display: none; }
  .fh-pagina strong { padding-left: 12px; border-left: 1px solid var(--linea); font-size: 15px; }
  .fh-volver { height: 42px; padding: 0 14px; font-size: 14px; }
  .fh-solo-escritorio { display: none !important; }
  .fh-solo-movil { display: inline; }
  .wrap { padding: 16px 16px 40px; }
  .fx-hero { padding: 28px 22px; border-radius: 20px; gap: 20px; }
  .fx-hero p { font-size: 15px; margin-top: 12px; }
  .fx-hero-steps { font-size: 15px; gap: 10px; }
  .fx-hero-steps span { width: 30px; height: 30px; font-size: 13px; }
  .fx-layout { margin-top: 20px; gap: 20px; }
  .fx-step { padding: 20px 18px; }
  .fx-step-head { gap: 12px; }
  .fx-step-head h2 { font-size: 19px; }
  .fx-num { width: 34px; height: 34px; }
  .fx-rfc { flex-direction: column; align-items: stretch; }
  .fx-rfc .btn { width: 100%; }
  .fx-grid { grid-template-columns: 1fr; gap: 16px; }
  .fx-field.span-2 { grid-column: auto; }
  .fx-done { padding: 32px 18px; }
  .btn-row .btn { width: 100%; }
  .fx-tips, .fx-help, .fx-warn { padding: 20px 18px; }
  .fh-pie .fh-in { flex-direction: column; align-items: flex-start; }
}