:root {
    color-scheme: dark;
    --background: #131612;
    --panel: #1c2019;
    --field: #151812;
    --line: #3a4334;
    --text: #f5f5e9;
    --muted: #bec4b5;
    --accent: #d9ef88;
    --accent-ink: #232b18;
    --error: #ffc9b8;
}
* { box-sizing: border-box; }
body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    padding: clamp(18px, 5vw, 42px);
    display: grid;
    place-items: center;
    background: radial-gradient(ellipse at 50% 0%, #2a3420, transparent 62%), var(--background);
    color: var(--text);
    font: 16px/1.5 system-ui, -apple-system, sans-serif;
}
.sign-in {
    width: min(100%, 500px);
    padding: clamp(22px, 6vw, 40px);
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--panel);
    box-shadow: 0 24px 80px #080a07a6;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    font-size: 15px;
    font-weight: 750;
    text-decoration: none;
}
.brand-icon {
    width: 15px;
    height: 15px;
    border: 4px solid var(--accent);
    border-right: 0;
}
h1 { margin: 14px 0 7px; font-size: clamp(28px, 8vw, 39px); line-height: 1.08; letter-spacing: -.055em; }
.intro { margin: 0 0 25px; color: var(--muted); }
form { display: grid; gap: 18px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend, .field-label { font-weight: 650; }
.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 8px; }
.roles label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 72px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--field);
    cursor: pointer;
}
.roles label:has(input:checked) { border-color: var(--accent); background: #27311f; }
.roles input { flex: 0 0 auto; margin: 5px 0 0; accent-color: var(--accent); }
.roles strong, .roles small { display: block; }
.roles small { color: var(--muted); font-size: 14px; }
.field { display: grid; gap: 7px; }
.field input, button {
    width: 100%;
    min-height: 49px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font: inherit;
}
.field input { background: var(--field); color: var(--text); }
.field input::placeholder { color: #a4ad99; }
.field input[name="otp"] { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: .3em; }
.hint { color: var(--muted); font-size: 14px; }
button { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 750; cursor: pointer; }
button:hover { background: #edf9bd; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.auth-error { padding: 10px 12px; border: 1px solid #744c42; border-radius: 8px; background: #33241f; color: var(--error); margin: 0 0 16px; }
.auth-error[hidden] { display: none; }
.auth-back { display: inline-block; margin-top: 20px; color: var(--muted); font-size: 15px; }
@media (max-width: 385px) {
    .roles { grid-template-columns: 1fr; }
}
