/* ==========================================================================
   Lerner Capital - Radar de Rendimientos - Style Sheet
   ========================================================================== */

/* Brand Book Variables & Core Styles */
:root {
    /* Brand Colors */
    --navy: #071A57;
    --blue: #103FD5;
    --sky: #67BAE4;
    
    /* Dark Theme Variables (Default) */
    --bg-color: #020716;
    --bg-grad: linear-gradient(135deg, #020716 0%, #071A57 60%, #0c2b95 100%);
    --bg-glow-1: radial-gradient(circle at 10% 20%, rgba(103, 186, 228, 0.08) 0%, transparent 50%);
    --bg-glow-2: radial-gradient(circle at 90% 80%, rgba(16, 63, 213, 0.12) 0%, transparent 50%);
    --surface: rgba(255, 255, 255, 0.05);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(103, 186, 228, 0.12);
    --border-hover: rgba(103, 186, 228, 0.25);
    --text: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.45);
    
    /* Utility Colors (Dark Theme) */
    --red: #e05252;
    --green: #1ec774;
    
    /* Radii & Shadows */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.35);
    
    /* Fonts */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --font-mono: 'SF Mono', 'Fira Mono', monospace;
    
    /* Table Sticky Header Solid Background */
    --table-header-bg: #0b1a47;
}

[data-theme="light"] {
    /* Light Theme Variables */
    --bg-color: #f3f6fb;
    --bg-grad: none;
    --bg-glow-1: radial-gradient(circle at 10% 20%, rgba(103, 186, 228, 0.12) 0%, transparent 40%);
    --bg-glow-2: radial-gradient(circle at 90% 80%, rgba(16, 63, 213, 0.06) 0%, transparent 40%);
    --surface: #ffffff;
    --surface-hover: #f9fbfd;
    --border: rgba(7, 26, 87, 0.08);
    --border-hover: rgba(7, 26, 87, 0.18);
    --text: #071A57;
    --text-secondary: #4a546e;
    --text-muted: #858ea6;
    
    /* Utility Colors (Light Theme) */
    --red: #d63c3c;
    --green: #0e9b58;
    
    --shadow-premium: 0 10px 30px rgba(7, 26, 87, 0.06);
    
    /* Table Sticky Header Solid Background */
    --table-header-bg: #ffffff;
}

/* Reset and Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-color);
    background-image: var(--bg-grad);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 13.5px;
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background glows */
.bg-glow {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
}
.bg-glow-1 {
    background: var(--bg-glow-1);
}
.bg-glow-2 {
    background: var(--bg-glow-2);
}

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

/* Header Styles */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 16px;
}

.header-logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-link {
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}
.brand-link:hover {
    transform: scale(1.02);
}

.brand-logo {
    height: 38px;
    width: auto;
}

.logo-dark {
    display: block;
}

.logo-light {
    display: none;
}

[data-theme="light"] .logo-dark {
    display: none;
}

[data-theme="light"] .logo-light {
    display: block;
}

[data-theme="light"] .brand-logo {
    filter: none;
}

.header-divider {
    width: 1px;
    height: 32px;
    background-color: var(--border);
}

.header-title-group h1 {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text);
    line-height: 1.1;
}

.header-title-group .subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.toggle {
    width: 44px;
    height: 22px;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: background .3s;
    flex-shrink: 0;
    outline: none;
}

[data-theme="light"] .toggle {
    background: rgba(7, 26, 87, .12);
    border-color: rgba(7, 26, 87, .18);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}

[data-theme="light"] .toggle::after {
    transform: translateX(20px);
    background: var(--navy);
}

.date-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background-color: var(--green);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(30, 199, 116, 0.4);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(30, 199, 116, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(30, 199, 116, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(30, 199, 116, 0);
    }
}

/* Metric Top Bar */
.metrics-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.metric-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-premium);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.metric-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.metric-card .m-label {
    font-family: var(--font-heading);
    font-size: 9.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    display: block;
}

.metric-card .m-val-group {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.metric-card .m-val {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
}

.metric-card .m-val.sky {
    color: var(--sky);
}

.metric-card .m-val.green {
    color: var(--green);
}

.metric-card .m-val.red {
    color: var(--red);
}


[data-theme="light"] .metric-card .m-val.sky {
    color: var(--blue);
}

.metric-card .m-sub {
    font-size: 9.5px;
    color: var(--text-muted);
    font-weight: 400;
}

.metric-card .m-ytd {
    font-size: 11px;
    font-weight: 600;
    color: var(--green);
    margin-left: 6px;
    padding: 2px 6px;
    background: rgba(30, 199, 116, 0.1);
    border-radius: 4px;
    display: inline-block;
    vertical-align: middle;
}
[data-theme="light"] .metric-card .m-ytd {
    background: rgba(30, 199, 116, 0.15);
}

#report-infographic-container .rm-ytd {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--green);
    margin-left: 6px;
    padding: 2px 6px;
    background: rgba(30, 199, 116, 0.1);
    border-radius: 4px;
    display: inline-block;
    vertical-align: middle;
    white-space: nowrap;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(2, 7, 22, 0.85);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    backdrop-filter: blur(12px);
    transition: opacity 0.4s ease, visibility 0.4s;
}

[data-theme="light"] .loading-overlay {
    background-color: rgba(243, 246, 251, 0.9);
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3.5px solid var(--border);
    border-top: 3.5px solid var(--sky);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

[data-theme="light"] .spinner {
    border-top-color: var(--blue);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

/* Main Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}

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

.tables-column, .interactive-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: space-between;
}

.tables-column > *, .interactive-column > * {
    flex-shrink: 0; /* Prevents cards from shrinking under constrained flex heights */
}

/* Glassmorphic Data Card */
.data-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    transition: border-color 0.25s ease;
}
.data-card:hover {
    border-color: var(--border-hover);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header h2 {
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Badges */
.badge {
    font-size: 9.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 12px;
}
.badge-sky {
    background: rgba(103, 186, 228, 0.12);
    color: var(--sky);
    border: 1px solid rgba(103, 186, 228, 0.25);
}
[data-theme="light"] .badge-sky {
    background: rgba(16, 63, 213, 0.07);
    color: var(--blue);
    border-color: rgba(16, 63, 213, 0.18);
}
.badge-green {
    background: rgba(30, 199, 116, 0.12);
    color: var(--green);
    border: 1px solid rgba(30, 199, 116, 0.25);
}
.badge-blue {
    background: rgba(16, 63, 213, 0.15);
    color: #8fa3ff;
    border: 1px solid rgba(16, 63, 213, 0.3);
}
[data-theme="light"] .badge-blue {
    background: rgba(16, 63, 213, 0.06);
    color: var(--blue);
    border-color: rgba(16, 63, 213, 0.18);
}
.badge-red {
    background: rgba(224, 82, 82, 0.12);
    color: var(--red);
    border: 1px solid rgba(224, 82, 82, 0.25);
}
[data-theme="light"] .badge-red {
    background: rgba(214, 60, 60, 0.07);
    color: var(--red);
    border-color: rgba(214, 60, 60, 0.18);
}
.badge-gray {
    background: rgba(120, 120, 120, 0.12);
    color: var(--text-secondary);
    border: 1px solid rgba(120, 120, 120, 0.25);
}


/* Tables Styles */
.table-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 550px;
    width: 100%;
    padding-right: 4px; /* Creates spacing between content and scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--border-hover) transparent;
}

/* Premium scrollbar styling for webkit */
.table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.table-container::-webkit-scrollbar-track {
    background: transparent;
}
.table-container::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 3px;
}
.table-container::-webkit-scrollbar-thumb:hover {
    background: var(--sky);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    text-align: left;
}

.data-table th {
    padding: 6px 10px;
    font-family: var(--font-heading);
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-hover);
}

.data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    white-space: nowrap;
}

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

.data-table tbody tr {
    transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
    background-color: var(--surface-hover);
}

.text-right {
    text-align: right;
}

.table-placeholder {
    text-align: center;
    padding: 24px !important;
    color: var(--text-muted);
    font-style: italic;
}

/* Financial values text formatters */
.val-ticker {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--sky);
}

[data-theme="light"] .val-ticker {
    color: var(--blue);
}

.val-mono {
    font-family: var(--font-mono);
    font-weight: 500;
}

.val-up {
    color: var(--green);
    font-weight: 600;
}

.val-down {
    color: var(--red);
    font-weight: 600;
}

.val-neutral {
    color: var(--text-muted);
}

.val-tir-cell {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text);
    background: rgba(103, 186, 228, 0.08);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    display: inline-block;
}

[data-theme="light"] .val-tir-cell {
    background: rgba(16, 63, 213, 0.05);
    color: var(--blue);
}

/* Corporate ON Banner */
.corporate-banner-card {
    background: linear-gradient(135deg, rgba(7, 26, 87, 0.4) 0%, rgba(16, 63, 213, 0.1) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-premium);
    transition: border-color 0.25s ease;
}
.corporate-banner-card:hover {
    border-color: var(--border-hover);
}

.corp-info {
    flex: 1;
    min-width: 280px;
}

.corp-badge {
    font-family: var(--font-heading);
    font-size: 8.5px;
    font-weight: 700;
    color: var(--sky);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 6px;
}

[data-theme="light"] .corp-badge {
    color: var(--blue);
}

.corp-info h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.corp-info p {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.corp-info strong {
    color: var(--text);
}

.corp-note {
    font-size: 9px;
    color: var(--text-muted);
    font-style: italic;
    display: block;
}

/* Buttons */
.btn {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--sky) 0%, var(--blue) 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(16, 63, 213, 0.25);
}
.btn-primary:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 20px rgba(16, 63, 213, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-hover);
    color: var(--text-secondary);
}
.btn-outline:hover {
    background: var(--surface-hover);
    border-color: var(--text);
    color: var(--text);
    transform: translateY(-1px);
}

.btn-whatsapp {
    background-color: #25d366;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
}
.btn-whatsapp:hover {
    background-color: #20ba59;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-corp {
    padding: 12px 20px;
    white-space: nowrap;
}

@media (max-width: 580px) {
    .btn-corp {
        width: 100%;
    }
}

/* Chart Card & Layout */
.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.chart-card-header h2 {
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chart-tabs {
    display: flex;
    background: rgba(7, 26, 87, 0.25);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 3px;
}

[data-theme="light"] .chart-tabs {
    background: #eef3f9;
}

.tab-btn {
    font-family: var(--font-body);
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}
.tab-btn:hover {
    color: var(--text-secondary);
}
.tab-btn.active {
    background: var(--sky);
    color: var(--navy);
}

[data-theme="light"] .tab-btn.active {
    background: var(--blue);
    color: #ffffff;
}

.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
}

.chart-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-style: italic;
    font-size: 12px;
    text-align: center;
    width: 80%;
}

.chart-empty.hidden {
    display: none;
}

/* Actions Card */
.actions-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.share-box {
    /* Nested wrapper card styling removed to prevent duplicate card border bug */
}

.share-box h3 {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.share-box p {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 14px;
}

.share-buttons {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 12px;
}

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

.cta-box {
    background: linear-gradient(135deg, rgba(7, 26, 87, 0.45) 0%, rgba(16, 63, 213, 0.15) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-premium);
    text-align: center;
    transition: border-color 0.25s ease;
}
.cta-box:hover {
    border-color: var(--border-hover);
}

.cta-logo-wrap {
    margin-bottom: 14px;
    display: flex;
    justify-content: center;
}

.cta-logo {
    height: 32px;
    width: auto;
}

.cta-box h4 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--text);
}

.cta-box p {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 18px;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.btn-cta {
    padding: 12px 24px;
    box-shadow: 0 4px 15px rgba(103, 186, 228, 0.2);
}

/* Footer */
.app-footer {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: 10px;
    text-align: center;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.6;
}

.app-footer p {
    margin-bottom: 4px;
}
.app-footer p:last-child {
    margin-bottom: 0;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .app-container {
        padding: 16px 12px;
    }
    
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Interactive Table Sorting */
.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}
.sortable:hover {
    color: var(--text) !important;
}
.sort-arrow {
    font-size: 9px;
    margin-left: 4px;
    display: inline-block;
    color: var(--text-muted);
    transition: color 0.15s ease;
    vertical-align: middle;
}
.sortable:hover .sort-arrow {
    color: var(--text-secondary);
}
.sort-arrow.active {
    color: var(--sky);
}
[data-theme="light"] .sort-arrow.active {
    color: var(--blue);
}

/* ==========================================================================
   Infographic Report Styles
   ========================================================================== */
#report-infographic-container {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1380px;
    box-sizing: border-box;
    --navy: #071A57;
    --blue: #103FD5;
    --sky: #67BAE4;
    --bg-grad: linear-gradient(135deg, #020716 0%, #071A57 60%, #0c2b95 100%);
    --surface: rgba(255, 255, 255, 0.05);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(103, 186, 228, 0.12);
    --border-hover: rgba(103, 186, 228, 0.25);
    --text: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.45);
    --red: #e05252;
    --green: #1ec774;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --font-mono: 'SF Mono', 'Fira Mono', monospace;
}

#report-infographic-container .report-content {
    background-color: #020716;
    background-image: var(--bg-grad);
    color: var(--text);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

/* Header */
#report-infographic-container .report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

#report-infographic-container .report-logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

#report-infographic-container .report-logo {
    height: 42px;
    width: auto;
}

#report-infographic-container .report-header-divider {
    width: 1px;
    height: 38px;
    background-color: var(--border);
}

#report-infographic-container .report-header-title-group h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text);
    line-height: 1.1;
}

#report-infographic-container .report-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 2px;
}

#report-infographic-container .report-date-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

#report-infographic-container .report-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--green);
    border-radius: 50%;
    display: inline-block;
}

/* Metrics */
#report-infographic-container .report-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

#report-infographic-container .report-metric-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

#report-infographic-container .rm-label {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    display: block;
}

#report-infographic-container .rm-val-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

#report-infographic-container .rm-val {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
}

#report-infographic-container .rm-val.sky {
    color: var(--sky);
}

#report-infographic-container .rm-val.green {
    color: var(--green);
}

#report-infographic-container .rm-val.red {
    color: var(--red);
}

#report-infographic-container .rm-sub {
    font-size: 8.5px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
}

/* Charts */
#report-infographic-container .report-charts-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

#report-infographic-container .report-chart-wrapper {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#report-infographic-container .report-chart-title {
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
    margin-bottom: 4px;
}

#report-infographic-container .report-chart-container {
    position: relative;
    height: 240px;
    width: 268px; /* Fixed width to prevent Chart.js scaling issues off-screen */
}

/* Tables Layout */
#report-infographic-container .report-tables-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#report-infographic-container .report-tables-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

#report-infographic-container .report-table-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

#report-infographic-container .report-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

#report-infographic-container .report-table-header h4 {
    font-family: var(--font-heading);
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#report-infographic-container .report-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 10px;
}

#report-infographic-container .report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

#report-infographic-container .report-table th {
    padding: 8px 10px;
    font-family: var(--font-heading);
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-hover);
}

#report-infographic-container .report-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    white-space: nowrap;
}

#report-infographic-container .report-table tbody tr:last-child td {
    border-bottom: none;
}

#report-infographic-container .report-table tbody tr {
    transition: background-color 0.15s ease;
}

#report-infographic-container .report-table tbody tr:hover {
    background-color: var(--surface-hover);
}

/* Corporate ON Banner inside Report */
#report-infographic-container .report-corporate-banner-card {
    background: linear-gradient(135deg, rgba(7, 26, 87, 0.5) 0%, rgba(16, 63, 213, 0.15) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

#report-infographic-container .report-corp-info {
    flex: 1;
}

#report-infographic-container .report-corp-badge {
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 700;
    color: var(--sky);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 6px;
}

#report-infographic-container .report-corp-info h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

#report-infographic-container .report-corp-info p {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 8px;
}

#report-infographic-container .report-corp-info strong {
    color: var(--text);
}

#report-infographic-container .report-corp-note {
    font-size: 9.5px;
    color: var(--text-muted);
    font-style: italic;
    display: block;
}

#report-infographic-container .report-table-note {
    font-size: 9px;
    color: var(--text-muted);
    font-style: italic;
    display: block;
    margin-top: 8px;
}

#report-infographic-container .report-cta-logo-wrap {
    display: flex;
    align-items: center;
}

#report-infographic-container .report-cta-logo {
    height: 48px;
    width: auto;
}

/* Footer Section */
#report-infographic-container .report-footer {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#report-infographic-container .report-footer-cols {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 9.5px;
    line-height: 1.4;
}

#report-infographic-container .report-footer-firm {
    font-weight: 600;
    color: var(--text-secondary);
}

#report-infographic-container .report-footer-cnv {
    font-weight: 500;
}

#report-infographic-container .report-footer-disclaimer {
    font-size: 8px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.3;
    font-style: italic;
}

/* Interactive Column - Banner Cards Layout */
.interactive-column .corporate-banner-card,
.interactive-column .cta-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px;
    box-sizing: border-box;
    text-align: left;
}

.interactive-column .corporate-banner-card .btn-corp,
.interactive-column .cta-box .btn-cta {
    width: 100%;
    margin-top: 16px;
    justify-content: center;
    align-self: stretch;
}

.interactive-column .cta-box .cta-logo-wrap {
    justify-content: flex-start;
}

.interactive-column .cta-box p {
    margin-left: 0;
    margin-right: 0;
}


/* Hide CTA box inside interactive column as it is moved to a full-width banner at the bottom */
.interactive-column .cta-box {
    display: none !important;
}

/* Increase minimum height of the CER table container to prevent alignment with Acciones card */
#card-cer .table-container {
    min-height: 400px;
}

/* 3-Column Grid Layout for WhatsApp Infographic */
#report-infographic-container .report-body-grid {
    display: grid;
    grid-template-columns: 480px 320px 480px;
    gap: 20px;
}
#report-infographic-container .report-column-left,
#report-infographic-container .report-column-middle,
#report-infographic-container .report-column-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
#report-infographic-container .report-charts-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Radar Link Styling */
.radar-link {
    color: var(--sky);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

[data-theme="light"] .radar-link {
    color: var(--blue);
}

.radar-link:hover {
    color: #8fa3ff;
}

[data-theme="light"] .radar-link:hover {
    color: var(--navy);
}
