/* Reset y base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f6fa; color: #333; line-height: 1.5; }

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #1a2744 0%, #2c4a7c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.login-box {
    background: white;
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
}
.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}
.login-logo .logo-circle {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, #1a2744 0%, #2c4a7c 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
}
.login-logo .logo-text { text-align: left; }
.login-logo .logo-name { font-size: 22px; font-weight: 600; color: #1a2744; display: block; }
.login-logo .logo-subtitle { font-size: 11px; letter-spacing: 3px; color: #666; }
.login-box h2 { color: #1a2744; margin-bottom: 10px; font-size: 22px; }
.login-box p { color: #666; margin-bottom: 25px; font-size: 14px; }
.login-box form { display: flex; flex-direction: column; gap: 15px; }
.login-box input {
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}
.login-box input:focus {
    outline: none;
    border-color: #2c4a7c;
}
.login-box button {
    padding: 14px;
    background: linear-gradient(135deg, #1a2744 0%, #2c4a7c 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.login-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(44, 74, 124, 0.4);
}
.login-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 15px;
    min-height: 20px;
}
.main-content-hidden {
    display: none !important;
}

/* Header */
.header { display: flex; align-items: center; justify-content: space-between; padding: 15px 30px; background: linear-gradient(135deg, #1a2744 0%, #2c4a7c 100%); color: white; }
.header-logo { display: flex; align-items: center; gap: 12px; }
.logo-circle { width: 45px; height: 45px; background: white; color: #1a2744; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 18px; font-weight: 600; letter-spacing: 1px; }
.logo-subtitle { font-size: 10px; letter-spacing: 3px; opacity: 0.8; }
.header-title { text-align: center; }
.header-title h1 { font-size: 20px; font-weight: 500; margin-bottom: 8px; }
.period-buttons { display: flex; gap: 8px; }
.period-btn { padding: 6px 14px; border: 1px solid rgba(255,255,255,0.3); background: transparent; color: white; border-radius: 20px; cursor: pointer; font-size: 13px; transition: all 0.2s; }
.period-btn:hover { background: rgba(255,255,255,0.1); }
.period-btn.active { background: white; color: #1a2744; }
.profile-buttons { display: flex; gap: 8px; }
.profile-btn { padding: 8px 16px; border: 1px solid rgba(255,255,255,0.3); background: transparent; color: white; border-radius: 20px; cursor: pointer; font-size: 13px; transition: all 0.2s; }
.profile-btn:hover { background: rgba(255,255,255,0.1); }
.profile-btn.active { background: white; color: #1a2744; }

/* Nav Container con degradados */
.nav-container { position: relative; background: white; border-bottom: 1px solid #e0e0e0; }
.nav-fade { position: absolute; top: 0; bottom: 0; width: 40px; z-index: 10; pointer-events: none; opacity: 0; transition: opacity 0.3s ease; }
.nav-fade-left { left: 0; background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%); }
.nav-fade-right { right: 0; background: linear-gradient(to left, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%); }
.nav-fade.visible { opacity: 1; }

/* Nav */
.nav { padding: 12px 30px; display: flex; gap: 5px; flex-wrap: nowrap; justify-content: center; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-btn { padding: 10px 18px; border: none; background: transparent; color: #666; border-radius: 8px; cursor: pointer; font-size: 14px; transition: all 0.2s; white-space: nowrap; flex-shrink: 0; }
.nav-btn:hover { background: #f0f0f0; color: #333; }
.nav-btn.active { background: #1a2744; color: white; }
.nav-btn.hidden { display: none; }
.nav-btn .short { display: none; }
.nav-btn .full { display: inline; }

/* Profile Indicator */
.profile-indicator { background: #fff3cd; padding: 10px 30px; font-size: 14px; border-bottom: 1px solid #e0e0e0; }

/* Tax Summary Compact */
.tax-summary-compact { background: white; border-radius: 10px; padding: 12px 18px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 20px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.tax-compact-title { font-weight: 600; color: #1a2744; font-size: 14px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tax-icon-sm { width: 24px; height: 24px; background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); color: white; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.tax-compact-grid { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.tax-compact-item { text-align: center; padding: 6px 12px; background: #f0fdf4; border-radius: 8px; min-width: 70px; }
.tax-compact-item.warning { background: #fef3e2; }
.tax-compact-item.pablo { background: #eff6ff; border-bottom: 2px solid #2c4a7c; }
.tax-compact-item.ale { background: #f0fdf4; border-bottom: 2px solid #28a745; }
.tax-compact-label { display: block; font-size: 10px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; }
.tax-compact-value { display: block; font-size: 18px; font-weight: 700; color: #28a745; }
.tax-compact-item.warning .tax-compact-value { color: #e67e22; }
.tax-compact-item.pablo .tax-compact-value { color: #2c4a7c; }
.tax-compact-item.ale .tax-compact-value { color: #28a745; }
.tax-compact-sub { display: block; font-size: 9px; color: #888; }
.tax-compact-divider { width: 1px; height: 35px; background: #ddd; }

@media (max-width: 768px) {
    .tax-summary-compact { justify-content: center; }
    .tax-compact-title { width: 100%; justify-content: center; margin-bottom: 5px; }
}

/* Tax Visual Card */
.tax-visual-card { background: white; border-radius: 12px; padding: 25px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-top: 25px; }
.tax-visual-header { margin-bottom: 25px; }
.tax-visual-header h3 { font-size: 20px; color: #1a2744; margin: 0 0 5px 0; }
.tax-visual-subtitle { font-size: 14px; color: #666; }
.tax-visual-content { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

/* Tax Bars Section */
.tax-bars-section { display: flex; flex-direction: column; gap: 25px; }
.tax-bar-group { background: #f8f9fa; border-radius: 10px; padding: 20px; }
.tax-bar-group.warning { background: #fef9f0; }
.tax-bar-label { margin-bottom: 15px; }
.tax-bar-title { display: block; font-weight: 600; font-size: 14px; color: #1a2744; margin-bottom: 3px; }
.tax-bar-desc { display: block; font-size: 12px; color: #888; }
.tax-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.tax-bar-row:last-child { margin-bottom: 0; }
.tax-bar-row.total { margin-top: 5px; padding-top: 10px; border-top: 1px dashed #ddd; }
.tax-bar-name { font-size: 13px; color: #666; width: 70px; flex-shrink: 0; }
.tax-bar-name.pablo-text { color: #2c4a7c; font-weight: 500; }
.tax-bar-name.ale-text { color: #28a745; font-weight: 500; }
.tax-bar-track { flex: 1; height: 28px; background: #e9ecef; border-radius: 14px; position: relative; overflow: hidden; }
.tax-bar-fill { height: 100%; border-radius: 14px; transition: width 0.5s ease; }
.tax-bar-fill.pablo { background: linear-gradient(90deg, #2c4a7c 0%, #4a90d9 100%); }
.tax-bar-fill.ale { background: linear-gradient(90deg, #28a745 0%, #5dd879 100%); }
.tax-bar-fill.total { background: linear-gradient(90deg, #1a2744 0%, #3d5a80 100%); }
.tax-bar-fill.warning { background: linear-gradient(90deg, #e67e22 0%, #f5a623 100%); }
.tax-bar-value { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 700; color: #1a2744; }

/* Tax Numbers Section */
.tax-numbers-section { display: flex; flex-direction: column; gap: 15px; }
.tax-number-card { display: flex; align-items: center; gap: 15px; background: #f8f9fa; border-radius: 12px; padding: 18px; }
.tax-number-card.total { background: linear-gradient(135deg, #1a2744 0%, #2c4a7c 100%); }
.tax-number-card.total .tax-number-value,
.tax-number-card.total .tax-number-label,
.tax-number-card.total .tax-number-detail { color: white; }
.tax-number-card.total .tax-number-detail { opacity: 0.8; }
.tax-number-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: white; flex-shrink: 0; }
.tax-number-icon.pablo { background: linear-gradient(135deg, #2c4a7c 0%, #4a90d9 100%); }
.tax-number-icon.ale { background: linear-gradient(135deg, #28a745 0%, #5dd879 100%); }
.tax-number-icon.total { background: rgba(255,255,255,0.2); }
.tax-number-data { flex: 1; }
.tax-number-value { display: block; font-size: 24px; font-weight: 700; color: #1a2744; }
.tax-number-label { display: block; font-size: 13px; color: #666; margin-top: 2px; }
.tax-number-detail { display: block; font-size: 11px; color: #888; margin-top: 4px; }

/* Tax Visual Single (for individual profiles) */
.tax-visual-card.single { margin-bottom: 25px; }
.tax-visual-single { display: grid; grid-template-columns: 2fr 1fr; gap: 25px; align-items: start; }
.tax-single-bars { display: flex; flex-direction: column; gap: 15px; }
.tax-single-bar { }
.tax-single-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tax-single-label span:first-child { font-size: 13px; color: #666; }
.tax-single-pct { font-size: 20px; font-weight: 700; color: #28a745; }
.tax-single-pct.pablo { color: #2c4a7c; }
.tax-single-pct.ale { color: #28a745; }
.tax-single-pct.warning { color: #e67e22; }
.tax-single-breakdown { display: flex; flex-direction: column; gap: 10px; }
.tax-breakdown-item { display: flex; align-items: center; gap: 10px; padding: 12px 15px; background: #f8f9fa; border-radius: 10px; }
.tax-breakdown-label { font-size: 12px; font-weight: 600; color: #888; width: 40px; }
.tax-breakdown-value { font-size: 16px; font-weight: 700; color: #1a2744; flex: 1; }
.tax-breakdown-pct { font-size: 12px; color: #888; background: #e9ecef; padding: 3px 8px; border-radius: 10px; }

/* Tax Compare Grid */
.tax-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tax-compare-col { background: #f8f9fa; border-radius: 12px; padding: 20px; }
.tax-compare-col.pablo { border-top: 4px solid #2c4a7c; }
.tax-compare-col.ale { border-top: 4px solid #28a745; }
.tax-compare-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.tax-compare-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: white; }
.tax-compare-col.pablo .tax-compare-icon { background: linear-gradient(135deg, #2c4a7c 0%, #4a90d9 100%); }
.tax-compare-col.ale .tax-compare-icon { background: linear-gradient(135deg, #28a745 0%, #5dd879 100%); }
.tax-compare-name { font-size: 16px; font-weight: 600; color: #1a2744; flex: 1; }
.tax-compare-total { font-size: 18px; font-weight: 700; color: #e74c3c; }
.tax-compare-bars { display: flex; flex-direction: column; gap: 12px; }
.tax-compare-bar { display: flex; align-items: center; gap: 10px; }
.tax-compare-label { font-size: 11px; color: #666; width: 70px; flex-shrink: 0; }
.tax-bar-track.small { height: 20px; border-radius: 10px; }
.tax-compare-value { font-size: 14px; font-weight: 700; color: #1a2744; width: 50px; text-align: right; }
.tax-compare-value.warning { color: #e67e22; }

@media (max-width: 900px) {
    .tax-visual-content { grid-template-columns: 1fr; }
    .tax-visual-single { grid-template-columns: 1fr; }
    .tax-compare-grid { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
    .tax-bar-name { width: 55px; font-size: 12px; }
    .tax-number-value { font-size: 20px; }
    .tax-single-pct { font-size: 18px; }
}

/* Returns Table - Rentabilidad por Activo */
.returns-table-card { background: white; border-radius: 12px; padding: 25px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-top: 25px; }
.returns-table-header { margin-bottom: 20px; }
.returns-table-header h3 { font-size: 20px; color: #1a2744; margin: 0; }

.returns-table { width: 100%; border-collapse: collapse; }
.returns-table thead tr:first-child { background: #1a2744; color: white; }
.returns-table thead tr:first-child th { padding: 14px 12px; font-size: 14px; font-weight: 600; text-align: center; }
.returns-table thead tr:first-child th.col-tipo { text-align: left; border-radius: 8px 0 0 0; }
.returns-table thead tr:first-child th.col-bench { border-radius: 0 8px 0 0; }
.returns-table thead tr.sub-header { background: #f0f4f8; }
.returns-table thead tr.sub-header th { padding: 8px 12px; font-size: 11px; font-weight: 500; color: #666; text-align: center; }

.returns-table tbody tr { border-bottom: 1px solid #e9ecef; transition: background 0.2s; }
.returns-table tbody tr:hover { background: #f8f9fa; }
.returns-table tbody tr.row-fin { background: #fafbfc; }
.returns-table tbody tr.row-sub { background: #f5f7f9; }
.returns-table tbody tr.inactive { opacity: 0.6; }

.tipo-cell { padding: 16px 12px; display: flex; align-items: center; gap: 10px; }
.tipo-cell.sub { padding-left: 35px; }
.tipo-icon { font-size: 20px; }
.tipo-name { font-size: 14px; font-weight: 600; color: #1a2744; }
.tipo-badge { font-size: 10px; background: #2c4a7c; color: white; padding: 3px 8px; border-radius: 10px; font-weight: 600; }
.tipo-badge.warning { background: #856404; color: #fff3cd; }
.sub-indent { width: 20px; height: 2px; background: #ddd; display: inline-block; }

.value-cell { padding: 12px 10px; text-align: center; position: relative; vertical-align: middle; }
.value-cell.small { padding: 10px 8px; }
.value-main { font-size: 15px; font-weight: 700; display: block; position: relative; z-index: 2; }
.value-cell.small .value-main { font-size: 13px; }
.value-cell.positive .value-main { color: #28a745; }
.value-cell.negative .value-main { color: #dc3545; }
.value-cell.neutral .value-main { color: #6c757d; }

.value-bar { height: 6px; border-radius: 3px; position: absolute; bottom: 6px; left: 10%; max-width: 80%; }
.value-bar.positive { background: linear-gradient(90deg, #28a745 0%, #5dd879 100%); }
.value-bar.negative { background: linear-gradient(90deg, #dc3545 0%, #ff6b6b 100%); }
.value-bar.neutral { background: #adb5bd; }

.value-cell.highlight-usd { background: rgba(220, 53, 69, 0.08); }
.value-cell.highlight-usd-light { background: rgba(220, 53, 69, 0.05); }
.usd-impact { display: block; font-size: 10px; color: #dc3545; font-weight: 500; margin-top: 2px; }
.usd-impact-small { display: block; font-size: 9px; color: #dc3545; font-weight: 500; margin-top: 1px; }

.bench-cell { padding: 12px 10px; text-align: center; font-size: 12px; color: #666; background: #fafbfc; }
.bench-cell.small { font-size: 11px; }

.inactive-cell { text-align: center; color: #888; font-style: italic; font-size: 13px; padding: 16px; }

.returns-table-legend { display: flex; gap: 20px; margin-top: 15px; padding-top: 15px; border-top: 1px solid #e9ecef; flex-wrap: wrap; justify-content: center; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #666; }
.legend-color { width: 14px; height: 14px; border-radius: 4px; }
.legend-color.positive { background: linear-gradient(135deg, #28a745 0%, #5dd879 100%); }
.legend-color.negative { background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%); }
.legend-icon { font-size: 14px; }

@media (max-width: 900px) {
    .returns-table { font-size: 12px; }
    .tipo-cell { padding: 12px 8px; }
    .value-cell { padding: 10px 6px; }
    .value-main { font-size: 13px; }
    .tipo-icon { font-size: 16px; }
    .tipo-name { font-size: 12px; }
}
/* Single person variant */
.returns-table.single-person { max-width: 600px; }
.returns-table.single-person thead tr:first-child th { padding: 12px 10px; }

@media (max-width: 600px) {
    .returns-table-card { padding: 15px; overflow-x: auto; }
    .returns-table { min-width: 500px; }
    .returns-table.single-person { min-width: 400px; }
}

/* Main */
.main { padding: 25px 30px; max-width: 1400px; margin: 0 auto; }
.section { display: none; }
.section.active { display: block; }

/* Section Title */
.section-title { margin-bottom: 25px; }
.section-title h2 { font-size: 24px; font-weight: 600; color: #1a2744; margin-bottom: 5px; }
.section-title p { color: #666; font-size: 14px; }

/* KPI Grid */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 25px; }
.kpi-card { padding: 20px; border-radius: 12px; color: white; }
.kpi-card.purple { background: linear-gradient(135deg, #6b5b95 0%, #9b8dc9 100%); }
.kpi-card.blue { background: linear-gradient(135deg, #2c4a7c 0%, #4a90d9 100%); }
.kpi-card.green { background: linear-gradient(135deg, #28a745 0%, #5dd879 100%); }
.kpi-card.orange { background: linear-gradient(135deg, #e67e22 0%, #f5a623 100%); }
.kpi-label { font-size: 13px; opacity: 0.9; margin-bottom: 8px; }
.kpi-value { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.kpi-value.warning { color: #ffe066; }
.kpi-value.negative { color: #ff7675; }
.kpi-value.positive { color: #55efc4; }
.kpi-badge { display: inline-block; padding: 4px 10px; background: rgba(0,0,0,0.25); border-radius: 12px; font-size: 12px; font-weight: 500; }
.kpi-badge.positive { background: rgba(255,255,255,0.95); color: #28a745; }
.kpi-badge.negative { background: rgba(255,255,255,0.95); color: #dc3545; }
.kpi-badge.warning { background: rgba(255,255,255,0.95); color: #e67e22; }

/* Dual Cards */
.dual-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 25px; }
.summary-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.summary-card.pablo .card-header { background: linear-gradient(135deg, #2c4a7c 0%, #4a90d9 100%); }
.summary-card.ale .card-header { background: linear-gradient(135deg, #28a745 0%, #5dd879 100%); }
.card-header { color: white; padding: 15px 20px; font-size: 18px; font-weight: 600; }
.card-subtitle { padding: 10px 20px; background: #f8f9fa; color: #666; font-size: 14px; border-bottom: 1px solid #eee; }
.card-row { display: flex; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid #f0f0f0; }
.card-row:last-child { border-bottom: none; }

/* Tables */
.table-container { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.table-container h3 { font-size: 16px; margin-bottom: 15px; color: #1a2744; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f8f9fa; font-weight: 600; color: #1a2744; font-size: 13px; }
td { font-size: 14px; }
tr.total td { background: #f8f9fa; font-weight: 600; }
tr.budget td { color: #888; font-style: italic; }
.table-note { margin-top: 10px; font-size: 12px; color: #888; }

/* Alerts Grid */
.alerts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 25px; }
.alert-card { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.alert-card h3 { font-size: 16px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 2px solid; }
.alert-card.success h3 { color: #28a745; border-color: #28a745; }
.alert-card.warning h3 { color: #e67e22; border-color: #e67e22; }
.alert-card.info h3 { color: #2c4a7c; border-color: #2c4a7c; }
.alert-card ul { padding-left: 20px; }
.alert-card li { margin-bottom: 8px; font-size: 14px; color: #555; }

/* Comparison Grid */
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 25px; }
.comparison-col { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.comparison-col.pablo .comparison-header { background: linear-gradient(135deg, #2c4a7c 0%, #4a90d9 100%); }
.comparison-col.ale .comparison-header { background: linear-gradient(135deg, #28a745 0%, #5dd879 100%); }
.comparison-header { color: white; padding: 15px 20px; font-size: 18px; font-weight: 600; text-align: center; }
.comparison-total { padding: 20px; text-align: center; font-size: 32px; font-weight: 700; color: #1a2744; background: #f8f9fa; }
.comparison-row { display: flex; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid #f0f0f0; }
.gauge-box { padding: 20px; background: #f8f9fa; }
.gauge-box h4 { font-size: 14px; text-align: center; margin-bottom: 10px; color: #666; }
.gauge-box canvas { max-height: 100px; }
.gauge-info { text-align: center; font-size: 13px; color: #666; margin-top: 10px; }

/* Mini KPI Grid */
.mini-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin-bottom: 25px; }
.mini-kpi { background: white; border-radius: 10px; padding: 15px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.mini-kpi-value { font-size: 22px; font-weight: 700; color: #1a2744; }
.mini-kpi-value.positive { color: #28a745; }
.mini-kpi-value.negative { color: #dc3545; }
.mini-kpi-value.warning { color: #e67e22; }
.mini-kpi-label { font-size: 12px; color: #666; margin-top: 5px; }
.mini-kpi-change { font-size: 11px; color: #888; margin-top: 3px; }
.mini-kpi-change.positive { color: #28a745; }

/* Chart Card */
.chart-card { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.chart-card h3 { font-size: 16px; margin-bottom: 15px; color: #1a2744; }
.costs-charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; margin-bottom: 25px; }
@media (max-width: 900px) { .costs-charts-grid { grid-template-columns: 1fr; } }
.chart-container { height: 300px; position: relative; }
.chart-container.small { height: 200px; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; margin-bottom: 25px; }
.stat-card { background: white; border-radius: 10px; padding: 18px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.stat-label { font-size: 12px; color: #666; margin-bottom: 5px; }
.stat-value { font-size: 24px; font-weight: 700; color: #1a2744; }
.stat-detail { font-size: 12px; color: #888; margin-top: 5px; }
.stat-detail.positive { color: #28a745; }

/* Breakdown Card */
.breakdown-card { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.breakdown-card h3 { font-size: 16px; margin-bottom: 15px; color: #1a2744; }
.breakdown-item { display: flex; justify-content: space-between; padding: 12px 15px; border-radius: 8px; margin-bottom: 8px; }
.breakdown-item.start { background: #e3f2fd; }
.breakdown-item.plus { background: #e8f5e9; }
.breakdown-item.minus { background: #ffebee; }
.breakdown-item.end { background: #1a2744; color: white; font-weight: 600; }

/* Diversification */
.diversification-card, .diversification-comparison { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.diversification-card h3, .diversification-comparison h3 { font-size: 16px; margin-bottom: 15px; color: #1a2744; }
.div-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.div-box { text-align: center; }
.div-box h4 { font-size: 14px; color: #666; margin-bottom: 10px; }
.div-box canvas { max-height: 180px; }

/* Range Selector */
.range-selector { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.range-title { font-size: 14px; color: #666; }
.range-value { font-weight: 600; color: #1a2744; margin-left: 10px; }
.range-labels { display: flex; justify-content: space-between; margin: 15px 0 10px; }
.range-label { font-size: 12px; color: #888; }
.range-label.active { color: #1a2744; font-weight: 600; }
.range-track-container { position: relative; height: 30px; }
.range-track { position: absolute; top: 12px; left: 0; right: 0; height: 6px; background: #e0e0e0; border-radius: 3px; }
.range-track-active { position: absolute; top: 12px; height: 6px; background: #2c4a7c; border-radius: 3px; }
.range-input { position: absolute; width: 100%; top: 0; height: 30px; -webkit-appearance: none; background: transparent; pointer-events: none; }
.range-input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; background: #1a2744; border-radius: 50%; cursor: pointer; pointer-events: auto; }

/* Timeline */
.timeline-card { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.timeline-card h3 { font-size: 16px; margin-bottom: 20px; color: #1a2744; }
.timeline { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 10px; }
.timeline-item { flex: 0 0 auto; min-width: 150px; padding: 15px; background: #f8f9fa; border-radius: 10px; border-left: 3px solid #2c4a7c; }
.timeline-item.current { border-left-color: #28a745; background: #e8f5e9; }
.timeline-marker { font-size: 12px; font-weight: 600; color: #2c4a7c; margin-bottom: 8px; }
.timeline-item.current .timeline-marker { color: #28a745; }
.timeline-text { font-size: 13px; }
.timeline-text strong { display: block; margin-bottom: 5px; }
.timeline-text small { color: #888; }

/* Property Grid */
.property-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 25px; }
.property-card { background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.property-header { padding: 12px 15px; color: white; font-weight: 600; font-size: 14px; }
.property-header.oficinas { background: #2c4a7c; }
.property-header.at { background: #e67e22; }
.property-header.le { background: #28a745; }
.property-header.uso { background: #6b5b95; }
.property-row { display: flex; justify-content: space-between; padding: 10px 15px; font-size: 13px; border-bottom: 1px solid #f0f0f0; }
.property-row.highlight { background: #f8f9fa; font-weight: 600; }
.property-benchmark { padding: 8px 15px; font-size: 11px; color: #888; background: #fafafa; }

/* Location Section */
.location-section { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.location-section h3 { font-size: 16px; margin-bottom: 15px; color: #1a2744; }
.location-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.location-item { display: flex; flex-direction: column; padding: 12px; background: #f8f9fa; border-radius: 8px; }
.loc-name { font-weight: 600; font-size: 14px; }
.loc-value { font-size: 18px; font-weight: 700; color: #1a2744; margin: 5px 0; }
.loc-change { font-size: 13px; }
.location-total { margin-top: 15px; padding-top: 15px; border-top: 1px solid #eee; font-size: 14px; }

/* USD Alert */
.usd-alert { display: flex; align-items: center; gap: 20px; background: #fff3cd; border: 1px solid #ffc107; border-radius: 12px; padding: 20px; margin-bottom: 25px; }
.usd-alert-icon { width: 50px; height: 50px; background: #ffc107; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }
.usd-alert-text { flex: 1; }
.usd-alert-text strong { display: block; margin-bottom: 5px; }
.usd-alert-text p { font-size: 14px; color: #666; margin: 0; }
.usd-alert-value { text-align: center; }
.usd-alert-value span { display: block; font-size: 12px; color: #666; }
.usd-alert-value strong { font-size: 24px; }

/* Composition Bars */
.composition-bars { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.composition-bars h3 { font-size: 16px; margin-bottom: 15px; color: #1a2744; }
.bar-item { margin-bottom: 15px; }
.bar-header { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.bar { height: 12px; background: #e0e0e0; border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; }
.bar-fill.rf { background: #2c4a7c; }
.bar-fill.rv { background: #28a745; }
.bar-fill.mp { background: #f5a623; }
.bar-detail { display: flex; justify-content: space-between; font-size: 12px; color: #888; margin-top: 5px; }

/* Bank Distribution */
.bank-distribution { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.bank-distribution h3 { font-size: 16px; margin-bottom: 15px; color: #1a2744; }
.bank-distribution .chart-container { height: 250px; max-height: 250px; }
.bank-distribution .chart-container canvas { max-height: 250px !important; }

/* Benchmark Section */
.benchmark-section { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.benchmark-section h3 { font-size: 16px; margin-bottom: 15px; color: #1a2744; }
.benchmark-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.bench-item { padding: 15px; border-radius: 8px; text-align: center; }
.bench-item.positive { background: #e8f5e9; }
.bench-item.negative { background: #ffebee; }
.bench-name { display: block; font-size: 13px; color: #666; margin-bottom: 5px; }
.bench-value { font-size: 18px; font-weight: 700; }
.bench-item.positive .bench-value { color: #28a745; }
.bench-item.negative .bench-value { color: #dc3545; }

/* Comparison KPIs */
.comparison-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 25px; }
.comparison-kpi-col { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.comparison-kpi-col h4 { font-size: 16px; margin-bottom: 15px; text-align: center; }
.comparison-kpi-col.pablo h4 { color: #2c4a7c; }
.comparison-kpi-col.ale h4 { color: #28a745; }

/* Composition Section */
.composition-section { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.composition-section h3 { font-size: 16px; margin-bottom: 15px; color: #1a2744; }
.composition-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.composition-box { text-align: center; }
.composition-box h4 { font-size: 14px; color: #666; margin-bottom: 10px; }
.composition-box canvas { max-height: 180px; }

/* Tags */
.tag { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; color: white; }
.tag.vc { background: #9b59b6; }
.tag.buyout { background: #e74c3c; }
.tag.pc { background: #3498db; }
.tag.re { background: #27ae60; }
.tag.infra { background: #f39c12; }

/* Alt Note */
.alt-note { background: #f8f9fa; padding: 12px 15px; border-radius: 8px; font-size: 13px; color: #666; margin-top: 15px; }

/* Rotation Section */
.rotation-section { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.rotation-section h3 { font-size: 16px; margin-bottom: 10px; color: #1a2744; }
.rotation-note { font-size: 13px; color: #888; margin-bottom: 15px; }
.rotation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; }
.rotation-card { display: flex; gap: 15px; padding: 15px; background: #f8f9fa; border-radius: 10px; }
.rotation-icon { width: 45px; height: 45px; background: #2c4a7c; color: white; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.rotation-info { display: flex; flex-direction: column; }
.rotation-info strong { font-size: 14px; }
.rotation-info span { font-size: 13px; color: #666; margin: 3px 0; }
.rotation-info small { font-size: 12px; color: #888; }
.rotation-total { margin-top: 15px; padding-top: 15px; border-top: 1px solid #eee; font-size: 14px; }

/* Debate Grid */
.debate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.debate-card { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); border-top: 4px solid; }
.debate-card.usd { border-color: #f39c12; }
.debate-card.liquidity { border-color: #3498db; }
.debate-card.security { border-color: #e74c3c; }
.debate-card.allocation { border-color: #9b59b6; }
.debate-card h3 { font-size: 16px; margin-bottom: 10px; color: #1a2744; }
.debate-card > p { font-size: 14px; color: #666; margin-bottom: 15px; }
.debate-data { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.debate-col ul { padding-left: 18px; margin-top: 8px; }
.debate-col li { font-size: 13px; color: #555; margin-bottom: 5px; }
.debate-strategy { background: #f8f9fa; padding: 12px; border-radius: 8px; font-size: 13px; }

/* Liquidity Table */
.liquidity-table { background: #f8f9fa; border-radius: 8px; overflow: hidden; }
.liq-row { display: grid; grid-template-columns: 2fr 1fr 1fr; padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #eee; }
.liq-row.header { background: #e9ecef; font-weight: 600; }
.liq-row.total { background: #1a2744; color: white; font-weight: 600; }

/* Debate Questions */
.debate-questions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.q-item { background: #f8f9fa; padding: 10px 12px; border-radius: 6px; font-size: 13px; border-left: 3px solid #e74c3c; }

/* Allocation Compare */
.allocation-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.alloc-col { background: #f8f9fa; padding: 12px; border-radius: 8px; }
.alloc-col strong { display: block; margin-bottom: 8px; font-size: 13px; }
.alloc-col p { font-size: 13px; margin: 5px 0; }

/* Gauge Mini */
.gauge-mini { text-align: center; padding: 15px 0; }
.gauge-mini canvas { max-height: 80px; }
.gauge-mini-label { font-size: 14px; margin-top: 8px; }
.gauge-mini-label .current { font-weight: 700; color: #1a2744; }
.gauge-mini-label .target { color: #888; }

/* Waterfall Section */
.waterfall-section { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.waterfall-section h3 { font-size: 16px; margin-bottom: 15px; color: #1a2744; }
.waterfall-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.waterfall-box h4 { font-size: 14px; color: #666; margin-bottom: 10px; text-align: center; }
.waterfall-box canvas { max-height: 200px; }

/* Heatmap Section */
.heatmap-section { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.heatmap-section h3 { font-size: 16px; margin-bottom: 15px; color: #1a2744; }
table.heatmap th, table.heatmap td { text-align: center; padding: 10px; }
table.heatmap tr.sub th { font-size: 12px; background: #f0f0f0; }
table.heatmap tr.total td { background: #f8f9fa; font-weight: 600; }
.heat-pos { background: #d4edda; color: #155724; }
.heat-neg { background: #f8d7da; color: #721c24; }
.heat-neu { background: #f8f9fa; color: #888; }

/* Comparison Charts */
.comparison-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 25px; }

/* Bank Comparison */
.bank-comparison { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.bank-comparison h3 { font-size: 16px; margin-bottom: 15px; color: #1a2744; }

/* Global colors */
.positive { color: #28a745 !important; }
.negative { color: #dc3545 !important; }
.warning { color: #e67e22 !important; }

/* Footer */
.footer { background: #1a2744; color: white; padding: 20px 30px; display: flex; justify-content: space-between; align-items: center; }
.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-icon { width: 35px; height: 35px; background: white; color: #1a2744; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.footer-info { text-align: right; font-size: 13px; opacity: 0.8; }
.footer-info span { display: block; }

/* Nav highlight */
.nav-btn.highlight { background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%); color: white; }
.nav-btn.highlight:hover { background: linear-gradient(135deg, #8e44ad 0%, #7d3c98 100%); }

/* AI Analysis Section */
.ai-executive-summary { background: linear-gradient(135deg, #1a2744 0%, #2c4a7c 100%); border-radius: 12px; padding: 25px; margin-bottom: 25px; color: white; }
.ai-header { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.ai-icon { width: 50px; height: 50px; background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.ai-title { flex: 1; min-width: 200px; }
.ai-title h3 { font-size: 18px; margin-bottom: 5px; }
.ai-title span { font-size: 12px; opacity: 0.8; }
.ai-rating { text-align: center; }
.rating-label { display: block; font-size: 11px; opacity: 0.8; margin-bottom: 5px; }
.rating-score { font-size: 24px; font-weight: 700; padding: 8px 16px; border-radius: 8px; }
.rating-score.good { background: rgba(40,167,69,0.3); color: #55efc4; }
.rating-score.warning { background: rgba(230,126,34,0.3); color: #ffeaa7; }
.rating-score.bad { background: rgba(220,53,69,0.3); color: #ff7675; }
.ai-summary-text p { font-size: 15px; line-height: 1.7; opacity: 0.95; }

/* AI Alerts */
.ai-alerts { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.ai-alerts h3 { font-size: 18px; color: #1a2744; margin-bottom: 20px; }
.ai-alert-grid { display: grid; gap: 15px; }
.ai-alert { padding: 20px; border-radius: 10px; border-left: 4px solid; }
.ai-alert.critical { background: #fff5f5; border-color: #dc3545; }
.ai-alert.warning { background: #fff8e6; border-color: #e67e22; }
.ai-alert.info { background: #f0f7ff; border-color: #3498db; }
.alert-priority { display: inline-block; padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 700; margin-bottom: 10px; }
.ai-alert.critical .alert-priority { background: #dc3545; color: white; }
.ai-alert.warning .alert-priority { background: #e67e22; color: white; }
.ai-alert.info .alert-priority { background: #3498db; color: white; }
.ai-alert h4 { font-size: 16px; color: #1a2744; margin-bottom: 10px; }
.ai-alert > p { font-size: 14px; color: #555; margin-bottom: 15px; line-height: 1.6; }
.alert-recommendation { background: rgba(0,0,0,0.05); padding: 12px; border-radius: 6px; font-size: 13px; }

/* AI Analysis Grid */
.ai-analysis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 25px; }
.ai-analysis-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.analysis-header { display: flex; align-items: center; gap: 12px; padding: 15px 20px; color: white; }
.analysis-header.positive { background: linear-gradient(135deg, #28a745 0%, #5dd879 100%); }
.analysis-header.warning { background: linear-gradient(135deg, #e67e22 0%, #f5a623 100%); }
.analysis-header.negative { background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%); }
.analysis-icon { width: 30px; height: 30px; background: rgba(255,255,255,0.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.analysis-header h4 { flex: 1; font-size: 15px; font-weight: 700; color: white !important; text-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.analysis-score { font-size: 13px; font-weight: 700; background: white; color: #1a2744; padding: 5px 12px; border-radius: 12px; flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }

/* Individual profile themes */
.ai-executive-summary.pablo-theme { background: linear-gradient(135deg, #2c4a7c 0%, #4a90d9 100%); }
.ai-executive-summary.ale-theme { background: linear-gradient(135deg, #28a745 0%, #5dd879 100%); }
.analysis-body { padding: 20px; }
.analysis-highlights { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.highlight { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.highlight.good { background: #d4edda; color: #155724; }
.highlight.bad { background: #f8d7da; color: #721c24; }
.highlight.neutral { background: #e9ecef; color: #495057; }
.analysis-body p { font-size: 13px; color: #555; margin-bottom: 10px; line-height: 1.6; }

/* AI Comparison */
.ai-comparison { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.ai-comparison h3 { font-size: 18px; color: #1a2744; margin-bottom: 20px; }
.comparison-analysis { display: grid; gap: 25px; }
.comp-section h4 { font-size: 15px; color: #1a2744; margin-bottom: 15px; }
.comp-recommendation h4 { font-size: 15px; color: #1a2744; margin-bottom: 15px; }
.rec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rec-item { padding: 15px; border-radius: 10px; }
.rec-item.pablo { background: #e3f2fd; border-left: 4px solid #2c4a7c; }
.rec-item.ale { background: #e8f5e9; border-left: 4px solid #28a745; }
.rec-item strong { display: block; margin-bottom: 10px; font-size: 14px; }
.rec-item ul { padding-left: 18px; }
.rec-item li { font-size: 13px; color: #555; margin-bottom: 6px; }

/* AI Projections */
.ai-projections { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.ai-projections h3 { font-size: 18px; color: #1a2744; margin-bottom: 20px; }
.projection-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.projection-card { border-radius: 12px; padding: 20px; text-align: center; }
.projection-card.optimista { background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%); border: 2px solid #28a745; }
.projection-card.base { background: linear-gradient(135deg, #e2e3e5 0%, #d6d8db 100%); border: 2px solid #6c757d; }
.projection-card.pesimista { background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%); border: 2px solid #dc3545; }
.proj-header { font-weight: 700; font-size: 14px; margin-bottom: 5px; }
.proj-prob { font-size: 12px; color: #666; margin-bottom: 15px; }
.proj-value { font-size: 32px; font-weight: 700; color: #1a2744; }
.proj-growth { font-size: 16px; font-weight: 600; margin-bottom: 15px; }
.projection-card.optimista .proj-growth { color: #28a745; }
.projection-card.base .proj-growth { color: #6c757d; }
.projection-card.pesimista .proj-growth { color: #dc3545; }
.projection-card ul { text-align: left; padding-left: 20px; margin: 0; }
.projection-card li { font-size: 12px; color: #555; margin-bottom: 5px; }

/* AI Action Plan */
.ai-action-plan { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.ai-action-plan h3 { font-size: 18px; color: #1a2744; margin-bottom: 20px; }
.action-timeline { display: grid; gap: 15px; }
.action-item { display: flex; gap: 15px; padding: 20px; background: #f8f9fa; border-radius: 10px; flex-wrap: wrap; }
.action-quarter { min-width: 70px; padding: 8px 12px; background: #1a2744; color: white; border-radius: 6px; font-weight: 600; font-size: 13px; text-align: center; height: fit-content; }
.action-content { flex: 1; min-width: 200px; }
.action-content h4 { font-size: 15px; color: #1a2744; margin-bottom: 10px; }
.action-content ul { padding-left: 18px; margin: 0; }
.action-content li { font-size: 13px; color: #555; margin-bottom: 5px; }
.action-priority { padding: 6px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; height: fit-content; }
.action-priority.high { background: #dc3545; color: white; }
.action-priority.medium { background: #e67e22; color: white; }
.action-priority.low { background: #28a745; color: white; }

/* AI KPIs Monitor */
.ai-kpis-monitor { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.ai-kpis-monitor h3 { font-size: 18px; color: #1a2744; margin-bottom: 20px; }
.monitor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 15px; }
.monitor-item { display: flex; gap: 12px; padding: 15px; background: #f8f9fa; border-radius: 10px; align-items: center; }
.monitor-icon { width: 40px; height: 40px; background: #1a2744; color: white; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.monitor-info { display: flex; flex-direction: column; min-width: 0; }
.monitor-name { font-weight: 600; font-size: 13px; color: #1a2744; }
.monitor-current { font-size: 12px; color: #28a745; }
.monitor-target { font-size: 11px; color: #888; }

/* AI Disclaimer */
.ai-disclaimer { background: #f8f9fa; border-radius: 8px; padding: 15px; border-left: 4px solid #6c757d; }
.ai-disclaimer p { font-size: 12px; color: #666; margin: 0; line-height: 1.6; }

/* Cash Flow Section */
.cf-alert-main { display: flex; align-items: center; gap: 20px; background: linear-gradient(135deg, #dc3545 0%, #c82333 100%); border-radius: 12px; padding: 20px; margin-bottom: 25px; color: white; }
.cf-alert-icon { width: 50px; height: 50px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; flex-shrink: 0; }
.cf-alert-content { flex: 1; }
.cf-alert-content h3 { font-size: 18px; margin-bottom: 5px; }
.cf-alert-content p { font-size: 14px; opacity: 0.95; margin: 0; }
.cf-alert-number { text-align: center; background: rgba(255,255,255,0.95); padding: 15px 20px; border-radius: 10px; }
.cf-alert-number span { display: block; font-size: 12px; color: #666; }
.cf-alert-number strong { font-size: 28px; color: #dc3545; }

.cf-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 25px; }
.cf-kpi { padding: 20px; border-radius: 12px; text-align: center; color: white; }
.cf-kpi.needs { background: linear-gradient(135deg, #6b5b95 0%, #9b8dc9 100%); }
.cf-kpi.generated { background: linear-gradient(135deg, #28a745 0%, #5dd879 100%); }
.cf-kpi.excess { background: linear-gradient(135deg, #e67e22 0%, #f5a623 100%); }
.cf-kpi.tax { background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%); }
.cf-kpi-label { font-size: 12px; opacity: 0.9; margin-bottom: 8px; }
.cf-kpi-value { font-size: 28px; font-weight: 700; }
.cf-kpi-detail { font-size: 11px; opacity: 0.8; margin-top: 5px; }

.cf-breakdown { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.cf-breakdown h3 { font-size: 18px; color: #1a2744; margin-bottom: 20px; }
.cf-breakdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.cf-income-section h4, .cf-expense-section h4 { font-size: 14px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid; }
.cf-income-section h4 { color: #28a745; border-color: #28a745; }
.cf-expense-section h4 { color: #dc3545; border-color: #dc3545; }
.cf-item { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.cf-item-name { flex: 1; font-size: 13px; }
.cf-item-value { font-weight: 600; font-size: 14px; min-width: 100px; text-align: right; }
.cf-item-pct { font-size: 12px; color: #888; min-width: 40px; text-align: right; }
.cf-item.income .cf-item-value { color: #28a745; }
.cf-item.expense .cf-item-value { color: #dc3545; }
.cf-item.total-income, .cf-item.total-expense { background: #f8f9fa; margin: 10px -10px -10px; padding: 12px 10px; border-radius: 0 0 8px 8px; border-bottom: none; }
.cf-item.total-income .cf-item-value { color: #28a745; font-size: 16px; }
.cf-item.total-expense .cf-item-value { color: #dc3545; font-size: 16px; }

.cf-waterfall { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.cf-waterfall h3 { font-size: 18px; color: #1a2744; margin-bottom: 15px; }
.cf-chart-container { height: 300px; }

.cf-variables { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.cf-variables h3 { font-size: 18px; color: #1a2744; margin-bottom: 10px; }
.cf-variables-intro { font-size: 14px; color: #666; margin-bottom: 20px; }
.cf-variable-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cf-variable-card { border-radius: 10px; padding: 20px; border: 2px solid #e0e0e0; }
.cf-variable-card.high-impact { border-color: #dc3545; background: #fff5f5; }
.cf-variable-card.medium-impact { border-color: #e67e22; background: #fff8e6; }
.cf-variable-card.low-impact { border-color: #28a745; background: #f0fff4; }
.cf-var-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.cf-var-impact { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px; }
.cf-variable-card.high-impact .cf-var-impact { background: #dc3545; color: white; }
.cf-variable-card.medium-impact .cf-var-impact { background: #e67e22; color: white; }
.cf-variable-card.low-impact .cf-var-impact { background: #28a745; color: white; }
.cf-var-amount { font-weight: 700; font-size: 14px; color: #1a2744; }
.cf-variable-card h4 { font-size: 16px; color: #1a2744; margin-bottom: 10px; }
.cf-variable-card > p { font-size: 13px; color: #555; margin-bottom: 12px; }
.cf-variable-card ul { padding-left: 18px; margin-bottom: 15px; }
.cf-variable-card li { font-size: 12px; color: #555; margin-bottom: 6px; }
.cf-var-result { background: rgba(0,0,0,0.05); padding: 10px; border-radius: 6px; font-size: 12px; }
.cf-var-result span { display: block; color: #666; margin-bottom: 3px; }
.cf-var-result strong { color: #1a2744; }

.cf-scenario { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.cf-scenario h3 { font-size: 18px; color: #1a2744; margin-bottom: 20px; }
.cf-scenario-compare { display: flex; align-items: center; gap: 20px; }
.cf-scenario-card { flex: 1; border-radius: 10px; overflow: hidden; }
.cf-scenario-card.current { border: 2px solid #dc3545; }
.cf-scenario-card.optimized { border: 2px solid #28a745; }
.cf-scenario-header { padding: 12px 15px; font-weight: 600; text-align: center; color: white; }
.cf-scenario-card.current .cf-scenario-header { background: #dc3545; }
.cf-scenario-card.optimized .cf-scenario-header { background: #28a745; }
.cf-scenario-body { padding: 15px; }
.cf-scenario-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; border-bottom: 1px solid #f0f0f0; }
.cf-scenario-row:last-child { border-bottom: none; }
.cf-scenario-row.highlight { background: #f8f9fa; margin: 8px -15px; padding: 10px 15px; font-weight: 600; }
.cf-scenario-arrow { font-size: 30px; color: #28a745; flex-shrink: 0; }
.cf-scenario-note { margin-top: 20px; padding: 15px; background: #e8f5e9; border-radius: 8px; border-left: 4px solid #28a745; }
.cf-scenario-note p { font-size: 13px; color: #155724; margin: 0; }

.cf-action-plan { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.cf-action-plan h3 { font-size: 18px; color: #1a2744; margin-bottom: 20px; }
.cf-action-timeline { display: grid; gap: 15px; }
.cf-action-step { display: flex; gap: 15px; padding: 15px; background: #f8f9fa; border-radius: 10px; }
.cf-step-number { width: 35px; height: 35px; background: #1a2744; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.cf-step-content { flex: 1; }
.cf-step-content h4 { font-size: 15px; color: #1a2744; margin-bottom: 5px; }
.cf-step-content p { font-size: 13px; color: #555; margin-bottom: 8px; }
.cf-step-timing { display: inline-block; font-size: 11px; padding: 3px 8px; background: #1a2744; color: white; border-radius: 4px; }

.cf-summary { display: flex; gap: 20px; background: linear-gradient(135deg, #1a2744 0%, #2c4a7c 100%); border-radius: 12px; padding: 25px; color: white; }
.cf-summary-icon { width: 60px; height: 60px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; flex-shrink: 0; }
.cf-summary-content h4 { font-size: 18px; margin-bottom: 15px; }
.cf-summary-content p { font-size: 14px; margin-bottom: 8px; opacity: 0.95; }
.cf-summary-content p:last-child { margin-bottom: 0; }

/* ==========================================
   EFICIENCIA FISCAL
   ========================================== */

.fiscal-overview { margin-bottom: 25px; }
.fiscal-main-card { background: white; border-radius: 12px; padding: 25px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.fiscal-main-card h3 { font-size: 18px; color: #1a2744; margin-bottom: 25px; text-align: center; }

.fiscal-visual { display: flex; gap: 40px; align-items: center; justify-content: center; flex-wrap: wrap; }
.fiscal-bar-container { display: flex; gap: 20px; align-items: flex-end; height: 250px; }
.fiscal-bar { width: 100px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.fiscal-bar-inner { border-radius: 8px 8px 0 0; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 10px; min-height: 60px; transition: height 0.5s ease; }
.fiscal-bar.wealth .fiscal-bar-inner { background: linear-gradient(180deg, #28a745 0%, #1e7e34 100%); }
.fiscal-bar.taxes .fiscal-bar-inner { background: linear-gradient(180deg, #dc3545 0%, #c82333 100%); }
.fiscal-bar.net .fiscal-bar-inner { background: linear-gradient(180deg, #4a90d9 0%, #2c4a7c 100%); }
.fiscal-bar-label { font-size: 11px; color: white; text-align: center; opacity: 0.9; }
.fiscal-bar-value { font-size: 18px; font-weight: 700; color: white; margin-top: 5px; }

.fiscal-rate-box { background: linear-gradient(135deg, #1a2744 0%, #2c4a7c 100%); border-radius: 12px; padding: 25px 35px; text-align: center; color: white; }
.fiscal-rate-label { display: block; font-size: 13px; opacity: 0.8; margin-bottom: 8px; }
.fiscal-rate-value { display: block; font-size: 48px; font-weight: 700; line-height: 1; }
.fiscal-rate-value.good { color: #28a745; }
.fiscal-rate-value.warning { color: #ffc107; }
.fiscal-rate-note { display: block; font-size: 11px; opacity: 0.7; margin-top: 8px; }

.fiscal-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 25px; }
.fiscal-kpi { display: flex; gap: 15px; padding: 20px; border-radius: 12px; background: white; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.fiscal-kpi-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; color: white; flex-shrink: 0; }
.fiscal-kpi.realized .fiscal-kpi-icon { background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%); }
.fiscal-kpi.latent .fiscal-kpi-icon { background: linear-gradient(135deg, #9b59b6 0%, #7b4397 100%); }
.fiscal-kpi.total-gen .fiscal-kpi-icon { background: linear-gradient(135deg, #4a90d9 0%, #2c4a7c 100%); }
.fiscal-kpi.taxes-paid .fiscal-kpi-icon { background: linear-gradient(135deg, #dc3545 0%, #c82333 100%); }
.fiscal-kpi-content { flex: 1; }
.fiscal-kpi-label { display: block; font-size: 12px; color: #666; margin-bottom: 5px; }
.fiscal-kpi-value { display: block; font-size: 22px; font-weight: 700; color: #1a2744; }
.fiscal-kpi-detail { display: block; font-size: 11px; color: #999; margin-top: 3px; }

.fiscal-breakdown { background: white; border-radius: 12px; padding: 25px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.fiscal-breakdown h3 { font-size: 16px; color: #1a2744; margin-bottom: 20px; }
.fiscal-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.fiscal-person { padding: 20px; border-radius: 10px; }
.fiscal-person.pablo { background: linear-gradient(135deg, rgba(74,144,217,0.1) 0%, rgba(44,74,124,0.1) 100%); border: 1px solid rgba(74,144,217,0.3); }
.fiscal-person.ale { background: linear-gradient(135deg, rgba(40,167,69,0.1) 0%, rgba(30,126,52,0.1) 100%); border: 1px solid rgba(40,167,69,0.3); }
.fiscal-person h4 { font-size: 16px; font-weight: 700; margin-bottom: 15px; }
.fiscal-person.pablo h4 { color: #2c4a7c; }
.fiscal-person.ale h4 { color: #1e7e34; }
.fiscal-person-data { display: flex; flex-direction: column; gap: 8px; }
.fiscal-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.05); font-size: 13px; }
.fiscal-row:last-child { border-bottom: none; }
.fiscal-row.highlight { background: rgba(0,0,0,0.03); margin: 0 -10px; padding: 10px; border-radius: 6px; border-bottom: none; font-weight: 600; }
.fiscal-row.taxes { color: #dc3545; }
.fiscal-row.rate { font-weight: 700; font-size: 14px; }
.fiscal-row .value { font-weight: 600; }
.fiscal-row .value.positive { color: #28a745; }
.fiscal-row .value.negative { color: #dc3545; }

.fiscal-taxes-detail { background: white; border-radius: 12px; padding: 25px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.fiscal-taxes-detail h3 { font-size: 16px; color: #1a2744; margin-bottom: 20px; }
.taxes-grid { display: flex; flex-direction: column; gap: 15px; }
.tax-item { display: flex; gap: 15px; align-items: center; }
.tax-bar { width: 150px; height: 20px; background: #e5e7eb; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.tax-bar::after { content: ''; display: block; height: 100%; width: calc(var(--tax-pct) * 2.5); background: linear-gradient(90deg, #dc3545 0%, #e67e22 100%); border-radius: 10px; }
.tax-info { display: flex; gap: 15px; align-items: center; flex: 1; }
.tax-name { font-size: 14px; color: #333; min-width: 180px; }
.tax-amount { font-size: 16px; font-weight: 700; color: #dc3545; min-width: 80px; }
.tax-pct { font-size: 13px; color: #666; background: #f0f0f0; padding: 3px 10px; border-radius: 12px; }
.taxes-total { display: flex; justify-content: space-between; margin-top: 20px; padding-top: 15px; border-top: 2px solid #1a2744; font-size: 16px; font-weight: 700; color: #1a2744; }

.fiscal-efficiency { background: white; border-radius: 12px; padding: 25px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.fiscal-efficiency h3 { font-size: 16px; color: #1a2744; margin-bottom: 20px; }
.efficiency-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.efficiency-card { padding: 20px; border-radius: 10px; border-left: 4px solid; }
.efficiency-card.good { background: rgba(40,167,69,0.08); border-color: #28a745; }
.efficiency-card.warning { background: rgba(255,193,7,0.1); border-color: #ffc107; }
.efficiency-card.info { background: rgba(74,144,217,0.08); border-color: #4a90d9; }
.efficiency-card h4 { font-size: 14px; color: #333; margin-bottom: 10px; }
.efficiency-value { font-size: 28px; font-weight: 700; margin-bottom: 10px; }
.efficiency-card.good .efficiency-value { color: #28a745; }
.efficiency-card.warning .efficiency-value { color: #e67e22; }
.efficiency-card.info .efficiency-value { color: #4a90d9; }
.efficiency-card p { font-size: 13px; color: #555; line-height: 1.5; }

.fiscal-summary { display: flex; gap: 20px; background: linear-gradient(135deg, #1a2744 0%, #2c4a7c 100%); border-radius: 12px; padding: 25px; color: white; }
.fiscal-summary-icon { width: 60px; height: 60px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; flex-shrink: 0; }
.fiscal-summary-content h4 { font-size: 18px; margin-bottom: 15px; }
.fiscal-summary-content p { font-size: 14px; margin-bottom: 8px; opacity: 0.95; }
.fiscal-summary-content p:last-child { margin-bottom: 0; }

/* Fiscal Donut Chart */
.fiscal-donut-container { display: flex; align-items: center; justify-content: center; gap: 40px; padding: 30px; }
.fiscal-donut { position: relative; width: 220px; height: 220px; }
.fiscal-donut svg { transform: rotate(-90deg); }
.fiscal-donut-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.fiscal-donut-center .rate { font-size: 36px; font-weight: 700; color: #1a2744; }
.fiscal-donut-center .label { font-size: 12px; color: #666; }
.fiscal-donut-legend { display: flex; flex-direction: column; gap: 15px; }
.fiscal-legend-item { display: flex; align-items: center; gap: 12px; }
.fiscal-legend-color { width: 16px; height: 16px; border-radius: 4px; }
.fiscal-legend-color.latent { background: #28a745; }
.fiscal-legend-color.realized { background: #4a90d9; }
.fiscal-legend-color.taxes { background: #dc3545; }
.fiscal-legend-info { display: flex; flex-direction: column; }
.fiscal-legend-info .name { font-size: 14px; color: #333; font-weight: 500; }
.fiscal-legend-info .value { font-size: 18px; color: #1a2744; font-weight: 700; }
.fiscal-legend-info .pct { font-size: 12px; color: #666; }

/* Tax Pie Chart */
.fiscal-taxes-pie { background: white; border-radius: 12px; padding: 25px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.fiscal-taxes-pie h3 { font-size: 16px; color: #1a2744; margin-bottom: 20px; }
.taxes-pie-container { display: flex; align-items: center; justify-content: center; gap: 40px; }
.taxes-pie { position: relative; width: 180px; height: 180px; }
.taxes-pie svg { transform: rotate(-90deg); }
.taxes-pie-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.taxes-pie-center .total { font-size: 24px; font-weight: 700; color: #1a2744; }
.taxes-pie-center .label { font-size: 11px; color: #666; }
.taxes-pie-legend { display: flex; flex-direction: column; gap: 12px; }
.taxes-pie-item { display: flex; align-items: center; gap: 12px; }
.taxes-pie-color { width: 14px; height: 14px; border-radius: 3px; }
.taxes-pie-color.ip { background: #e74c3c; }
.taxes-pie-color.is { background: #f39c12; }
.taxes-pie-color.irpf { background: #3498db; }
.taxes-pie-info { display: flex; flex-direction: column; }
.taxes-pie-info .name { font-size: 13px; color: #555; }
.taxes-pie-info .value { font-size: 16px; font-weight: 600; color: #1a2744; }
.taxes-pie-info .pct { font-size: 11px; color: #888; }

/* Fiscal Horizontal Bar */
.fiscal-flow { background: white; border-radius: 12px; padding: 25px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.fiscal-flow h3 { font-size: 16px; color: #1a2744; margin-bottom: 20px; }
.fiscal-flow-bar { height: 50px; border-radius: 8px; display: flex; overflow: hidden; margin-bottom: 15px; }
.fiscal-flow-segment { display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 14px; transition: all 0.3s; }
.fiscal-flow-segment.latent { background: linear-gradient(135deg, #28a745 0%, #5dd879 100%); }
.fiscal-flow-segment.realized { background: linear-gradient(135deg, #4a90d9 0%, #6bb3e8 100%); }
.fiscal-flow-segment.taxes { background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%); }
body.fiscal-optimized .fiscal-flow-segment.taxes { background: linear-gradient(135deg, #28a745 0%, #5dd879 100%); }
.fiscal-flow-legend { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.fiscal-flow-item { display: flex; align-items: center; gap: 8px; }
.fiscal-flow-dot { width: 12px; height: 12px; border-radius: 3px; }
.fiscal-flow-dot.latent { background: #28a745; }
.fiscal-flow-dot.realized { background: #4a90d9; }
.fiscal-flow-dot.taxes { background: #dc3545; }
body.fiscal-optimized .fiscal-flow-dot.taxes { background: #28a745; }
.fiscal-flow-item span { font-size: 13px; color: #555; }
.fiscal-flow-item strong { color: #1a2744; }

/* Fiscal Controls Container - STICKY */
.fiscal-controls { position: sticky; top: 0; z-index: 100; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 20px; padding: 10px 20px; margin: -20px -20px 20px -20px; background: linear-gradient(135deg, #1a2744 0%, #2c4a7c 100%); box-shadow: 0 4px 15px rgba(26, 39, 68, 0.3); flex-wrap: wrap; }

/* Toggle compacto */
.fiscal-toggle-container { display: flex; align-items: center; gap: 10px; padding: 0; background: transparent; box-shadow: none; border-radius: 0; }
.fiscal-toggle-label { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.6); transition: all 0.3s; }
.fiscal-toggle-label.active { color: white; font-weight: 600; }
.fiscal-toggle-label.optimized.active { color: #7dffaf; }
.fiscal-toggle { width: 50px; height: 26px; }
.fiscal-toggle-slider { background-color: rgba(255,255,255,0.3); }
.fiscal-toggle-slider:before { height: 18px; width: 18px; }
.fiscal-toggle input:checked + .fiscal-toggle-slider { background-color: #28a745; }

/* Needs Selector compacto */
.needs-selector { display: flex; align-items: center; gap: 12px; padding: 0; background: transparent; box-shadow: none; border-radius: 0; }
.needs-label { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.8); white-space: nowrap; }
.needs-slider-container { display: flex; align-items: center; gap: 8px; min-width: 150px; max-width: 200px; }
.needs-min, .needs-max { font-size: 11px; color: rgba(255,255,255,0.5); font-weight: 500; }
.needs-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: linear-gradient(to right, #28a745, #ffc107, #dc3545); outline: none; cursor: pointer; }
.needs-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: white; cursor: pointer; border: none; box-shadow: 0 2px 6px rgba(0,0,0,0.3); transition: transform 0.15s; }
.needs-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.needs-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: white; cursor: pointer; border: none; box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
.needs-value-display { display: flex; align-items: center; gap: 5px; padding: 5px 12px; background: rgba(255,255,255,0.15); border-radius: 6px; }
.needs-value-display span:first-child { font-size: 14px; font-weight: 600; color: white; }
.needs-yearly { font-size: 11px; color: rgba(255,255,255,0.6); }

/* Cash Flow Integration Card */
.cf-integrated { background: white; border-radius: 12px; padding: 25px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 25px; }
.cf-integrated h3 { font-size: 16px; color: #1a2744; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.cf-integrated h3 .icon { width: 32px; height: 32px; background: #4a90d9; color: white; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.cf-flow-visual { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; justify-content: center; }
.cf-flow-box { padding: 15px 20px; border-radius: 10px; text-align: center; min-width: 120px; }
.cf-flow-box.income { background: rgba(40, 167, 69, 0.1); border: 1px solid rgba(40, 167, 69, 0.3); }
.cf-flow-box.needs { background: rgba(74, 144, 217, 0.1); border: 1px solid rgba(74, 144, 217, 0.3); }
.cf-flow-box.excess { background: rgba(220, 53, 69, 0.1); border: 1px solid rgba(220, 53, 69, 0.3); }
.cf-flow-box.excess.optimized { background: rgba(40, 167, 69, 0.1); border: 1px solid rgba(40, 167, 69, 0.3); }
.cf-flow-box .label { font-size: 11px; color: #666; margin-bottom: 5px; }
.cf-flow-box .value { font-size: 22px; font-weight: 700; }
.cf-flow-box.income .value { color: #28a745; }
.cf-flow-box.needs .value { color: #4a90d9; }
.cf-flow-box.excess .value { color: #dc3545; }
.cf-flow-box.excess.optimized .value { color: #28a745; }
.cf-flow-arrow { font-size: 20px; color: #999; }
.cf-tax-impact { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; padding: 20px; background: #f8f9fa; border-radius: 10px; }
.cf-tax-item { text-align: center; }
.cf-tax-item .label { font-size: 12px; color: #666; margin-bottom: 5px; }
.cf-tax-item .value { font-size: 20px; font-weight: 700; }
.cf-tax-item .value.negative { color: #dc3545; }
.cf-tax-item .value.positive { color: #28a745; }
.cf-tax-item .detail { font-size: 11px; color: #888; margin-top: 3px; }

/* Fiscal Toggle - Base structure */
.fiscal-toggle { position: relative; display: inline-block; }
.fiscal-toggle input { opacity: 0; width: 0; height: 0; }
.fiscal-toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; transition: 0.4s; border-radius: 30px; }
.fiscal-toggle-slider:before { position: absolute; content: ""; left: 4px; bottom: 4px; background-color: white; transition: 0.4s; border-radius: 50%; }
.fiscal-toggle input:checked + .fiscal-toggle-slider:before { transform: translateX(24px); }

/* Optimization mode indicator */
.fiscal-optimized-badge { display: none; background: linear-gradient(135deg, #28a745 0%, #5dd879 100%); color: white; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; margin-left: 10px; }
body.fiscal-optimized .fiscal-optimized-badge { display: inline-block; }
body.fiscal-optimized .fiscal-rate-value.good { color: #28a745 !important; }
body.fiscal-optimized .fiscal-bar.taxes .fiscal-bar-inner { background: linear-gradient(135deg, #28a745 0%, #5dd879 100%) !important; }

/* Savings highlight */
.fiscal-savings { display: none; background: rgba(40, 167, 69, 0.1); border: 1px solid rgba(40, 167, 69, 0.3); border-radius: 12px; padding: 20px; margin-bottom: 25px; }
body.fiscal-optimized .fiscal-savings { display: block; }
.fiscal-savings-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.fiscal-savings-icon { width: 40px; height: 40px; background: #28a745; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.fiscal-savings-title { font-size: 16px; font-weight: 600; color: #28a745; }
.fiscal-savings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.fiscal-savings-item { text-align: center; }
.fiscal-savings-item .label { font-size: 12px; color: #666; margin-bottom: 5px; }
.fiscal-savings-item .value { font-size: 20px; font-weight: 700; color: #28a745; }
.fiscal-savings-item .detail { font-size: 11px; color: #999; margin-top: 3px; }

/* Responsive - Tablet */
@media (max-width: 768px) {
    .header { flex-direction: column; gap: 15px; padding: 15px; }
    .profile-buttons, .period-buttons { flex-wrap: wrap; justify-content: center; }
    .nav { justify-content: flex-start; padding: 10px 15px; gap: 8px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; }
    .nav::-webkit-scrollbar { display: none; }
    .nav-btn { padding: 10px 14px; font-size: 12px; flex-shrink: 0; }
    .nav-btn .short { display: none; }
    .nav-btn .full { display: inline; }
    .main { padding: 15px; }
    .section-title h2 { font-size: 20px; }
    .comparison-grid, .comparison-kpis, .div-grid, .composition-grid, .waterfall-grid, .comparison-charts { grid-template-columns: 1fr; }
    .debate-data, .allocation-compare, .rec-grid { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .kpi-card { padding: 15px; }
    .kpi-value { font-size: 22px; }
    .ai-header { flex-direction: column; text-align: center; }
    .ai-title { text-align: center; }
    .ai-analysis-grid { grid-template-columns: 1fr; }
    .projection-grid { grid-template-columns: 1fr; }
    .action-item { flex-direction: column; }
    .action-quarter { width: 100%; }
    .action-priority { width: fit-content; }
    table { font-size: 12px; }
    th, td { padding: 8px 10px; }
    .footer { flex-direction: column; gap: 15px; text-align: center; }
    .footer-info { text-align: center; }

    /* Cash Flow Responsive - Tablet */
    .cf-alert-main { flex-direction: column; text-align: center; gap: 15px; }
    .cf-kpi-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .cf-breakdown-grid { grid-template-columns: 1fr; gap: 20px; }
    .cf-variable-grid { grid-template-columns: 1fr; gap: 15px; }
    .cf-scenario-compare { flex-direction: column; }
    .cf-scenario-arrow { transform: rotate(90deg); }
    .cf-summary { flex-direction: column; text-align: center; }

    /* Eficiencia Fiscal Responsive - Tablet */
    .fiscal-visual { flex-direction: column; gap: 25px; }
    .fiscal-bar-container { height: 200px; }
    .fiscal-bar { width: 80px; }
    .fiscal-kpi-grid { grid-template-columns: 1fr 1fr; }
    .fiscal-comparison { grid-template-columns: 1fr; }
    .efficiency-grid { grid-template-columns: 1fr; }
    .fiscal-summary { flex-direction: column; text-align: center; }
    .tax-bar { width: 100px; }
    .fiscal-donut-container { flex-direction: column; gap: 25px; }
    .fiscal-donut-legend { flex-direction: row; gap: 20px; }
    .fiscal-flow-legend { flex-direction: column; gap: 8px; }
    .fiscal-flow-segment { font-size: 12px; }
    .fiscal-toggle-container { flex-wrap: wrap; }
    .fiscal-savings-grid { grid-template-columns: 1fr; gap: 10px; }
    .taxes-pie-container { flex-direction: column; gap: 25px; }
    .taxes-pie-legend { flex-direction: row; flex-wrap: wrap; gap: 15px; justify-content: center; }
    .fiscal-controls { gap: 10px; padding: 8px 15px; margin: -15px -15px 15px -15px; }
    .needs-selector { gap: 8px; }
    .needs-slider-container { min-width: 120px; max-width: 160px; }
    .needs-label { font-size: 11px; }
    .needs-value-display span:first-child { font-size: 12px; }
    .fiscal-toggle-label { font-size: 11px; }
    .cf-flow-visual { flex-direction: column; gap: 10px; }
    .cf-flow-arrow { transform: rotate(90deg); }
    .cf-tax-impact { grid-template-columns: 1fr; }
    .tax-name { min-width: 140px; }
}

/* iPhone Pro Max optimizado (430px) */
@media (max-width: 430px) {
    body { font-size: 14px; }
    .header { padding: 12px; gap: 12px; }
    .header-logo { gap: 8px; }
    .logo-circle { width: 38px; height: 38px; font-size: 20px; }
    .logo-name { font-size: 16px; }
    .logo-subtitle { font-size: 9px; }
    .header-title h1 { font-size: 15px; margin-bottom: 6px; }
    .period-buttons { gap: 6px; }
    .period-btn { padding: 5px 10px; font-size: 11px; }
    .profile-buttons { gap: 6px; }
    .profile-btn { padding: 6px 12px; font-size: 11px; }

    .nav { padding: 10px 12px; gap: 8px; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .nav::-webkit-scrollbar { display: none; }
    .nav-btn { padding: 10px 16px; font-size: 12px; white-space: nowrap; border-radius: 8px; flex-shrink: 0; }
    .nav-btn .short { display: none; }
    .nav-btn .full { display: inline; }
    .nav-btn.highlight { padding: 10px 16px; }

    .profile-indicator { padding: 8px 12px; font-size: 12px; }

    .main { padding: 12px; }
    .section-title { margin-bottom: 15px; }
    .section-title h2 { font-size: 18px; }
    .section-title p { font-size: 12px; }

    .kpi-grid { grid-template-columns: 1fr; gap: 10px; }
    .kpi-card { padding: 15px; border-radius: 10px; }
    .kpi-label { font-size: 12px; }
    .kpi-value { font-size: 26px; }
    .kpi-badge { font-size: 11px; padding: 3px 8px; }

    .dual-cards { gap: 12px; }
    .summary-card { border-radius: 10px; }
    .card-header { padding: 12px 15px; font-size: 16px; }
    .card-subtitle { padding: 8px 15px; font-size: 13px; }
    .card-row { padding: 10px 15px; font-size: 13px; }

    .mini-kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .mini-kpi { padding: 12px; border-radius: 8px; }
    .mini-kpi-value { font-size: 18px; }
    .mini-kpi-label { font-size: 11px; }

    .table-container { padding: 15px; border-radius: 10px; }
    .table-container h3 { font-size: 14px; }
    table { font-size: 11px; }
    th, td { padding: 8px 6px; }

    .alerts-grid { gap: 12px; }
    .alert-card { padding: 15px; border-radius: 10px; }
    .alert-card h3 { font-size: 14px; }
    .alert-card li { font-size: 13px; }

    /* AI Section - iPhone */
    .ai-executive-summary { padding: 15px; border-radius: 10px; }
    .ai-header { gap: 12px; margin-bottom: 15px; }
    .ai-icon { width: 40px; height: 40px; font-size: 14px; }
    .ai-title h3 { font-size: 15px; }
    .ai-title span { font-size: 11px; }
    .rating-score { font-size: 20px; padding: 6px 12px; }
    .ai-summary-text p { font-size: 13px; line-height: 1.6; }

    .ai-alerts { padding: 15px; border-radius: 10px; }
    .ai-alerts h3 { font-size: 16px; margin-bottom: 15px; }
    .ai-alert { padding: 15px; }
    .ai-alert h4 { font-size: 14px; }
    .ai-alert > p { font-size: 13px; }
    .alert-recommendation { font-size: 12px; padding: 10px; }

    .ai-analysis-card { border-radius: 10px; }
    .analysis-header { padding: 12px 15px; gap: 10px; }
    .analysis-icon { width: 26px; height: 26px; font-size: 14px; }
    .analysis-header h4 { font-size: 13px; }
    .analysis-score { font-size: 11px; padding: 4px 10px; }
    .analysis-body { padding: 15px; }
    .analysis-body p { font-size: 12px; }
    .highlight { padding: 4px 10px; font-size: 11px; }

    .ai-action-plan { padding: 15px; border-radius: 10px; }
    .ai-action-plan h3 { font-size: 16px; }
    .action-item { padding: 15px; gap: 12px; }
    .action-quarter { padding: 6px 10px; font-size: 12px; }
    .action-content h4 { font-size: 14px; }
    .action-content li { font-size: 12px; }
    .action-priority { font-size: 10px; padding: 5px 10px; }

    .ai-kpis-monitor { padding: 15px; border-radius: 10px; }
    .ai-kpis-monitor h3 { font-size: 16px; }
    .monitor-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .monitor-item { padding: 12px; gap: 10px; }
    .monitor-icon { width: 35px; height: 35px; font-size: 14px; }
    .monitor-name { font-size: 12px; }
    .monitor-current { font-size: 11px; }
    .monitor-target { font-size: 10px; }

    .ai-disclaimer { padding: 12px; }
    .ai-disclaimer p { font-size: 11px; }

    .ai-comparison { padding: 15px; border-radius: 10px; }
    .ai-comparison h3 { font-size: 16px; }
    .rec-item { padding: 12px; }
    .rec-item strong { font-size: 13px; }
    .rec-item li { font-size: 12px; }

    .ai-projections { padding: 15px; border-radius: 10px; }
    .ai-projections h3 { font-size: 16px; }
    .projection-card { padding: 15px; border-radius: 10px; }
    .proj-header { font-size: 13px; }
    .proj-value { font-size: 26px; }
    .proj-growth { font-size: 14px; }
    .projection-card li { font-size: 11px; }

    /* Other sections iPhone */
    .chart-card { padding: 15px; border-radius: 10px; }
    .chart-card h3 { font-size: 14px; }
    .chart-container { height: 250px; }

    .property-grid { gap: 10px; }
    .property-card { border-radius: 8px; }
    .property-header { padding: 10px 12px; font-size: 13px; }
    .property-row { padding: 8px 12px; font-size: 12px; }

    .debate-grid { gap: 12px; }
    .debate-card { padding: 15px; border-radius: 10px; }
    .debate-card h3 { font-size: 14px; }
    .debate-card > p { font-size: 13px; }

    .footer { padding: 15px 12px; }
    .footer-icon { width: 30px; height: 30px; }
    .footer-info { font-size: 11px; }

    /* Cash Flow Responsive - iPhone */
    .cf-alert-main { padding: 15px; border-radius: 10px; gap: 12px; }
    .cf-alert-icon { width: 40px; height: 40px; font-size: 20px; }
    .cf-alert-content h3 { font-size: 15px; }
    .cf-alert-content p { font-size: 12px; }
    .cf-alert-number strong { font-size: 22px; }

    .cf-kpi-grid { grid-template-columns: 1fr; gap: 10px; }
    .cf-kpi { padding: 15px; border-radius: 10px; }
    .cf-kpi-value { font-size: 24px; }
    .cf-kpi-label { font-size: 11px; }
    .cf-kpi-detail { font-size: 10px; }

    .cf-breakdown { padding: 15px; border-radius: 10px; }
    .cf-breakdown h3 { font-size: 16px; margin-bottom: 15px; }
    .cf-income-section h4, .cf-expense-section h4 { font-size: 13px; }
    .cf-item-name { font-size: 12px; }
    .cf-item-value { font-size: 13px; min-width: 80px; }
    .cf-item-pct { font-size: 11px; min-width: 35px; }

    .cf-variables { padding: 15px; border-radius: 10px; }
    .cf-variables h3 { font-size: 16px; }
    .cf-variables-intro { font-size: 12px; margin-bottom: 15px; }
    .cf-variable-card { padding: 15px; border-radius: 8px; }
    .cf-variable-card h4 { font-size: 14px; }
    .cf-variable-card > p { font-size: 12px; }
    .cf-variable-card li { font-size: 11px; }
    .cf-var-result { font-size: 11px; padding: 8px; }

    .cf-scenario { padding: 15px; border-radius: 10px; }
    .cf-scenario h3 { font-size: 16px; }
    .cf-scenario-header { padding: 10px 12px; font-size: 13px; }
    .cf-scenario-body { padding: 12px; }
    .cf-scenario-row { font-size: 12px; padding: 6px 0; }
    .cf-scenario-arrow { font-size: 24px; }
    .cf-scenario-note { padding: 12px; }
    .cf-scenario-note p { font-size: 12px; }

    .cf-action-plan { padding: 15px; border-radius: 10px; }
    .cf-action-plan h3 { font-size: 16px; }
    .cf-action-step { padding: 12px; gap: 12px; }
    .cf-step-number { width: 30px; height: 30px; font-size: 14px; }
    .cf-step-content h4 { font-size: 14px; }
    .cf-step-content p { font-size: 12px; }
    .cf-step-timing { font-size: 10px; }

    .cf-summary { padding: 15px; border-radius: 10px; gap: 12px; }
    .cf-summary-icon { width: 45px; height: 45px; font-size: 22px; }
    .cf-summary-content h4 { font-size: 15px; margin-bottom: 10px; }
    .cf-summary-content p { font-size: 12px; }

    /* Eficiencia Fiscal Responsive - iPhone */
    .fiscal-main-card { padding: 15px; }
    .fiscal-main-card h3 { font-size: 16px; margin-bottom: 20px; }
    .fiscal-bar-container { height: 180px; gap: 15px; }
    .fiscal-bar { width: 70px; }
    .fiscal-bar-label { font-size: 10px; }
    .fiscal-bar-value { font-size: 14px; }
    .fiscal-rate-box { padding: 20px 25px; }
    .fiscal-rate-value { font-size: 36px; }
    .fiscal-rate-label { font-size: 12px; }
    .fiscal-rate-note { font-size: 10px; }

    .fiscal-kpi-grid { grid-template-columns: 1fr; gap: 10px; }
    .fiscal-kpi { padding: 15px; gap: 12px; }
    .fiscal-kpi-icon { width: 40px; height: 40px; font-size: 20px; }
    .fiscal-kpi-value { font-size: 20px; }
    .fiscal-kpi-label { font-size: 11px; }
    .fiscal-kpi-detail { font-size: 10px; }

    .fiscal-breakdown { padding: 15px; }
    .fiscal-breakdown h3 { font-size: 15px; }
    .fiscal-person { padding: 15px; }
    .fiscal-person h4 { font-size: 14px; }
    .fiscal-row { font-size: 12px; padding: 6px 0; }

    .fiscal-taxes-detail { padding: 15px; }
    .fiscal-taxes-detail h3 { font-size: 15px; }
    .tax-item { flex-wrap: wrap; gap: 10px; }
    .tax-bar { width: 100%; order: 3; }
    .tax-info { width: 100%; }
    .tax-name { min-width: auto; flex: 1; font-size: 13px; }
    .tax-amount { min-width: auto; font-size: 14px; }
    .tax-pct { font-size: 12px; }

    .fiscal-efficiency { padding: 15px; }
    .fiscal-efficiency h3 { font-size: 15px; }
    .efficiency-card { padding: 15px; }
    .efficiency-card h4 { font-size: 13px; }
    .efficiency-value { font-size: 24px; }
    .efficiency-card p { font-size: 12px; }

    .fiscal-summary { padding: 15px; gap: 12px; }
    .fiscal-summary-icon { width: 45px; height: 45px; font-size: 22px; }
    .fiscal-summary-content h4 { font-size: 15px; margin-bottom: 10px; }
    .fiscal-summary-content p { font-size: 12px; }

    /* Nuevas visualizaciones - iPhone */
    .fiscal-toggle-container { padding: 12px; gap: 10px; }
    .fiscal-toggle-label { font-size: 12px; }
    .fiscal-toggle { width: 50px; height: 26px; }
    .fiscal-toggle-slider:before { height: 18px; width: 18px; }
    .fiscal-toggle input:checked + .fiscal-toggle-slider:before { transform: translateX(24px); }
    .fiscal-flow { padding: 15px; }
    .fiscal-flow h3 { font-size: 14px; }
    .fiscal-flow-bar { height: 40px; }
    .fiscal-flow-segment { font-size: 11px; }
    .fiscal-flow-legend { gap: 6px; }
    .fiscal-flow-item { font-size: 12px; }
    .fiscal-donut-container { padding: 15px; gap: 20px; }
    .fiscal-donut { width: 180px; height: 180px; }
    .fiscal-donut svg { width: 180px; height: 180px; }
    .fiscal-donut-center .rate { font-size: 28px; }
    .fiscal-donut-center .label { font-size: 11px; }
    .fiscal-donut-legend { gap: 12px; }
    .fiscal-legend-info .name { font-size: 12px; }
    .fiscal-legend-info .value { font-size: 16px; }
    .fiscal-legend-info .pct { font-size: 11px; }
    .fiscal-savings { padding: 15px; }
    .fiscal-savings-header { gap: 8px; margin-bottom: 12px; }
    .fiscal-savings-icon { width: 35px; height: 35px; font-size: 16px; }
    .fiscal-savings-title { font-size: 14px; }
    .fiscal-savings-item .value { font-size: 18px; }
    .fiscal-savings-item .label { font-size: 11px; }
    .fiscal-savings-item .detail { font-size: 10px; }
    .taxes-pie-container { padding: 15px; gap: 20px; }
    .taxes-pie { width: 150px; height: 150px; }
    .taxes-pie svg { width: 150px; height: 150px; }
    .taxes-pie-center .total { font-size: 18px; }
    .taxes-pie-center .label { font-size: 10px; }
    .taxes-pie-legend { gap: 10px; }
    .taxes-pie-info .name { font-size: 12px; }
    .taxes-pie-info .value { font-size: 14px; }
    .taxes-pie-info .pct { font-size: 10px; }
}

/* Extra small screens */
@media (max-width: 375px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .mini-kpi-grid { grid-template-columns: 1fr; }
    .monitor-grid { grid-template-columns: 1fr; }
    .nav-btn { padding: 6px 8px; font-size: 10px; }
}

/* ========================================
   DATOS DE REFERENCIA - TABLAS
   ======================================== */
.data-reference {
    padding: 20px;
}

.data-tables {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.data-table-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.data-table-container h3 {
    color: #e0e6ed;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.data-table-container h3::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, #4ecdc4, #44a08d);
    border-radius: 2px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table thead th {
    background: rgba(78, 205, 196, 0.15);
    color: #4ecdc4;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid rgba(78, 205, 196, 0.3);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #c0c8d0;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

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

.data-table .row-label {
    font-weight: 500;
    color: #e0e6ed;
    min-width: 120px;
}

.data-table .value-cell {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    text-align: right;
    color: #fff;
}

.data-table .formula-cell {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 11px;
    color: #8b95a5;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 10px;
    border-radius: 4px;
}

.data-table .highlight-row td {
    background: rgba(78, 205, 196, 0.08);
    font-weight: 600;
}

.data-table .total-row td {
    background: rgba(255, 193, 7, 0.1);
    font-weight: 600;
    border-top: 2px solid rgba(255, 193, 7, 0.3);
}

.data-table .section-header td {
    background: rgba(108, 92, 231, 0.1);
    font-weight: 600;
    color: #a29bfe;
    padding: 12px;
}

.data-table-note {
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ffc107;
    border-radius: 0 6px 6px 0;
    font-size: 11px;
    color: #c0c8d0;
}

.data-table-note strong {
    color: #ffc107;
}

/* Responsive tables */
@media (max-width: 768px) {
    .data-table-container {
        padding: 15px;
        overflow-x: auto;
    }

    .data-table {
        font-size: 11px;
        min-width: 500px;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    .data-tables {
        gap: 15px;
    }

    .data-table-container {
        padding: 12px;
    }

    .data-table-container h3 {
        font-size: 13px;
    }
}
