/* ==========================================================
   SmartCo CRM
   BETA Login
   Single authoritative stylesheet
   ========================================================== */

html,
body {
    width: 100%;
    overflow-x: hidden;
}

/* ----------------------------------------------------------
   SmartCo brand tokens
   ---------------------------------------------------------- */

html.smartco-login-page:not(:has(.crm-wl-login)) {
    --login-primary: var(--crm-primary, #6357e8);
    --login-button: var(--crm-button, #4858a7);
    --login-heading: var(--crm-heading, #40464f);

    --login-text: #475569;
    --login-muted: #64748b;
    --login-soft: #94a3b8;
    --login-border: #e2e8f0;
    --login-surface: #ffffff;
}

/* ----------------------------------------------------------
   Page
   ---------------------------------------------------------- */

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-simple-layout {
    min-height: 100vh !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 18px !important;

    background:
        radial-gradient(
            circle at 12% 10%,
            rgba(255, 255, 255, .11),
            transparent 31%
        ),
        radial-gradient(
            circle at 88% 88%,
            rgba(99, 87, 232, .28),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #30375f 0%,
            #4858a7 44%,
            #6357e8 100%
        ) !important;
}

/* ----------------------------------------------------------
   Login card
   ---------------------------------------------------------- */

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-simple-main-ctn {
    width: 100% !important;
    max-width: 390px !important;

    margin: 0 auto !important;
    padding: 0 !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-simple-main {
    width: 100% !important;
    max-width: 390px !important;

    margin: 0 auto !important;
    padding: 20px 24px 18px !important;

    box-sizing: border-box !important;

    background: var(--login-surface) !important;

    border: 1px solid rgba(226, 232, 240, .9) !important;
    border-radius: 16px !important;

    box-shadow:
        0 24px 65px rgba(15, 23, 42, .28) !important;
}

/* ----------------------------------------------------------
   Logo / heading
   ---------------------------------------------------------- */

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-simple-header {
    margin: 0 0 18px !important;
    padding: 0 !important;

    gap: 2px !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-simple-header .fi-logo {
    margin-bottom: 14px !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-simple-header img {
    width: auto !important;
    max-height: 44px !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-simple-header-heading {
    margin: 0 !important;

    color: var(--login-heading) !important;

    font-size: 18px !important;
    line-height: 1.25 !important;
    font-weight: 600 !important;

    letter-spacing: -.01em;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-simple-header-subheading {
    margin: 3px 0 0 !important;

    color: var(--login-muted) !important;

    font-size: 11px !important;
    line-height: 1.4 !important;
}

/* ----------------------------------------------------------
   Form
   ---------------------------------------------------------- */

html.smartco-login-page:not(:has(.crm-wl-login)) form {
    gap: 10px !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-sc.fi-sc-has-gap {
    gap: 10px !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-sc.fi-sc-has-gap.fi-sc-dense {
    gap: 9px !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-fo-field-wrp {
    margin: 0 !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-fo-field-wrp-label {
    margin-bottom: 3px !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-fo-field-wrp-label label {
    color: var(--login-heading) !important;

    font-size: 12px !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) input:not([type="checkbox"]) {
    min-height: 40px !important;
    height: 40px !important;

    padding-top: 6px !important;
    padding-bottom: 6px !important;

    font-size: 13px !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-input-wrp {
    border-radius: 8px !important;
}

/* ----------------------------------------------------------
   Forgot password
   ---------------------------------------------------------- */

html.smartco-login-page:not(:has(.crm-wl-login)) .smartco-login-forgot {
    color: var(--login-primary) !important;

    font-size: 10.5px !important;
    font-weight: 500 !important;

    text-decoration: none !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .smartco-login-forgot:hover {
    text-decoration: underline !important;
}

/* ----------------------------------------------------------
   Checkboxes
   ---------------------------------------------------------- */

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-checkbox-input {
    width: 16px !important;
    height: 16px !important;

    min-width: 16px !important;
    min-height: 16px !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-checkbox-input:checked {
    background-color: var(--login-primary) !important;
    border-color: var(--login-primary) !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-fo-checkbox label,
html.smartco-login-page:not(:has(.crm-wl-login)) .fi-checkbox-label {
    color: var(--login-text) !important;

    font-size: 10.5px !important;
    line-height: 1.4 !important;
}

/* Terms checkbox gets deliberate separation from Remember me */

html.smartco-login-page:not(:has(.crm-wl-login)) .smartco-login-terms-field {
    margin-top: 7px !important;
    margin-bottom: 2px !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .smartco-login-terms-field .fi-checkbox-label,
html.smartco-login-page:not(:has(.crm-wl-login)) .smartco-login-terms-field label {
    color: var(--login-muted) !important;

    font-size: 9.5px !important;
    line-height: 1.55 !important;
    font-weight: 400 !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .smartco-login-terms-link {
    color: var(--login-primary) !important;

    font-weight: 600 !important;

    text-decoration: none !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .smartco-login-terms-link:hover {
    text-decoration: underline !important;
}

/* ----------------------------------------------------------
   Sign in button
   ---------------------------------------------------------- */

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-ac {
    width: 100% !important;

    margin-top: 8px !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-btn[type="submit"],
html.smartco-login-page:not(:has(.crm-wl-login)) .fi-ac-btn-action[type="submit"],
html.smartco-login-page:not(:has(.crm-wl-login)) .fi-btn-color-primary {
    width: 100% !important;

    min-height: 40px !important;
    height: 40px !important;

    padding: 0 14px !important;

    background: var(--login-button) !important;
    border-color: var(--login-button) !important;

    color: #ffffff !important;

    border-radius: 9px !important;

    font-size: 13px !important;
    font-weight: 600 !important;

    box-shadow: none !important;

    transition:
        transform .15s ease,
        filter .15s ease !important;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-btn[type="submit"]:hover,
html.smartco-login-page:not(:has(.crm-wl-login)) .fi-ac-btn-action[type="submit"]:hover,
html.smartco-login-page:not(:has(.crm-wl-login)) .fi-btn-color-primary:hover {
    filter: brightness(.93) !important;
    transform: translateY(-1px);
}

html.smartco-login-page:not(:has(.crm-wl-login)) .fi-btn[type="submit"] *,
html.smartco-login-page:not(:has(.crm-wl-login)) .fi-ac-btn-action[type="submit"] * {
    color: #ffffff !important;
}

/* ----------------------------------------------------------
   reCAPTCHA attribution
   ---------------------------------------------------------- */

html.smartco-login-page:not(:has(.crm-wl-login)) .smartco-login-legal {
    margin-top: 10px !important;
    padding: 0 !important;

    text-align: center;
}

html.smartco-login-page:not(:has(.crm-wl-login)) .smartco-login-recaptcha-copy {
    margin: 0 auto !important;

    color: var(--login-soft) !important;

    font-size: 8.5px !important;
    line-height: 1.35 !important;
}

/* ----------------------------------------------------------
   Keyboard accessibility
   ---------------------------------------------------------- */

html.smartco-login-page:not(:has(.crm-wl-login)) a:focus-visible {
    outline: 2px solid var(--login-primary);
    outline-offset: 2px;

    border-radius: 2px;
}

/* ----------------------------------------------------------
   Mobile
   ---------------------------------------------------------- */

@media (max-width: 480px) {

    html.smartco-login-page:not(:has(.crm-wl-login)) .fi-simple-layout {
        align-items: flex-start !important;

        padding: 20px 10px 12px !important;
    }

    html.smartco-login-page:not(:has(.crm-wl-login)) .fi-simple-main-ctn,
    html.smartco-login-page:not(:has(.crm-wl-login)) .fi-simple-main {
        max-width: 100% !important;
    }

    html.smartco-login-page:not(:has(.crm-wl-login)) .fi-simple-main {
        padding: 18px 18px 16px !important;

        border-radius: 14px !important;
    }

    html.smartco-login-page:not(:has(.crm-wl-login)) .fi-simple-header {
        margin-bottom: 16px !important;
    }

    html.smartco-login-page:not(:has(.crm-wl-login)) .fi-simple-header .fi-logo {
        margin-bottom: 12px !important;
    }

    html.smartco-login-page:not(:has(.crm-wl-login)) .fi-simple-header img {
        max-height: 40px !important;
    }

    html.smartco-login-page:not(:has(.crm-wl-login)) .smartco-login-terms-field .fi-checkbox-label,
    html.smartco-login-page:not(:has(.crm-wl-login)) .smartco-login-terms-field label {
        font-size: 9.25px !important;
    }
}

/* ----------------------------------------------------------
   Reduced motion
   ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    html.smartco-login-page:not(:has(.crm-wl-login)) .fi-btn {
        transition: none !important;
    }

    html.smartco-login-page:not(:has(.crm-wl-login)) .fi-btn:hover {
        transform: none !important;
    }
}
