/* =====================================================================
   MyMemberLogin.aspx — UI/UX enhancement layer  (v2)
   Pure, additive CSS. No markup / C# logic changed. Loaded after
   style.css and engineered to override the page's trailing inline
   <style> block via higher specificity + targeted !important.

   Design language: soft "aurora" gradient canvas, floating glass cards,
   gradient-clipped headings, capsule inputs with animated focus rings,
   and a sheen-on-hover primary button.

   Theme tokens: deep purple #5b2b81 · brand purple #6944e2 · pink #ef57ff
   ===================================================================== */

:root {
    --np-purple: #6944e2;
    --np-purple-dark: #5b2b81;
    --np-purple-deep: #4a2f9e;
    --np-pink: #ef57ff;
    --np-pink-soft: #f7c8fb;
    --np-ink: #2a2150;
    --np-muted: #8a83a6;
    --np-line: rgba(105, 68, 226, 0.16);
    --np-ring: rgba(105, 68, 226, 0.28);
    --np-card-radius: 26px;
    --np-field-radius: 16px;
    --np-shadow: 0 30px 70px -24px rgba(56, 24, 110, 0.55);
    --np-shadow-soft: 0 10px 26px -14px rgba(56, 24, 110, 0.40);
    --np-font: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ============================ Page canvas ============================ */
html {
    background: radial-gradient(1200px 800px at 12% 12%, #8a5cff 0%, rgba(138, 92, 255, 0) 55%),
                radial-gradient(1000px 700px at 88% 85%, #ff7be8 0%, rgba(255, 123, 232, 0) 50%),
                linear-gradient(135deg, #5f3df0 0%, #9b4ff0 48%, #ef57ff 100%) !important;
    background-attachment: fixed !important;
    min-height: 100%;
}

body {
    font-family: var(--np-font);
    color: var(--np-ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    position: relative;
    overflow-x: hidden;
}

/* Soft floating light-orbs for depth (decorative, pointer-safe) */
body::before,
body::after {
    content: "";
    position: fixed;
    z-index: 0;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.5;
    pointer-events: none;
}

body::before {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -100px;
    background: radial-gradient(circle, #b58bff 0%, rgba(181, 139, 255, 0) 70%);
    animation: npDrift1 16s ease-in-out infinite;
}

body::after {
    width: 480px;
    height: 480px;
    bottom: -160px;
    right: -120px;
    background: radial-gradient(circle, #ff9bee 0%, rgba(255, 155, 238, 0) 70%);
    animation: npDrift2 20s ease-in-out infinite;
}

@keyframes npDrift1 {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(40px, 30px); }
}
@keyframes npDrift2 {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(-50px, -30px); }
}

/* The wrapper DIVs carry an inline background-image; neutralise them so
   the gradient canvas + cards control the visuals. */
body > form > div[style*="background-image"] {
    background-image: none !important;
}

/* ============================ Layout ============================ */
.container.my-5 {
    max-width: 1060px;
    position: relative;
    z-index: 1;
}

section.p-5 {
    padding: 1.25rem !important;
}

.my-5.mx-md-5 {
    margin: .5rem !important;
}

/* Keep both cards equal height and align the illustration nicely */
.row {
    align-items: stretch;
}
.row > [class*="col-"] {
    display: flex;
}

/* ============================ Cards ============================ */
.card {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: var(--np-card-radius) !important;
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--np-shadow) !important;
    overflow: hidden;
    transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s ease;
    animation: npRise .6s cubic-bezier(.2, .8, .2, 1) both;
}

/* Stagger the two cards' entrance */
.col-md-6:first-child .card { animation-delay: .05s; }
.col-md-6:last-child  .card { animation-delay: .18s; }

@keyframes npRise {
    from { opacity: 0; transform: translateY(26px) scale(.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 38px 84px -22px rgba(56, 24, 110, 0.6) !important;
}

.card-body {
    padding: 2.6rem 2.3rem !important;
    min-height: auto !important;
    height: auto !important;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Gradient accent rail across the top of the form card */
.col-md-6:first-child .card::before {
    content: "";
    display: block;
    height: 5px;
    margin: -2.6rem -2.3rem 1.7rem;
    background: linear-gradient(90deg, var(--np-purple) 0%, var(--np-pink) 100%);
}

/* ============================ Brand & headings ============================ */
.card-body img[alt="logo"] {
    width: 172px !important;
    margin: 0 auto .2rem;
    display: block;
    filter: drop-shadow(0 8px 16px rgba(56, 24, 110, 0.2));
    animation: npRise .6s .12s cubic-bezier(.2, .8, .2, 1) both;
}

h3.dark-grey-text {
    /* Gradient-clipped heading (beats the inline color via !important) */
    color: transparent !important;
    background: linear-gradient(90deg, var(--np-purple-dark), var(--np-purple), var(--np-pink));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700 !important;
    font-size: 1.55rem !important;
    letter-spacing: .2px;
    margin: .9rem 0 .35rem !important;
    padding-bottom: 0 !important;
}

/* A small supportive caption rendered purely from CSS under each heading */
h3.dark-grey-text::after {
    content: "Secure access to your nationpay portal";
    display: block;
    font-size: .8rem;
    font-weight: 400;
    letter-spacing: .2px;
    color: var(--np-muted);
    -webkit-text-fill-color: var(--np-muted);
    margin-top: .45rem;
    margin-bottom: 1.4rem;
}

/* Tailor the caption per panel for context */
#login2 h3.dark-grey-text::after { content: "Enter the one-time code we sent you"; }
#divForgot h3.dark-grey-text::after { content: "We'll help you get back into your account"; }

/* ============================ Inputs ============================ */
.input-group.bdrbkdhjf {
    margin-bottom: 1.05rem !important;
    border-radius: var(--np-field-radius);
    box-shadow: var(--np-shadow-soft);
    background: #fff;
    transition: box-shadow .25s ease, transform .25s ease;
}

.input-group.bdrbkdhjf:focus-within {
    box-shadow: 0 0 0 4px var(--np-ring), var(--np-shadow-soft);
    transform: translateY(-1px);
}

.input-group-text.password1 {
    background: linear-gradient(135deg, var(--np-purple), var(--np-pink)) !important;
    border: none !important;
    border-radius: var(--np-field-radius) 0 0 var(--np-field-radius) !important;
    padding: 0 16px !important;
    min-width: 54px;
    justify-content: center;
}

/* Render the prefix icons in white so they read on the gradient chip */
.input-group-text.password1 img {
    width: 19px;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: .95;
}

.form-control.input1 {
    border-radius: 0 var(--np-field-radius) var(--np-field-radius) 0 !important;
    border: 1px solid var(--np-line) !important;
    border-left: none !important;
    background: #fff !important;
    padding: .85rem 1rem !important;
    height: auto !important;
    font-size: .95rem;
    color: var(--np-ink);
    box-shadow: none !important;
    transition: border-color .2s ease, background .2s ease;
}

.form-control.input1::placeholder {
    color: #b3aaca;
    font-size: .9rem;
}

.form-control.input1:focus {
    border-color: var(--np-purple) !important;
    background: #fffdff !important;
    outline: none;
}

/* Show / hide-password eye icon */
.eyesvgdd {
    width: 24px !important;
    right: 16px !important;
    bottom: 12px !important;
    color: var(--np-purple) !important;
    cursor: pointer;
    opacity: .65;
    transition: opacity .2s ease, transform .2s ease;
}
.input-group:hover .eyesvgdd,
.eyesvgdd:hover {
    opacity: 1;
    transform: scale(1.08);
}
.avv { cursor: pointer; }

/* ============================ Links ============================ */
a {
    color: var(--np-purple) !important;
    font-weight: 500;
    transition: color .2s ease;
}
a:hover {
    color: var(--np-purple-deep) !important;
    text-decoration: underline !important;
}

/* Forgot / Resend / Switch link row — right aligned, subtle */
#login1 > div:nth-of-type(3),
#login2 > div:nth-of-type(2),
#divForgot > div:nth-of-type(2) {
    text-align: right;
    font-size: .9rem;
    margin-top: -.2rem;
}

.forgetjfj { text-align: right !important; }

/* ============================ Primary button ============================ */
.btn.btn-outline-orange {
    position: relative;
    width: 100% !important;
    border: none !important;
    border-radius: 16px !important;
    padding: .9rem 1.5rem !important;
    margin: 1.4rem 0 1rem !important;
    font-family: var(--np-font) !important;
    font-size: 1.04rem !important;
    font-weight: 600 !important;
    letter-spacing: .5px;
    color: #fff !important;
    background: linear-gradient(135deg, var(--np-purple) 0%, #8b5bf0 55%, var(--np-pink) 135%) !important;
    box-shadow: 0 14px 26px -10px rgba(105, 68, 226, 0.65) !important;
    overflow: hidden;
    z-index: 1;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease !important;
}

/* Moving sheen on hover */
.btn.btn-outline-orange::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-18deg);
    transition: left .6s ease;
}
.btn.btn-outline-orange:hover::after { left: 130%; }

.btn.btn-outline-orange:hover,
.btn.btn-outline-orange:focus {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 20px 36px -12px rgba(105, 68, 226, 0.75) !important;
}
.btn.btn-outline-orange:active {
    transform: translateY(0);
    box-shadow: 0 10px 20px -10px rgba(105, 68, 226, 0.65) !important;
}

/* "Don't have an account · Register" footnote */
.card-body p {
    color: var(--np-muted);
    font-size: .88rem;
    margin-top: .4rem;
}

/* ============================ Validation messages ============================ */
span[id*="rfv"],
span[id*="rev"],
span[id*="RequiredFieldValidator"],
.card-body [style*="color:Red"],
.card-body [style*="color: Red"] {
    display: inline-block;
    color: #e23b6d !important;
    font-size: .82rem !important;
    font-weight: 500;
    background: rgba(226, 59, 109, 0.09);
    border: 1px solid rgba(226, 59, 109, 0.18);
    border-radius: 9px;
    padding: .2rem .6rem;
    margin: .18rem 0;
    animation: npShake .4s ease;
}

@keyframes npShake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-4px); }
    75%      { transform: translateX(4px); }
}

/* ============================ Illustration panel ============================ */
.col-md-6:last-child .card {
    background: linear-gradient(160deg, #f4ecff 0%, #ffe6fb 100%) !important;
    position: relative;
}

/* Soft radial glow behind the illustration */
.col-md-6:last-child .card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(closest-side, rgba(239, 87, 255, 0.18), transparent 75%);
    pointer-events: none;
}

.col-md-6:last-child .card-body {
    padding: 1.5rem !important;
    position: relative;
    z-index: 1;
}

.card-body img[alt="login image"] {
    width: 100%;
    max-width: 430px;
    margin: auto;
    filter: drop-shadow(0 22px 34px rgba(105, 68, 226, 0.25));
    animation: npFloat 5.5s ease-in-out infinite;
}

@keyframes npFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-14px); }
}

/* ============================ OTP modal popup ============================ */
.modalBackground {
    background: rgba(45, 20, 80, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modalPopup {
    /* Hidden from first paint to stop the AjaxControlToolkit popup from
       flashing during the post-login redirect (FOUC). NO !important —
       the extender shows it by setting an inline display, which must win. */
    display: none;
    border-radius: 20px !important;
    box-shadow: var(--np-shadow) !important;
    padding: 1.7rem 1.5rem !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    animation: npRise .35s cubic-bezier(.2, .8, .2, 1) both;
}

.modalPopup h3 {
    color: var(--np-purple-dark) !important;
    font-weight: 600;
}

.modalPopup .form-control {
    border-radius: 12px !important;
    border: 1px solid var(--np-line) !important;
    padding: .7rem .9rem !important;
    text-align: center;
    letter-spacing: 4px;
    font-size: 1.1rem;
}
.modalPopup .form-control:focus {
    border-color: var(--np-purple) !important;
    box-shadow: 0 0 0 4px var(--np-ring) !important;
}

.modalPopup .btn.loginbtn {
    background: linear-gradient(135deg, var(--np-purple), var(--np-pink)) !important;
    border-radius: 14px !important;
    color: #fff !important;
    font-weight: 600 !important;
    padding: .7rem 2.2rem !important;
    box-shadow: 0 12px 24px -10px rgba(105, 68, 226, 0.6) !important;
}

.modalclose {
    border-radius: 50% !important;
    width: 30px !important;
    height: 30px;
    background: var(--np-purple) !important;
    color: #fff !important;
    line-height: 1;
}

/* ============================ Scrollbar polish ============================ */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--np-purple), var(--np-pink));
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

/* ============================ Responsive ============================ */
@media (max-width: 991px) {
    .row { align-items: center; }
    .card-body { padding: 2.1rem 1.7rem !important; }
    /* Show the form first, illustration after */
    .col-md-6:last-child { margin-top: 1.2rem; }
    .card-body img[alt="login image"] { max-width: 300px; }
}

@media (max-width: 575px) {
    section.p-5 { padding: .5rem !important; }
    .my-5.mx-md-5 { margin: .2rem !important; }
    .card-body { padding: 1.8rem 1.3rem !important; }
    .card-body img[alt="logo"] { width: 148px !important; }
    h3.dark-grey-text { font-size: 1.34rem !important; }
    /* Prioritise the form: hide the decorative illustration on small phones */
    .col-md-6:last-child { display: none; }
}

/* ====================================================================
   UNIFIED LOADER — identical to the Retailer portal loader. Shown on
   login/verify/send submit (see the inline script in MyMemberLogin.aspx),
   which also masks the slow redirect to the dashboard.
   ==================================================================== */
.loader-container {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(45, 20, 80, 0.40);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.loader {
    width: 58px;
    height: 58px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, 0.55);
    border-top-color: var(--np-pink);
    border-right-color: var(--np-purple);
    animation: np-spin .8s linear infinite;
    box-shadow: 0 10px 30px -8px rgba(56, 24, 110, 0.55);
}
@keyframes np-spin { to { transform: rotate(360deg); } }
.loading-text {
    color: #fff;
    font-weight: 600;
    letter-spacing: .3px;
    font-size: .95rem;
    background: rgba(0, 0, 0, 0.18);
    padding: 6px 16px;
    border-radius: 20px;
}

/* ============================ Reduced motion ============================ */
@media (prefers-reduced-motion: reduce) {
    *,
    body::before,
    body::after {
        animation: none !important;
        transition: none !important;
    }
    .loader { animation: np-spin 1.6s linear infinite !important; }
}
