﻿/* Login page design (Views/Access/Login.cshtml, _LoginLayout.cshtml)
   Keeps the original colours (#5d61bf background, #838ab6 labels) and only improves the look.
   Loaded after the login style bundle in _LoginLayout. */

/* ---------- Background: same colour, soft gradient and two light circles ---------- */
body.bg-primary {
    background: linear-gradient(135deg, #5d61bf 0%, #5155b3 55%, #4a4ea8 100%) !important;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body.bg-primary::before,
body.bg-primary::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    pointer-events: none;
    z-index: 0;
}

body.bg-primary::before {
    width: 520px;
    height: 520px;
    top: -180px;
    right: -160px;
    animation: login-float 12s ease-in-out infinite;
}

body.bg-primary::after {
    width: 380px;
    height: 380px;
    bottom: -140px;
    left: -120px;
    animation: login-float 14s ease-in-out infinite reverse;
}

@keyframes login-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(18px); }
}

#app {
    position: relative;
    z-index: 1;
}

/* ---------- Outer glass panel ---------- */
.single-page {
    background: rgba(255, 255, 255, .12) !important;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 18px !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 20px 50px rgba(20, 22, 80, .30) !important;
    animation: login-fade-up .6s ease-out both;
}

@keyframes login-fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
}

/* Dark overlay of the panel follows the new rounded corners */
.construction-bg:before {
    border-radius: inherit !important;
}

/* ---------- Login card ---------- */
.single-page .wrapper.wrapper2 {
    border-radius: 14px !important;
    box-shadow: 0 12px 30px rgba(20, 22, 80, .25) !important;
    animation: login-fade-up .6s ease-out .15s both;
}

.single-page .wrapper .card-body {
    padding: 34px 32px 26px !important;
}

.single-page .wrapper h3 {
    font-size: 24px;
    font-weight: 600;
    color: #5d61bf;
    margin-bottom: 28px;
    position: relative;
}

/* Small line under the "Login" title */
.single-page .wrapper h3::after {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    border-radius: 3px;
    background: #5d61bf;
    margin: 10px auto 0;
}

.single-page .wrapper > form > div {
    margin-bottom: 20px !important;
}

/* Inputs */
.single-page .wrapper input[type=text],
.single-page .wrapper input[type=password] {
    height: 48px !important;
    border-radius: 10px;
    border: 1px solid #dfe0f5 !important;
    padding: 5px 16px !important;
    font-size: 15px;
    color: #3d4070;
    background: #fff;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.single-page .wrapper input[type=text]:focus,
.single-page .wrapper input[type=password]:focus {
    border-color: #5d61bf !important;
    box-shadow: 0 0 0 4px rgba(93, 97, 191, .15);
}

/* Floating labels: turn to the main colour when the field has focus */
.single-page .wrapper label {
    top: -9px !important;
    font-size: 12px;
    border-radius: 4px;
    transition: color .2s ease;
}

.single-page .wrapper div:focus-within > label {
    color: #5d61bf;
    font-weight: 500;
}

/* Login button */
#btnlogin {
    height: 48px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .3px;
    background: linear-gradient(135deg, #6a6ed0, #5d61bf 50%, #4a4ea8);
    box-shadow: 0 8px 18px rgba(93, 97, 191, .35);
    transition: transform .15s ease, box-shadow .15s ease;
}

#btnlogin:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(93, 97, 191, .45);
}

#btnlogin:active {
    transform: scale(.98);
}

/* Forgot password link */
.single-page .wrapper a[href="/Forget"] {
    color: #5d61bf;
    font-weight: 500;
    text-decoration: none;
    transition: color .2s ease;
}

.single-page .wrapper a[href="/Forget"]:hover {
    color: #3b3fb6;
    text-decoration: underline;
}

/* ---------- Welcome side (logos) ---------- */
.log-wrapper {
    color: #fff;
    animation: login-fade-up .6s ease-out .25s both;
}

.log-wrapper h4 {
    color: #fff;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(20, 22, 80, .25);
}

.log-wrapper .unipayLogo {
    filter: drop-shadow(0 6px 14px rgba(20, 22, 80, .25));
}

/* Company logo (Content/img/setaragan-topup-logo.png): centred above "Welcome To" in a round white badge */
.log-wrapper .etopLogo {
    position: static !important;
    display: block;
    width: 140px !important;
    height: 140px;
    object-fit: contain;
    margin: 0 auto 14px;
    padding: 14px;                   /* keeps the text inside the circle */
    background: #fff;
    border-radius: 50%;              /* round badge */
    box-shadow: 0 10px 24px rgba(20, 22, 80, .25);
    animation: login-logo-in .6s cubic-bezier(.2, .9, .3, 1.3) .3s both;
}

@keyframes login-logo-in {
    from { opacity: 0; transform: scale(.7); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Tablet and mobile ---------- */
@media (max-width: 991px) {
    .single-page {
        width: calc(100% - 24px) !important;
        margin: 24px auto !important;
        padding: 20px !important;
        display: block;
    }

    /* Logos first, then the login card */
    .single-page > .row:last-child {
        display: flex;
        flex-direction: column-reverse;
    }

    .log-wrapper {
        margin: 0 0 18px !important;
    }

    .log-wrapper .etopLogo {
        width: 110px !important;
        height: 110px;
        padding: 11px;
        border-radius: 50%;
        margin: 0 auto 10px;
    }

    .single-page .wrapper.wrapper2 {
        top: 0 !important;
        left: 0 !important;
    }
}

@media (max-width: 480px) {
    .single-page {
        width: calc(100% - 16px) !important;
        margin: 12px auto !important;
        padding: 14px !important;
        border-radius: 14px !important;
    }

    .single-page .wrapper .card-body {
        padding: 26px 18px 20px !important;
    }

    .log-wrapper h4 {
        font-size: 15px;
    }

    .unipayLogo {
        width: 130px !important;
    }

    /* 16px text stops iPhone Safari from zooming in */
    .single-page .wrapper input[type=text],
    .single-page .wrapper input[type=password] {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.bg-primary::before, body.bg-primary::after,
    .single-page, .single-page .wrapper.wrapper2, .log-wrapper {
        animation: none !important;
    }
}
