body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 24px;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

.dashboard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 24px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.refresh-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.refresh-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.refresh-btn.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.last-updated {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.dashboard-notification {
    padding: 12px 20px;
    margin-bottom: 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.dashboard-notification.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.dashboard-notification.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.chart-container {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    height: 400px;
}

.chart-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

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

.table-container {
    margin-top: 48px;
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 800px;
}

th,
td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #1e293b;
    text-transform: uppercase;
    font-size: 0.875rem;
    position: sticky;
    top: 0;
    z-index: 1;
}

td {
    font-size: 0.9375rem;
    color: #475569;
}

tr:hover {
    background-color: #f8fafc;
    transition: background-color 0.2s ease;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-online {
    background-color: #dcfce7;
    color: #166534;
}

.status-offline {
    background-color: #fef2f2;
    color: #991b1b;
}

.status-reference {
    background-color: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.status-unknown {
    background-color: #ffedd5;
    color: #9a3412;
}

/* Link Badge Styles */
a.status-badge {
    text-decoration: none;
    transition: all 0.2s ease;
}

a.status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #e2e8f0;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    color: #1e293b;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.description {
    text-align: center;
    color: #64748b;
    margin-top: -24px;
    margin-bottom: 32px;
    font-size: 1.1rem;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 16px;
    color: #1e293b;
}

/* Methodology Section */
.methodology-section {
    margin-top: 48px;
    background: #ffffff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.methodology-section h2 {
    text-align: left;
    margin-top: 0;
}

.methodology-section h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
    text-align: left;
}

.methodology-section p {
    color: #64748b;
    margin-bottom: 16px;
}

.methodology-section ul {
    list-style: disc;
    padding-left: 24px;
    color: #475569;
}

.methodology-section li {
    margin-bottom: 8px;
}

.methodology-section a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.methodology-section a:hover {
    text-decoration: underline;
}

/* Loading states */
.chart-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 12px;
    }

    .dashboard-controls {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .refresh-btn {
        justify-content: center;
    }

    .last-updated {
        text-align: center;
    }

    .chart-container {
        height: 350px;
    }

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

    th,
    td {
        padding: 10px 12px;
        font-size: 0.875rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {

    .chart-container,
    .table-container,
    .dashboard-controls {
        padding: 16px;
    }

    .chart-container {
        height: 300px;
    }

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

    th,
    td {
        font-size: 0.8125rem;
        padding: 8px 10px;
    }

    .refresh-btn {
        padding: 10px 20px;
        font-size: 0.875rem;
    }
}