* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

nav {
    margin-top: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    margin-right: 20px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
    transition: all 0.3s;
}

nav a:hover {
    background: rgba(255,255,255,0.3);
}

.main-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.nav-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.nav-card h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #667eea;
}

.date-filter {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.date-filter form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.date-filter label {
    font-weight: 600;
}

.date-filter input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.date-filter button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.date-filter button:hover {
    background: #5568d3;
}

.metrics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.metric-card h3 {
    font-size: 0.9em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.metric-value {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.dashboard-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-section h2 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.dashboard-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.half-width {
    margin-bottom: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #dee2e6;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.positive {
    color: #28a745;
    font-weight: 600;
}

.negative {
    color: #dc3545;
    font-weight: 600;
}

.budget-increase {
    color: #28a745;
}

.budget-decrease {
    color: #dc3545;
}

.budget-maintain {
    color: #ffc107;
}

.budget-optimize {
    color: #17a2b8;
}

.action-badge {
    display: inline-block;
    padding: 5px 10px;
    background: #ffc107;
    color: #333;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: 600;
}

.info-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.feature h4 {
    color: #667eea;
    margin-bottom: 15px;
}

.feature ul {
    list-style-position: inside;
}

.feature li {
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .main-nav {
        grid-template-columns: 1fr;
    }
    
    .metrics-summary {
        grid-template-columns: 1fr 1fr;
    }
    
    .dashboard-row {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 0.85em;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }
}