/* One branded login for every Shrey Group role. */
:where(body.shrey-crm-standalone-login, body.login) {
    --navy: #12244e; --teal: #103fa3; --teal-dark: #0d3386; --gold: #b28d47;
    --ink: #0e1c3c; --muted: #505F7E; --line: #d9dee7;
    box-sizing: border-box; display: grid; place-items: center; min-height: 100vh; min-height: 100dvh;
    margin: 0; padding: 24px; background: #eef2fa; color: var(--ink);
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
}
.shrey-login-shell, .shrey-login-shell * { box-sizing: border-box; }
.shrey-login-shell { width: min(100%, 460px); }
.shrey-login-card, body.login #login {
    position: relative; width: 100%; padding: 40px; overflow: hidden;
    border: 1px solid #dce0e9; border-radius: 16px; background: #fff;
    box-shadow: 0 18px 48px rgba(18, 36, 78, .12);
}
.shrey-login-card::before, body.login #login::before {
    position: absolute; inset: 0 0 auto; height: 3px;
    background: var(--teal); content: "";
}
.shrey-login-brand { display: flex; justify-content: center; margin-bottom: 24px; }
.shrey-login-logo { display: block; width: 172px; height: auto; aspect-ratio: 1233.5 / 548; object-fit: contain; }
.shrey-login-heading { text-align: center; }
.shrey-login-heading h1 { margin: 0 0 6px; color: var(--ink); font-size: 30px; line-height: 1.2; letter-spacing: -.03em; }
.shrey-login-heading p { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
.shrey-login-card form p { margin: 0 0 18px; }
.shrey-login-card form label { display: block; margin-bottom: 7px; color: var(--ink); font-size: 14px; font-weight: 600; }
.shrey-login-card form input[type=text], .shrey-login-card form input[type=password], body.login input.input {
    box-sizing: border-box; width: 100%; min-height: 50px; margin: 0; padding: 12px 14px;
    border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
    font: inherit; font-size: 16px; box-shadow: none;
}
.shrey-login-card form input:hover, body.login input.input:hover { border-color: #a8b3c8; }
.shrey-login-shell :is(a, button, input):focus-visible, body.login :is(a, button, input):focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.shrey-login-password { position: relative; display: block; }
.shrey-login-card .shrey-login-password input { padding-right: 66px; }
.shrey-login-password__toggle {
    position: absolute; top: 3px; right: 3px; min-width: 56px; min-height: 44px;
    border: 0; border-radius: 6px; background: transparent; color: var(--teal-dark);
    font: 600 13px "Segoe UI", sans-serif; cursor: pointer;
}
.shrey-login-password__toggle:hover { background: #e9effd; }
.shrey-login-card .login-remember { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; }
.shrey-login-card .login-remember label { display: flex; align-items: center; min-height: 44px; gap: 8px; margin: 0; color: var(--muted); font-size: 13px; font-weight: 400; }
.shrey-login-card input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--teal); }
.shrey-login-card a { color: var(--teal-dark); text-underline-offset: 3px; }
.shrey-login-forgot { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 600; }
.shrey-login-card input[type=submit], .shrey-login-button, body.login .button-primary {
    display: block; width: 100%; min-height: 50px; padding: 12px 18px;
    border: 1px solid var(--teal); border-radius: 8px; background: var(--teal); color: #fff;
    font: 600 16px "Segoe UI", sans-serif; text-align: center; text-decoration: none; cursor: pointer;
    transition: background .2s ease, border-color .2s ease; box-shadow: none;
}
.shrey-login-card input[type=submit]:hover, a.shrey-login-button:hover, body.login .button-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.shrey-login-home { display: block; width: fit-content; margin: 16px auto -8px; padding: 8px; color: var(--muted) !important; font-size: 12px; text-decoration: none; }
.shrey-login-home:hover { color: var(--teal-dark) !important; }
.shrey-login-links { margin-top: 12px; font-size: 13px; }
.shrey-login-alert, .shrey-login-success { margin: 0 0 20px; padding: 12px 14px; border: 1px solid #e3b7ba; border-radius: 8px; background: #fff5f5; color: #922d34; font-size: 14px; }
.shrey-login-success { border-color: #779ef2; background: #e9effd; color: #0c2e78; }
.shrey-login-welcome { text-align: center; }
.shrey-login-welcome h1 { margin: 0 0 7px; color: var(--ink); font-size: 28px; line-height: 1.2; letter-spacing: -.025em; }
.shrey-login-welcome p { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.shrey-login-welcome p strong { color: var(--ink); font-weight: 600; }
.shrey-login-card a.shrey-login-button { color: #fff; }
.shrey-login-secondary { display: inline-block; margin-top: 16px; color: var(--muted) !important; font-size: 13px; text-decoration: none; }
.shrey-login-secondary:hover { color: var(--teal-dark) !important; text-decoration: underline; }
body.login #login { width: min(100%, 460px); box-sizing: border-box; }
body.login #login h1 a { margin-bottom: 28px; }
body.login #loginform, body.login #lostpasswordform, body.login #resetpassform { margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; overflow: visible; }
body.login form .input { margin-bottom: 18px; }
body.login .wp-pwd .input { padding-right: 48px; }
body.login .wp-hide-pw { min-width: 44px; min-height: 48px; color: var(--teal-dark); }
body.login #nav, body.login #backtoblog { padding: 0; }
body.login #nav a, body.login #backtoblog a { color: var(--muted); }
body.login .forgetmenot { margin-bottom: 20px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (max-width: 520px) {
    :where(body.shrey-crm-standalone-login, body.login) { padding: 16px 12px; }
    .shrey-login-card, body.login #login { padding: 34px 24px; border-radius: 14px; }
    .shrey-login-logo { width: 170px; }
    .shrey-login-heading h1 { font-size: 28px; }
}

/* ------------------------------------------------------------------
 * Session renewal, shown inside the CRM dialog after a timeout.
 *
 * This is the one screen a signed-out user is forced through, and it
 * ran 471px tall inside a dialog the phone could only give ~430 of, so
 * the password field and the button sat below the fold of an iframe
 * most people do not realise they can scroll. Remember-me and the
 * submit now share a row, the logo and notice are sized for a dialog
 * rather than a page, and the whole thing is 367px.
 * ------------------------------------------------------------------ */
body.interim-login.login {
    display: block !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
}
body.interim-login.login #login {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 18px 20px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
}
body.interim-login.login #login::before { display: none !important; }
body.interim-login.login #login h1 { margin: 0 0 12px !important; text-align: left !important; }
body.interim-login.login #login h1 a {
    width: 104px !important;
    height: 30px !important;
    margin: 0 !important;
    background-position: left center !important;
}
body.interim-login.login :is(#login-message, .message, #login_error) {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin: 0 0 14px !important;
    padding: 9px 12px !important;
    border: 1px solid #DDE1EA !important;
    border-left: 3px solid #103FA3 !important;
    border-radius: 10px !important;
    background: #F1F4FA !important;
    color: #0E1C3C !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
}
body.interim-login.login #login_error {
    border-left-color: #B23A3F !important;
    background: #F8E7E8 !important;
    color: #93292E !important;
}
/* Two columns so remember-me and the submit share the last row. */
body.interim-login.login #loginform {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
}
body.interim-login.login #loginform > p,
body.interim-login.login #loginform > .user-pass-wrap { grid-column: 1 / -1 !important; margin: 0 !important; }
body.interim-login.login #loginform label {
    display: block !important;
    margin: 0 0 4px !important;
    color: #505F7E !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    letter-spacing: .07em !important;
    text-transform: uppercase !important;
}
body.interim-login.login #loginform :is(input[type=text], input[type=password]) {
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    border: 1px solid #DDE1EA !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #0E1C3C !important;
    font-size: 14px !important;
    box-shadow: none !important;
}
body.interim-login.login #loginform :is(input[type=text], input[type=password]):focus {
    border-color: #103FA3 !important;
    box-shadow: 0 0 0 3px rgba(16, 63, 163, .14) !important;
    outline: 0 !important;
}
body.interim-login.login #loginform .wp-pwd { position: relative !important; }
body.interim-login.login #loginform .wp-pwd input { padding-right: 48px !important; }
body.interim-login.login #loginform .wp-hide-pw {
    position: absolute !important;
    right: 5px !important;
    top: 5px !important;
    display: grid !important;
    place-items: center !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: #E9EFFD !important;
    color: #0E368D !important;
    box-shadow: none !important;
}
body.interim-login.login #loginform .forgetmenot {
    grid-column: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    float: none !important;
    margin: 0 !important;
    align-self: center !important;
}
/* 24px and a border that clears 3:1 - it is a control, not decoration. */
body.interim-login.login #loginform .forgetmenot input {
    box-sizing: border-box !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    margin: 0 !important;
    border: 1px solid #505F7E !important;
    border-radius: 6px !important;
}
body.interim-login.login #loginform .forgetmenot label {
    display: inline !important;
    margin: 0 !important;
    color: #47546E !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}
body.interim-login.login #loginform .wp-tooltip__toggle {
    display: grid !important;
    place-items: center !important;
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    color: #505F7E !important;
}
body.interim-login.login #loginform .submit {
    grid-column: 2 !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    align-self: center !important;
}
body.interim-login.login #loginform .button-primary {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 120px !important;
    min-height: 44px !important;
    padding: 0 20px !important;
    float: none !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: #12244E !important;
    color: #fff !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    box-shadow: none !important;
}
body.interim-login.login :is(#nav, #backtoblog, .privacy-policy-page-link, .language-switcher) { display: none !important; }
@media (max-width: 359px) {
    body.interim-login.login #loginform { grid-template-columns: 1fr !important; }
    body.interim-login.login #loginform .submit { grid-column: 1 !important; }
    body.interim-login.login #loginform .button-primary { width: 100% !important; }
}

/* ------------------------------------------------------------------
 * Logo motion, 2026-09-11.
 *
 * The logo rises in when the card loads, then a soft light sweeps
 * across the mark every few seconds. The sweep is masked to the logo's
 * own shape, so only the logo catches the light, never the card.
 * Reduced-motion users get the static logo (rule near the top).
 * ------------------------------------------------------------------ */
@keyframes shrey-logo-in {
    from { opacity: 0; transform: translateY(8px) scale(.96); }
    to { opacity: 1; transform: none; }
}
@keyframes shrey-logo-shine {
    0%, 62% { background-position: 150% 0; }
    100% { background-position: -50% 0; }
}
.shrey-login-brand {
    position: relative;
    width: fit-content;
    margin-inline: auto;
    animation: shrey-logo-in .7s cubic-bezier(.2, .7, .2, 1) both;
}
body.login:not(.interim-login) #login h1 a {
    position: relative;
    animation: shrey-logo-in .7s cubic-bezier(.2, .7, .2, 1) both;
}
.shrey-login-brand::after,
body.login:not(.interim-login) #login h1 a::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .85) 50%, transparent 60%) 150% 0 / 250% 100% no-repeat;
    -webkit-mask: url(logo-clean.png) center / contain no-repeat;
    mask: url(logo-clean.png) center / contain no-repeat;
    content: "";
    pointer-events: none;
    animation: shrey-logo-shine 5.5s ease-in-out 1s infinite;
}
@media (prefers-reduced-motion: reduce) {
    .shrey-login-brand,
    .shrey-login-brand::after,
    body.login #login h1 a,
    body.login #login h1 a::before { animation: none !important; }
}
