:root {
    --ink: #17202a;
    --muted: #667085;
    --line: #d9e0e8;
    --bg: #f6f8fb;
    --panel: #ffffff;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --accent: #c2410c;
    --danger: #b42318;
    --success: #067647;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--ink);
}

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

.topbar {
    min-height: 64px;
    padding: 0 28px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    font-weight: 800;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.settings-logo {
    max-width: 180px;
    max-height: 90px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px;
    background: #fff;
}

nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto;
}

.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto;
    color: var(--muted);
    text-align: center;
    font-size: 14px;
}

.auth-shell {
    min-height: calc(100vh - 160px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: center;
    gap: 48px;
}

h1, h2, h3 {
    margin-top: 0;
}

h1 {
    font-size: 40px;
    line-height: 1.1;
}

.lead {
    color: var(--muted);
    font-size: 18px;
    max-width: 620px;
}

.eyebrow {
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0;
}

.panel, .card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
}

.auth-card, .narrow {
    max-width: 440px;
    margin: 0 auto;
}

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

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.stacked {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 7px;
    font-weight: 700;
    margin-bottom: 14px;
}

input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 11px 12px;
    font: inherit;
    background: #fff;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

button, .button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    padding: 11px 16px;
    font-weight: 800;
    cursor: pointer;
}

.button-secondary {
    background: #334155;
}

.button-danger {
    background: var(--danger);
}

.muted {
    color: var(--muted);
}

.alert {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 18px;
}

.alert.success {
    background: #dcfae6;
    color: var(--success);
}

.alert.error {
    background: #fee4e2;
    color: var(--danger);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 13px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    background: #eef4f7;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.form-actions {
    align-self: end;
}

.registration-form {
    align-items: end;
}

.stat {
    font-size: 32px;
    font-weight: 800;
}

.question {
    margin-bottom: 18px;
}

.option-label {
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-label input {
    width: auto;
}

.timer {
    position: sticky;
    top: 12px;
    z-index: 1;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-weight: 800;
}

.result-pass {
    color: var(--success);
    font-weight: 800;
}

.result-fail {
    color: var(--danger);
    font-weight: 800;
}

@media (max-width: 760px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    h1 {
        font-size: 32px;
    }

    .toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}
