:root {
    color-scheme: light;
    --ink: #252832;
    --muted: #6f7480;
    --brand-color: #9b1935;
    --page-background: #f7f7f6;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--page-background);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-color); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand-color); outline-offset: 4px; }
.site-header { padding: 36px 24px 12px; text-align: center; }
.brand { display: inline-block; color: var(--ink); font-size: 23px; font-weight: 650; letter-spacing: 2px; overflow-wrap: anywhere; }
.brand:hover { text-decoration: none; }
.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 36px 24px; }
.login-container { width: 100%; max-width: 460px; }
.login-card { padding: 40px 36px 30px; background: #fff; border: 1px solid #e2e3e6; border-radius: 16px; box-shadow: 0 12px 40px -16px rgba(28, 31, 41, .14); }
.card-heading { text-align: center; margin-bottom: 32px; }
.company-logo { display: block; width: auto; height: auto; max-width: 220px; max-height: 140px; margin: 0 auto 8px; object-fit: contain; }
.card-heading h1 { font-size: 29px; font-weight: 650; letter-spacing: -.9px; line-height: 1.25; margin: 0; overflow-wrap: anywhere; }
.form-description { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 10px 0 0; overflow-wrap: anywhere; }
.field-group { margin-bottom: 22px; }
.field-group > label { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 500; }
.field-group input { display: block; width: 100%; min-height: 50px; padding: 13px 15px; border: 1px solid #d7dae0; border-radius: 7px; background: #fff; color: var(--ink); transition: border-color .15s; }
.field-group input::placeholder { color: #767d89; font-size: 13px; opacity: 1; }
.field-group input:focus { outline: 2px solid var(--brand-color); outline-offset: 2px; border-color: var(--brand-color); }
.field-group input[aria-invalid="true"] { border-color: #a02339; }
.password-field { position: relative; }
.password-field input { padding-right: 70px; }
.password-toggle { position: absolute; top: 3px; right: 4px; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 5px; background: transparent; color: #636b78; font-size: 12px; }
.password-toggle:hover { color: var(--brand-color); background: #f6f6f7; }
.form-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 26px; font-size: 12px; }
.remember-option { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.remember-option input { width: 17px; height: 17px; margin: 0; accent-color: var(--brand-color); cursor: pointer; }
.sign-in { width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 7px; background: var(--brand-color); color: #fff; font-size: 14px; font-weight: 600; transition: filter .15s; }
.sign-in:hover { filter: brightness(.9); }
.register-prompt { border-top: 1px solid #eceef1; padding-top: 24px; margin: 26px 0 0; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; }
.register-prompt a { margin-left: 3px; font-weight: 500; }
.support-prompt { text-align: center; color: var(--muted); font-size: 13px; margin: 26px 0 0; line-height: 1.6; }
.support-prompt a { margin-left: 3px; font-weight: 500; }
.notice { padding: 14px 16px; margin-bottom: 24px; border-radius: 7px; font-size: 12px; line-height: 1.6; }
.notice-error { background: #fdf0f1; border: 1px solid #f1cdd2; color: #912136; }
.notice-success { background: #eef6ed; border: 1px solid #cddfc9; color: #365b32; }
.notice ul { margin: 6px 0 0; padding-left: 17px; }
.notice p { margin: 6px 0 0; }
.site-footer { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 12px 24px 26px; color: #717785; font-size: 11px; line-height: 1.6; text-align: center; }
.site-footer a { color: inherit; }
.footer-rule { width: 24px; height: 1px; background: #c9cbd1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 480px) {
    .site-header { padding-top: 28px; }
    .brand { font-size: 21px; }
    .login-main { padding: 24px 20px; }
    .login-card { padding: 30px 24px 26px; border-radius: 14px; }
    .card-heading { margin-bottom: 28px; }
    .card-heading h1 { font-size: 27px; }
    .form-description { font-size: 13px; }
    .field-group input { font-size: 16px; }
    .site-footer { padding-bottom: 22px; }
}
@media (max-width: 360px) {
    .login-main { padding-right: 14px; padding-left: 14px; }
    .login-card { padding-right: 20px; padding-left: 20px; }
    .form-options { font-size: 11px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
