/* assets/css/style.css */
.hsd-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    margin: 20px 0;
}

.hsd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(226, 232, 240, 0.6);
}

.hsd-title {
    margin: 0;
    color: #1e293b;
    font-size: 1.5em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hsd-icon-sun {
    color: #f59e0b;
}

.hsd-last-update {
    color: #64748b;
    font-size: 0.875em;
    background: rgba(226, 232, 240, 0.5);
    padding: 6px 12px;
    border-radius: 20px;
}

.hsd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.hsd-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.hsd-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
}

.hsd-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.hsd-card-today::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.hsd-card-total::before { background: linear-gradient(90deg, #10b981, #34d399); }
.hsd-card-month::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.hsd-card-status::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.hsd-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.hsd-card-header h4 {
    margin: 0;
    color: #475569;
    font-size: 0.95em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hsd-card-icon {
    font-size: 1.2em;
    opacity: 0.7;
}

.hsd-card-content {
    text-align: center;
}

.hsd-value {
    font-size: 2.2em;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 5px;
}

.hsd-unit {
    color: #64748b;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.hsd-subvalue {
    color: #10b981;
    font-size: 0.9em;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
}

.hsd-status-badge {
    font-size: 2em;
    display: inline-block;
    animation: pulse 2s infinite;
}

.hsd-status-badge-large {
    font-size: 3em;
}

.hsd-status-3 { color: #10b981; }
.hsd-status-2 { color: #f59e0b; }
.hsd-status-1 { color: #ef4444; }

.hsd-status-label {
    color: #64748b;
    font-size: 0.9em;
    margin-top: 8px;
}

/* Widgets individuales */
.hsd-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}

.hsd-widget:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
}

.hsd-widget-today {
    border-left: 4px solid #3b82f6;
}

.hsd-widget-total {
    border-left: 4px solid #10b981;
}

.hsd-widget-icon {
    color: #3b82f6;
    flex-shrink: 0;
}

.hsd-widget-total .hsd-widget-icon {
    color: #10b981;
}

.hsd-widget-content {
    flex: 1;
}

.hsd-widget-label {
    color: #64748b;
    font-size: 0.875em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.hsd-widget-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.hsd-counter {
    display: inline-block;
}

.hsd-widget-unit {
    color: #64748b;
    font-size: 0.8em;
    font-weight: 500;
}

.hsd-widget-subtext {
    color: #64748b;
    font-size: 0.85em;
    margin-top: 5px;
}

.hsd-widget-progress {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.hsd-progress-bar {
    height: 6px;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 3px;
    margin-bottom: 8px;
    transition: width 1s ease-in-out;
}

.hsd-progress-text {
    color: #64748b;
    font-size: 0.8em;
    text-align: center;
}

/* Animaciones */
.hsd-animated .hsd-widget-value {
    animation: countUp 2s ease-out forwards;
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive */
@media (max-width: 768px) {
    .hsd-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hsd-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .hsd-value {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    .hsd-grid {
        grid-template-columns: 1fr;
    }
    
    .hsd-dashboard {
        padding: 15px;
    }
}

/* Gráfico */
.hsd-chart-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
}

.hsd-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.hsd-chart-header h4 {
    margin: 0;
    color: #475569;
    font-size: 1em;
}

.hsd-chart-legend {
    display: flex;
    gap: 15px;
}

.hsd-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.85em;
}

.hsd-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.hsd-chart {
    height: 100px;
    background: linear-gradient(to bottom, #f8fafc, white);
    border-radius: 8px;
    padding: 10px;
    position: relative;
}

.hsd-chart-placeholder {
    height: 100%;
    background: rgba(226, 232, 240, 0.3);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.hsd-chart-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, #3b82f6, #60a5fa);
    border-radius: 6px 6px 0 0;
    transition: height 1s ease-in-out;
}