/* Páginas públicas de marca: inicio (welcome) e ingreso (layouts/guest). Estilo corporativo, neutro respecto a las plantillas. */
:root {
    --ink-950: #0b1511;
    --ink-900: #111e18;
    --ink-800: #17231e;
    --ink-700: #22332b;
    --mint: #8fcfae;
    --text: #17221d;
    --text-muted: #5d6a63;
    --surface-2: #f5f7f6;
    --border: #e3e8e5;
    --ok: #1f8a5b;
    --ok-soft: #e3f4ec;
    --warn: #b7791f;
    --warn-soft: #fbf1df;
    --no: #b4453a;
    --no-soft: #f9e6e3;
}

.kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    color: var(--brand);
}
.kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(143, 207, 174, .18); }
.kicker-dark { color: var(--mint); }
.brand-name { color: var(--text); }
.brand-name small { color: var(--text-muted); }

/* ============================ Ingreso ============================ */
.auth-body { min-height: 100vh; min-height: 100dvh; background: var(--surface-2); color: var(--text); }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.auth-art {
    position: relative; overflow: hidden; isolation: isolate;
    background: var(--ink-900); color: #fff;
}
.auth-art .brand-name { color: #fff; }
.auth-art .brand-name small { color: #9fb2a8; }
/* Mosaico de plantillas (partials/template-mosaic): fondo del login y del hero del inicio */
.mosaic {
    position: absolute; top: -10%; bottom: -10%; right: -6%; width: 62%;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
    transform: rotate(-8deg); opacity: .5; pointer-events: none;
}
.mosaic-col { display: flex; flex-direction: column; gap: 16px; animation: mosaic-scroll var(--dur, 40s) linear infinite; }
.mosaic-col:nth-child(2) { animation-direction: reverse; margin-top: -30%; }
.mosaic-col img { width: 100%; border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
@keyframes mosaic-scroll { to { transform: translateY(calc(-50% - 8px)); } }
@media (prefers-reduced-motion: reduce) { .mosaic-col { animation: none; } }
.auth-art .mosaic { z-index: -1; }
.auth-art::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg, var(--ink-900) 34%, rgba(17, 30, 24, .82) 58%, rgba(17, 30, 24, .35));
}
.auth-art-inner {
    position: relative; height: 100%;
    display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
    padding: 40px clamp(32px, 5vw, 72px);
    max-width: 620px;
}
.auth-title { font-weight: 600; font-size: clamp(2rem, 3vw, 2.75rem); line-height: 1.12; letter-spacing: -.02em; margin: 16px 0 14px; }
.auth-lead { color: #b7c6be; font-size: 1.05rem; max-width: 460px; margin-bottom: 24px; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: #dfe8e3; }
.auth-points li { display: flex; gap: 10px; align-items: center; }
.auth-points i {
    display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(143, 207, 174, .16); color: var(--mint); font-size: .9rem;
}
.auth-art-foot { margin: 0; color: #7f9389; font-size: .8rem; }
.auth-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; background: #fff; }
.auth-brand-mobile { display: none !important; }
.auth-card { width: 100%; max-width: 400px; }
.auth-heading { font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-card .form-label { font-weight: 500; font-size: .9rem; }
.auth-foot { margin: 28px 0 0; color: var(--text-muted); font-size: .8rem; text-align: center; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8a978f; pointer-events: none; }
.input-icon .form-control { padding-left: 42px; font-size: 1rem; border-radius: 10px; border-color: #d7ded9; }
.input-icon .form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(79, 122, 100, .15); }
.input-icon .toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.caps-warning { color: #b45309; }
@media (max-width: 991.98px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-art { display: none; }
    .auth-panel { justify-content: flex-start; padding-top: 40px; background: var(--surface-2); }
    .auth-brand-mobile { display: flex !important; margin-bottom: 24px; }
    .auth-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 28px 22px; box-shadow: var(--shadow); }
}

/* ============================ Inicio ============================ */
.landing { background: #fff; color: var(--text); font-size: 15px; }
.landing .brand { color: var(--text); }
.landing-nav {
    position: sticky; top: 0; z-index: 30;
    padding: 12px 0;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.landing-nav nav a { color: var(--text-muted); text-decoration: none; font-weight: 500; }
.landing-nav nav a:hover { color: var(--text); }
.landing .btn-lg { border-radius: 10px; }
section[id] { scroll-margin-top: 72px; }

.hero {
    position: relative; overflow: hidden; isolation: isolate;
    padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 9vw, 112px);
    background: var(--ink-900);
    color: #fff;
}
.hero .mosaic { z-index: -3; width: min(58%, 960px); }
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: -2;
    background:
        linear-gradient(180deg, rgba(17, 30, 24, .7), transparent 18%, transparent 78%, var(--ink-950)),
        linear-gradient(90deg, var(--ink-900) 36%, rgba(17, 30, 24, .8) 56%, rgba(17, 30, 24, .45));
}
@media (max-width: 991.98px) {
    .hero .mosaic { width: 110%; right: -20%; opacity: .3; }
    .hero::after { background: linear-gradient(180deg, rgba(17, 30, 24, .92) 45%, rgba(17, 30, 24, .7) 75%, var(--ink-950)); }
}
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
}
.hero-title {
    font-weight: 600; letter-spacing: -.025em;
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    line-height: 1.06; margin: 18px 0 18px;
}
.hero-title span { color: var(--mint); }
.hero-lead { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: #b7c6be; max-width: 560px; }
.hero .btn-outline-light { border-color: rgba(255, 255, 255, .3); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 8px 0 0; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); }
.hero-stats dt { font-size: 1.5rem; font-weight: 600; }
.hero-stats dd { margin: 0; font-size: .85rem; color: #9fb2a8; }

/* Maqueta del producto: ventana del panel + teléfono con las plantillas */
.mock { position: relative; container-type: inline-size; display: flex; align-items: flex-end; max-width: 620px; margin-inline: auto; padding: 24px 0 0; }
.mock-window {
    flex: 1; min-width: 0;
    background: #fff; color: var(--text); border-radius: 14px; overflow: hidden;
    box-shadow: 0 40px 90px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08);
}
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #eef1ef; border-bottom: 1px solid var(--border); }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: #cfd6d2; }
.mock-bar span { margin-left: 10px; flex: 1; max-width: 60%; background: #fff; border-radius: 6px; padding: 2px 10px; font-size: max(9px, 1.9cqi); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-body { padding: 4.5cqi 13cqi 4.5cqi 4.5cqi; display: grid; gap: 3.2cqi; font-size: max(10px, 2.3cqi); }
.mock-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mock-head small { display: block; color: var(--text-muted); font-size: .85em; }
.mock-head b { font-size: 1.35em; font-weight: 600; }
.mock-chip { display: inline-block; padding: .25em .7em; border-radius: 99px; font-size: .82em; font-weight: 600; white-space: nowrap; }
.mock-chip.ok { background: var(--ok-soft); color: var(--ok); }
.mock-chip.warn { background: var(--warn-soft); color: var(--warn); }
.mock-chip.no { background: var(--no-soft); color: var(--no); }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqi; }
.mock-stats div { border: 1px solid var(--border); border-radius: 10px; padding: 2.2cqi 2.6cqi; }
.mock-stats small { display: block; color: var(--text-muted); font-size: .85em; }
.mock-stats b { font-size: 1.9em; font-weight: 600; line-height: 1.2; }
.mock-stats b.ok { color: var(--ok); }
.mock-stats b.warn { color: var(--warn); }
.mock-progress > div:first-child { display: flex; justify-content: space-between; color: var(--text-muted); margin-bottom: 6px; }
.mock-progress .track { height: 8px; border-radius: 99px; background: #edf0ee; overflow: hidden; }
.mock-progress .track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--mint)); }
.mock-list { list-style: none; padding: 0; margin: 0; }
.mock-list li { display: flex; align-items: center; gap: 2.2cqi; padding: 1.8cqi 0; border-top: 1px solid var(--border); }
.mock-list .av { flex: none; width: 6.4cqi; height: 6.4cqi; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: .8em; }
.mock-list .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-phone {
    flex: none; width: 34%; margin: 0 0 -6cqi -10cqi; position: relative; z-index: 2;
    aspect-ratio: 9 / 18.5; padding: 1.6cqi; border-radius: 6cqi;
    background: #0a0f0d; box-shadow: 0 30px 60px rgba(0, 0, 0, .5), inset 0 0 0 1px #2b3a33;
}
.mock-screen { height: 100%; border-radius: 4.6cqi; overflow: hidden; background: #f4f5f4; display: flex; flex-direction: column; padding: 6cqi 2cqi 2.4cqi; gap: 2cqi; }
.mini-stage { position: relative; flex: 1; }
.mini-slide {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: top; border-radius: 2cqi;
    opacity: 0; transform: scale(.97); transition: opacity .7s ease, transform .7s ease;
}
.mini-slide.active { opacity: 1; transform: none; }
.mini-btn { background: var(--brand); color: #fff; text-align: center; border-radius: 2cqi; padding: 1.8cqi; font-size: max(8px, 1.9cqi); font-weight: 600; }
.mock-toast {
    position: absolute; z-index: 3; top: 0; left: -3cqi;
    display: flex; align-items: center; gap: 10px;
    background: #fff; color: var(--text); border-radius: 12px; padding: 10px 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .3); font-size: max(11px, 2.2cqi);
    animation: toast 6s ease-in-out infinite;
}
.mock-toast i { color: var(--ok); font-size: 1.5em; }
.mock-toast b { display: block; font-weight: 600; }
.mock-toast span { color: var(--text-muted); line-height: 1.3; }
@keyframes toast { 0%, 8% { opacity: 0; transform: translateY(8px); } 16%, 80% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; transform: translateY(-4px); } }
@media (max-width: 575.98px) { .mock-toast { left: 0; } }
@media (prefers-reduced-motion: reduce) { .mock-toast { animation: none; } }

.segments { border-bottom: 1px solid var(--border); padding: 28px 0; }
.segments p { text-align: center; color: var(--text-muted); font-size: .85rem; font-weight: 500; margin-bottom: 14px; }
.segments ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; }
.segments li { font-weight: 600; color: #7a867f; }

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-soft { background: var(--surface-2); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-head h2 { font-weight: 600; letter-spacing: -.02em; font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 10px 0 10px; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; margin: 0; }
.feature { height: 100%; padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.feature:hover { border-color: #c9d6cf; box-shadow: 0 14px 34px rgba(17, 30, 24, .07); }
.feature-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 1.2rem; background: var(--brand-soft); color: var(--brand); margin-bottom: 16px; }
.feature h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 6px; }
.feature p { color: var(--text-muted); margin: 0; font-size: .93rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 56px; display: flex; flex-direction: column; gap: 4px; counter-increment: step; }
.step::before {
    content: counter(step, decimal-leading-zero);
    position: absolute; top: 0; left: 0; width: 40px; height: 40px; border-radius: 10px;
    display: grid; place-items: center; background: var(--ink-800); color: var(--mint); font-weight: 600; font-size: .9rem;
}
.step:not(:last-child)::after { content: ""; position: absolute; top: 20px; left: 56px; right: 0; height: 1px; background: #cfd8d3; }
.step strong { font-size: 1.05rem; font-weight: 600; }
.step span { color: var(--text-muted); }
@media (max-width: 767.98px) {
    .steps { grid-template-columns: 1fr; gap: 20px; }
    .step { padding: 0 0 0 58px; min-height: 40px; }
    .step:not(:last-child)::after { top: 48px; bottom: -14px; left: 20px; right: auto; width: 1px; height: auto; }
}

.section-dark { background: var(--ink-900); color: #fff; }
.section-dark h2 { font-weight: 600; letter-spacing: -.02em; font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.lead-muted { color: #b7c6be; font-size: 1.05rem; }
.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; overflow: hidden; }
.trust-item { display: flex; gap: 14px; padding: 24px; background: var(--ink-900); }
.trust-item i { color: var(--mint); font-size: 1.4rem; line-height: 1; }
.trust-item strong { display: block; font-weight: 600; margin-bottom: 4px; }
.trust-item span { color: #9fb2a8; font-size: .92rem; }
@media (max-width: 575.98px) { .trust-grid { grid-template-columns: 1fr; } }

.theme-emoji { font-size: 2.2rem; }
.plan {
    position: relative; height: 100%;
    background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 28px;
    display: flex; flex-direction: column;
}
.plan.featured { border: 2px solid var(--brand); box-shadow: 0 24px 50px rgba(17, 30, 24, .12); }
.plan-badge { position: absolute; top: -12px; left: 28px; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 600; letter-spacing: .04em; padding: 4px 12px; border-radius: 99px; }
.plan h3 { font-weight: 600; font-size: 1.15rem; }
.plan-price { font-size: 2rem; font-weight: 600; letter-spacing: -.02em; margin-bottom: 16px; }
.plan ul { list-style: none; padding: 16px 0 0; margin: 0 0 24px; flex: 1; border-top: 1px solid var(--border); }
.plan li { display: flex; gap: 8px; margin-bottom: 10px; color: var(--text-muted); }
.plan li i { color: var(--brand); }

.cta {
    position: relative; overflow: hidden;
    border-radius: 20px; padding: clamp(28px, 5vw, 56px);
    background: radial-gradient(600px 300px at 100% 0%, rgba(79, 122, 100, .6), transparent 70%), var(--ink-900);
    color: #fff; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
.cta h2 { font-weight: 600; letter-spacing: -.02em; margin: 0 0 6px; font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.cta p { margin: 0; color: #b7c6be; }

.landing-foot { padding: 48px 0 28px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .9rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.foot-grid p { max-width: 340px; margin: 10px 0 0; }
.foot-grid nav { display: flex; flex-direction: column; gap: 8px; }
.foot-grid nav strong { color: var(--text); font-weight: 600; margin-bottom: 4px; }
.foot-grid nav a { color: var(--text-muted); text-decoration: none; }
.foot-grid nav a:hover { color: var(--text); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .82rem; }
@media (max-width: 767.98px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- Diseños: pestañas + carrusel ---------- */
.tpl-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: -12px auto 32px; padding: 4px; width: fit-content; max-width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.tpl-tab {
    border: 0; background: transparent; color: var(--text-muted);
    border-radius: 9px; padding: 8px 16px; font-weight: 500; font-size: .92rem; transition: all .2s;
}
.tpl-tab span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; border-radius: 99px; background: #e4e9e6; font-size: .72rem; }
.tpl-tab:hover { color: var(--text); }
.tpl-tab.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(17, 30, 24, .12); }
.tpl-slider { position: relative; padding: 0 8px 36px; }
.tpl-track {
    display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    padding: 6px 4px 18px; scrollbar-width: none;
}
.tpl-track::-webkit-scrollbar { display: none; }
.tpl-card {
    flex: 0 0 calc((100% - 48px) / 3); scroll-snap-align: start;
    background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
    display: flex; flex-direction: column; transition: box-shadow .25s, border-color .25s;
}
.tpl-card:hover { border-color: #c9d6cf; box-shadow: 0 20px 44px rgba(17, 30, 24, .1); }
.tpl-shot { position: relative; aspect-ratio: 3 / 3.2; overflow: hidden; background: linear-gradient(180deg, var(--c2), var(--surface-2)); display: grid; place-items: center; }
.tpl-shot img { width: 76%; margin-top: 8%; align-self: start; border-radius: 8px; box-shadow: 0 18px 40px rgba(0, 0, 0, .16); transition: transform 1.6s ease; }
.tpl-card:hover .tpl-shot img { transform: translateY(-28%); }
.tpl-info { padding: 18px 20px 22px; border-top: 1px solid var(--border); }
.tpl-info strong { font-size: 1.05rem; font-weight: 600; }
.tpl-info p { color: var(--text-muted); margin: 6px 0 12px; font-size: .92rem; }
.tpl-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-tags span { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); font-size: .74rem; font-weight: 500; padding: 2px 9px; border-radius: 6px; }
.tpl-nav {
    position: absolute; top: 40%; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--border); background: #fff; color: var(--text); font-size: 1.1rem;
    box-shadow: 0 8px 22px rgba(17, 30, 24, .12); display: grid; place-items: center;
}
.tpl-nav:hover { background: var(--ink-800); border-color: var(--ink-800); color: #fff; }
.tpl-nav.prev { left: -14px; } .tpl-nav.next { right: -14px; }
.tpl-dots { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; justify-content: center; gap: 6px; }
.tpl-dots span { width: 8px; height: 8px; border-radius: 99px; background: #d3dbd6; transition: all .3s; }
.tpl-dots span.on { width: 26px; background: var(--brand); }
.tpl-slider.static .tpl-nav, .tpl-slider.static .tpl-dots { display: none; }
@media (max-width: 991.98px) { .tpl-card { flex-basis: calc((100% - 24px) / 2); } }
@media (max-width: 575.98px) {
    .tpl-card { flex-basis: 84%; }
    .tpl-nav { display: none; }
    .tpl-tabs { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; width: auto; }
    .tpl-tab { white-space: nowrap; }
}
