/* ─────────────────────────────────────────────────────────────
   CuentaMela — páginas públicas (landing y pantallas de acceso)
   Prototipo aprobado: zinc + azul cielo, Inter. No usan Bootstrap
   ni site.css; subir la versión en assets/PublicAsset.php al cambiar.
───────────────────────────────────────────────────────────── */

:root {
  --pub-ink: #18181b;          /* texto y botón principal */
  --pub-ink-dark: #09090b;
  --pub-soft: #3f3f46;
  --pub-muted: #52525b;
  --pub-line: #e4e4e7;
  --pub-line-strong: #d4d4d8;
  --pub-bg: #fafafa;
  --pub-link: #0369a1;         /* enlace, el azul del logo */
  --pub-link-hover: #075985;
  --pub-accent: #0284c7;       /* foco y selección */
  --pub-sky: #0ea5e9;          /* solo rellenos */
  --pub-sky-50: #f0f9ff;
  --pub-sky-200: #bae6fd;
  --pub-sky-300: #7dd3fc;
}

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

body.pub {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--pub-ink);
  background: var(--pub-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

.pub a { color: var(--pub-link); }
.pub a:hover { color: var(--pub-link-hover); }
.pub button { font: inherit; cursor: pointer; }
.pub input, .pub select { font: inherit; }
.pub a:focus-visible,
.pub button:focus-visible,
.pub input:focus-visible,
.pub select:focus-visible { outline: 2px solid var(--pub-accent); outline-offset: 2px; }

.cm-logo { display: block; height: auto; max-width: 100%; }
.nowrap { white-space: nowrap; }

/* ─── Marco de acceso (layouts/auth.php) ─────────────────────── */
.auth { min-height: 100vh; display: flex; }

.auth-side {
  flex: 1 1 380px;
  min-width: 0;
  background: var(--pub-ink);
  color: #fff;
  padding: 40px clamp(24px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.pub .auth-back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  color: #d4d4d8;
}
.pub .auth-back:hover { color: #fff; }
.auth-pitch { margin-top: auto; display: flex; flex-direction: column; gap: 16px; max-width: 440px; }
.auth-pitch-title { margin: 0; font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.auth-pitch-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: #d4d4d8; }
.auth-pitch-list li { display: flex; gap: 10px; align-items: center; }
.auth-pitch-list svg { flex: 0 0 auto; }
.auth-side-foot { font-size: 13px; color: #a1a1aa; display: flex; flex-wrap: wrap; gap: 16px; }
.pub .auth-side-foot a { color: #d4d4d8; }
.pub .auth-side-foot a:hover { color: #fff; }

.auth-main {
  flex: 1 1 480px;
  min-width: 0;
  padding: 40px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 22px; }
.auth-logo { display: block; align-self: flex-start; line-height: 0; margin-bottom: 10px; }
.auth-logo .cm-logo { width: 168px; }

/* Celular: sin el panel oscuro; el logotipo queda arriba del formulario. */
@media (max-width: 767.98px) {
  .auth-side { display: none; }
  .auth-main { align-items: flex-start; padding: 32px 16px 40px; }
  .auth-logo { margin-bottom: 4px; }
}

.auth-head { display: flex; flex-direction: column; gap: 6px; }
.auth-head h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.auth-head p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--pub-muted); }

.auth-form { display: flex; flex-direction: column; gap: 22px; margin: 0; }
.auth-form--tight { gap: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 14px; font-weight: 600; }
.field-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-label-row a { font-size: 13px; font-weight: 500; }
.input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--pub-line-strong);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 400;
  background: #fff;
  color: var(--pub-ink);
}
.input:focus { border-color: var(--pub-accent); }
.input[readonly] { background: #f4f4f5; border-color: var(--pub-line); color: var(--pub-soft); }
.field.has-error .input, .input[aria-invalid="true"] { border-color: #dc2626; }
.field-hint { margin: 0; font-size: 13px; line-height: 1.4; color: var(--pub-muted); font-weight: 400; }
.field-hint.is-error { color: #991b1b; }
.field-error { margin: 0; font-size: 13px; line-height: 1.4; color: #991b1b; }
.field-error:empty { display: none; }

.code-input {
  min-height: 56px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--pub-soft); cursor: pointer; margin: 0; }
.check input[type="checkbox"] { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--pub-accent); flex: 0 0 auto; cursor: pointer; }

.btn-ink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--pub-ink);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.pub a.btn-ink { color: #fff; }
.btn-ink:hover, .pub a.btn-ink:hover { background: var(--pub-ink-dark); color: #fff; }

.link-quiet {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
}
.pub a.link-quiet, .pub button.link-quiet { color: var(--pub-soft); }
.pub a.link-quiet:hover, .pub button.link-quiet:hover { color: var(--pub-ink); }
.pub button.link-quiet { text-decoration: underline; }
.link-quiet[hidden] { display: none; }

.auth-alt {
  border-top: 1px solid var(--pub-line);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--pub-soft);
}
.auth-alt a { font-weight: 600; }
.auth-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--pub-muted); }

.step-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #075985;
  background: var(--pub-sky-50);
  border: 1px solid var(--pub-sky-200);
  border-radius: 999px;
  padding: 4px 10px;
}

.notice { border: 1px solid; border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.5; }
.notice--info { background: var(--pub-sky-50); border-color: var(--pub-sky-200); color: #075985; }
.notice--success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.notice--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.notice--warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.pub .notice a { color: inherit; font-weight: 600; }

/* ─── Landing (views/site/index.php, prototipo «Landing») ────── */
.lp { background: #fff; }
.lp-wrap { max-width: 1120px; margin: 0 auto; padding-left: clamp(16px, 4vw, 24px); padding-right: clamp(16px, 4vw, 24px); }
.lp-header { border-bottom: 1px solid var(--pub-line); background: #fff; }
.lp-header-inner { padding-top: 14px; padding-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.lp-logo { display: block; padding: 6px 0; line-height: 0; }
.lp-logo .cm-logo { width: 168px; }
.lp-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pub a.lp-nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 14px; font-weight: 500; color: var(--pub-soft); text-decoration: none; }
.pub a.lp-nav-link:hover { color: var(--pub-ink); }

.lp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.lp-btn--lg { min-height: 48px; padding: 0 20px; font-size: 15px; }
.pub a.lp-btn--ink { background: var(--pub-ink); color: #fff; }
.pub a.lp-btn--ink:hover { background: var(--pub-ink-dark); color: #fff; }
.pub a.lp-btn--ghost { background: #fff; border-color: var(--pub-line-strong); color: var(--pub-ink); font-weight: 500; }
.pub a.lp-btn--ghost:hover { background: #f4f4f5; color: var(--pub-ink); }
.pub a.lp-btn--white { background: #fff; color: var(--pub-ink); font-weight: 700; }
.pub a.lp-btn--white:hover { background: #f4f4f5; color: var(--pub-ink); }

.lp-hero { border-bottom: 1px solid var(--pub-line); background: var(--pub-bg); }
.lp-hero-inner { padding-top: 72px; padding-bottom: 64px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.lp-hero-text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.lp-badge { align-self: flex-start; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--pub-muted); border: 1px solid var(--pub-line); background: #fff; border-radius: 999px; padding: 6px 12px; }
.lp-hero-title { margin: 0; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; font-weight: 800; letter-spacing: -.04em; }
.lp-hero-title span { color: var(--pub-accent); }
.lp-hero-sub { margin: 0; font-size: 18px; line-height: 1.6; color: var(--pub-soft); max-width: 540px; }
.lp-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.lp-invite { margin: 0; font-size: 14px; color: var(--pub-muted); }

.lp-demo { flex: 1 1 400px; min-width: 0; margin: 0; background: #fff; border: 1px solid var(--pub-line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 12px 32px rgba(24, 24, 27, .08); }
.lp-demo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.lp-demo-title { font-size: 15px; font-weight: 600; }
.lp-demo-tag { font-size: 12px; font-weight: 600; color: var(--pub-muted); border: 1px dashed var(--pub-line-strong); border-radius: 999px; padding: 2px 8px; }
.lp-demo-row { display: flex; align-items: center; gap: 12px; }
.lp-demo-name { flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--pub-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-demo-days { display: flex; gap: 2px; flex: 0 0 auto; }
.lp-demo-day { display: block; width: 6px; height: 18px; border-radius: 2px; background: var(--pub-line); }
.lp-demo-day.is-on { background: var(--pub-sky); }
.lp-demo-day.is-next { background: transparent; border: 1px dashed var(--pub-line-strong); }
.lp-demo-chip { flex: 0 0 auto; min-width: 86px; text-align: center; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 3px 8px; border: 1px solid; }
.lp-demo-chip.is-con { background: var(--pub-sky-50); color: #075985; border-color: var(--pub-sky-200); }
.lp-demo-chip.is-sin { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.lp-demo-chip.is-inactiva { background: #f4f4f5; color: var(--pub-soft); border-color: var(--pub-line-strong); }
.lp-demo-foot { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid #f4f4f5; padding-top: 12px; }
.lp-chip { font-size: 12px; font-weight: 600; color: var(--pub-soft); background: #f4f4f5; border-radius: 999px; padding: 4px 10px; }
.lp-chip--sky { color: #075985; background: var(--pub-sky-50); border: 1px solid var(--pub-sky-200); }
.lp-proof { padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 10px; }
.lp-pill { font-size: 13px; font-weight: 500; color: var(--pub-soft); border: 1px solid var(--pub-line); background: #fff; border-radius: 999px; padding: 6px 12px; }

.lp-section { border-bottom: 1px solid var(--pub-line); }
.lp-section--soft { background: var(--pub-bg); }
.lp-section > .lp-wrap { padding-top: 72px; padding-bottom: 72px; }
.lp-stack { display: flex; flex-direction: column; gap: 32px; }
.lp-stack--tight { gap: 18px; }
.lp-section > .lp-stack--tight { padding-top: 56px; padding-bottom: 56px; }
.lp-section-head { display: flex; flex-direction: column; gap: 10px; }
.lp-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--pub-muted); }
.lp-h2 { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.lp-h2--sm { font-size: 26px; letter-spacing: -.02em; }
.lp-lead { margin: 0; font-size: 16px; line-height: 1.6; color: var(--pub-soft); }

.lp-problem { display: flex; flex-wrap: wrap; gap: 40px; }
.lp-problem-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 12px; }
.lp-pains { flex: 2 1 480px; min-width: 0; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.lp-pains li { border: 1px solid var(--pub-line); border-radius: 12px; padding: 18px; font-size: 15px; line-height: 1.55; color: #27272a; }

.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.lp-step { background: #fff; border: 1px solid var(--pub-line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.lp-step-n { font-size: 14px; font-weight: 700; color: var(--pub-accent); }
.lp-step h3 { margin: 0; font-size: 19px; font-weight: 600; }
.lp-step p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--pub-soft); }

.lp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.lp-feature { border: 1px solid var(--pub-line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.lp-feature-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--pub-sky-50); color: var(--pub-link); display: flex; align-items: center; justify-content: center; }
.lp-feature h3 { margin: 0; font-size: 17px; font-weight: 600; }
.lp-feature p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--pub-soft); }
.lp-data { margin: 0; font-size: 15px; line-height: 1.6; color: var(--pub-soft); border: 1px solid var(--pub-line); border-radius: 14px; padding: 18px 22px; }
.lp-data strong { color: var(--pub-ink); }

.lp-testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.lp-testimonial { margin: 0; border: 1px solid var(--pub-line); border-radius: 14px; padding: 22px; background: #fff; display: flex; flex-direction: column; gap: 16px; }
.lp-testimonial blockquote { margin: 0; font-size: 15px; line-height: 1.6; color: var(--pub-soft); }
.lp-testimonial figcaption { display: flex; align-items: center; gap: 12px; }
.lp-avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 999px; background: var(--pub-ink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.lp-testimonial-name { display: block; font-size: 14px; font-weight: 600; }
.lp-testimonial-role { display: block; font-size: 13px; color: var(--pub-muted); }

.lp-cta { background: var(--pub-ink); color: #fff; }
.lp-cta-inner { padding-top: 72px; padding-bottom: 72px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.lp-cta-logo { width: 300px; margin-bottom: 16px; }
.lp-cta-title { margin: 0; font-size: 36px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.lp-cta-text { margin: 0; max-width: 560px; font-size: 17px; line-height: 1.6; color: #d4d4d8; }
.lp-cta-invite { margin: 0; font-size: 14px; color: #d4d4d8; }
.pub .lp-cta-invite a { color: var(--pub-sky-300); }
.pub .lp-cta-invite a:hover { color: #bae6fd; }

.lp-footer { border-top: 1px solid var(--pub-line); background: #fff; }
.lp-footer-inner { padding-top: 24px; padding-bottom: 24px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; font-size: 14px; color: var(--pub-muted); }
.lp-footer-brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lp-footer-brand .cm-logo { width: 120px; }
.lp-footer-links { display: flex; flex-wrap: wrap; gap: 16px; }

@media (max-width: 599.98px) {
  .lp-hero-inner { padding-top: 40px; padding-bottom: 40px; gap: 32px; }
  .lp-hero-sub { font-size: 17px; }
  .lp-section > .lp-wrap { padding-top: 48px; padding-bottom: 48px; }
  .lp-h2 { font-size: 28px; }
  .lp-cta-title { font-size: 28px; }
  .lp-cta-logo { width: 220px; }
  .lp-demo { padding: 16px; }
  .lp-demo-row { gap: 8px; }
  .lp-demo-chip { min-width: 0; }
  .lp-demo-day:nth-child(n+15) { display: none; }
  .lp-nav { width: 100%; }
  .pub a.lp-nav-link { display: none; }
  .lp-nav .lp-btn { flex: 1 1 0; }
  .lp-features, .lp-steps, .lp-testimonials, .lp-pains { grid-template-columns: minmax(0, 1fr); }
}
