/* ==================================================================
   MOS ERP LOGIN / PASSWORD / SIGNUP BRANDING
   Scope: Website authentication pages only.

   IMPORTANT:
   - No global navbar rules
   - No Desk sidebar rules
   - No global card/widget rules
   ================================================================== */


/* Authentication page background */
.for-login,
.for-forgot,
.for-login-with-email-link,
.for-signup {
    background: #f3f4f6 !important;
}


/* Authentication card */
.for-login .page-card,
.for-forgot .page-card,
.for-login-with-email-link .page-card,
.for-signup .page-card {
    border-radius: 12px !important;
    box-shadow: 0 15px 50px rgba(0,0,0,0.25) !important;
    border: none !important;
}


/* Hide standard Frappe authentication icon */
.for-login .page-card-head svg,
.for-forgot .page-card-head svg,
.for-login-with-email-link .page-card-head svg,
.for-signup .page-card-head svg {
    display: none !important;
}


/* Hide standard app-logo inside authentication card */
section.for-login .page-card-head > img.app-logo,
section.for-forgot .page-card-head > img.app-logo,
section.for-login-with-email-link .page-card-head > img.app-logo,
section.for-signup .page-card-head > img.app-logo {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
}


/* MOS logo */
.for-login .page-card-head::before,
.for-forgot .page-card-head::before,
.for-login-with-email-link .page-card-head::before,
.for-signup .page-card-head::before {
    content: "";
    display: block;
    width: 200px;
    height: 80px;
    margin: 0 auto 20px auto;
    background-image: url("/files/mos-logo.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}


/* Authentication title */
.for-login .page-card-head h4,
.for-forgot .page-card-head h4,
.for-login-with-email-link .page-card-head h4,
.for-signup .page-card-head h4 {
    color: #b30000 !important;
    font-weight: 600 !important;
}


/* Authentication input styling — scoped */
.for-login .form-control,
.for-forgot .form-control,
.for-login-with-email-link .form-control,
.for-signup .form-control {
    border-radius: 6px !important;
    border: 1px solid #d1d5db !important;
}

.for-login .form-control:focus,
.for-forgot .form-control:focus,
.for-login-with-email-link .form-control:focus,
.for-signup .form-control:focus {
    border-color: #b30000 !important;
    box-shadow: 0 0 0 2px rgba(179,0,0,0.15) !important;
}


/* Authentication primary buttons — scoped */
.for-login .btn-primary,
.for-forgot .btn-primary,
.for-login-with-email-link .btn-primary,
.for-signup .btn-primary {
    background-color: #ede9fe !important;
    border-color: #ddd6fe !important;
    color: #374151 !important;
    font-weight: 600;
    border-radius: 6px;
    box-shadow: none !important;
}

.for-login .btn-primary:hover,
.for-forgot .btn-primary:hover,
.for-login-with-email-link .btn-primary:hover,
.for-signup .btn-primary:hover {
    background-color: #ddd6fe !important;
    border-color: #c4b5fd !important;
    color: #111827 !important;
}


/* Authentication links only */
.for-login a,
.for-forgot a,
.for-login-with-email-link a,
.for-signup a {
    color: #b30000 !important;
}


/* MOS powered-by text */
.footer-powered {
    font-size: 0 !important;
    position: relative;
}

.footer-powered::after {
    content: "Powered By: MOS Design and Manufacture";
    font-size: 14px;
    color: #301934;
    font-weight: 500;
}


/* ================================================================
   MOS LOGIN R4 FINAL
   ERPNext successful-login splash replacement.
   CSS only: no observer, polling or DOM mutation.
   ================================================================ */

html body .centered.splash {
    min-height: 100vh !important;
    width: 100% !important;

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

    background: #ffffff !important;
}


/* Native ERPNext blue E must never be visible. */

html body .centered.splash > img,
html body .centered.splash img[src*="erpnext-logo.svg"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;

    width: 0 !important;
    height: 0 !important;
}


/* MOS loading identity. */

html body .centered.splash::before {
    content: "" !important;

    display: block !important;

    width: 260px !important;
    height: 120px !important;

    background-image:
        url("/files/mos-logo.png") !important;

    background-position:
        center center !important;

    background-repeat:
        no-repeat !important;

    background-size:
        contain !important;
}
