/**
 * HUAWEI FUSIONSOLAR STYLE
 * Diseño adaptado para Sistema Solar Provincial - San Juan
 * Basado en Huawei FusionSolar Design System
 */

/* Reset y Variables */
:root {
    /* Colores Huawei */
    --huawei-primary: #007DFF;
    --huawei-bg-dark: #0A1929;
    --huawei-bg-secondary: #102642;
    --huawei-bg-card: #FFFFFF;
    --huawei-text-primary: #1C1C1C;
    --huawei-text-secondary: #666666;
    --huawei-text-light: #999999;
    --huawei-border: #E6E6E6;
    
    /* Estados */
    --status-normal: #00D77F;
    --status-defect: #FA2A2D;
    --status-disconnected: #999999;
    --status-warning: #FF8C00;
    
    /* Tipografía */
    --font-family: 'Roboto', 'Titillium-Regular', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
}

/* Responsive Font Sizes */
@media (max-width: 1366px) {
    html, body { font-size: 12px; }
}
@media (min-width: 1367px) and (max-width: 1680px) {
    html, body { font-size: 14px; }
}
@media (min-width: 1681px) and (max-width: 1900px) {
    html, body { font-size: 14px; }
}
@media (min-width: 1901px) {
    html, body { font-size: 16px; }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: var(--font-family);
    background: #F0F2F5;
    color: var(--huawei-text-primary);
    overflow-x: hidden;
}

body.huawei-dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =============================================================================
   HEADER BANNER CON IMAGEN
   ============================================================================= */

.nco-home-banner {
    background: linear-gradient(135deg, #0A2E5C 0%, #1A5490 50%, #0A2E5C 100%),
                url('https://images.unsplash.com/photo-1509391366360-2e959784a276?w=1920') center/cover;
    background-blend-mode: overlay;
    height: 28vh;
    min-height: 200px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.banner-overlay {
    background: linear-gradient(to bottom, rgba(10, 38, 71, 0.85), rgba(10, 38, 71, 0.95));
    height: 100%;
    width: 100%;
}

.banner-content {
    height: 100%;
    padding: 2rem 3rem;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    gap: 2rem;
}

.banner-logo {
    display: flex;
    align-items: center;
}

.government-logo {
    height: 5rem;
    filter: brightness(1.2) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.banner-title {
    text-align: center;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.event-logo {
    height: 10rem;
    width: auto;
    filter: brightness(3) contrast(1.5) drop-shadow(0 4px 16px rgba(255, 255, 255, 0.3));
}

.banner-title p {
    font-size: 1.2rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.banner-weather {
    text-align: right;
    color: #FFFFFF;
}

.weather-location {
    font-size: 0.85rem;
    font-weight: 600;
    color: #00D7FF;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.weather-temp {
    font-size: 3rem;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 0.3rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.temp-unit {
    font-size: 1.5rem;
    margin-left: 0.2em;
}

.weather-condition {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.5rem;
}

.weather-time {
    font-size: 1.5rem;
    font-weight: 500;
    font-family: 'Courier New', monospace;
    color: #00FFB3;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* =============================================================================
   CONTAINER PRINCIPAL - LAYOUT SIN SCROLL
   ============================================================================= */

.nco-home-container {
    flex: 1;
    padding: 1rem 2rem;
    max-width: 1920px;
    margin: 0 auto;
    width: 100%;
    height: calc(100vh - 28vh - 3rem); /* Altura disponible sin header ni footer */
    overflow: hidden;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.5rem;
    height: 100%;
}

/* =============================================================================
   COLUMNA IZQUIERDA - BARRAS ANIMADAS
   ============================================================================= */

.left-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.bar-section {
    background: var(--huawei-bg-card);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    flex: 1;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, rgba(0, 215, 127, 0.1), rgba(0, 215, 127, 0.05));
    border-radius: 6px;
    border-left: 3px solid var(--status-normal);
}

.status-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.status-icon.ready {
    background: var(--status-normal);
    color: white;
    box-shadow: 0 0 15px rgba(0, 215, 127, 0.4);
    animation: pulse-ready 2s ease-in-out infinite;
}

@keyframes pulse-ready {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 215, 127, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 215, 127, 0.6);
    }
}

.status-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--status-normal);
    letter-spacing: 0.08em;
}

.bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.bar-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--huawei-text-primary);
    letter-spacing: 0.08em;
}

.bar-target {
    font-size: 1.3rem;
    color: var(--huawei-text-light);
    font-weight: 500;
}

.bar-container {
    position: relative;
    width: 100%;
    height: 7rem;
    display: flex;
    align-items: center;
}

.bar-background {
    position: absolute;
    width: 100%;
    height: 5rem;
    background: linear-gradient(to right, rgba(0, 125, 255, 0.1), rgba(0, 125, 255, 0.05));
    border: 3px solid rgba(0, 125, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(0, 125, 255, 0.8) 0%,
        rgba(0, 171, 255, 0.9) 50%,
        rgba(0, 215, 255, 1) 100%);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(0, 125, 255, 0.4);
}

.bar-glow {
    position: absolute;
    right: 0;
    top: 0;
    width: 50px;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    animation: sweep 2s ease-in-out infinite;
}

@keyframes sweep {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

.bar-value {
    position: relative;
    z-index: 10;
    width: 100%;
    text-align: center;
    font-family: 'Roboto', monospace;
}

.value-number {
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--huawei-text-primary);
    text-shadow: 0 2px 10px rgba(0, 125, 255, 0.3);
}

.value-unit {
    font-size: 2rem;
    font-weight: 600;
    color: var(--huawei-primary);
    margin-left: 0.5rem;
}

/* =============================================================================
   COLUMNA DERECHA - KPIs GRANDES + BENEFICIOS GRANDES
   ============================================================================= */

.right-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

/* KPIs Grandes para Pantalla Gigante */
.kpi-large-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.kpi-large {
    background: var(--huawei-bg-card);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 2px solid rgba(0, 125, 255, 0.15);
    transition: all 0.3s ease;
}

.kpi-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 125, 255, 0.2);
}

.kpi-icon-large {
    font-size: 4rem;
    width: 5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 125, 255, 0.15), rgba(0, 125, 255, 0.05));
    border-radius: 12px;
    flex-shrink: 0;
}

.kpi-data-large {
    flex: 1;
}

.kpi-label-large {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--huawei-text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.kpi-value-large {
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--huawei-text-primary);
    line-height: 1;
}

.unit-large {
    font-size: 1.8rem;
    color: var(--huawei-text-light);
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Beneficios Grandes */
.benefits-large {
    background: var(--huawei-bg-card);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.benefit-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 215, 127, 0.08), rgba(0, 215, 127, 0.03));
    border-radius: 10px;
    border: 2px solid rgba(0, 215, 127, 0.15);
}

.benefit-icon-large {
    font-size: 4.5rem;
    width: 6rem;
    height: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 215, 127, 0.25), rgba(0, 215, 127, 0.15));
    border-radius: 50%;
    margin-bottom: 1rem;
}

.benefit-content-large {
    width: 100%;
}

.benefit-value-large {
    font-size: 3rem;
    font-weight: 500;
    color: var(--huawei-text-primary);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.benefit-unit-large {
    font-size: 1.5rem;
    color: var(--huawei-text-light);
    font-weight: 400;
    margin-left: 0.5rem;
}

.benefit-label-large {
    font-size: 1.2rem;
    color: var(--huawei-text-secondary);
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* =============================================================================
   FOOTER
   ============================================================================= */

.huawei-footer {
    background: var(--huawei-bg-secondary);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.8rem 2rem;
    margin-top: 0;
}

.footer-content {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
}

.separator {
    color: rgba(255, 255, 255, 0.3);
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 1600px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .kpi-large-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .benefits-large {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1366px) {
    .banner-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.5rem;
        padding: 1rem 2rem;
    }
    
    .banner-logo,
    .banner-weather {
        justify-content: center;
        text-align: center;
    }
    
    .banner-title h1 {
        font-size: 1.8rem;
    }
    
    .government-logo {
        height: 3.5rem;
    }
    
    .weather-temp {
        font-size: 2rem;
    }
    
    .value-number {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .kpi-compact-row {
        grid-template-columns: 1fr;
    }
    
    .benefits-compact {
        flex-direction: column;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bar-section,
.kpi-large,
.benefits-large {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

.bar-section:nth-child(1) { animation-delay: 0.1s; }
.bar-section:nth-child(2) { animation-delay: 0.2s; }
.kpi-large:nth-child(1) { animation-delay: 0.3s; }
.kpi-large:nth-child(2) { animation-delay: 0.4s; }
.benefits-large { animation-delay: 0.5s; }
