/**
 * Auth / guest landing pages (index, login, forgot password) — DLM brand stage + form card.
 * Registered on site/login (and forgot). Overrides dated custom.css login rules.
 */

:root {
    --dlm-auth-navy: #152d7c;
    --dlm-auth-navy-deep: #0b1a4a;
    --dlm-auth-navy-mid: #1e3fa1;
    --dlm-auth-ink: #1a2332;
    --dlm-auth-muted: #5b6577;
    --dlm-auth-line: #d8dee8;
    --dlm-auth-card: #ffffff;
}

/* Full-bleed navy stage — beat dlm-shell / layout gray fills on #wrap, #main, body */
body[class*="site-login"],
body[class*="site-forgot"],
body[class*="site-forgotYourPassword"],
body[class*="site-index"],
body[class*="site-login"] #wrap,
body[class*="site-forgot"] #wrap,
body[class*="site-forgotYourPassword"] #wrap,
body[class*="site-index"] #wrap,
body[class*="site-login"] #main,
body[class*="site-forgot"] #main,
body[class*="site-forgotYourPassword"] #main,
body[class*="site-index"] #main {
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 12% -10%, rgba(30, 63, 161, 0.55), transparent 60%),
        radial-gradient(900px 500px at 90% 10%, rgba(8, 28, 92, 0.45), transparent 55%),
        linear-gradient(165deg, var(--dlm-auth-navy-deep) 0%, var(--dlm-auth-navy) 48%, #243f9a 100%) !important;
    background-color: var(--dlm-auth-navy-deep) !important;
}

/* White chrome header — same as protected pages */
body[class*="site-login"] .header-container,
body[class*="site-forgot"] .header-container,
body[class*="site-forgotYourPassword"] .header-container,
body[class*="site-index"] .header-container,
body[class*="site-login"] #main .header-container,
body[class*="site-forgot"] #main .header-container,
body[class*="site-forgotYourPassword"] #main .header-container,
body[class*="site-index"] #main .header-container {
    background: #fff !important;
    box-shadow: none !important;
    border-bottom: 1px solid #e6eaf2 !important;
    margin-left: 0 !important;
    width: 100% !important;
}

body[class*="site-login"] #header .dlm-top-bar.top-bar,
body[class*="site-forgot"] #header .dlm-top-bar.top-bar,
body[class*="site-forgotYourPassword"] #header .dlm-top-bar.top-bar,
body[class*="site-index"] #header .dlm-top-bar.top-bar,
body[class*="site-login"] .top-bar.dlm-top-bar,
body[class*="site-forgot"] .top-bar.dlm-top-bar,
body[class*="site-forgotYourPassword"] .top-bar.dlm-top-bar,
body[class*="site-index"] .top-bar.dlm-top-bar {
    background: #fff !important;
    box-shadow: none !important;
    border: 0 !important;
    min-height: 64px;
}

body[class*="site-login"] .content-container,
body[class*="site-forgot"] .content-container,
body[class*="site-forgotYourPassword"] .content-container,
body[class*="site-index"] .content-container {
    background: transparent !important;
    min-height: calc(100vh - 64px);
}

body[class*="site-login"] .user-bar,
body[class*="site-forgot"] .user-bar,
body[class*="site-forgotYourPassword"] .user-bar,
body[class*="site-index"] .user-bar,
body[class*="site-login"] .global-search-container,
body[class*="site-forgot"] .global-search-container,
body[class*="site-forgotYourPassword"] .global-search-container,
body[class*="site-index"] .global-search-container,
body[class*="site-login"] .dlm-sidebar,
body[class*="site-forgot"] .dlm-sidebar,
body[class*="site-forgotYourPassword"] .dlm-sidebar,
body[class*="site-index"] .dlm-sidebar {
    display: none !important;
}

body[class*="site-login"] .header-logo,
body[class*="site-forgot"] .header-logo,
body[class*="site-forgotYourPassword"] .header-logo,
body[class*="site-index"] .header-logo {
    filter: none;
    opacity: 1;
}

.dlm-auth.form-container-login,
.dlm-auth.form-container-forgot-password,
.form-container-login,
.form-container-forgot-password {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: calc(100vh - 72px);
    height: auto;
    padding: 32px 16px 48px;
    box-sizing: border-box;
    background: transparent;
}

.dlm-auth__panel.form-login,
.dlm-auth__panel.form-forgot-password,
.form-login {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 36px 32px 28px;
    border-radius: 16px;
    background: var(--dlm-auth-card);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35) inset,
        0 18px 50px rgba(5, 16, 48, 0.35);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
}

#login-form,
#forgot-password-form,
.dlm-auth__form {
    width: 100%;
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dlm-auth__brand.form-title-login,
.form-title-login,
.form-title-forgot-password {
    text-align: center;
    padding: 0 0 16px;
    margin-bottom: 12px;
    background: transparent !important;
    border-bottom: 1px solid var(--dlm-auth-line) !important;
    display: block;
}

.login-page-logo {
    display: block;
    margin: 0 auto 12px;
    width: auto;
    max-width: min(260px, 78%);
    height: auto;
    max-height: 96px;
    object-fit: contain;
}

.dlm-auth__tagline,
.form-title-forgot-password h1 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--dlm-auth-navy);
}

.form-title-forgot-password h1 {
    font-size: 1.35rem;
    margin-bottom: 8px;
}

.dlm-auth__lede {
    margin: 0 0 8px;
    text-align: center;
    color: var(--dlm-auth-muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.dlm-auth__errors.form-error-summary,
.form-error-summary {
    margin: 8px 0 4px;
}

.form-error-summary .errorSummary,
.dlm-auth__errors .errorSummary {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #f5c6cb;
    background: #fdf2f3;
    color: #721c24;
    font-size: 0.9rem;
    text-align: left;
}

.form-inner-container-login,
.form-inner-container-forgot-password,
.dlm-auth__fields {
    padding: 8px 0 4px;
    width: 100%;
}

.form-row-login {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
    width: 100%;
    justify-content: stretch;
    align-items: stretch;
}

.form-group-login,
.form-group-forgot-password {
    width: 100%;
    margin-bottom: 0;
    padding: 0;
}

.form-group-login label,
.form-group-forgot-password label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--dlm-auth-ink);
    font-size: 0.9rem;
    text-align: left;
}

.form-group-login input[type="text"],
.form-group-login input[type="email"],
.form-group-login input[type="password"],
.form-group-forgot-password input[type="email"] {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 12px 14px;
    min-height: 46px;
    border: 1px solid var(--dlm-auth-line);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--dlm-auth-ink);
    background: #fbfcfe;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.dlm-auth__password-wrap {
    position: relative;
    width: 100%;
}

.dlm-auth__password-wrap input[type="password"],
.dlm-auth__password-wrap input[type="text"] {
    padding-right: 46px !important;
}

.dlm-auth__password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--dlm-auth-muted);
    cursor: pointer;
    z-index: 2;
}

.dlm-auth__password-toggle:hover,
.dlm-auth__password-toggle:focus {
    color: var(--dlm-auth-navy);
    background: rgba(21, 45, 124, 0.08);
    outline: none;
}

.form-group-login input:focus,
.form-group-forgot-password input:focus {
    outline: none;
    border-color: var(--dlm-auth-navy-mid);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(21, 45, 124, 0.18);
}

.form-group-login .errorMessage,
.form-group-forgot-password .errorMessage {
    color: #c0392b;
    font-size: 0.8rem;
    margin-top: 6px;
    display: block;
    text-align: left;
}

.form-group-login-forgot-password {
    margin: 2px 0 10px;
    text-align: right;
    padding: 0;
}

.dlm-auth__link,
.form-group-login-forgot-password a,
.dlm-auth__back {
    color: var(--dlm-auth-navy);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.dlm-auth__link:hover,
.form-group-login-forgot-password a:hover,
.dlm-auth__back:hover {
    color: var(--dlm-auth-navy-mid);
    text-decoration: underline;
}

.form-button-section-login {
    margin: 8px 0 0;
    width: 100%;
}

.form-button-section-login .form-button-container {
    width: 100%;
    display: flex;
    justify-content: stretch;
}

.form-button-section-login .form-button,
.form-button-container .form-button,
.dlm-auth__submit,
.btn-forgot-password {
    width: 100% !important;
    max-width: none !important;
    min-height: 48px;
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    background: var(--dlm-auth-navy) !important;
    color: #fff !important;
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s ease, transform 0.1s ease;
}

.form-button-section-login .form-button:hover,
.dlm-auth__submit:hover,
.btn-forgot-password:hover {
    background: var(--dlm-auth-navy-deep) !important;
}

.form-button-section-login .form-button:active,
.dlm-auth__submit:active {
    transform: translateY(1px);
}

.flash-login {
    padding: 12px 14px;
    margin-bottom: 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    overflow-wrap: break-word;
}

.flash-login-success {
    background: #e8f6ec;
    border-color: #b7e0c2;
    color: #155724;
}

.flash-login-error {
    background: #fdf2f3;
    border-color: #f5c6cb;
    color: #721c24;
}

.flash-login-info {
    background: #e8f4f8;
    border-color: #bee5eb;
    color: #0c5460;
}

.required {
    color: #c0392b;
}


/* Guest landing (site/index) */
.dlm-auth.guest-index-container,
.guest-index-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: calc(100vh - 72px);
    height: auto;
    padding: 32px 16px 48px;
    box-sizing: border-box;
    background: transparent !important;
}

.dlm-auth__panel.guest-index,
.guest-index {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 36px 32px 28px;
    border-radius: 16px;
    background: var(--dlm-auth-card) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35) inset,
        0 18px 50px rgba(5, 16, 48, 0.35);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
    height: auto !important;
    text-align: center;
}

.dlm-auth__welcome {
    margin: 4px 0 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--dlm-auth-ink);
    letter-spacing: 0.01em;
}

a.dlm-auth__submit.btn-index,
a.btn-index.dlm-auth__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    text-align: center;
}

a.dlm-auth__submit.btn-index:hover,
a.btn-index.dlm-auth__submit:hover {
    color: #fff !important;
}

@media (max-width: 560px) {
    .dlm-auth.form-container-login,
    .dlm-auth.form-container-forgot-password,
    .form-container-login,
    .form-container-forgot-password {
        padding: 20px 12px 36px;
    }

    .dlm-auth__panel.form-login,
    .dlm-auth__panel.form-forgot-password,
    .form-login {
        padding: 28px 18px 22px;
        border-radius: 14px;
    }

    .login-page-logo {
        max-width: min(220px, 82%);
        max-height: 84px;
    }
}
