/* ==========================================================================
   DESIGN SYSTEM & CUSTOM STYLES: GOBIERNO DE IA GAP ANALYSIS TOOL
   ========================================================================== */

/* Variables and Theme Config */
:root {
    /* Colors - Corporate dark luxury palette */
    --bg-dark: #070a13;
    --bg-dark-card: rgba(15, 23, 42, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --primary: #6366f1; /* Indigo */
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.15);
    
    --accent-emerald: #10b981; /* Success */
    --accent-emerald-glow: rgba(16, 185, 129, 0.15);
    
    --accent-coral: #f97316; /* Warning/Weakness (Orange/Coral) */
    --accent-coral-glow: rgba(249, 115, 22, 0.12);
    --accent-red: #ef4444; /* Critical */
    
    /* Text colors */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-bright: #ffffff;
    
    /* Fonts */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-title: 'Outfit', system-ui, -apple-system, sans-serif;
    
    /* Effects */
    --backdrop-blur: blur(16px);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 15px 45px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.25);
    --shadow-emerald: 0 0 30px rgba(16, 185, 129, 0.25);
    --shadow-coral: 0 0 30px rgba(249, 115, 22, 0.25);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-dark);
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Glowing Orbs */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.glow-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(160px);
    opacity: 0.18;
}

.glow-blue {
    top: -10%;
    left: 5%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, var(--primary) 0%, rgba(99, 102, 241, 0) 70%);
}

.glow-purple {
    bottom: -10%;
    right: 5%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #a855f7 0%, rgba(168, 85, 247, 0) 70%);
}

/* App Layout Container */
.app-container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 2.25rem;
    height: 2.25rem;
    color: var(--primary);
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.6));
}

.logo-text {
    font-family: var(--font-title);
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-bright);
}

.logo-text .highlight {
    color: var(--primary);
}

.logo-badge {
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--primary-glow);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
}

.standard-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.9rem;
    border-radius: 100px;
}

.pill-icon {
    width: 0.95rem;
    height: 0.95rem;
    color: var(--text-muted);
}

/* Main Content Area */
.main-content {
    flex: 1 0 auto;
    padding: 3rem 0;
}

/* Screen Toggle Base */
.screen {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   PANTALLA 1: LANDING & HERO
   ========================================================================== */
.hero-section {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 5rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-family: var(--font-title);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
    color: var(--text-bright);
}

.text-gradient {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 50%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 780px;
}

.hero-subtitle .bold {
    color: var(--text-main);
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-family: var(--font-sans);
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-lg {
    padding: 1rem 2.25rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: var(--text-bright);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-bright);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--text-bright);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.45);
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-text:hover {
    color: var(--text-main);
}

/* Pillars Section */
.pillars-section {
    margin-top: 3rem;
}

.section-title {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-bright);
}

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

.pillar-card {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--backdrop-blur);
    padding: 2.25rem 2rem;
    border-radius: var(--radius-lg);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.pillar-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-md), 0 0 15px rgba(99, 102, 241, 0.05);
}

.pillar-icon-box {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Custom pillar colors */
.pillar-icon-box.culture {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.25);
}
.pillar-icon-box.data {
    background: rgba(14, 165, 233, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.25);
}
.pillar-icon-box.roles {
    background: rgba(236, 72, 153, 0.12);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.25);
}
.pillar-icon-box.supervision {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.pillar-card h3 {
    font-family: var(--font-title);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-bright);
}

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

/* ==========================================================================
   PANTALLA 2: CUESTIONARIO MULTIPASO
   ========================================================================== */
.questionnaire-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

/* Stepper progress */
.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-md);
}

.progress-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent-emerald) 100%);
    border-radius: 100px;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    min-width: 140px;
    text-align: right;
}

/* Tabs indicator */
.steps-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.step-tab {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    opacity: 0.6;
}

.step-tab.active {
    background: rgba(99, 102, 241, 0.06);
    border-color: rgba(99, 102, 241, 0.4);
    opacity: 1;
}

.step-tab.completed {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
    opacity: 1;
}

.step-tab-num {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    transition: var(--transition-smooth);
}

.step-tab.active .step-tab-num {
    background: var(--primary);
    color: var(--text-bright);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.step-tab.completed .step-tab-num {
    background: var(--accent-emerald);
    color: var(--text-bright);
}

.step-tab-text {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Glass panel container */
.glass-panel {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--backdrop-blur);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 3rem;
}

/* Step panel slide logic */
.step-panel {
    display: none;
}

.step-panel.active {
    display: block;
    animation: fadeInSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.panel-intro {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.panel-icon {
    width: 3.5rem;
    height: 3.5rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
}

.panel-icon.culture { background: rgba(99, 102, 241, 0.1); color: #818cf8; }
.panel-icon.data { background: rgba(14, 165, 233, 0.1); color: #38bdf8; }
.panel-icon.roles { background: rgba(236, 72, 153, 0.1); color: #f472b6; }
.panel-icon.supervision { background: rgba(16, 185, 129, 0.1); color: #34d399; }

.panel-badge {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 0.35rem;
}

.color-culture { color: #818cf8; }
.color-data { color: #38bdf8; }
.color-roles { color: #f472b6; }
.color-supervision { color: #34d399; }

.panel-intro h2 {
    font-family: var(--font-title);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0.25rem;
}

.panel-intro p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Question Content block */
.question-block {
    margin-bottom: 3.5rem;
}

.question-block:last-child {
    margin-bottom: 1rem;
}

.question-text {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-bright);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.question-number {
    color: var(--primary);
    font-weight: 700;
}

/* Option Buttons Group (1-5 Scale) */
.rating-group {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.rating-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.rating-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.rating-num {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.rating-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.rating-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Interactive States based on selection */
.rating-group[data-question] .rating-btn.active {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.rating-group[data-question] .rating-btn.active .rating-num {
    color: var(--primary);
    transform: scale(1.1);
}

/* Different active glows depending on rating score */
.rating-group[data-question] .rating-btn.active[data-value="1"],
.rating-group[data-question] .rating-btn.active[data-value="2"] {
    background: rgba(249, 115, 22, 0.06);
    border-color: var(--accent-coral);
    box-shadow: var(--shadow-coral);
}
.rating-group[data-question] .rating-btn.active[data-value="1"] .rating-num,
.rating-group[data-question] .rating-btn.active[data-value="2"] .rating-num {
    color: var(--accent-coral);
}

.rating-group[data-question] .rating-btn.active[data-value="4"],
.rating-group[data-question] .rating-btn.active[data-value="5"] {
    background: rgba(16, 185, 129, 0.06);
    border-color: var(--accent-emerald);
    box-shadow: var(--shadow-emerald);
}
.rating-group[data-question] .rating-btn.active[data-value="4"] .rating-num,
.rating-group[data-question] .rating-btn.active[data-value="5"] .rating-num {
    color: var(--accent-emerald);
}

/* Navigation footer */
.questionnaire-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.questionnaire-footer .btn {
    min-width: 140px;
    padding: 0.85rem 1.75rem;
}

.btn:disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* ==========================================================================
   PANTALLA 3: DASHBOARD DE RESULTADOS (VISTA EJECUTIVA)
   ========================================================================== */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.badge-success {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--accent-emerald-glow);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-emerald);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.results-title {
    font-family: var(--font-title);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: 0.25rem;
}

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

/* Grid Layout for KPIs and Graphs */
.results-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.summary-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.summary-card h3 {
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

/* KPI Card & Thermometer Circular Indicator */
.kpi-card {
    align-items: center;
    text-align: center;
}

.kpi-card h3 {
    width: 100%;
    text-align: left;
}

.kpi-visualization {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem 0;
}

.circular-gauge {
    position: relative;
    width: 180px;
    height: 180px;
}

.circular-gauge svg {
    transform: rotate(-90deg);
}

.gauge-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 12;
}

.gauge-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 440;
    stroke-dashoffset: 440; /* Managed by JS anim */
    transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1), stroke 1s ease;
}

.gauge-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gauge-value {
    font-family: var(--font-title);
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--text-bright);
    line-height: 1;
}

.gauge-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.classification-box {
    margin-top: auto;
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.classification-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.classification-value {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 700;
}

.text-red { color: #f87171; }
.text-orange { color: #fb923c; }
.text-emerald { color: #34d399; }

/* Radar Chart Card */
.chart-card {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow: visible;
}

.chart-container {
    position: relative;
    width: 100%;
    max-width: 440px;
    height: 380px;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

canvas#radarChart {
    width: 100% !important;
    height: 100% !important;
    max-width: 440px !important;
    max-height: 380px !important;
    aspect-ratio: 1 / 1 !important;
}

/* Weakest Link Alert Banner */
.weak-link-banner {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.1) 0%, rgba(249, 115, 22, 0.04) 100%);
    border: 1px solid rgba(249, 115, 22, 0.35);
    padding: 1.75rem 2rem;
    border-radius: var(--radius-lg);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.05);
}

.weak-link-banner.success-banner {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.04) 100%) !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.05) !important;
}

.weak-link-banner.success-banner .weak-banner-icon {
    background: rgba(16, 185, 129, 0.15) !important;
    color: var(--accent-emerald) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
}

.weak-banner-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-md);
    background: rgba(249, 115, 22, 0.15);
    color: var(--accent-coral);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.weak-banner-content {
    flex: 1;
}

.weak-banner-title {
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0.5rem;
}

.weak-banner-text {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Plan de Acción / Recomendaciones */
.recommendations-section {
    margin-bottom: 3rem;
}

.recommendations-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.recommendations-header h2 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-bright);
}

.text-indigo { color: #818cf8; }

.rec-intro {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.recommendations-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.recommendations-list li {
    position: relative;
    padding-left: 3rem;
    font-size: 1rem;
    color: var(--text-main);
}

.recommendations-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.75rem;
    height: 1.75rem;
    background: var(--accent-emerald-glow);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-emerald);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.compliance-note {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.note-icon {
    width: 1.2rem;
    height: 1.2rem;
    color: var(--primary);
    flex-shrink: 0;
}

.dashboard-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.dashboard-actions .btn {
    min-width: 260px;
}

/* Footer Section */
.app-footer {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
}

/* Print Signature Section */
.print-only {
    display: none;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (DESKTOP FIRST TO MOBILE BREAKDOWNS)
   ========================================================================== */

@media (max-width: 1024px) {
    .results-summary-grid {
        grid-template-columns: 1fr;
    }
    .chart-card {
        min-height: 380px;
    }
}

@media (max-width: 900px) {
    .hero-title {
        font-size: 2.75rem;
    }
    .rating-group {
        grid-template-columns: 1fr; /* Stack options vertically on smaller tablets and mobile */
        gap: 0.75rem;
    }
    .rating-btn {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 1rem;
        gap: 1rem;
    }
    .rating-num {
        font-size: 1.5rem;
        margin-bottom: 0;
        width: 2.5rem;
        text-align: center;
    }
    .rating-btn div {
        flex: 1;
    }
    .steps-tabs {
        gap: 0.5rem;
    }
    .step-tab-text {
        display: none; /* Hide step tab names on narrow screens, keep numbers */
    }
    .step-tab {
        justify-content: center;
        padding: 0.75rem;
    }
    .app-container {
        padding: 0 1.25rem;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.25rem;
        letter-spacing: -1px;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
    .glass-panel {
        padding: 1.5rem;
    }
    .panel-intro {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    .dashboard-actions {
        flex-direction: column;
        gap: 1rem;
    }
    .dashboard-actions .btn {
        width: 100%;
        min-width: unset;
    }
}

.print-watermark {
    display: none;
}

/* ==========================================================================
   PRINT MEDIA STYLE SHEET (OPTIMIZED FOR PDF GENERATION)
   ========================================================================== */
@media print {
    /* Force exact colors and backgrounds for printing */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .print-watermark {
        display: block !important;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-25deg);
        z-index: -1000;
        width: 580px;
        height: auto;
        opacity: 0.05; /* Faded, very light, non-intrusive */
        pointer-events: none;
    }

    .print-watermark img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Hide all elements that are not part of the executive report */
    .no-print, 
    .app-header, 
    .app-footer, 
    .glow-bg, 
    .questionnaire-header, 
    .steps-tabs,
    .hero-actions,
    .compliance-note,
    .compliance-note *,
    button {
        display: none !important;
    }

    /* Reset global page styles for printers */
    html, body {
        background-color: #ffffff !important;
        color: #0c0f1d !important;
        font-size: 12pt !important;
        width: 100%;
        margin: 0;
        padding: 0;
        overflow: visible !important;
        display: block !important; /* Force block to avoid flex rendering bugs in print engines */
    }

    .app-container {
        display: block !important; /* Force block layout */
        max-width: 100% !important;
        padding: 2cm !important;
        margin: 0 !important;
    }

    .main-content {
        display: block !important; /* Force block layout */
        padding: 0 !important;
    }

    /* Prevent active screen from collapsing or having 0 opacity/transform during print layout capture */
    .screen {
        display: none !important;
        opacity: 0 !important;
        transform: none !important;
        transition: none !important;
    }

    .screen.active {
        display: block !important;
        opacity: 1 !important;
    }

    /* Print styling elements */
    .glass-panel {
        background: #ffffff !important;
        border: 1px solid #d1d5db !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        padding: 1.5rem !important;
        color: #0c0f1d !important;
        margin-bottom: 1.5rem !important;
        page-break-inside: avoid;
    }

    .results-header {
        border-bottom: 2px solid #0c0f1d !important;
        margin-bottom: 2rem !important;
        padding-bottom: 1rem !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-end !important;
    }

    .print-logo-header {
        display: block !important;
        width: 150px !important;
        height: auto !important;
        margin-bottom: 0.5rem;
    }

    .print-logo-header img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .results-title {
        color: #0c0f1d !important;
        font-size: 24pt !important;
    }

    .results-meta {
        color: #4b5563 !important;
        font-size: 10pt !important;
    }

    /* Layout structure adjustments */
    .results-summary-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 1.5rem !important;
        margin-bottom: 1.5rem !important;
        page-break-inside: avoid;
    }

    .summary-card {
        display: block !important;
        height: auto !important;
    }

    .chart-card {
        page-break-inside: avoid !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 1rem !important;
        overflow: visible !important;
    }

    .chart-container {
        width: 100% !important;
        max-width: 360px !important;
        height: 330px !important;
        min-height: 330px !important;
        aspect-ratio: 1 / 1 !important;
        margin: 0 auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    canvas#radarChart {
        width: 100% !important;
        height: 100% !important;
        max-width: 360px !important;
        max-height: 330px !important;
        aspect-ratio: 1 / 1 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .summary-card h3 {
        color: #0c0f1d !important;
        border-bottom: 1px solid #d1d5db !important;
        font-size: 14pt !important;
        margin-bottom: 1rem !important;
        padding-bottom: 0.5rem !important;
    }

    .circular-gauge {
        width: 140px !important;
        height: 140px !important;
    }

    .circular-gauge svg {
        width: 100% !important;
        height: 100% !important;
    }

    .gauge-bg {
        stroke: #f3f4f6 !important;
    }

    .gauge-progress {
        stroke: #4f46e5 !important;
    }

    .gauge-value {
        color: #0c0f1d !important;
        font-size: 22pt !important;
    }

    .gauge-label {
        color: #4b5563 !important;
        font-size: 8pt !important;
    }

    .classification-box {
        border: 1px solid #d1d5db !important;
        background: #f9fafb !important;
        padding: 0.75rem !important;
    }

    .classification-value {
        font-size: 12pt !important;
    }

    .text-red { color: #dc2626 !important; }
    .text-orange { color: #ea580c !important; }
    .text-emerald { color: #16a34a !important; }

    /* Weakest link banner */
    .weak-link-banner {
        background: #fff7ed !important;
        border: 1.5px solid #fdba74 !important;
        box-shadow: none !important;
        color: #0c0f1d !important;
        padding: 1.25rem !important;
        margin-bottom: 2rem !important;
        page-break-inside: avoid;
    }

    .weak-banner-icon {
        background: #ffedd5 !important;
        color: #ea580c !important;
        border: 1px solid #fed7aa !important;
    }

    .weak-banner-title {
        color: #ea580c !important;
        font-size: 13pt !important;
    }

    .weak-banner-text {
        color: #374151 !important;
        font-size: 10pt !important;
    }

    /* Plan of Action list */
    .recommendations-section {
        background: #ffffff !important;
        border: 1px solid #d1d5db !important;
        page-break-inside: avoid;
    }

    .recommendations-header h2 {
        color: #0c0f1d !important;
        font-size: 15pt !important;
    }

    .recommendations-list li {
        color: #1f2937 !important;
        font-size: 10.5pt !important;
        padding-left: 2rem !important;
    }

    .recommendations-list li::before {
        background: #e6fffa !important;
        border: 1px solid #34d399 !important;
        color: #059669 !important;
        width: 1.25rem !important;
        height: 1.25rem !important;
        font-size: 7.5pt !important;
    }

    /* Print signatures styling */
    .print-only.signature-block {
        display: flex !important;
        justify-content: space-between;
        margin-top: 4cm !important;
        page-break-inside: avoid;
    }

    .signature-line {
        width: 45%;
        text-align: center;
    }

    .signature-line .line {
        border-top: 1.5px solid #374151;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .signature-line p {
        font-size: 9pt;
        color: #4b5563;
    }
}
