/*
 * Login surface — Tensocret isolation.
 *
 * Minimum safe styling for the accessible login form. No
 * frameworks, no JavaScript dependency, no external assets.
 * Keeps the form fully usable with the CSS stripped so the
 * page degrades gracefully to a plain accessible form.
 */

:root {
    color-scheme: light dark;
    --bg: #f5f6f8;
    --surface: #ffffff;
    --text: #1c1f23;
    --muted: #5b6470;
    --border: #d6dbe0;
    --primary: #1f4e8c;
    --primary-text: #ffffff;
    --error-bg: #fdecea;
    --error-border: #d32f2f;
    --error-text: #611a15;
    --focus: #1f4e8c;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1115;
        --surface: #161a21;
        --text: #e7eaee;
        --muted: #9aa3ad;
        --border: #2a3038;
        --primary: #6aa1e4;
        --primary-text: #0f1115;
        --error-bg: #3a1413;
        --error-border: #c45d57;
        --error-text: #f5d3d0;
        --focus: #6aa1e4;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 22rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.75rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.login-card h1 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
}

.login-card .subtitle {
    margin: 0 0 1.25rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.alert {
    border: 1px solid transparent;
    border-radius: 0.375rem;
    padding: 0.75rem 0.875rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.alert-error {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error-text);
}

.field {
    margin-bottom: 1rem;
}

.field label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.field input[type="email"],
.field input[type="password"] {
    width: 100%;
    padding: 0.6rem 0.7rem;
    font-size: 1rem;
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field input:focus-visible {
    outline: none;
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(31, 78, 140, 0.25);
}

.field-checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    font-size: 0.95rem;
    margin: 0;
}

.btn-primary {
    display: inline-block;
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-text);
    background: var(--primary);
    border: 1px solid transparent;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    filter: brightness(0.95);
}

.btn-primary:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}
