/* ==========================================================================
   Login Page — Ready Check brand overrides
   Scoped to body.ea.page-login so styles never leak into admin pages.
   ========================================================================== */

/* ── Brand color tokens (mirrors theme.css :root block) ── */
:root {
    --color-primary: #2A6354 !important;
    --color-primary-rgb: 42, 99, 84 !important;
    --link-color: #2A6354 !important;
    --link-hover-color: #1D433B !important;
    --text-color: #193F36 !important;
    --text-color-rgb: 25, 63, 54 !important;
    --button-primary-bg: #1D433B !important;
    --button-primary-box-shadow: 0 1px 2px rgba(29, 67, 59, 0.3) !important;
    --button-focus-outline-color: #9DCBBD !important;
}

/* ── Page layout — vertically centered ── */
body.ea.page-login {
    background: #F3F6F5;
    font-family: 'Lato', 'Inter', system-ui, -apple-system, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

body.ea.page-login .login-wrapper {
    width: 100%;
    max-width: 440px;
}

/* Hide empty header that renders a divider line */
body.ea.page-login .main-header {
    display: none !important;
}

/* ── Logo (inside card) ── */
body.ea.page-login .rc-login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    color: #1D433B;
    margin-bottom: 1.25rem;
}

body.ea.page-login .rc-login-logo img {
    width: 28px;
    height: 27px;
}

/* ── Company logos banner ── */
body.ea.page-login .rc-company-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(235, 242, 240, 0.5);
    border-radius: 6px;
    padding: 0.75rem 1.25rem;
    max-width: 380px;
    margin: 0 auto 1.5rem;
}

body.ea.page-login .rc-company-logo {
    height: 45px;
    width: auto;
}

body.ea.page-login .rc-company-divider {
    display: block;
    width: 1px;
    height: 2.5rem;
    background: #C2DDD6;
    flex-shrink: 0;
}

/* ── Login card ── */
body.ea.page-login .login-wrapper .content {
    border: 1px solid #C2DDD6;
    border-radius: 8px;
}

/* ── Form labels ── */
body.ea.page-login .form-control-label {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 500;
    color: #1D433B;
}

/* ── Input focus ── */
body.ea.page-login .form-control:focus {
    border-color: #9DCBBD;
    box-shadow: 0 0 0 0.2rem rgba(157, 203, 189, 0.25);
}

/* ── Sign-in button ── */
body.ea.page-login .btn-primary {
    background: #1D433B !important;
    border-color: #1D433B !important;
    color: #EBF2F0 !important;
}

body.ea.page-login .btn-primary:hover,
body.ea.page-login .btn-primary:focus {
    background: #2A6354 !important;
    border-color: #2A6354 !important;
}

body.ea.page-login .btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(157, 203, 189, 0.35) !important;
}

/* ── Password visibility toggle ── */
body.ea.page-login .rc-password-wrapper {
    position: relative;
}

body.ea.page-login .rc-password-wrapper .form-control {
    padding-right: 2.5rem;
}

body.ea.page-login .rc-password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #2A6354;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}

body.ea.page-login .rc-password-toggle:hover {
    color: #1D433B;
}

/* ── Remember me ── */
body.ea.page-login .form-check-input:checked {
    background-color: #2A6354;
    border-color: #2A6354;
}

body.ea.page-login .form-check-label {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    color: #193F36;
}

/* ── Loading state on submit ── */
body.ea.page-login .btn-loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

body.ea.page-login .btn-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 0.5rem;
    border: 2px solid rgba(235, 242, 240, 0.4);
    border-top-color: #EBF2F0;
    border-radius: 50%;
    animation: rc-spin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes rc-spin {
    to { transform: rotate(360deg); }
}

/* ── Error alert ── */
body.ea.page-login .alert-danger {
    background-color: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.25);
    border-radius: 8px;
    color: #842029;
}
