:root {
    --bg: #ffffff;
    --surface: #f6f8fa;
    --border: #d0d7de;
    --text: #1f2328;
    --text-muted: #656d76;
    --accent: #0969da;
    --green: #1a7f37;
    --yellow: #9a6700;
    --red: #cf222e;
    --badge-green-bg: rgba(26, 127, 55, 0.1);
    --badge-yellow-bg: rgba(154, 103, 0, 0.1);
    --badge-red-bg: rgba(207, 34, 46, 0.1);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0d1117;
        --surface: #161b22;
        --border: #30363d;
        --text: #e6edf3;
        --text-muted: #7d8590;
        --accent: #58a6ff;
        --green: #3fb950;
        --yellow: #d29922;
        --red: #f85149;
        --badge-green-bg: rgba(63, 185, 80, 0.15);
        --badge-yellow-bg: rgba(210, 153, 34, 0.15);
        --badge-red-bg: rgba(248, 81, 73, 0.15);
    }
}

:root[data-theme="dark"] {
    --bg: #0d1117;
    --surface: #161b22;
    --border: #30363d;
    --text: #e6edf3;
    --text-muted: #7d8590;
    --accent: #58a6ff;
    --green: #3fb950;
    --yellow: #d29922;
    --red: #f85149;
    --badge-green-bg: rgba(63, 185, 80, 0.15);
    --badge-yellow-bg: rgba(210, 153, 34, 0.15);
    --badge-red-bg: rgba(248, 81, 73, 0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

header {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

header h1 {
    font-size: 20px;
    font-weight: 600;
}

header nav {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

header nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 6px;
}

header nav a:hover,
header nav a.active {
    color: var(--text);
    background: var(--surface);
}

main {
    padding: 24px 0;
}

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

th, td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
}

td {
    font-size: 14px;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-green {
    background: var(--badge-green-bg);
    color: var(--green);
}

.badge-yellow {
    background: var(--badge-yellow-bg);
    color: var(--yellow);
}

.badge-red {
    background: var(--badge-red-bg);
    color: var(--red);
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.card h3 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.card .value {
    font-size: 32px;
    font-weight: 600;
}

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

.loading {
    color: var(--text-muted);
    text-align: center;
    padding: 48px;
}

.error {
    color: var(--red);
    text-align: center;
    padding: 48px;
}

h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.theme-toggle {
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-left: auto;
}

.theme-toggle:hover {
    color: var(--text);
}
