* { box-sizing: border-box; }
:root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #231f20;
    background: #f5f5f5;
    font-synthesis: none;
    --brand-red: #d12128;
    --brand-red-hover: #b61c23;
}
body { margin: 0; min-width: 280px; }
button, input { font: inherit; }
button, input[type="submit"] { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand-red); outline-offset: 4px; }
.login-shell {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    border-top: 4px solid var(--brand-red);
}
.form-panel {
    width: 100%;
    max-width: 440px;
    padding: 32px 40px;
    background: #fff;
    border: 1px solid #e5e3e3;
    border-radius: 16px;
    box-shadow: 0 12px 40px #231f2008;
}
.brand-header { display: flex; justify-content: center; padding-bottom: 26px; border-bottom: 1px solid #efeded; }
.brand-logo { display: block; width: 220px; max-width: 100%; height: auto; }
.form-content { padding-top: 28px; }
h1 { margin: 0 0 7px; font-size: 26px; font-weight: 650; line-height: 1.25; letter-spacing: -.6px; }
.form-description { margin: 0 0 28px; font-size: 13px; line-height: 1.6; color: #706b6c; }
.field { margin-bottom: 21px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 9px; }
.field input {
    min-width: 0;
    width: 100%;
    min-height: 50px;
    border: 1px solid #ccc7c8;
    border-radius: 8px;
    background: #fff;
    padding: 13px 15px;
    font-size: 16px;
    color: #231f20;
    transition: border-color .15s;
}
.field input:focus { border-color: var(--brand-red); outline: 3px solid #d1212815; }
.field input[aria-invalid="true"] { border-color: var(--brand-red); }
.password-field { position: relative; }
.password-field input { padding-right: 80px; }
.password-toggle {
    position: absolute;
    top: 3px;
    right: 5px;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: #5b5052;
    font-size: 12px;
    font-weight: 650;
    border-radius: 6px;
}
.password-toggle:hover { color: var(--brand-red); }
.verification { margin: 23px 0; }
#login-turnstile { min-height: 65px; }
.verification-status { font-size: 12px; line-height: 1.6; color: #706b6c; margin: 8px 0 0; }
.verification-retry { color: #ac1b22; font-size: 13px; background: none; border: 0; text-decoration: underline; padding: 8px 0; min-height: 44px; }
.login-submit {
    min-height: 51px;
    width: 100%;
    padding: 13px 20px;
    border: 1px solid var(--brand-red);
    border-radius: 8px;
    background: var(--brand-red);
    color: #fff;
    font-weight: 650;
    font-size: 15px;
    transition: background .15s;
}
.login-submit:hover:enabled { background: var(--brand-red-hover); border-color: var(--brand-red-hover); }
.login-submit:disabled { opacity: .55; cursor: wait; }
.form-footer { margin-top: 26px; font-size: 11px; color: #706b6c; text-align: center; line-height: 1.8; }
.form-alert, .environment-notice { padding: 13px 15px; border: 1px solid #efc8ca; border-radius: 8px; background: #fdf0f1; color: #a51a20; font-size: 13px; line-height: 1.6; margin-bottom: 24px; }
.form-alert p { margin: 0; }
.field-error { font-size: 12px; line-height: 1.6; color: #a51a20; margin: 6px 0 0; }
.environment-notice { color: #795117; background: #fff6df; border-color: #e7d7b1; }
.environment-notice strong { display: block; }
.instance-name { display: block; width: fit-content; border: 1px solid #ddd5d6; color: #706066; padding: 4px 8px; border-radius: 5px; font-size: 10px; font-weight: 700; letter-spacing: 1px; margin: 0 0 20px; overflow-wrap: anywhere; }
@media (max-width: 480px) {
    .login-shell { padding: 24px 16px; }
    .form-panel { padding: 24px 20px; border-radius: 12px; }
    .brand-logo { width: 195px; }
    .brand-header { padding-bottom: 22px; }
    .form-content { padding-top: 24px; }
}
@media (max-width: 359px) {
    .login-shell { padding: 16px 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
