:root {
    --bg: #0f172a;
    --panel: #1e293b;
    --panel-alt: #273449;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --accent: #3b82f6;
    --danger: #ef4444;
    --ok: #22c55e;
    --warn: #f59e0b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-card {
    background: var(--panel);
    padding: 2rem;
    border-radius: 8px;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-card h1 { font-size: 1.2rem; margin: 0 0 .5rem; }

label {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    font-size: .85rem;
    color: var(--muted);
}

input, textarea {
    background: var(--panel-alt);
    border: 1px solid #334155;
    color: var(--text);
    padding: .5rem;
    border-radius: 4px;
    font-size: .95rem;
}

button, .button {
    background: var(--accent);
    color: white;
    border: none;
    padding: .5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    width: fit-content;
    font-size: .9rem;
}

a { color: var(--accent); }

.error { color: var(--danger); }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--panel);
    border-bottom: 1px solid #334155;
}

.topbar nav a { margin-right: 1rem; }

main { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }

.panel {
    background: var(--panel);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.data-table th, .data-table td {
    text-align: left;
    padding: .5rem;
    border-bottom: 1px solid #334155;
}

.row-alert { background: rgba(239, 68, 68, 0.12); }

.badge {
    padding: .15rem .5rem;
    border-radius: 999px;
    font-size: .75rem;
}

.badge-ok { background: rgba(34,197,94,.2); color: var(--ok); }
.badge-warn { background: rgba(245,158,11,.2); color: var(--warn); }
.badge-muted { background: rgba(148,163,184,.2); color: var(--muted); }

.notice-box {
    background: var(--panel-alt);
    border: 1px solid var(--accent);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.api-key {
    display: block;
    margin-top: .5rem;
    padding: .5rem;
    background: #0b1120;
    word-break: break-all;
    border-radius: 4px;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 420px;
}

.inline-form {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .75rem;
}

.thumb {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    text-decoration: none;
    color: var(--muted);
    font-size: .75rem;
}

.thumb img {
    width: 100%;
    border-radius: 4px;
    border: 1px solid #334155;
}
