/* ═══════════════════════════════════════════════════════════
   Alta de cliente — Gleering
   Estética tomada de landing-pedidos/src/styles/global.css
   ═══════════════════════════════════════════════════════════ */

:root {
  --brand-green: #2f7d32;
  --brand-dark: #1f5c1f;
  --brand-wp: #1d9e75;
  --brand-accent: #f59e0b;
  --brand-tomato: #d6451f;
  --paper: #fbf6ec;
  --paper-2: #f4ecdc;
  --ink: #26201a;
  --ink-soft: #6b6157;
  --line: #e6dcc8;
  --danger: #c0392b;
  --font-sans: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --shadow-warm: 0 1px 2px rgba(74, 56, 18, 0.05), 0 14px 34px -18px rgba(74, 56, 18, 0.28);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* El atributo hidden debe ganarle a cualquier display explícito (.nav, .field, .turno…) */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(900px 500px at 85% -8%, rgba(47, 125, 50, 0.06), transparent 60%),
    radial-gradient(700px 420px at 5% 0%, rgba(245, 158, 11, 0.05), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-attachment: fixed, fixed, scroll;
  min-height: 100vh;
  line-height: 1.5;
}

h1, h2, h3 { font-family: var(--font-display); font-optical-sizing: auto; letter-spacing: -0.015em; text-wrap: balance; line-height: 1.15; }

/* ── Header ── */
.app-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 246, 236, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.app-header__inner {
  max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-green); }
.brand__mark { width: 26px; height: 26px; }
.brand__text { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.app-header__tag { font-size: 0.8rem; color: var(--ink-soft); font-weight: 600; }

.progress { max-width: 640px; margin: 0 auto; padding: 0 18px 12px; }
.progress__bar { height: 7px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.progress__fill { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand-green), var(--brand-wp)); border-radius: 99px; transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.progress__label { display: block; margin-top: 6px; font-size: 0.72rem; color: var(--ink-soft); font-weight: 600; }

/* ── Layout ── */
.wrap { max-width: 640px; margin: 0 auto; padding: 24px 18px 120px; }

.step { animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.step__title { font-size: 1.7rem; margin-bottom: 4px; }
.step__hint { color: var(--ink-soft); margin-bottom: 22px; font-size: 0.95rem; }

/* ── Bienvenida ── */
.step--welcome { text-align: center; padding-top: 12px; }
.welcome__emoji { font-size: 3.4rem; line-height: 1; margin-bottom: 12px; }
.welcome h1 { font-size: 2.1rem; margin-bottom: 12px; }
.lead { color: var(--ink-soft); font-size: 1.05rem; max-width: 34ch; margin: 0 auto 22px; }
.lead strong { color: var(--ink); }
.welcome__list { list-style: none; text-align: left; max-width: 300px; margin: 0 auto 26px; display: grid; gap: 12px; }
.welcome__list li { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--ink); }
.welcome__list span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--paper-2); color: var(--brand-green); font-weight: 800; flex: none; }
.welcome__resume { margin-top: 18px; font-size: 0.9rem; color: var(--ink-soft); }

/* ── Campos ── */
.field { display: block; margin-bottom: 20px; }
.field--indent { margin-left: 8px; padding-left: 14px; border-left: 3px solid var(--paper-2); }
.field__label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.95rem; }
.field__label em { color: var(--brand-tomato); font-style: normal; }
.field__help { display: block; font-size: 0.83rem; color: var(--ink-soft); margin-bottom: 8px; }
.opt { font-weight: 500; color: var(--ink-soft); font-size: 0.82rem; }

input[type="text"], input[type="tel"], input[type="email"], input[type="number"], textarea, select {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 13px 14px; transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand-green); box-shadow: 0 0 0 3px rgba(47, 125, 50, 0.13); }
input::placeholder, textarea::placeholder { color: #b3a892; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b6157' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

.field__error { display: none; color: var(--danger); font-size: 0.82rem; font-weight: 600; margin-top: 6px; }
.field__error.is-shown { display: block; }
.field__error--block { margin-top: 0; }
input.is-invalid, select.is-invalid { border-color: var(--danger); }

.input-prefix { display: flex; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s; }
.input-prefix:focus-within { border-color: var(--brand-green); box-shadow: 0 0 0 3px rgba(47, 125, 50, 0.13); }
.input-prefix span { padding: 0 12px; color: var(--ink-soft); font-weight: 700; }
.input-prefix input { border: none; box-shadow: none !important; padding-left: 0; }

/* ── Teléfono ── */
.phone-row { display: flex; gap: 10px; }
.phone-part { display: flex; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; flex: 0 0 40%; transition: border-color 0.15s, box-shadow 0.15s; }
.phone-part:focus-within { border-color: var(--brand-green); box-shadow: 0 0 0 3px rgba(47, 125, 50, 0.13); }
.phone-prefix { padding: 0 10px; color: var(--ink-soft); font-weight: 700; white-space: nowrap; }
.phone-part input { border: none; box-shadow: none !important; padding-left: 0; }
.phone-row > input { flex: 1; }
.phone-preview { display: block; margin-top: 8px; font-size: 0.9rem; color: var(--brand-green); font-weight: 700; min-height: 1.2em; }

/* ── Tarjetas (rubro) ── */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.card-opt { display: flex; align-items: center; gap: 10px; padding: 14px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; font-weight: 700; transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s; }
.card-opt:active { transform: scale(0.98); }
.card-opt__emoji { font-size: 1.5rem; }
.card-opt.is-selected { border-color: var(--brand-green); box-shadow: 0 0 0 3px rgba(47, 125, 50, 0.13); background: #fbfdfb; }
.card-opt input { position: absolute; opacity: 0; pointer-events: none; }

/* ── Switch ── */
.switch-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; margin-bottom: 12px; }
.switch-card--slim { padding: 13px 16px; }
.switch-card__text { display: flex; flex-direction: column; gap: 2px; }
.switch-card__text strong { font-size: 0.98rem; }
.switch-card__text small { color: var(--ink-soft); font-size: 0.82rem; }
.switch { position: relative; flex: none; width: 50px; height: 30px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch__slider { position: absolute; inset: 0; background: #d9cfba; border-radius: 99px; transition: background 0.2s; }
.switch__slider::before { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 0.2s; }
.switch input:checked + .switch__slider { background: var(--brand-green); }
.switch input:checked + .switch__slider::before { transform: translateX(20px); }
.switch input:focus-visible + .switch__slider { box-shadow: 0 0 0 3px rgba(47,125,50,0.3); }

/* ── Horarios ── */
.dias { display: grid; gap: 12px; }
.dia { background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; }
.dia__head { display: flex; align-items: center; justify-content: space-between; }
.dia__name { font-weight: 700; }
.dia__state { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); margin-right: auto; margin-left: 10px; }
.dia__body { margin-top: 12px; display: grid; gap: 10px; }
.dia__body[hidden] { display: none; }
.turno { display: flex; align-items: center; gap: 8px; }
.turno label { font-size: 0.78rem; color: var(--ink-soft); font-weight: 600; flex: none; width: 42px; }
.turno input[type="time"] { flex: 1; padding: 10px; }
.turno__sep { color: var(--ink-soft); font-weight: 700; }
.turno__remove { background: none; border: none; color: var(--danger); font-size: 1.3rem; cursor: pointer; padding: 0 4px; line-height: 1; }
.dia__addturno { align-self: start; }

/* ── Archivo de catálogo ── */
.file-drop { display: flex; flex-direction: column; gap: 10px; align-items: start; }
.file-chip { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; max-width: 100%; }
.file-chip__icon { font-size: 1.3rem; flex: none; }
.file-chip__name { font-weight: 700; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.file-chip__size { color: var(--ink-soft); font-size: 0.8rem; flex: none; white-space: nowrap; }
.file-chip__remove { background: none; border: none; color: var(--danger); font-size: 1.3rem; cursor: pointer; padding: 0 2px; line-height: 1; margin-left: auto; }

/* ── Logo ── */
.logo-drop { display: flex; align-items: center; gap: 16px; }
.logo-preview { width: 84px; height: 84px; border-radius: 18px; border: 2px dashed var(--line); display: grid; place-items: center; overflow: hidden; flex: none; background: #fff; }
.logo-preview[data-empty="false"] { border-style: solid; }
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.logo-preview span { font-size: 0.75rem; color: var(--ink-soft); }
.logo-drop__actions { display: flex; flex-direction: column; gap: 8px; align-items: start; }

/* ── Colores ── */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.swatch { width: 42px; height: 42px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; transition: transform 0.1s; position: relative; }
.swatch:active { transform: scale(0.92); }
.swatch.is-selected { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand-green); }
.swatch.is-selected::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.color-custom { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.9rem; color: var(--ink-soft); cursor: pointer; }
.color-custom input[type="color"] { width: 40px; height: 40px; padding: 0; border: 1.5px solid var(--line); border-radius: 10px; background: none; cursor: pointer; }

/* ── Hero preview ── */
.hero-preview { border-radius: var(--radius); padding: 26px 20px; margin-bottom: 22px; background: var(--brand-green); color: #fff; text-align: center; box-shadow: var(--shadow-warm); transition: background 0.2s; }
.hero-preview__badge { display: inline-block; font-size: 0.72rem; font-weight: 700; background: rgba(255,255,255,0.22); padding: 4px 10px; border-radius: 99px; margin-bottom: 12px; }
.hero-preview__title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; display: block; line-height: 1.1; }
.hero-preview__sub { display: block; margin-top: 8px; font-size: 0.9rem; opacity: 0.9; }
.hero-preview__cta { display: inline-block; margin-top: 14px; background: #fff; color: var(--ink); font-weight: 700; padding: 8px 18px; border-radius: 99px; font-size: 0.9rem; }

/* ── Módulos ── */
.modules { display: grid; gap: 10px; }
.mod { display: flex; align-items: center; gap: 12px; padding: 14px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; }
.mod.is-on { border-color: var(--brand-green); background: #fbfdfb; }
.mod input { width: 22px; height: 22px; accent-color: var(--brand-green); flex: none; }
.mod__text strong { display: block; font-size: 0.95rem; }
.mod__text small { color: var(--ink-soft); font-size: 0.8rem; }
.fiscal-box { margin-top: 18px; padding: 18px; background: var(--paper-2); border-radius: 14px; }
.fiscal-box h3 { font-size: 1.1rem; margin-bottom: 14px; }

/* ── Resumen ── */
.summary { display: grid; gap: 2px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 22px; }
.sum-row { display: flex; justify-content: space-between; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--paper-2); }
.sum-row:last-child { border-bottom: none; }
.sum-row__k { color: var(--ink-soft); font-size: 0.85rem; font-weight: 600; flex: none; }
.sum-row__v { text-align: right; font-weight: 600; font-size: 0.9rem; word-break: break-word; }
.sum-group { padding: 10px 16px 4px; font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-green); background: #fbfdfb; }

/* ── Listo ── */
.step--done { text-align: center; }
.done__check { width: 68px; height: 68px; border-radius: 50%; background: var(--brand-wp); color: #fff; font-size: 2.2rem; display: grid; place-items: center; margin: 8px auto 16px; }
.done h2 { font-size: 1.9rem; margin-bottom: 10px; }
.done__steps { text-align: left; max-width: 380px; margin: 20px auto; display: grid; gap: 14px; padding-left: 4px; list-style: none; counter-reset: d; }
.done__steps li { position: relative; padding-left: 40px; color: var(--ink); }
.done__steps li::before { counter-increment: d; content: counter(d); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--paper-2); color: var(--brand-green); font-weight: 800; display: grid; place-items: center; }
.done__steps code { background: var(--paper-2); padding: 1px 6px; border-radius: 6px; font-size: 0.85em; }
.done__actions { display: grid; gap: 10px; max-width: 340px; margin: 24px auto 0; }

/* ── Botones ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; font-weight: 700; font-size: 1rem; border: none; border-radius: 99px; padding: 13px 24px; cursor: pointer; transition: transform 0.1s, box-shadow 0.15s, background 0.15s; text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--brand-green); color: #fff; box-shadow: var(--shadow-warm); }
.btn--primary:hover { background: var(--brand-dark); }
.btn--wp { background: var(--brand-wp); color: #fff; box-shadow: var(--shadow-warm); }
.btn--wp:hover { filter: brightness(1.05); }
.btn--ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--brand-green); }
.btn--lg { padding: 16px 28px; font-size: 1.05rem; width: 100%; }
.linkbtn { background: none; border: none; color: var(--brand-green); font-weight: 700; font-family: inherit; font-size: inherit; cursor: pointer; text-decoration: underline; padding: 0; }
.fineprint { text-align: center; font-size: 0.8rem; color: var(--ink-soft); margin-top: 12px; }

/* ── Nav fija ── */
.nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 15; display: flex; gap: 12px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: rgba(251,246,236,0.94); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.nav .btn { flex: 1; max-width: 640px; }
.nav__inner { max-width: 640px; margin: 0 auto; display: flex; gap: 12px; width: 100%; }
.nav [data-action="back"] { flex: 0 0 auto; padding-left: 20px; padding-right: 20px; }
.nav [data-action="next"] { flex: 1; }

@media (min-width: 560px) {
  .nav { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
