/* Web publica del ERP (/, /erp-sga/, /recepciones-expediciones/, /inventario/,
   /implantacion/). Mismo lenguaje visual que /features (tokens, tipografias),
   con la cabecera marino de Resolutis: el logo tiene texto blanco y va siempre
   sobre fondo oscuro. Plantilla: erp/app/Views/publica/_plantilla.php */
:root {
  --bg: #f5f6fc;
  --surface: #ffffff;
  --surface-2: #eef0fa;
  --text: #1c2233;
  --text-muted: #5b6479;
  --line: #e2e5f2;
  --accent: #0062ff;
  --accent-ink: #0046b8;
  --accent-soft: #e5efff;
  --accent2: #1238b8;
  --accent2-ink: #040d36;
  --accent2-soft: #e4e8f6;
  --good: #1a7f50;
  --good-soft: #e3f6ec;
  --warn: #9a6210;
  --warn-soft: #fbf0dd;
  --navy: #040d36;
  --shadow: 0 1px 2px rgba(28,34,51,.04), 0 8px 24px -12px rgba(28,34,51,.12);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10121c; --surface: #171a28; --surface-2: #1f2333; --text: #e8eaf6; --text-muted: #a2a9c0; --line: #2b2f45;
    --accent: #4d8dff; --accent-ink: #b8d0ff; --accent-soft: #14254d;
    --accent2: #7f9cf0; --accent2-ink: #cdd8fb; --accent2-soft: #1b2347;
    --good: #57c993; --good-soft: #143627; --warn: #e0b566; --warn-soft: #3a2c14;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --bg: #10121c; --surface: #171a28; --surface-2: #1f2333; --text: #e8eaf6; --text-muted: #a2a9c0; --line: #2b2f45;
  --accent: #4d8dff; --accent-ink: #b8d0ff; --accent-soft: #14254d;
  --accent2: #7f9cf0; --accent2-ink: #cdd8fb; --accent2-soft: #1b2347;
  --good: #57c993; --good-soft: #143627; --warn: #e0b566; --warn-soft: #3a2c14;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { background: var(--bg); }
body { margin: 0; color: var(--text); font-family: 'IBM Plex Sans', -apple-system, 'Segoe UI', sans-serif; font-size: 16px; line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: 'Manrope', 'IBM Plex Sans', sans-serif; text-wrap: balance; margin: 0; line-height: 1.2; }
code, .mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .92em; }
img { max-width: 100%; height: auto; }
a { color: var(--accent-ink); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
p { margin: 0; }
.wrap { max-width: 1140px; margin-inline: auto; padding-inline: 20px; }
@media (max-width: 480px) { .wrap { padding-inline: 16px; } }

.saltar { position: absolute; left: -9999px; top: 8px; background: #fff; color: var(--navy); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.saltar:focus { left: 12px; }

/* Cabecera */
.cab { position: sticky; top: 0; z-index: 40; background: var(--navy); color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.cab .wrap { max-width: 1360px; }
.cab-fila { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.cab-marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; flex: none; }
.cab-marca img { height: 30px; width: auto; display: block; }
.cab-marca span { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 14px; color: #b8c7f0; border-left: 1px solid rgba(255,255,255,.2); padding-left: 10px; white-space: nowrap; }
.cab-nav { display: flex; gap: 2px; margin-left: auto; }
.cab-nav a { color: #c9d4f5; text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
.cab-nav a:hover, .cab-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.08); }
.cab-acciones { display: flex; gap: 8px; flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 14.5px; text-decoration: none; padding: 11px 18px; border-radius: 10px; border: 1px solid transparent; white-space: nowrap; transition: transform .12s, background .12s, box-shadow .12s; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }
.btn-primario { background: #0062ff; color: #fff; box-shadow: 0 6px 16px -6px rgba(0,98,255,.6); }
.btn-primario:hover { background: #0050d6; }
.btn-claro { background: #fff; color: var(--navy); }
.btn-borde { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-borde:hover { border-color: var(--accent); }
.cab .btn { padding: 9px 14px; font-size: 13.5px; }
.cab .btn-acceso { border-color: rgba(255,255,255,.28); color: #fff; }
.cab .btn-acceso:hover { background: rgba(255,255,255,.08); }
@media (max-width: 1300px) {
  .cab-fila { flex-wrap: wrap; gap: 10px; padding-block: 10px; }
  .cab-acciones { margin-left: auto; }
  .cab-nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .cab-nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 560px) {
  .cab-marca span { display: none; }
  .cab .btn-demo-largo { display: none; }
}
@media (min-width: 561px) { .cab .btn-demo-corto { display: none; } }

/* Migas */
.migas { font-size: 13px; color: var(--text-muted); padding-top: 22px; }
.migas ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.migas li + li::before { content: '/'; margin-right: 6px; color: var(--line); }
.migas a { color: var(--text-muted); }

/* Hero */
.hero { padding-block: 44px 40px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); display: inline-block; padding: 5px 11px; border-radius: 999px; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; margin-top: 16px; letter-spacing: -0.02em; max-width: 900px; }
.hero h1 .g { background: linear-gradient(120deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; color: var(--text-muted); max-width: 720px; margin-top: 16px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-nota { font-size: 13px; color: var(--text-muted); margin-top: 14px; }
.hero-img { margin-top: 36px; }
@media (max-width: 480px) { .hero-cta .btn { width: 100%; } }

/* Secciones */
section.bloque { padding-block: 52px; border-top: 1px solid var(--line); }
.bloque-cab { margin-bottom: 26px; max-width: 760px; }
.bloque-cab h2 { font-size: clamp(24px, 3.4vw, 30px); font-weight: 800; letter-spacing: -0.01em; }
.bloque-cab p { color: var(--text-muted); margin-top: 10px; }
.bloque h3 { font-size: 18px; font-weight: 800; }
.texto { max-width: 760px; }
.texto p + p { margin-top: 12px; }

.rejilla { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.rejilla-2 { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.tarjeta { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
.tarjeta.erp { border-top: 3px solid var(--accent); }
.tarjeta.sga { border-top: 3px solid var(--accent2); }
.tarjeta h3 { font-size: 17px; }
.tarjeta p { color: var(--text-muted); font-size: 15px; margin-top: 8px; }
.tarjeta ul { margin: 12px 0 0; padding-left: 18px; font-size: 14.5px; }
.tarjeta li + li { margin-top: 6px; }
.tarjeta .enlace { display: inline-block; margin-top: 14px; font-weight: 700; font-size: 14px; }
.chip { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; display: inline-block; }
.chip.erp { color: var(--accent-ink); background: var(--accent-soft); }
.chip.sga { color: var(--accent2-ink); background: var(--accent2-soft); }
.chip.ambos { color: var(--good); background: var(--good-soft); }
.tarjeta-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* Ficha de proceso: tarea, quien, que necesita, resultado, siguiente */
.proceso { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.proceso + .proceso { margin-top: 16px; }
.proceso-cab { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.proceso-cab .num { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--text-muted); }
.proceso-cab h3 { font-size: 19px; }
.proceso > p { color: var(--text-muted); margin-top: 8px; max-width: 820px; }
.ficha { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; margin: 16px 0 0; }
.ficha div { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.ficha dt { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-ink); }
.ficha dd { margin: 4px 0 0; font-size: 14.5px; }
.proceso-pie { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 16px; font-size: 14.5px; }
.proceso-pie a.mas { font-weight: 700; }

/* Pasos ERP/SGA */
.pasos { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); counter-reset: paso; }
.pasos li { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; counter-increment: paso; position: relative; }
.pasos li.erp { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.pasos li.sga { background: var(--accent2-soft); border-color: color-mix(in srgb, var(--accent2) 30%, var(--line)); }
.pasos .quien { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.pasos li.erp .quien { color: var(--accent-ink); }
.pasos li.sga .quien { color: var(--accent2-ink); }
.pasos .quien::before { content: counter(paso, decimal-leading-zero) ' · '; font-family: 'IBM Plex Mono', monospace; font-weight: 500; }
.pasos b { display: block; font-size: 15px; margin-top: 4px; }
.pasos span.como { display: block; font-size: 13.5px; color: var(--text-muted); margin-top: 3px; }

/* Capturas */
figure.captura { margin: 0; }
figure.captura figcaption { font-size: 13.5px; color: var(--text-muted); margin-top: 10px; }
figure.captura figcaption b { color: var(--text); }
.marco-nav { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.marco-nav .barra { background: var(--surface-2); padding: 8px 12px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.marco-nav .barra i { width: 9px; height: 9px; border-radius: 999px; background: var(--line); display: inline-block; }
.marco-nav .barra span { margin-left: 8px; font-size: 11px; color: var(--text-muted); font-family: 'IBM Plex Mono', monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marco-nav img { display: block; width: 100%; }
.marco-pda { max-width: 240px; margin-inline: auto; border-radius: 26px; overflow: hidden; border: 7px solid #1c2233; box-shadow: var(--shadow); background: #1c2233; }
.marco-pda img { display: block; width: 100%; }
.pdas { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.pdas figcaption { text-align: center; }
.aviso-capturas { font-size: 13px; color: var(--text-muted); margin-top: 18px; }

/* Esquema ilustrativo ERP - BD - SGA */
.esquema { background: var(--surface); border: 1px dashed color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 18px; padding: 22px; }
.esquema-etiqueta { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); background: var(--warn-soft); padding: 3px 9px; border-radius: 999px; display: inline-block; }
.esquema-fila { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 12px; align-items: stretch; margin-top: 16px; }
.esquema-nodo { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--bg); }
.esquema-nodo h3 { font-size: 15.5px; }
.esquema-nodo p { font-size: 13.5px; color: var(--text-muted); margin-top: 6px; }
.esquema-nodo.erp { border-top: 3px solid var(--accent); }
.esquema-nodo.sga { border-top: 3px solid var(--accent2); }
.esquema-nodo.bd { border-top: 3px solid var(--good); }
.esquema-flecha { display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--text-muted); font-size: 11.5px; text-align: center; min-width: 74px; gap: 4px; }
.esquema-flecha svg { width: 60px; height: 16px; }
@media (max-width: 820px) {
  .esquema-fila { grid-template-columns: 1fr; }
  .esquema-flecha { flex-direction: row; min-width: 0; }
  .esquema-flecha svg { transform: rotate(90deg); width: 22px; }
}

/* Tablas */
.tabla { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; min-width: 640px; }
caption { text-align: left; padding: 12px 16px; font-size: 13.5px; color: var(--text-muted); caption-side: bottom; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); background: var(--surface-2); }
tbody th { font-weight: 700; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: none; }

/* Listas de comprobacion */
.lista-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.lista-check li { position: relative; padding-left: 28px; }
.lista-check li::before { content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 6px; background: var(--good-soft); border: 1px solid color-mix(in srgb, var(--good) 40%, transparent); }
.lista-check li::after { content: ''; position: absolute; left: 6px; top: 7px; width: 5px; height: 9px; border: solid var(--good); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.lista-check.pregunta li::before { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.lista-check.pregunta li::after { content: '?'; border: none; transform: none; left: 5px; top: 2px; width: auto; height: auto; color: var(--accent-ink); font-weight: 800; font-size: 13px; }

.nota { background: var(--warn-soft); color: var(--text); border-radius: 12px; padding: 14px 16px; font-size: 14.5px; }
.nota b { color: var(--warn); }

/* CTA */
.cta-demo { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; background: radial-gradient(120% 160% at 0% 0%, #0b1a5c 0%, #040d36 62%); color: #fff; border-radius: 20px; padding: 28px; box-shadow: 0 18px 40px -18px rgba(4,13,54,.7); }
.cta-demo .txt { flex: 1 1 320px; }
.cta-demo h2, .cta-demo h3 { color: #fff; font-size: 22px; }
.cta-demo p { color: #c3d0f3; margin-top: 6px; }
.cta-demo .acciones { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-demo .btn-acceso { color: #fff; border-color: rgba(255,255,255,.3); }
@media (max-width: 480px) { .cta-demo .acciones, .cta-demo .btn { width: 100%; } }

.enlaces-res { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.enlaces-res a { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.enlaces-res a:hover { border-color: var(--accent); }
.enlaces-res b { display: block; font-size: 15px; }
.enlaces-res span { display: block; font-size: 13.5px; color: var(--text-muted); margin-top: 4px; }

/* Pie */
.pie { background: var(--navy); color: #b8c7f0; margin-top: 60px; padding-block: 44px 28px; font-size: 14px; }
.pie a { color: #dbe3fb; text-decoration: none; }
.pie a:hover { text-decoration: underline; }
.pie-cols { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.pie h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: #fff; margin-bottom: 10px; }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.pie-base { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: center; }
.pie-base img { height: 26px; width: auto; display: block; }

/* Captura de PDA junto a una del ERP */
.par-pda { display: grid; gap: 24px; grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
@media (max-width: 720px) { .par-pda { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .cab-marca img { height: 24px; }
  .cab .btn { padding: 8px 11px; font-size: 13px; }
  .cab-acciones { gap: 6px; }
}
.tarjeta ul.lista-check { padding-left: 0; }
