/* Authentication presentation uses the same shared tokens as the CRM. */
.auth-login {
    --auth-primary: var(--crm-primary);
    --auth-text: var(--crm-text);
    --auth-muted: var(--crm-muted);
    --auth-border: var(--crm-border);
    margin: 0;
    background: var(--crm-background);
    color: var(--auth-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 14px;
}
.auth-login p, .auth-login a, .auth-login label, .auth-login input,
.auth-login select, .auth-login textarea, .auth-login button { font-family: inherit; }
.auth-login .auth-shell { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; min-height: 100svh; }
.auth-login .auth-form-panel { background: var(--crm-surface); display: flex; flex-direction: column; padding: 44px clamp(28px, 5vw, 88px) 28px; min-width: 0; }
.auth-login .auth-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.auth-login .auth-wordmark { display: flex; align-items: center; gap: 12px; color: var(--auth-text); font-size: 27px; font-weight: 700; letter-spacing: -1px; }
.auth-login .auth-wordmark img { width: 44px; height: 44px; }
.auth-login .auth-brand-caption { color: var(--auth-muted); font-size: 12px; }
.auth-login .auth-form-content { width: 100%; max-width: 400px; margin: auto; padding: 58px 0; }
.auth-login .auth-eyebrow { color: var(--auth-primary); font-size: 11px; font-weight: 700; letter-spacing: 2px; margin: 0 0 14px; }
/* Override the legacy dashboard stylesheet’s global !important heading rules. */
.auth-login h1 { color: var(--auth-text); font-size: clamp(32px, 3vw, 42px) !important; font-weight: 700 !important; line-height: 1.2; letter-spacing: -1.5px; margin: 0 0 14px; }
.auth-login .auth-description { color: var(--auth-muted); font-size: 14px; line-height: 1.7; margin: 0 0 32px; }
.auth-login .auth-field { margin-bottom: 22px; }
.auth-login .auth-field label { display: block; margin: 0 0 9px; color: var(--auth-text); font-size: 13px; font-weight: 600; }
.auth-login .auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth-login a { color: var(--auth-primary); font-size: inherit; font-weight: 600; }
.auth-login a:hover { color: var(--crm-primary-hover); text-decoration: underline; }
.auth-login .auth-label-row a { font-size: 12px; }
.auth-login .auth-field input {
    width: 100%; height: 52px; padding: 14px 16px; border: 1px solid var(--auth-border) !important;
    border-radius: 9px; background: #fff; color: var(--auth-text); font-family: inherit; font-size: 14px;
    box-shadow: 0 2px 3px rgba(23, 36, 61, .02); transition: border-color .15s, box-shadow .15s;
}
.auth-login .auth-field input::placeholder { color: var(--crm-muted); }
.auth-login .auth-field input:focus { border-color: var(--auth-primary) !important; box-shadow: 0 0 0 3px rgba(var(--crm-primary-rgb), .18); outline: none; }
.auth-login a:focus-visible, .auth-login .auth-submit:focus-visible { outline: 3px solid var(--crm-primary); outline-offset: 4px; }
.auth-login .auth-captcha { margin: 4px 0 24px; min-height: 78px; }
.auth-login .auth-remember { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; color: var(--auth-muted); font-size: 13px; line-height: 1.5; cursor: pointer; }
.auth-login .auth-remember input { appearance: auto; flex: 0 0 18px; width: 18px; height: 18px; margin: 0; cursor: pointer; accent-color: var(--auth-primary); }
.auth-login .auth-submit {
    display: block; width: 100%; height: 52px; padding: 12px 20px; border: 0; border-radius: 9px;
    background: var(--auth-primary); color: #fff; font-family: inherit; font-size: 14px; font-weight: 600;
    text-transform: none; letter-spacing: .2px; cursor: pointer; box-shadow: 0 4px 10px rgba(var(--crm-primary-rgb), .15);
}
.auth-login .auth-submit:hover { background: var(--crm-primary-hover); color: #fff; }
.auth-login .auth-submit:disabled { opacity: .6; cursor: wait; }
.auth-login .auth-signup { margin: 25px 0 0; color: var(--auth-muted); text-align: center; font-size: 13px; line-height: 1.7; }
.auth-login .auth-signup a { margin-left: 4px; }
.auth-login .auth-footer { color: var(--auth-muted); font-size: 11px; line-height: 1.6; }
.auth-login .contact__msg:not(:empty) { margin-bottom: 20px; overflow-wrap: anywhere; }
.auth-login .forErrors { position: static; overflow-wrap: anywhere; }
.auth-login .auth-story {
    display: flex; flex-direction: column; justify-content: space-between; min-width: 0; overflow: hidden;
    margin: 16px 16px 16px 0; padding: 36px clamp(28px, 4vw, 64px) 28px; border-radius: 20px;
    color: #fff; background: var(--crm-primary); box-shadow: var(--crm-shadow-floating);
}
.auth-login .auth-story-top { display: flex; align-items: center; gap: 10px; color: #d0e4ea; font-size: 10px; font-weight: 600; letter-spacing: 1.8px; }
.auth-login .auth-story-mark { color: #b4d6df; font-size: 28px; line-height: 1; }
.auth-login .auth-story-content { margin: auto 0; padding: 50px 0 28px; }
.auth-login .auth-story-kicker { color: #b4d6df; font-size: 11px; letter-spacing: 2px; margin: 0 0 20px; }
.auth-login .auth-story h2 { color: #fff; font-size: clamp(34px, 3.7vw, 54px) !important; line-height: 1.12; letter-spacing: -0.035em; font-weight: 600 !important; margin: 0 0 22px; }
.auth-login .auth-story-description { color: #d0e4ea; font-size: 14px; line-height: 1.8; max-width: 390px; margin: 0; }
.auth-login .auth-illustration { max-width: 480px; margin: 32px auto 0; }
.auth-login .auth-illustration img { display: block; width: 100%; height: auto; }
.auth-login .auth-story-footer { display: flex; flex-wrap: wrap; gap: 12px 24px; border-top: 1px solid #ffffff26; padding-top: 22px; color: #d0e4ea; font-size: 11px; }
@media (min-width: 1600px) { .auth-login .auth-form-content { max-width: 440px; } }
@media (max-width: 900px) {
    .auth-login .auth-shell { grid-template-columns: 1fr; }
    .auth-login .auth-form-panel { min-height: 100vh; min-height: 100svh; padding: 32px 24px 24px; }
    .auth-login .auth-brand, .auth-login .auth-footer { width: 100%; max-width: 400px; margin: 0 auto; }
    .auth-login .auth-story { display: none; }
}
@media (max-width: 360px) {
    .auth-login .auth-form-panel { padding-left: 8px; padding-right: 8px; }
    .auth-login .auth-form-content { padding-top: 40px; padding-bottom: 40px; }
}
@media (prefers-reduced-motion: reduce) { .auth-login .auth-field input { transition: none; } }

/* Scoped adapters for legacy auth forms and notification libraries. */
.auth-login :is(.btn-primary,.login100-form-btn,.btn-next) { background: var(--crm-primary); border-color: var(--crm-primary); color: #fff; }
.auth-login :is(.btn-primary,.login100-form-btn,.btn-next):hover { background: var(--crm-primary-hover); border-color: var(--crm-primary-hover); color: #fff; }
.auth-login .alert { border-radius: var(--crm-control-radius); }
.auth-login .alert-danger { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.auth-login .alert-success { color: #166534; background: #f0fdf4; border-color: #bbf7d0; }
.auth-login .alert-warning { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.auth-login .alert-info { color: var(--crm-primary-hover); background: var(--crm-primary-light); border-color: var(--crm-border); }
.auth-login #toast-container > div { border-radius: var(--crm-control-radius); box-shadow: var(--crm-shadow-floating); opacity: 1; }
.auth-login .toast-info { background-color: var(--crm-primary); }
.auth-login .toast-success { background-color: #166534; }
.auth-login .toast-error { background-color: #991b1b; }
.auth-login .toast-warning { background-color: #92400e; }
.auth-login :is(input,select,button,a):focus-visible { outline: 2px solid var(--crm-primary); outline-offset: 3px; }
.auth-login input:is([type=checkbox],[type=radio]) { accent-color: var(--crm-primary); }
