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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

h1 {
    font-size: 2.5em;
    color: #2d3748;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    color: #718096;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Week Toggle Buttons */
.week-toggle {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-toggle {
    background: #e2e8f0;
    color: #4a5568;
    padding: 10px 20px;
    border-radius: 0;
    border: none;
}

.btn-toggle:first-child {
    border-radius: 8px 0 0 8px;
}

.btn-toggle:last-child {
    border-radius: 0 8px 8px 0;
}

.btn-toggle:hover:not(.active) {
    background: #cbd5e0;
}

.btn-toggle.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: default;
}

.last-updated {
    color: #718096;
    font-size: 14px;
}

.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: linear-gradient(135deg, #f6f8fb 0%, #ffffff 100%);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card.alert {
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
    border-left: 4px solid #f56565;
}

.card-label {
    font-size: 14px;
    color: #718096;
    margin-bottom: 8px;
    font-weight: 500;
}

.card-value {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
}

.card.alert .card-value {
    color: #c53030;
}

.section {
    margin-bottom: 40px;
}

h2 {
    font-size: 1.8em;
    color: #2d3748;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.plan-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.plan-stat {
    background: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.plan-stat-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.plan-stat-details {
    font-size: 14px;
    color: #718096;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: #f7fafc;
}

.overage-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 13px;
}

.overage-high {
    background: #feb2b2;
    color: #742a2a;
}

.overage-medium {
    background: #fbd38d;
    color: #744210;
}

.overage-low {
    background: #fef5e7;
    color: #975a16;
}

.no-data {
    text-align: center;
    padding: 60px 20px;
    background: #f0fff4;
    border-radius: 8px;
    border: 2px dashed #9ae6b4;
}

.no-data p {
    font-size: 18px;
    color: #22543d;
    font-weight: 500;
}

.error {
    text-align: center;
    padding: 60px 20px;
    background: #fff5f5;
    border-radius: 8px;
    border: 2px solid #fc8181;
}

.error h3 {
    color: #c53030;
    margin-bottom: 10px;
}

.error p {
    color: #742a2a;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8em;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 10px;
    }
}
