/* ═══════════════════════════════════════════════════════════════
   Reporte — Premium Dark Theme
   Inherits ALL tokens from global.css — no variable redeclaration
   ═══════════════════════════════════════════════════════════════ */

/* ── Layout ────────────────────────────────────────────────── */
.report-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

/* View States */
.view-state {
    display: none;
}

.view-state.active {
    display: block;
}

/* ── 1. Portada ────────────────────────────────────────────── */
.section-portada {
    text-align: center;
    margin-bottom: 5rem;
    animation: fadeIn 1s ease forwards;
}

.branding {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.brand-icon {
    color: var(--brand-violet);
}

.section-portada h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 300;
}

.meta-data {
    display: inline-flex;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.meta-data .dot {
    color: var(--border-default);
}

/* ── Sections Global ───────────────────────────────────────── */
.section-block {
    margin-bottom: 5rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.section-desc strong {
    color: var(--text-primary);
}

/* ── 2. Resumen Stats ──────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.stat-num {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.stat-label strong {
    color: var(--text-primary);
}

.border-green { border-top: 3px solid var(--color-danger); }
.border-yellow { border-top: 3px solid var(--color-warning); }
.border-blue { border-top: 3px solid var(--color-info); }

/* Opportunity Box */
.opportunity-box {
    text-align: center;
    padding: 2.5rem;
}

.opp-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.opp-details {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.opp-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.opp-val {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.opp-lbl {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.opp-divider {
    width: 1px;
    height: 60px;
    background-color: var(--border-subtle);
}

/* ── Audit Panel ───────────────────────────────────────────── */
.section-audit {
    padding-top: 0;
}

.audit-panel {
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.audit-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.audit-icon {
    font-size: 1.5rem;
}

.audit-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.audit-header p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.audit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.audit-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
}

.audit-val {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brand-pink);
}

.audit-lbl {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Services Breakdown ────────────────────────────────────── */
.services-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.services-list li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    gap: 10px;
}

.svc-name {
    font-weight: 600;
    color: var(--brand-violet);
    width: 25%;
    min-width: 150px;
}

.svc-desc {
    color: var(--text-secondary);
    flex-grow: 1;
}

.svc-price {
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0.6;
    font-size: 0.8rem;
}

.svc-count {
    background: var(--brand-violet);
    color: white;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ── 3. Hallazgos ──────────────────────────────────────────── */
.insights-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.insights-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.check-icon {
    color: var(--brand-violet);
    font-weight: bold;
    flex-shrink: 0;
}

/* ── 4. Segmentación ───────────────────────────────────────── */
.seg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.seg-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.seg-header {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.seg-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-grow: 1;
    margin: 0;
}

.seg-action {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.seg-green .seg-action { color: #34d399; }
.seg-yellow .seg-action { color: #fbbf24; }
.seg-blue .seg-action { color: #60a5fa; }
.seg-purple .seg-action { color: #c084fc; }

/* ── 5. Timeline ───────────────────────────────────────────── */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-subtle);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.tl-dot {
    position: absolute;
    left: -2.85rem;
    top: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--bg-base);
    border: 4px solid var(--brand-violet);
    box-shadow: 0 0 10px var(--brand-violet);
}

.dot-hot  { border-color: var(--color-danger);  box-shadow: 0 0 10px var(--color-danger); }
.dot-warm { border-color: var(--color-warning); box-shadow: 0 0 10px var(--color-warning); }
.dot-cold { border-color: var(--color-success); box-shadow: 0 0 10px var(--color-success); }

.tl-content h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.tl-content ul {
    color: var(--text-secondary);
    padding-left: 1.25rem;
    margin: 0;
}

.tl-content li {
    margin-bottom: 0.5rem;
}

/* ── 6. Messages ───────────────────────────────────────────── */
.messages-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message-card {
    background: rgba(16, 185, 129, 0.04);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    position: relative;
    transition: border-color var(--transition-base);
}

.message-card:hover {
    border-color: rgba(16, 185, 129, 0.3);
}

.msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.msg-badge {
    background: var(--color-success-dim);
    color: #34d399;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.msg-for {
    font-size: 0.8rem;
    color: var(--brand-pink);
    flex-grow: 1;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: none;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    cursor: pointer;
    transition: background var(--transition-fast);
    font-family: var(--font-ui);
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.15);
}

.msg-body {
    font-size: 1.05rem;
    line-height: 1.5;
    color: #e4e4e7;
    font-style: italic;
}

.msg-link {
    color: var(--brand-violet);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.msg-link:hover {
    color: var(--brand-pink);
    text-decoration: underline;
}

/* Message highlight on anchor */
.message-card:target {
    border-color: var(--brand-violet) !important;
    box-shadow: var(--shadow-glow-violet);
    animation: pulseHighlight 1.5s ease;
}

@keyframes pulseHighlight {
    0%   { box-shadow: 0 0 0px rgba(139, 92, 246, 0); }
    50%  { box-shadow: 0 0 30px rgba(139, 92, 246, 0.5); }
    100% { box-shadow: var(--shadow-glow-violet); }
}

/* ── 7. Contacts Table ─────────────────────────────────────── */
.table-responsive {
    overflow-x: auto;
    padding: 0;
    border-radius: var(--radius-xl);
}

.contacts-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.contacts-table th,
.contacts-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.contacts-table th {
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    background: rgba(0, 0, 0, 0.2);
}

.contacts-table td {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.contacts-table td strong {
    color: var(--text-primary);
}

.contacts-table tr:last-child td {
    border-bottom: none;
}

.priority-high { background: var(--color-danger-dim); color: #f87171; }
.priority-med  { background: var(--color-warning-dim); color: #fbbf24; }

/* ── 8. Projection ─────────────────────────────────────────── */
.proj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.proj-card {
    text-align: center;
    padding: 2rem;
}

.proj-val {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.proj-lbl {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* ── 9. Next Steps ─────────────────────────────────────────── */
.next-steps-explainer {
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.step-row {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.step-icon-lg {
    font-size: 2rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.step-text h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.step-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.step-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 1.5rem 0;
}

/* ── Pricing Grid ──────────────────────────────────────────── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.pricing-card {
    padding: 2rem 1.5rem;
    text-align: center;
    border: 1px solid var(--border-subtle);
    position: relative;
    transition: transform var(--transition-slow), border-color var(--transition-base);
}

.pricing-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.3);
}

.pricing-popular {
    border-color: var(--brand-violet) !important;
    box-shadow: var(--shadow-glow-violet);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand-gradient);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: var(--radius-full);
    letter-spacing: 1px;
}

.pricing-medal {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.pricing-name {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.pricing-tagline {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0.25rem 0 1rem;
}

.pricing-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    font-family: var(--font-display);
}

.pricing-price span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
    text-align: left;
}

.pricing-features li {
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.pricing-goal {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-pink);
    padding-top: 0.5rem;
}

.pricing-result {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin: 0.5rem 0 0.25rem;
    font-weight: 500;
}

.pricing-value {
    font-size: 0.78rem;
    color: var(--color-success);
    margin: 0 0 0.5rem;
    opacity: 0.8;
}

.pricing-footnote {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-subtle);
}

/* ── Bridge Box ────────────────────────────────────────────── */
.bridge-box {
    padding: 1.25rem 1.5rem;
    line-height: 1.7;
}

.bridge-box p {
    color: var(--text-secondary);
}

.bridge-box strong {
    color: var(--text-primary);
}

/* ── 10. CTA Section ───────────────────────────────────────── */
.section-cta {
    margin-top: 4rem;
    margin-bottom: 2rem;
}

.cta-content {
    text-align: center;
    padding: 4rem 2rem;
}

.cta-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.cta-content p {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.cta-buttons .btn-outline {
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff; /* Mas blanco */
}

.cta-buttons .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    color: #ffffff;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .step-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 600px) {
    .opp-details {
        flex-direction: column;
        gap: 1.5rem;
    }

    .opp-divider {
        display: none;
    }

    .section-portada h1 {
        font-size: 2rem;
    }

    .services-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .svc-name,
    .svc-desc,
    .svc-price {
        width: 100%;
    }

    .report-wrapper {
        padding: 2rem 1rem 3rem;
    }
}
