/* RadioExte Visitas Pro - Dashboard Profesional Estilo Xero */

.revp-dashboard-public {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f8f9fa;
}

/* ========== HEADER ========== */
.revp-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 20px;
}

.revp-logo-mda-container {
    flex-shrink: 0;
}

.revp-logo-mda-main {
    height: 50px !important;
    width: auto;
    display: block;
}

/* Filtro de Fechas */
.revp-date-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.revp-date-input {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    background: #fff;
    min-width: 140px;
}

.revp-date-separator {
    color: #9ca3af;
    font-size: 14px;
}

.revp-btn-apply {
    padding: 8px 20px;
    background: #0DD3C3;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.revp-btn-apply:hover {
    background: #0bc0b0;
}

/* ========== METRIC CARDS (Sin sombras) ========== */
.revp-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

/* ========== DATE RANGE INDICATOR ========== */
.revp-date-range-indicator {
    text-align: center;
    margin-bottom: 32px;
    padding: 16px 0;
}

.revp-date-range-indicator span {
    font-size: 18px;
    font-weight: 400;
    color: #1B1F40;
}

.revp-metric-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
}

.revp-metric-card:hover {
    border-color: #d1d5db;
    transform: translateY(-2px);
}

/* Gradientes tipo Xero */
.revp-gradient-blue {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
}

.revp-gradient-cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: #fff;
}

.revp-gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.revp-gradient-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #fff;
}

.revp-metric-header {
    margin-bottom: 12px;
}

.revp-metric-label {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.revp-metric-value {
    font-size: 36px;
    font-weight: 700;
    margin: 8px 0;
    line-height: 1;
}

.revp-metric-footer {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 8px;
}

/* ========== CHARTS WRAPPER ========== */
.revp-charts-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.revp-charts-row {
    display: grid;
    gap: 24px;
}

.revp-chart-box {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    width: 100%;
}

.revp-chart-full {
    grid-column: 1 / -1;
}

.revp-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.revp-chart-title {
    font-size: 18px;
    font-weight: 600;
    color: #1B1F40;
    margin: 0;
}

.revp-chart-subtitle {
    font-size: 13px;
    color: #6b7280;
}

.revp-chart-content {
    position: relative;
}

.revp-chart-content canvas {
    max-height: 300px !important;
}

.revp-chart-full .revp-chart-content canvas {
    max-height: 350px !important;
}

/* ========== SPLIT LAYOUT (Gráfico + Leyenda) ========== */
.revp-chart-split {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    align-items: center;
}

.revp-chart-visual {
    position: relative;
}

.revp-chart-visual canvas {
    max-height: 220px !important;
}

/* ========== LEGEND CON PORCENTAJES VISIBLES ========== */
.revp-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.revp-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.revp-legend-item:hover {
    background: #f9fafb;
}

.revp-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.revp-legend-label {
    flex: 1;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.revp-legend-value {
    font-size: 15px;
    font-weight: 700;
    color: #1B1F40;
    min-width: 50px;
    text-align: right;
}

/* ========== HORIZONTAL BARS (Categorías) ========== */
.revp-horizontal-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.revp-bar-item {
    display: grid;
    grid-template-columns: 120px 1fr 60px;
    gap: 12px;
    align-items: center;
}

.revp-bar-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-align: right;
}

.revp-bar-container {
    background: #f3f4f6;
    border-radius: 8px;
    height: 32px;
    position: relative;
    overflow: hidden;
}

.revp-bar-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.revp-bar-value {
    font-size: 15px;
    font-weight: 700;
    color: #1B1F40;
    text-align: right;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .revp-dashboard-public {
        padding: 20px 15px;
    }
    
    .revp-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .revp-metrics-grid {
        grid-template-columns: 1fr !important;
    }
    
    .revp-chart-split {
        grid-template-columns: 1fr;
    }
    
    .revp-metric-value {
        font-size: 28px;
    }
    
    .revp-date-filter {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .revp-bar-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .revp-bar-label {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .revp-chart-box {
        padding: 16px;
    }
    
    .revp-metric-card {
        padding: 20px;
    }
}

/* ========== LOADING STATE ========== */
.revp-loading {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.revp-loading:after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ========== FOOTER ========== */
.revp-dashboard-footer {
    margin-top: 48px;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.revp-footer-copyright {
    font-size: 14px;
    font-weight: 600;
    color: #1B1F40;
    margin: 0 0 8px 0;
}

.revp-footer-disclaimer {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}
