/* ============================================================
   Unified Scan Report — Shared Styles
   Used across: /scan, /scan-report, /executive-report
   Prefixed with report- to avoid collisions during transition
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────── */
:root {
    --report-green: #4CAF50;
    --report-gold: #D4AF37;
    --report-orange: #FFB74D;
    --report-red: #ff6b6b;

    --report-swot-strength: #22c55e;
    --report-swot-strength-bg: rgba(34, 197, 94, 0.08);
    --report-swot-weakness: #ef4444;
    --report-swot-weakness-bg: rgba(239, 68, 68, 0.08);
    --report-swot-opportunity: #3b82f6;
    --report-swot-opportunity-bg: rgba(59, 130, 246, 0.08);
    --report-swot-threat: #f59e0b;
    --report-swot-threat-bg: rgba(245, 158, 11, 0.08);
}

/* ── Report Navigation ─────────────────────────────────── */

.report-nav {
    position: sticky;
    top: var(--nav-height);
    z-index: 100;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: top 0.3s ease;
}

body.nav-hidden .report-nav {
    top: 0;
}

.report-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.report-nav-inner::-webkit-scrollbar {
    display: none;
}

.report-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    flex-shrink: 0;
}

.report-nav-brand img {
    border-radius: 6px;
}

.report-nav-brand-text {
    font-weight: 700;
    font-size: 1rem;
    color: #D4AF37;
}

.report-nav-domain {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.report-nav-score {
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.report-nav-tier {
    font-weight: 500;
    opacity: 0.8;
}

.report-nav-views {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
}

.report-nav-link {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.report-nav-link:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

.report-nav-link.active {
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.1);
}

.report-nav-link.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.report-nav-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.report-nav-btn {
    padding: 0.4rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
}

.report-nav-btn:hover {
    border-color: #D4AF37;
    color: #D4AF37;
}

/* ── Report Nav Section Links ─────────────────────────── */

.report-nav-sections {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-shrink: 1;
    min-width: 0;
}

.report-nav-sections::-webkit-scrollbar {
    display: none;
}

.report-nav-section-pill {
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.report-nav-section-pill:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.report-nav-section-pill.active {
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
}

@media (max-width: 768px) {
    .report-nav-sections {
        display: none;
    }
}

/* ── AI Executive Summary ──────────────────────────────── */

.report-ai-summary {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.07) 0%, rgba(212, 175, 55, 0.02) 100%);
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 12px;
    padding: 2rem 2.25rem;
    margin-bottom: 2rem;
}

.report-ai-summary-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.report-ai-summary-icon {
    font-size: 1.5rem;
}

.report-ai-summary-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    color: #fff;
}

.report-ai-summary-label {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.report-ai-summary-body {
    color: #d0d0d0;
    line-height: 1.75;
    font-size: 0.95rem;
}

/* ── Pillar Card Grid ──────────────────────────────────── */

.report-pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.report-pillar-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 1.5rem 1.25rem;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
}

.report-pillar-card:hover {
    border-color: rgba(212, 175, 55, 0.25);
    transform: translateY(-3px);
}

.report-pillar-card-skipped {
    opacity: 0.6;
}

.report-pillar-card-skipped:hover {
    opacity: 0.8;
}

.report-pillar-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.report-pillar-card-score {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.report-pillar-card-name {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.35;
    min-height: 2.1em;
}

.report-score-gauge {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.report-score-gauge-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease-out;
}

.report-pillar-card-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.report-pillar-card-summary {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-top: 0.75rem;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── SWOT Grid (shared across all report pages) ────────── */

.swot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.swot-quadrant {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.swot-quadrant-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.swot-quadrant-header h3 {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.swot-icon {
    font-size: 1.2rem;
}

.swot-count {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
}

.swot-items {
    padding: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.swot-item {
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: background 0.15s;
}

.swot-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.swot-item-pillar {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

.swot-item-text {
    font-size: 0.9rem;
    line-height: 1.5;
}

.swot-item-narrative {
    font-size: 0.9rem;
    line-height: 1.5;
    font-style: italic;
    margin-top: 0.25rem;
}

.swot-item-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.25rem;
}

/* Quadrant-specific colors */
.swot-strengths { border-top: 3px solid var(--report-swot-strength); }
.swot-strengths .swot-quadrant-header { background: var(--report-swot-strength-bg); }
.swot-strengths .swot-item-pillar { color: var(--report-swot-strength); }

.swot-weaknesses { border-top: 3px solid var(--report-swot-weakness); }
.swot-weaknesses .swot-quadrant-header { background: var(--report-swot-weakness-bg); }
.swot-weaknesses .swot-item-pillar { color: var(--report-swot-weakness); }

.swot-opportunities { border-top: 3px solid var(--report-swot-opportunity); }
.swot-opportunities .swot-quadrant-header { background: var(--report-swot-opportunity-bg); }
.swot-opportunities .swot-item-pillar { color: var(--report-swot-opportunity); }

.swot-threats { border-top: 3px solid var(--report-swot-threat); }
.swot-threats .swot-quadrant-header { background: var(--report-swot-threat-bg); }
.swot-threats .swot-item-pillar { color: var(--report-swot-threat); }

/* ── Report Revenue Grid ──────────────────────────────── */

.report-revenue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* ── Report Accordion (Detailed Analysis) ─────────────── */

.report-accordion {
    margin-bottom: 1rem;
}

.report-accordion .accordion-header {
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.report-detail-section {
    margin-bottom: 1rem;
}

.report-detail-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.report-detail-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
}

.report-findings-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.report-findings-list li {
    padding: 0.4rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ── Report Issue List ─────────────────────────────────── */

.report-issue-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.report-issue-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
}

.report-issue-info {
    flex: 1;
    min-width: 200px;
}

.report-issue-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 0.2rem;
}

.report-issue-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.report-issue-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: #D4AF37;
    white-space: nowrap;
}

/* ── Pill badges ───────────────────────────────────────── */

.pill {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
}

.pill-priority {
    border: 1px solid;
}

/* ── Quote Cards ───────────────────────────────────────── */

.report-quote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.report-quote-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.report-quote-card-recommended {
    border-color: rgba(212, 175, 55, 0.35);
}

.report-quote-ribbon {
    position: absolute;
    top: 14px;
    right: -32px;
    background: #D4AF37;
    color: #0a0a0a;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 0.25rem 2.5rem;
    transform: rotate(45deg);
    letter-spacing: 1px;
}

.report-quote-tier {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
}

.report-quote-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #D4AF37;
    margin-bottom: 1.25rem;
}

.report-quote-price sup {
    font-size: 1rem;
    vertical-align: super;
    color: rgba(212, 175, 55, 0.7);
}

.report-quote-modules {
    list-style: none;
    padding: 0;
    margin: 0;
}

.report-quote-modules li {
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
}

.report-quote-modules li::before {
    content: '\2713';
    color: #4CAF50;
    margin-right: 0.6rem;
    font-weight: 700;
}

/* ── Section Headings ──────────────────────────────────── */

.report-section-heading {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.35rem;
}

.report-section-subheading {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 2rem;
}

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 768px) {
    .swot-grid {
        grid-template-columns: 1fr;
    }

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

    .report-nav-domain {
        display: none;
    }

    .report-nav-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .report-pillar-grid {
        grid-template-columns: 1fr;
    }

    .report-issue-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .report-quote-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Print Styles ──────────────────────────────────────── */

@media print {
    .report-nav {
        display: none !important;
    }

    .report-pillar-card,
    .report-quote-card,
    .report-issue-row,
    .swot-quadrant {
        background: #fff !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }

    .report-pillar-card-name,
    .swot-item-text,
    .report-detail-text {
        color: #333 !important;
    }

    .report-pillar-card-summary,
    .swot-item-meta,
    .report-detail-label {
        color: #666 !important;
    }

    .report-ai-summary {
        background: #f9f9f4 !important;
        border-color: #ddd !important;
    }

    .report-ai-summary-title {
        color: #111 !important;
    }

    .report-ai-summary-body {
        color: #333 !important;
    }

    .swot-items {
        max-height: none;
        overflow: visible;
    }

    .report-issue-title {
        color: #111 !important;
    }

    .report-issue-price {
        color: #8B7B2D !important;
    }

    .report-quote-tier {
        color: #111 !important;
    }

    .report-quote-price {
        color: #8B7B2D !important;
    }

    .report-quote-modules li {
        color: #333 !important;
        border-color: #eee !important;
    }

    .result-accordion .accordion-body {
        max-height: none !important;
        overflow: visible !important;
        padding: 0 1rem 1rem !important;
    }

    .result-accordion .accordion-chevron {
        display: none !important;
    }
}
