/* ============================================================
   Propuestas — Sistema de diseño "Pitch Premium"
   ============================================================ */
:root {
    --ink: #0b1220;
    --navy: #0f172a;
    --indigo: #4f46e5;
    --violet: #7c3aed;
    --emerald: #10b981;
    --gold: #f59e0b;
    --rose: #f43f5e;
    --sky: #0ea5e9;
    --muted: #64748b;
    --line: #e7ebf2;
    --bg: #f6f8fc;
    --card: #ffffff;
    --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #0ea5e9 110%);
    --grad-vivid: linear-gradient(125deg, #4f46e5, #7c3aed, #0ea5e9, #ec4899, #4f46e5);
    --grad-dark: radial-gradient(1200px 600px at 10% -10%, rgba(124,58,237,.45), transparent 60%),
                 radial-gradient(900px 500px at 100% 0%, rgba(14,165,233,.40), transparent 55%),
                 linear-gradient(160deg, #0b1220 0%, #131c33 60%, #0b1220 100%);
    --shadow: 0 10px 30px rgba(15, 23, 42, .08);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, .18);
    --radius: 18px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .display, .navbar-brand {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    letter-spacing: -.02em;
}

a { text-decoration: none; }

/* ---------- Navbar ---------- */
.app-navbar {
    background: rgba(11, 18, 32, .85);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.app-navbar .navbar-brand { font-weight: 800; }
.app-navbar .brand-badge {
    width: 34px; height: 34px; border-radius: 10px;
    background: var(--grad); display: inline-flex; align-items: center; justify-content: center;
    color: #fff; margin-right: .55rem; box-shadow: 0 6px 16px rgba(79,70,229,.5);
}
.app-navbar .nav-link { color: rgba(255,255,255,.78) !important; font-weight: 500; border-radius: 10px; padding: .4rem .8rem !important; }
.app-navbar .nav-link:hover { color: #fff !important; background: rgba(255,255,255,.08); }

/* ---------- Cards ---------- */
.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--card);
}
.card-header {
    background: #fff; border-bottom: 1px solid var(--line);
    font-weight: 700; border-radius: var(--radius) var(--radius) 0 0 !important;
}

/* ---------- Botones ---------- */
.btn { border-radius: 12px; font-weight: 600; }
.btn-primary { background: var(--indigo); border-color: var(--indigo); }
.btn-primary:hover { background: #4338ca; border-color: #4338ca; }
.btn-gradient {
    background: var(--grad); color: #fff; border: 0;
    box-shadow: 0 10px 24px rgba(79,70,229,.35);
}
.btn-gradient:hover { color: #fff; filter: brightness(1.05); transform: translateY(-1px); }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art {
    background: var(--grad-vivid); background-size: 320% 320%;
    animation: gradientShift 16s ease infinite;
    color: #fff; padding: 3.5rem; position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
}
.auth-art::after {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px);
    background-size: 22px 22px; opacity: .5;
}
.auth-art .art-z { position: relative; z-index: 1; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem; background: #fff; }
.auth-card { width: 100%; max-width: 400px; }
.brand-logo {
    width: 56px; height: 56px; border-radius: 16px; background: var(--grad);
    display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.6rem;
    box-shadow: 0 12px 30px rgba(79,70,229,.5);
}
.form-control, .form-select { border-radius: 12px; padding: .65rem .9rem; border-color: var(--line); }
.form-control:focus, .form-select:focus { border-color: var(--indigo); box-shadow: 0 0 0 .2rem rgba(79,70,229,.15); }
@media (max-width: 900px) {
    html, body { overflow-x: hidden; }
    /* Pantalla completa con el degradado de marca; todo centrado */
    .auth {
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        min-height: 100vh; gap: 2rem; padding: 2.5rem 1.25rem;
        background: var(--grad-vivid); background-size: 320% 320%;
        animation: gradientShift 16s ease infinite;
    }
    .auth-art {
        display: flex; flex-direction: column; align-items: center; gap: .85rem;
        min-height: 0; padding: 0; background: transparent; border-radius: 0;
    }
    .auth-art::after { display: none; }
    .auth-art .display-5 { font-size: 1.7rem; }
    .auth-form {
        display: flex; justify-content: center; width: 100%;
        background: transparent; padding: 0;
    }
    .auth-card {
        background: #fff; border-radius: 20px;
        box-shadow: 0 26px 60px rgba(2, 8, 23, .45);
        padding: 2rem 1.6rem;
        width: 100%; max-width: min(400px, calc(100vw - 40px));
    }
}

/* ---------- HERO de propuesta ---------- */
.pitch-hero {
    background: var(--grad-vivid); background-size: 320% 320%;
    animation: gradientShift 16s ease infinite;
    color: #fff; border-radius: 26px;
    padding: 3.2rem 2.6rem; position: relative; overflow: hidden;
    box-shadow: 0 24px 60px rgba(79, 70, 229, .38);
}
.pitch-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px);
    background-size: 24px 24px; opacity: .6;
}
.pitch-hero::after {
    content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.20), transparent);
    transform: skewX(-20deg); animation: sweep 7s ease-in-out infinite; pointer-events: none;
}
.pitch-hero .hero-z { position: relative; z-index: 1; }
.pitch-hero .eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; color: #c7d2fe; font-weight: 700; }
.pitch-hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; margin: .4rem 0 .6rem; }
.pitch-hero .lead { color: rgba(255,255,255,.82); font-size: 1.1rem; max-width: 760px; }
.chip {
    display: inline-flex; align-items: center; gap: .4rem; background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18); color: #fff; padding: .32rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
}
.chip.gold { background: rgba(245,158,11,.18); border-color: rgba(245,158,11,.5); color: #fde68a; }
.chip.emerald { background: rgba(16,185,129,.18); border-color: rgba(16,185,129,.5); color: #a7f3d0; }

/* ---------- KPI strip (sobrepuesto al hero) ---------- */
.kpi-strip { margin-top: -3.2rem; position: relative; z-index: 3; }
.kpi-card {
    background: #fff; border-radius: 18px; padding: 1.1rem 1.25rem; box-shadow: var(--shadow);
    border: 1px solid var(--line); height: 100%;
}
.kpi-card .kpi-ico {
    width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem; color: #fff; margin-bottom: .6rem;
}
.kpi-card .kpi-num { font-size: 1.7rem; font-weight: 800; font-family: 'Plus Jakarta Sans'; line-height: 1; }
.kpi-card .kpi-lbl { color: var(--muted); font-size: .82rem; margin-top: .25rem; }
.kpi-card .kpi-sub { color: #94a3b8; font-size: .72rem; }
.g-indigo { background: var(--indigo); } .g-emerald { background: var(--emerald); }
.g-gold { background: var(--gold); } .g-sky { background: var(--sky); } .g-violet { background: var(--violet); } .g-rose { background: var(--rose); }

/* ---------- Bloques de narrativa ---------- */
.block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem 1.7rem; }
.block-title { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.block-title .idx {
    width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; font-size: .9rem;
}
.block-title h3 { margin: 0; font-size: 1.3rem; }
.prose { color: #1f2937; line-height: 1.7; }
.prose p { margin-bottom: .7rem; }
.prose .sub-h { font-weight: 700; color: var(--navy); margin: .4rem 0 .2rem; }
.prose ul { list-style: none; padding-left: 0; margin: .3rem 0 .8rem; }
.prose ul li { position: relative; padding-left: 1.6rem; margin-bottom: .35rem; }
.prose ul li::before { content: "\F26B"; font-family: "bootstrap-icons"; color: var(--indigo); position: absolute; left: 0; top: .05rem; }

/* ---------- Tabla financiera ---------- */
.fin-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.fin-table thead th { background: #f1f5f9; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding: .7rem 1rem; }
.fin-table tbody td { padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.fin-table tbody tr:hover td { background: #fafbff; }
.fin-table .monto { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.fin-table tfoot td { padding: .85rem 1rem; font-weight: 800; border-top: 2px solid var(--navy); }
.fin-table tfoot .monto { color: var(--indigo); font-size: 1.05rem; }
.bar-cell { position: relative; }
.bar-fill { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--grad); border-radius: 3px; }

/* ---------- TOC lateral ---------- */
.toc { position: sticky; top: 1.2rem; }
.toc a { display: block; padding: .45rem .8rem; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .9rem; border-left: 2px solid transparent; }
.toc a:hover { background: #eef2ff; color: var(--indigo); }

/* ---------- Animaciones ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Listado / tarjetas ---------- */
.prop-card { transition: transform .2s ease, box-shadow .2s ease; overflow: hidden; }
.prop-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.prop-card:hover .prop-cover .ico { transform: scale(1.08) rotate(-4deg); }
.prop-cover {
    height: 176px; border-radius: var(--radius) var(--radius) 0 0;
    background: var(--grad-vivid); position: relative; overflow: hidden;
    display: flex; flex-direction: column; padding: 1rem 1.2rem 1.15rem;
}
.prop-cover-chip { align-self: flex-start; position: relative; z-index: 2; }
.prop-cover-title {
    position: relative; z-index: 2; margin: auto 0 0; color: #fff;
    font-family: 'Plus Jakarta Sans'; font-weight: 800; font-size: 1.18rem; line-height: 1.22;
    text-shadow: 0 2px 12px rgba(2, 8, 23, .32);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.prop-cover::after {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px);
    background-size: 18px 18px; opacity: .5;
}
.prop-cover .ico { position: absolute; right: -2px; top: 8px; bottom: auto; font-size: 4.8rem; color: rgba(255,255,255,.22); transition: transform .3s ease; z-index: 1; }

/* Todas las portadas comparten el degradado unificado; el tema se distingue por el icono.
   Un ligero giro de matiz por tema da variedad sutil sin romper la armonía. */
.prop-cover.cover-cafe       { filter: hue-rotate(18deg) saturate(1.05); }
.prop-cover.cover-enfermeria { filter: hue-rotate(-12deg); }
.prop-cover.cover-estetica   { filter: hue-rotate(26deg); }
.prop-cover.cover-salud      { filter: hue-rotate(-22deg); }
.prop-cover.cover-tech       { filter: hue-rotate(-6deg); }
.prop-cover.cover-retail     { filter: hue-rotate(14deg) saturate(1.05); }
/* Brillo sutil en la portada para dar profundidad */
.prop-cover { position: relative; }
.prop-cover::before {
    content: ""; position: absolute; inset: 0; z-index: 0;
    background: radial-gradient(120% 80% at 85% 10%, rgba(255,255,255,.22), transparent 60%);
}
.prop-card .card-title { font-family: 'Plus Jakarta Sans'; }
.prop-link { color: var(--indigo); font-weight: 700; display: inline-flex; align-items: center; gap: .35rem; }
.prop-link i { transition: transform .2s ease; }
.prop-card:hover .prop-link i { transform: translateX(4px); }
.prop-cta { font-weight: 700; padding-top: .6rem; padding-bottom: .6rem; }
.prop-cta i { transition: transform .2s ease; }
.prop-card:hover .prop-cta i { transform: translateX(4px); }

.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.estado-badge { font-size: .72rem; font-weight: 700; }

.diagram-thumb { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: .35rem; max-height: 240px; object-fit: contain; }

footer { color: #94a3b8; }

/* ============================================================
   Portal animado — estilo 2026
   ============================================================ */
.portal-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(75px); opacity: .5; animation: float 16s ease-in-out infinite; }
.orb-1 { width: 420px; height: 420px; background: #7c3aed; top: -90px; left: -70px; }
.orb-2 { width: 360px; height: 360px; background: #0ea5e9; top: 18%; right: -90px; animation-delay: -5s; }
.orb-3 { width: 340px; height: 340px; background: #f59e0b; bottom: -120px; left: 28%; animation-delay: -9s; }
.orb-4 { width: 300px; height: 300px; background: #ec4899; bottom: 8%; right: 22%; animation-delay: -3s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(26px, -34px) scale(1.06); }
    66%      { transform: translate(-20px, 22px) scale(.95); }
}

/* Hero de bienvenida */
.welcome-hero {
    position: relative; overflow: hidden; border-radius: 26px;
    padding: 2.6rem 2.4rem; margin-bottom: 2rem; color: #fff;
    background: linear-gradient(125deg, #4f46e5, #7c3aed, #0ea5e9, #ec4899, #4f46e5);
    background-size: 320% 320%; animation: gradientShift 14s ease infinite;
    box-shadow: 0 24px 60px rgba(79, 70, 229, .38);
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.welcome-hero::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px);
    background-size: 24px 24px; opacity: .6;
}
.welcome-hero::after {
    content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.22), transparent);
    transform: skewX(-20deg); animation: sweep 7s ease-in-out infinite;
}
@keyframes sweep { 0%, 100% { left: -60%; } 55% { left: 130%; } }
.welcome-z { position: relative; z-index: 1; }
.welcome-eyebrow {
    display: inline-flex; align-items: center; gap: .45rem; font-size: .74rem; font-weight: 700;
    letter-spacing: .16em; text-transform: uppercase; color: #e0e7ff;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
    padding: .35rem .8rem; border-radius: 999px; margin-bottom: .9rem;
}
.welcome-title {
    font-family: 'Plus Jakarta Sans'; font-weight: 800;
    font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.08; margin-bottom: .7rem;
}
.grad-text {
    background: linear-gradient(90deg, #fde68a, #fbcfe8 55%, #ffffff);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.welcome-sub { color: rgba(255,255,255,.92); max-width: 660px; font-size: 1.06rem; line-height: 1.65; }
.welcome-chips { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.35rem; }
.wchip {
    display: inline-flex; align-items: center; gap: .4rem; backdrop-filter: blur(6px);
    background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); color: #fff;
    padding: .45rem .9rem; border-radius: 999px; font-size: .84rem; font-weight: 600;
    transition: transform .2s ease, background .2s ease;
}
.wchip:hover { transform: translateY(-2px); background: rgba(255,255,255,.26); }

/* Tarjetas con más vida */
.prop-card:hover { transform: translateY(-9px); box-shadow: 0 32px 64px rgba(79, 70, 229, .26); }
.prop-cover .ico { animation: bob 7s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.prop-card:hover .prop-cover .ico { animation: none; }

@media (prefers-reduced-motion: reduce) {
    .orb, .welcome-hero, .welcome-hero::after, .prop-cover .ico { animation: none !important; }
}
