/* Dashboard Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.dashboard-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.header-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.last-update {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.disclaimer {
    font-size: 0.8rem;
    color: #e74c3c;
    font-weight: 600;
    padding: 5px 10px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 20px;
}

/* Filters */
.filters-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 600;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.filter-group select {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group select:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

/* KPIs Grid */
.kpis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-section h2 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.kpi-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.kpi-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 12px 12px 0 0;
}

.kpi-card[data-status="excellent"]::before {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
}

.kpi-card[data-status="good"]::before {
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

.kpi-card[data-status="warning"]::before {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

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

.kpi-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.kpi-trend {
    font-size: 1.5rem;
    font-weight: bold;
}

.kpi-trend.up {
    color: #27ae60;
}

.kpi-trend.down {
    color: #e74c3c;
}

.kpi-trend.stable {
    color: #95a5a6;
}

.kpi-value {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}

.kpi-value .value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.kpi-value .target {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.kpi-sparkline {
    height: 40px;
}

.kpi-sparkline canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.chart-header h3 {
    color: #2c3e50;
    font-size: 1.2rem;
}

.chart-period {
    font-size: 0.9rem;
    color: #7f8c8d;
    background: rgba(127, 140, 141, 0.1);
    padding: 5px 10px;
    border-radius: 15px;
}

.chart-container canvas {
    max-height: 300px;
}

/* Alerts Section */
.alerts-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.alerts-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert.warning {
    background: rgba(241, 196, 15, 0.1);
    border-left-color: #f1c40f;
}

.alert.info {
    background: rgba(52, 152, 219, 0.1);
    border-left-color: #3498db;
}

.alert.success {
    background: rgba(46, 204, 113, 0.1);
    border-left-color: #2ecc71;
}

.alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert-content strong {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 5px;
    display: block;
}

.alert-content p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.alert-content small {
    color: #95a5a6;
    font-size: 0.8rem;
}

/* Footer */
.dashboard-footer {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.footer-section h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    color: #7f8c8d;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.footer-section li::before {
    content: "• ";
    color: #3498db;
    font-weight: bold;
}

.footer-disclaimer {
    border-top: 1px solid #ecf0f1;
    padding-top: 20px;
    text-align: center;
}

.footer-disclaimer p {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 10px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .kpis-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .filters-section {
        flex-direction: column;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #3498db;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kpi-card,
.chart-container,
.alert {
    animation: fadeIn 0.6s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
