/* The admin site's styles. Its own file, not the learner app's style.css: the admin site is
   another origin and serves only its own files (ADMIN.md §7). Plain and functional. */

:root {
    color-scheme: light dark;
    --bg: #f6f6f4;
    --surface: #ffffff;
    --text: #1d1d1f;
    --muted: #63636a;
    --border: #d9d9de;
    --accent: #2f5d8a;
    --accent-text: #ffffff;
    --error: #b3261e;
    --failed-row: #fdecea;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.45;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #161618;
        --surface: #1f1f22;
        --text: #ececef;
        --muted: #a0a0a8;
        --border: #38383e;
        --accent: #7fb0e0;
        --accent-text: #0e1a26;
        --error: #f2b8b5;
        --failed-row: #3a1f1d;
    }
}

* { box-sizing: border-box; }

/* The pages show and hide steps with the hidden attribute; button's display mustn't override it. */
[hidden] { display: none !important; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    padding: 2rem 1rem;
}

body.wide { padding: 0; }

a { color: var(--accent); }

h1 { font-size: 1.5rem; margin: 0 0 0.75rem; }

.card {
    max-width: 28rem;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.nowrap { white-space: nowrap; }

label { display: block; font-weight: 600; margin: 1rem 0 0.25rem; }

input {
    width: 100%;
    font: inherit;
    font-size: 1.5rem;
    letter-spacing: 0.15em;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
}

button, .button {
    display: inline-block;
    font: inherit;
    padding: 0.55rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
}

button.primary, .button.primary {
    margin-top: 1rem;
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-text);
    font-weight: 600;
}

button:disabled { opacity: 0.55; cursor: default; }

.message { min-height: 1.5em; margin: 1rem 0 0; }
.message.error { color: var(--error); }

.topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.topbar .title { font-weight: 700; margin-right: auto; }

body.wide main { padding: 1.25rem 1rem 2rem; }

.table-wrap { overflow-x: auto; }

table { border-collapse: collapse; width: 100%; font-size: 0.9rem; background: var(--surface); }
th, td { text-align: left; vertical-align: top; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--border); }
th { font-weight: 600; white-space: nowrap; }
td time { white-space: nowrap; }
td.details { color: var(--muted); }
tr.failed td { background: var(--failed-row); }

#more { margin-top: 1rem; }
