@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ================================================
   MATCHING.DEALS — SISTEMA DE DISEÑO GUBERNAMENTAL
   Paleta: Blanco/Slate · Navy · Azul Real · Ámbar Pro
   ================================================ */

:root {
    /* Fondo */
    --bg-page: #F1F5F9;
    --bg-white: #FFFFFF;
    --bg-section: #F8FAFC;
    --bg-sidebar: #FFFFFF;

    /* Tipografía */
    --text-head: #0F172A;
    --text-body: #334155;
    --text-muted: #64748B;
    --text-light: #94A3B8;

    /* Acento principal — Azul Real */
    --blue-700: #1D4ED8;
    --blue-600: #2563EB;
    --blue-100: #DBEAFE;
    --blue-50: #EFF6FF;

    /* Navy institucional */
    --navy: #0F172A;
    --navy-700: #1E293B;
    --navy-500: #334155;

    /* Ámbar Pro */
    --amber-600: #D97706;
    --amber-100: #FEF3C7;
    --amber-50: #FFFBEB;

    /* Semánticos */
    --success: #059669;
    --success-bg: #D1FAE5;
    --warning: #D97706;
    --warning-bg: #FEF9C3;
    --danger: #DC2626;
    --danger-bg: #FEE2E2;

    /* Bordes y sombras */
    --border: #E2E8F0;
    --border-dark: #CBD5E1;
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.07), 0 1px 2px -1px rgb(0 0 0 / 0.07);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --shadow-hover: 0 12px 24px -4px rgb(37 99 235 / 0.15), 0 4px 8px -2px rgb(0 0 0 / 0.06);

    /* Radio */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

/* ================================================ RESET */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-page);
    color: var(--text-body);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-head);
    letter-spacing: -0.025em;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: var(--blue-600);
    transition: color 0.2s;
}

a:hover {
    color: var(--blue-700);
}

ul {
    list-style: none;
}

button,
input {
    font-family: inherit;
}

/* ================================================ SCROLLBAR */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: var(--bg-page);
}

::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--blue-600);
}

/* ================================================ CONTENEDOR */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ================================================ BOTONES */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-primary {
    background: var(--blue-600);
    color: #fff;
    border-color: var(--blue-600);
    box-shadow: 0 1px 3px 0 rgb(37 99 235 / 0.35);
}

.btn-primary:hover {
    background: var(--blue-700);
    border-color: var(--blue-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px 0 rgb(37 99 235 / 0.4);
    color: #fff;
}

.btn-outline {
    background: var(--bg-white);
    color: var(--text-body);
    border-color: var(--border-dark);
}

.btn-outline:hover {
    background: var(--bg-section);
    border-color: var(--blue-600);
    color: var(--blue-600);
}

.btn-pro {
    background: var(--amber-600);
    color: #fff;
    border-color: var(--amber-600);
}

.btn-pro:hover {
    background: #B45309;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px 0 rgb(180 83 9 / 0.4);
    color: #fff;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 13px 30px;
    font-size: 1rem;
}

/* ================================================ BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.badge-alta {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-media {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-baja {
    background: var(--success-bg);
    color: var(--success);
}

.badge-boe {
    background: var(--blue-100);
    color: var(--blue-700);
}

.badge-borme {
    background: #E0E7FF;
    color: #4338CA;
}

.badge-fusion {
    background: #E0E7FF;
    color: #4338CA;
}

.badge-escision {
    background: #F3E8FF;
    color: #6B21A8;
}

.badge-disolucion {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-constitucion {
    background: #D1FAE5;
    color: #065F46;
}

.badge-revocacion {
    background: #FEF3C7;
    color: #92400E;
}

.badge-cesion {
    background: #E0F2FE;
    color: #075985;
}

.badge-otro {
    background: var(--bg-section);
    color: var(--text-muted);
}

.badge-pro {
    background: var(--amber-100);
    color: var(--amber-600);
    font-size: 0.65rem;
}

/* Dashboard Pro Controls */
.pro-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
    flex-wrap: wrap;
    background: var(--bg-white);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.tabs-switcher {
    display: flex;
    background: var(--bg-page);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.tab-link {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 7px;
    transition: all 0.2s;
}

.tab-link.active {
    background: var(--bg-white);
    color: var(--blue-600);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.date-filter {
    display: flex;
    align-items: center;
}

.search-input {
    background: var(--bg-white);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--blue-600);
}

/* ================================================ FUENTES PREMIUM */
.fuentes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 900px;
    margin: 40px auto 0;
}

.fuente-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
}

.fuente-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--blue-600);
}

.fuente-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at top right, var(--blue-50) 0%, transparent 100%);
}

.fuente-icon {
    width: 54px;
    height: 54px;
    background: var(--blue-50);
    color: var(--blue-600);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.fuente-card h4 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.fuente-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ================================================ CARD BASE */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--blue-100);
    transform: translateY(-2px);
}

/* ================================================ NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 900;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.04em;
}

.logo img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.logo-dot {
    color: var(--blue-600);
}

.logo-badge {
    background: var(--blue-600);
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-body);
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--bg-section);
    color: var(--text-head);
}

.nav-link.active {
    color: var(--blue-600);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ================================================ HERO */
.hero {
    padding: 140px 0 80px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

/* Ornamento geométrico sutil */
.hero::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgb(219 234 254 / 0.6) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgb(219 234 254 / 0.4) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

/* Pill institucional */
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: 99px;
    padding: 4px 14px 4px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--blue-700);
    margin-bottom: 24px;
}

.hero-pill-dot {
    width: 7px;
    height: 7px;
    background: var(--blue-600);
    border-radius: 50%;
}

.hero h1 {
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    font-weight: 800;
    color: var(--text-head);
    margin-bottom: 20px;
}

.hero h1 span {
    color: var(--blue-600);
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 580px;
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Fuentes badge */
.fuentes-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.fuentes-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-right: 4px;
}

/* ================================================ STATS STRIP */
.stats-strip {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
}

.stats-strip-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stat-item {
    padding: 28px 32px;
    border-right: 1px solid var(--border);
    text-align: center;
}

.stat-item:last-child {
    border-right: none;
}

.stat-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-head);
    letter-spacing: -0.04em;
}

.stat-value span {
    color: var(--blue-600);
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

/* ================================================ SECCIONES */
.section {
    padding: 72px 0;
}

.section-alt {
    background: var(--bg-section);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
}

.section-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Alerta de retraso */
.delay-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--danger-bg);
    border: 1px solid #FECACA;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--danger);
    white-space: nowrap;
}

/* ================================================ FILTROS */
.filters-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.filters-bar::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    padding: 6px 16px;
    border-radius: 99px;
    background: var(--bg-white);
    border: 1px solid var(--border-dark);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip:hover {
    border-color: var(--blue-600);
    color: var(--blue-600);
    background: var(--blue-50);
}

.filter-chip.active {
    background: var(--blue-600);
    border-color: var(--blue-600);
    color: #fff;
    font-weight: 600;
}

/* ================================================ BORME SMART LIST (TABLA) */
.borme-table-container {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-top: 10px;
}

.borme-table-header {
    display: flex;
    padding: 14px 24px;
    background: var(--bg-section);
    border-bottom: 2px solid var(--border);
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.borme-row-wrapper {
    border-bottom: 1px solid var(--border);
}

.borme-row {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 16px;
}

.borme-row:hover {
    background: var(--blue-50);
}

.borme-row.expanded {
    background: var(--blue-50);
    border-bottom: 1px solid var(--blue-100);
}

/* Columnas de la tabla */
.col-nombre {
    flex: 3;
    font-weight: 700;
    color: var(--text-head);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.col-tipo {
    flex: 1;
    display: flex;
    align-items: center;
}

.col-fecha {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.col-provincia {
    flex: 1.5;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.col-capital {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--blue-700);
    text-align: right;
}

.col-action {
    width: 24px;
    color: var(--text-light);
    transition: transform 0.2s;
}

.expanded .col-action {
    transform: rotate(180deg);
    color: var(--blue-600);
}

/* Panel de detalle/expansión */
.borme-detail {
    max-height: 0;
    overflow: hidden;
    background: #FAFBFF;
    transition: max-height 0.3s ease-out;
}

.borme-row.expanded+.borme-detail {
    max-height: 500px;
    border-bottom: 1px solid var(--blue-100);
}

.borme-detail-inner {
    padding: 20px 24px 24px 64px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-body);
}

.borme-detail-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--blue-600);
    margin-bottom: 8px;
    display: block;
}

@media (max-width: 900px) {
    .borme-table-header {
        display: none;
    }

    .borme-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .col-nombre {
        font-size: 0.95rem;
    }

    .col-capital {
        text-align: left;
    }

    .borme-detail-inner {
        padding: 16px;
    }
}

/* ================================================ GRID DE CARDS */
.opp-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, 1fr);
    /* 3 por defecto */
    align-items: start;
}

/* ================================================ OPORTUNIDAD CARD */
.opp-card {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

/* Franja de urgencia lateral */
.opp-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    background: var(--border);
}

.opp-card.urgencia-alta::before {
    background: var(--danger);
}

.opp-card.urgencia-media::before {
    background: var(--warning);
}

.opp-card.urgencia-baja::before {
    background: var(--success);
}

.opp-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.opp-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.opp-date {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.opp-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-head);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    /* reserva 2 líneas siempre */
}

/* Organización y Ubicación */
.opp-org {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.opp-org svg {
    opacity: 0.6;
}

/* Badge de Score IA */
.badge-score {
    background: #fdf2f8 !important;
    color: #db2777 !important;
    border: 1px solid #fbcfe8 !important;
}

/* Análisis Estructurado de IA */
.opp-analysis-structured {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.insight-item {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-head);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.insight-item strong {
    color: var(--blue-600);
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    margin-right: 4px;
}

.opp-literal {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    background: var(--bg-section);
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border);
    margin: 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.5em;
    /* reserva 3 líneas */
}

.opp-insight-box {
    margin-top: 8px;
    padding: 12px;
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: var(--radius-md);
    position: relative;
    flex-grow: 1;
}

.insight-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--blue-700);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.opp-analysis {
    font-size: 0.85rem;
    color: var(--text-head);
    line-height: 1.55;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 6.2em;
    /* reserva 4 líneas */
}

.opp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.opp-tag {
    padding: 2px 9px;
    background: var(--bg-section);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Soporte para expansión de tarjetas */
.opp-card.expanded .opp-title,
.opp-card.expanded .opp-literal,
.opp-card.expanded .opp-analysis,
.opp-card.expanded .insight-item {
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    display: block !important;
    min-height: 0 !important;
}

.expand-btn {
    background: var(--bg-section);
    border: 1px solid var(--border);
    color: var(--blue-600);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 12px 0;
    transition: all 0.2s;
    width: fit-content;
}

.expand-btn:hover {
    background: var(--border);
    border-color: var(--border-dark);
}

.opp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    gap: 10px;
    flex-wrap: wrap;
}

/* Indicador de retraso en card */
.delay-ribbon {
    position: absolute;
    top: 10px;
    left: -32px;
    background: var(--danger);
    color: #fff;
    padding: 3px 36px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    transform: rotate(-43deg);
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ================================================ BANNER STICKY */
.sticky-banner {
    position: sticky;
    top: 68px;
    z-index: 200;
    background: var(--blue-700);
    color: #fff;
    padding: 10px 0;
    border-bottom: 1px solid var(--blue-600);
}

.sticky-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.sticky-banner p {
    font-size: 0.85rem;
    font-weight: 500;
}

.sticky-banner strong {
    font-weight: 700;
}

/* ================================================ PRICING */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 860px;
    margin: 0 auto;
}

.price-card {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.price-amount {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-head);
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 12px 0 4px;
}

.price-amount small {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 400;
}

.price-card.featured {
    background: var(--blue-600);
    border-color: var(--blue-600);
    color: #fff;
}

.price-card.featured h3,
.price-card.featured .price-amount,
.price-card.featured .price-desc {
    color: #fff;
}

.price-card.featured .price-amount small,
.price-card.featured .price-list li {
    color: rgba(255, 255, 255, 0.8);
}

.price-card.featured .price-list li.ok {
    color: #fff;
}

.price-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.price-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.price-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
}

.price-list li.nok {
    color: var(--text-muted);
    text-decoration: line-through;
}

/* ================================================ MODAL */
.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-bg.open {
    display: flex;
}

.modal-box {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 520px;
    padding: 40px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-section);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: 0.2s;
}

.modal-close:hover {
    background: var(--border);
    color: var(--text-head);
}

.modal-icon {
    width: 52px;
    height: 52px;
    background: var(--blue-50);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--blue-600);
}

.modal-cta-box {
    background: var(--bg-section);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    margin: 20px 0;
}

.modal-cta-box h4 {
    font-size: 0.92rem;
    margin-bottom: 6px;
}

.modal-cta-box p {
    font-size: 0.83rem;
    color: var(--text-muted);
}

.email-row {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.email-row input {
    flex-grow: 1;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-dark);
    font-size: 0.875rem;
    background: var(--bg-white);
    color: var(--text-head);
    outline: none;
    transition: border-color 0.2s;
}

.email-row input:focus {
    border-color: var(--blue-600);
}

/* ================================================ FOOTER */
.footer {
    background: var(--navy);
    color: #94A3B8;
    padding: 60px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    color: #fff;
}

.footer-brand p {
    font-size: 0.85rem;
    margin-top: 12px;
}

.footer-col h5 {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    margin-bottom: 14px;
}

.footer-col a {
    display: block;
    font-size: 0.85rem;
    color: #94A3B8;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
}

.footer-disclaimer {
    color: #64748B;
    font-style: italic;
}

/* ================================================ PRO SIDEBAR */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.pro-sidebar {
    width: 260px;
    background: var(--bg-white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-head {
    padding: 24px 20px 16px;
    border-bottom: 1px solid var(--border);
}

.sidebar-head .logo {
    font-size: 1.1rem;
}

.sidebar-section-label {
    padding: 20px 20px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sidebar-nav {
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.18s;
    position: relative;
}

.sidebar-link:hover {
    background: var(--bg-section);
    color: var(--text-head);
}

.sidebar-link.active {
    background: var(--blue-50);
    color: var(--blue-600);
    font-weight: 600;
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: var(--blue-600);
    border-radius: 0 3px 3px 0;
}

.sidebar-link svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-link.active svg {
    opacity: 1;
}

.sidebar-count {
    margin-left: auto;
    background: var(--blue-100);
    color: var(--blue-700);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 99px;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 12px;
    border-top: 1px solid var(--border);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-section);
    cursor: pointer;
    transition: 0.2s;
}

.user-pill:hover {
    border-color: var(--border-dark);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--blue-600);
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-name {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text-head);
}

.user-plan {
    font-size: 0.72rem;
    color: var(--amber-600);
    font-weight: 600;
}

/* ================================================ PRO MAIN */
.pro-main {
    flex-grow: 1;
    background: var(--bg-page);
    padding: 32px 36px;
}

.pro-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.pro-topbar h1 {
    font-size: 1.6rem;
    font-weight: 700;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--success);
}

.live-dot {
    width: 7px;
    height: 7px;
    background: var(--success);
    border-radius: 50%;
    animation: livePulse 2s ease infinite;
}

@keyframes livePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(5, 150, 105, .6);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(5, 150, 105, 0);
    }
}

.top-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    padding: 9px 16px;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: var(--bg-white);
    color: var(--text-head);
    width: 260px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

/* KPI Cards Pro */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.kpi-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
}

.kpi-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-head);
    line-height: 1.1;
    margin: 6px 0 4px;
    letter-spacing: -0.04em;
}

.kpi-trend {
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.trend-up {
    color: var(--success);
}

.trend-down {
    color: var(--danger);
}

.trend-neu {
    color: var(--text-muted);
}

.pro-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pro-feed-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
}

/* ================================================ ANIMACIONES */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    animation: fadeUp 0.5s ease forwards;
}

.fade-up-d1 {
    animation-delay: 0.05s;
}

.fade-up-d2 {
    animation-delay: 0.1s;
}

.fade-up-d3 {
    animation-delay: 0.15s;
}

.fade-up-d4 {
    animation-delay: 0.2s;
}

/* ================================================ RESPONSIVE (OPTIMIZADO) */

/* Tablets y pantallas medianas (1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    .opp-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-strip-inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .fuentes-grid {
        grid-template-columns: 1fr;
    }
}

/* Móviles Grandes y Tablets Verticales (768px) */
@media (max-width: 768px) {
    :root {
        --radius-lg: 12px;
        --radius-xl: 16px;
    }

    .hero {
        padding: 100px 0 50px;
        text-align: center;
    }

    .hero-inner {
        margin: 0 auto;
    }

    .hero h1 {
        font-size: clamp(1.8rem, 8vw, 2.4rem);
    }

    .hero-sub {
        margin: 0 auto 24px;
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 10px;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .stats-strip-inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-item {
        padding: 20px 15px;
        border-right: none;
    }

    .stat-item:nth-child(odd) {
        border-right: 1px solid var(--border);
    }

    .stat-item:nth-child(n+3) {
        border-top: 1px solid var(--border);
    }

    .stat-value {
        font-size: 1.8rem;
    }

    .filters-bar {
        padding-bottom: 10px;
        margin-bottom: 20px;
    }

    .opp-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pro-navbar .container {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    /* Navbar Landing Móvil (Estilo Pro) */
    .navbar {
        position: absolute;
    }

    /* Evitamos que tape contenido en móvil al ser más alta */
    .navbar-inner {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 12px;
        align-items: center;
    }

    .logo {
        font-size: 1.25rem;
    }

    .logo img {
        height: 28px;
    }

    .nav-actions {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }

    .nav-actions .btn {
        flex: 1;
        padding: 10px;
        font-size: 0.8rem;
    }

    /* En móviles muy estrechos, apilamos también los botones */
    @media (max-width: 380px) {
        .nav-actions {
            flex-direction: column;
        }

        .nav-actions .btn {
            width: 100%;
        }
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-brand,
    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .footer-disclaimer {
        font-size: 0.75rem;
        max-width: 100%;
        text-align: center;
    }
}

/* Móviles Pequeños (480px) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.7rem;
    }

    .stats-strip-inner {
        grid-template-columns: 1fr;
    }

    .stat-item:nth-child(odd) {
        border-right: none;
    }

    .stat-item {
        border-top: 1px solid var(--border);
    }

    .stat-item:first-child {
        border-top: none;
    }

    .opp-card {
        padding: 18px 20px;
    }

    .opp-title {
        font-size: 0.9rem;
    }

    .pro-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        text-align: left;
    }

    .top-controls,
    .search-input {
        width: 100% !important;
    }

    .pro-controls-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .tabs-switcher {
        width: 100%;
        justify-content: space-between;
    }

    .tab-link {
        flex: 1;
        text-align: center;
        font-size: 0.75rem;
    }

    .sticky-banner p {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .sticky-banner .btn {
        width: 100%;
        margin-top: 8px;
    }

    .modal-box {
        padding: 30px 20px;
        width: 95%;
    }
}

/* ================================================ AUTH & LOGIN */
.auth-page {
    background: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: var(--bg-white);
    width: 100%;
    max-width: 420px;
    padding: 48px 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    animation: authIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header .logo {
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-head);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-dark);
    font-size: 0.95rem;
    transition: all 0.2s;
    outline: none;
    background: var(--bg-white);
}

.form-control:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 4px var(--blue-50);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.4;
}

.auth-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 16px;
    text-align: center;
    padding: 12px;
    background: var(--danger-bg);
    border-radius: var(--radius-md);
    border: 1px solid #FECACA;
    animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.auth-footer {
    margin-top: 32px;
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
}