* { box-sizing: border-box; }
body.reference-login { margin: 0; color: #202c35; font-family: "Segoe UI", Arial, sans-serif; letter-spacing: 0; -webkit-font-smoothing: antialiased; background: linear-gradient(#18292f61, #17292f94), url("../img/login-warehouse.e40e0de3aa7b.png") center / cover fixed; }
.reference-login button, .reference-login input, .reference-login select { font: inherit; }
.reference-login button, .reference-login summary, .reference-login a { touch-action: manipulation; }
.reference-login button { cursor: pointer; }
.reference-login [hidden] { display: none !important; }
.reference-login .login-wrap { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 24px; gap: 18px; }
.reference-brand, .reference-login .login-panel { width: 440px; max-width: 100%; }
.reference-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; color: #fff; }
.reference-brand img { display: block; width: 64px; height: 64px; object-fit: contain; border-radius: 8px; }
.reference-brand-details { width: 100%; padding-top: 12px; border-top: 1px solid #ffffff4d; }
.reference-company-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.reference-company-heading h1 { flex: 1; min-width: 0; margin: 0; font-size: 26px; line-height: 1.2; font-weight: 650; overflow-wrap: anywhere; }
.reference-brand p { color: #e3eaee; margin: 7px 0 0; font-size: 13px; }
.reference-login .login-panel { padding: 24px; border: 1px solid #e5eaee; border-radius: 8px; background: #fff; box-shadow: 0 16px 48px #0c1f2c25; }
.reference-login .login-form { display: flex; flex-direction: column; gap: 18px; }
.reference-login h2 { margin: 0 0 6px; font-size: 22px; line-height: 1.25; font-weight: 650; }
.auth-subtitle { margin: -13px 0 0; font-size: 13px; line-height: 1.4; color: #657681; }
.reference-field { position: relative; }
.reference-field label { position: absolute; z-index: 1; left: 12px; top: -9px; padding: 0 6px; background: #fff; color: #4f5e69; font-size: 13px; font-weight: 500; }
.reference-field input { display: block; width: 100%; height: 52px; border: 1px solid #cfd9e0; border-radius: 6px; padding: 0 50px 0 16px; background: #fff; color: #26343f; font-size: 16px; font-weight: 400; outline: none; }
.reference-field input::placeholder { color: #687984; }
.reference-field input:hover { border-color: #aebfc9; }
.reference-field input:focus { border-color: #735098; box-shadow: 0 0 0 3px #79549f0b; }
.reference-field input[readonly] { color: #657681; background: #f8fafb; }
.input-with-icon { position: relative; }
.reference-identifier > svg { position: absolute; right: 14px; top: 15px; width: 22px; height: 22px; color: #788992; pointer-events: none; }
.password-toggle { position: absolute; right: 5px; top: 4px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 6px; background: transparent; color: #687984; }
.password-toggle svg { width: 20px; height: 20px; }
.password-toggle:hover { background: #f0f4f6; color: #384d5b; }
.forgot-link { align-self: flex-end; margin-top: -7px; color: #54616d; text-decoration: none; font-size: 13px; }
.forgot-link:hover { color: #522090; text-decoration: underline; }
.reference-divider { display: flex; align-items: center; gap: 14px; color: #657682; font-size: 11px; }
.reference-divider::before, .reference-divider::after { content: ""; height: 1px; flex: 1; background: #e8edf0; }
.reference-send, .reference-back, .login-button { display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.reference-send { width: 100%; min-height: 44px; padding: 8px; border: 1px solid #c5dfd1; border-radius: 6px; background: #fff; color: #176640; font-size: 14px !important; font-weight: 600 !important; }
.reference-send svg { width: 18px; height: 18px; }
.reference-send:hover { background: #f2f9f5; }
.login-button { width: 100%; min-height: 48px; border: 0; border-radius: 6px; padding: 10px 16px; background: #522090; color: #fff; font-size: 15px !important; font-weight: 600 !important; transition: background 120ms ease; }
.login-button svg { width: 18px; height: 18px; }
.login-button:hover { background: #431875; }
.login-button:active { background: #3c0c6c; }
.login-button:disabled, .reference-send:disabled { opacity: .65; cursor: default; }
.reference-login button:focus-visible, .reference-login a:focus-visible, .reference-login summary:focus-visible { outline: 3px solid #bcb0d5; outline-offset: 3px; }
.reference-back { min-height: 32px; padding: 0; border: 0; background: none; color: #617481; font-size: 13px !important; }
.reference-back:hover { color: #522090; }
.otp-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.otp-actions:empty { display: none; }
.otp-actions.is-otp { margin-top: -8px; }
.otp-actions.is-otp .reference-send { width: auto; min-height: 32px; padding: 0; background: none; border: 0; font-size: 13px !important; }
[data-otp-status] { color: #667781; font-size: 12px; }
[data-otp-code-field] input { font-size: 22px; font-weight: 500; }
[data-otp-code-field] input::placeholder { font-size: 16px; font-weight: 400; }
.form-alert, .field-error, .caps-lock-warning { display: block; color: #b42318; font-size: 13px; line-height: 1.4; }
.form-alert { border-left: 2px solid #c7635c; padding-left: 10px; }
.form-alert ul { margin: 0; padding: 0; list-style: none; }
.field-error, .caps-lock-warning { margin-top: 8px; }
.auth-feedback { margin: 0 0 20px; color: #38644e; font-size: 13px; line-height: 1.5; }
.auth-feedback.auth-error { color: #b42318; }
.auth-contact summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 1px solid #dde4ea; border-radius: 6px; background: #f9fbfc; color: #586672; font-size: 14px; font-weight: 500; cursor: pointer; list-style: none; }
.auth-contact summary::-webkit-details-marker { display: none; }
.auth-contact summary:hover { background: #edf3f6; }
.auth-contact svg { width: 18px; height: 18px; flex-shrink: 0; }
.auth-contact > div { padding: 14px 0 0; font-size: 13px; line-height: 1.5; }
.auth-contact p { margin: 0; }
.auth-contact a { display: flex; align-items: center; gap: 8px; padding: 6px 0; color: #38644e; overflow-wrap: anywhere; }
.reference-footer { display: flex; flex-direction: column; align-items: center; padding-top: 2px; gap: 5px; color: #fff; text-align: center; }
.reference-footer strong { font-size: 19px; font-weight: 650; }
.reference-footer span { color: #e0e8ed; font-size: 12px; font-weight: 500; }
@media (max-width: 480px) {
  .reference-login .login-wrap { padding: 20px; gap: 18px; justify-content: center; }
  .reference-brand img { width: 48px; height: 48px; }
  .reference-company-heading h1 { font-size: 24px; }
  .reference-login .login-panel { padding: 24px 22px; }
  .reference-brand p { font-size: 12px; }
}
@media (min-width: 1000px) {
  .reference-brand { position: absolute; top: 32px; left: 40px; width: 240px; max-width: calc((100vw - 440px) / 2 - 64px); }
}
@media (max-height: 740px) {
  .reference-login .login-wrap { padding-top: 16px; padding-bottom: 16px; gap: 14px; }
  .reference-brand { gap: 9px; }
  .reference-brand img { width: 44px; height: 44px; }
  .reference-brand-details { padding-top: 9px; }
  .reference-company-heading h1 { font-size: 22px; }
  .reference-brand p { margin-top: 5px; }
  .reference-login .login-panel { padding-top: 20px; padding-bottom: 20px; }
  .reference-login .login-form { gap: 16px; }
  .reference-field input { height: 48px; }
  .reference-identifier > svg { top: 13px; }
  .password-toggle { top: 2px; }
  .reference-footer strong { font-size: 17px; }
}
@media (max-height: 640px) and (max-width: 999px) {
  .reference-login .login-wrap { padding-top: 12px; padding-bottom: 12px; gap: 12px; }
}
@media (max-width: 350px) {
  .reference-login .login-wrap { padding-left: 16px; padding-right: 16px; }
  .reference-company-heading h1 { font-size: 21px; }
  .reference-login .login-panel { padding-left: 18px; padding-right: 18px; }
}
@media (prefers-reduced-motion: reduce) { .reference-login * { transition: none !important; } }
