/*==================================================
Mahamaya ERP Login — split device card
==================================================*/

@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family: "Nunito", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-weight: 500;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background:
        radial-gradient(circle at 12% 18%, rgba(167,139,250,.28), transparent 32%),
        radial-gradient(circle at 88% 12%, rgba(251,191,36,.18), transparent 28%),
        radial-gradient(circle at 80% 86%, rgba(244,114,182,.16), transparent 30%),
        #f4f1fb;
    min-height:100vh;
    overflow-x:hidden;
}

h1, h2, h3, h4, h5, h6,
.btn,
button,
input,
label {
    font-family: "Nunito", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/*=========================
Forgot / reset: centered card
=========================*/

.login-page{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:40px 15px;
}

/*=========================
Scene
=========================*/

.login-scene{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:36px 18px;
    position:relative;
    overflow:hidden;
}

.scene-floats{
    position:absolute;
    inset:0;
    pointer-events:none;
    z-index:1;
}

.bg-shot{
    position:absolute;
    margin:0;
    padding:8px;
    background:#fff;
    border-radius:18px;
    box-shadow:0 18px 40px rgba(49, 32, 107, .14);
    overflow:hidden;
}

.bg-shot img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    border-radius:12px;
}

.shot-a{
    width:220px;
    height:150px;
    top:7%;
    left:3%;
    transform:rotate(-10deg);
}

.shot-b{
    width:250px;
    height:160px;
    top:4%;
    right:6%;
    transform:rotate(8deg);
}

.shot-c{
    width:180px;
    height:210px;
    bottom:8%;
    left:5%;
    transform:rotate(7deg);
}

.shot-d{
    width:210px;
    height:140px;
    bottom:6%;
    right:4%;
    transform:rotate(-8deg);
}

.shot-e{
    width:160px;
    height:110px;
    top:38%;
    left:-2%;
    transform:rotate(-14deg);
}

.shot-f{
    width:150px;
    height:150px;
    top:36%;
    right:-1%;
    transform:rotate(12deg);
}

.orb{
    position:absolute;
    border-radius:50%;
    filter:blur(0.5px);
}

.orb-1{
    width:90px;
    height:90px;
    top:18%;
    right:22%;
    background:linear-gradient(135deg,#c4b5fd,#818cf8);
    opacity:.7;
}

.orb-2{
    width:54px;
    height:54px;
    bottom:22%;
    left:22%;
    background:linear-gradient(135deg,#f9a8d4,#c084fc);
    opacity:.75;
}

.orb-3{
    width:36px;
    height:36px;
    top:28%;
    left:28%;
    background:linear-gradient(135deg,#67e8f9,#a78bfa);
    opacity:.65;
}

/*=========================
Device card
=========================*/

.login-device{
    position:relative;
    z-index:3;
    width:min(900px, 96vw);
    min-height:550px;
    display:grid;
    grid-template-columns: 1.02fr 1fr;
    background:#fff;
    border:8px solid #2b1b6b;
    border-radius:36px;
    overflow:hidden;
    box-shadow:0 40px 90px rgba(43, 27, 107, .22);
}

.device-photo{
    position:relative;
    min-height:640px;
    background:#2b1b6b;
}

.device-photo img{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    filter:saturate(.75) contrast(1.05);
}

.photo-wash{
    position:absolute;
    inset:0;
    background:linear-gradient(165deg, rgba(109,40,217,.28) 0%, rgba(124,58,237,.34) 48%, rgba(76,29,149,.5) 100%);
}

.photo-copy{
    position:absolute;
    left:32px;
    right:32px;
    bottom:32px;
    color:#fff;
    z-index:2;
}

.photo-copy p{
    margin:0 0 8px;
    letter-spacing:.18em;
    text-transform:uppercase;
    font-size:12px;
    font-weight:700;
    opacity:.86;
}

.photo-copy h1{
    margin:0;
    font-size:clamp(26px, 2.6vw, 36px);
    font-weight:800;
    line-height:1.2;
    max-width:12em;
}

.device-form{
    display:flex;
    align-items:center;
    justify-content:center;
    padding:36px 42px;
    background:#fff;
}

.login-card{
    background:transparent;
    border-radius:0;
    padding:0;
    box-shadow:none;
    max-width: 400px;
    margin: 0 auto;
    z-index: 1;
    width: 100%;
    position: relative;
}

.login-page .login-card{
    background:#ffffff;
    border-radius:28px;
    padding:48px;
    box-shadow:0 30px 80px rgba(43, 27, 107, .16);
    border:1px solid rgba(43, 27, 107, .06);
}

/*=========================
Logo
=========================*/

.login-logo-wrap {
    margin: 0 auto 10px;
}

.login-brand-logo {
    display: block;
    width: min(220px, 78%);
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 16px;
    object-fit: contain;
}

.login-welcome{
    margin-bottom:22px;
}

.login-welcome h2{
    font-size:28px;
    font-weight:800;
    color:#1e1638;
    margin:0 0 4px;
}

.login-welcome p{
    margin:0;
    color:#7b7289;
    font-size:14px;
}

.logo-box{
    width:92px;
    height:92px;
    margin:auto;
    border-radius:24px;
    background:linear-gradient(135deg,#8422a6,#244bb8);
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:42px;
    box-shadow:0 12px 30px rgba(106,27,154,.35);
}

/*=========================
Heading (legacy, unused on login)
=========================*/

.company-name{
    margin-top:28px;
    text-align:center;
    font-size:28px;
    font-weight:800;
    background:linear-gradient(90deg,#7d1ca2,#2d48b7);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
}

.company-subtitle{
    text-align:center;
    color:#7b7b7b;
    margin-top:10px;
    margin-bottom:40px;
    font-size:17px;
}

/*=========================
Form
=========================*/

.form-group{
    margin-bottom:8px;
}

.form-group label{
    display:block;
    color:#3f3356;
    font-weight:700;
    margin-bottom:8px;
    font-size:14px;
}

.form-group label i{
    margin-right:8px;
}

.custom-input{
    border-radius:999px;
    overflow:hidden;
    border:1.5px solid #ece8f4;
    transition:.3s;
    background:#faf9fc;
}

.custom-input:focus-within{
    border-color:#7c3aed;
    background:#fff;
    box-shadow:0 0 0 4px rgba(124,58,237,.12);
}

.input-group-text{
    background:transparent;
    border:none;
    color:#7c3aed;
    width:44px;
    justify-content:center;
    font-size:16px;
}

.form-control{
    border:none;
    box-shadow:none!important;
    height:48px;
    font-size:15px;
    background:transparent;
}

.form-control::placeholder{
    color:#a8a1b5;
}

.password-btn{
    border:none;
    background:transparent;
    width:48px;
    color:#8b8498;
    font-size:18px;
}

.password-btn:hover{
    background:transparent;
    color:#7c3aed;
}

/*=========================
Remember
=========================*/

.remember-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin:20px 0;
}

.form-check-label{
    color:#7b7289;
}

.form-check-input{
    cursor:pointer;
}

.form-check-input:checked{
    background-color:#7c3aed;
    border-color:#7c3aed;
}

.forgot-link{
    text-decoration:none;
    color:#6d28d9;
    font-weight:700;
}

.forgot-link:hover{
    color:#4c1d95;
}

.auth-title{
    font-size: 1.45rem;
    font-weight: 800;
    color: #1e293b;
}

.auth-subtitle{
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.45;
}

.reset-link-box .reset-link-url{
    display: block;
    word-break: break-all;
    font-weight: 700;
    color: #4c1d95;
}

.alert-success{
    border-radius: 14px;
    font-weight: 600;
}

.alert-info{
    border-radius: 14px;
}

/*=========================
Button
=========================*/

.login-btn{
    height:50px;
    border:none;
    border-radius:999px;
    background:#7c3aed;
    color:#fff;
    font-size:16px;
    font-weight:700;
    transition:.35s;
}

.login-btn i{
    margin-right:8px;
}

.login-btn:hover{
    transform:translateY(-2px);
    color:#fff;
    background:#6d28d9;
    box-shadow:0 14px 28px rgba(124,58,237,.28);
}

/*=========================
Demo
=========================*/

.demo-box{
    margin-top:34px;
    background:#f4f9ff;
    border-radius:14px;
    padding:18px;
    text-align:center;
    color:#6b7280;
    font-size:15px;
    border:1px solid #edf2fb;
}

.demo-box i{
    color:#19a7ff;
    margin-right:6px;
}

.demo-box strong{
    color:#6a1b9a;
}

/*=========================
Alert
=========================*/

.alert{
    border-radius:12px;
    margin-bottom:22px;
}

/*=========================
Responsive
=========================*/

@media(max-width:1100px){
    .shot-e,
    .shot-f{
        display:none;
    }

    .login-device{
        min-height:580px;
    }

    .device-photo{
        min-height:580px;
    }

    .device-form{
        padding:28px 28px;
    }
}

@media(max-width:992px){
    .login-scene{
        align-items:center;
        justify-content:center;
        padding:max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
        min-height:100dvh;
        overflow-x:hidden;
        overflow-y:auto;
    }

    .login-device{
        grid-template-columns:1fr;
        min-height:unset;
        max-height:calc(100dvh - 24px);
        width:min(400px, 92vw);
        border-width:6px;
        border-radius:28px;
    }

    .device-photo{
        min-height:0;
        height:clamp(120px, 22vh, 180px);
    }

    .photo-copy{
        left:20px;
        right:20px;
        bottom:16px;
    }

    .photo-copy h1{
        max-width:none;
        font-size:clamp(20px, 5vw, 26px);
    }

    .photo-copy p{
        font-size:10px;
        margin-bottom:4px;
    }

    .device-form{
        padding:20px 20px 22px;
        align-items:stretch;
        overflow-y:auto;
        min-height:0;
    }

    .shot-a,
    .shot-b,
    .shot-c,
    .shot-d{
        opacity:.55;
        transform:none;
    }

    .login-page .login-card{
        padding:40px;
    }
}

@media(max-width:768px){
    .login-scene{
        padding:10px 10px;
    }

    .login-device{
        width:min(360px, 94vw);
        max-height:calc(100dvh - 20px);
        border-radius:24px;
    }

    .device-photo{
        height:clamp(110px, 20vh, 150px);
    }

    .login-logo-wrap{
        margin-bottom:4px;
    }

    .login-brand-logo {
        width: min(168px, 72%);
    }

    .login-welcome{
        margin-bottom:12px;
    }

    .login-welcome h2{
        font-size:22px;
    }

    .login-welcome p{
        font-size:12px;
    }

    .form-group label{
        font-size:13px;
        margin-bottom:6px;
    }

    .custom-input .form-control{
        height:44px;
        font-size:14px;
    }

    .input-group-text{
        width:40px;
        font-size:15px;
    }

    .password-btn{
        width:42px;
    }

    .login-btn{
        height:46px;
        font-size:15px;
    }

    .remember-row{
        flex-direction:column;
        align-items:flex-start;
        gap:10px;
        margin:14px 0;
    }

    .alert{
        margin-bottom:12px;
        padding:10px 12px;
        font-size:13px;
    }

    .login-page .login-card{
        padding:32px 24px;
        border-radius:24px;
    }

    .company-name{
        font-size:30px;
    }

    .company-subtitle{
        font-size:15px;
    }

    .bg-shot{
        display:none;
    }
}

@media(max-width:576px){
    .login-scene{
        padding:8px 6px;
    }

    .login-device{
        width:min(100%, calc(100vw - 12px));
        max-height:calc(100dvh - 16px);
        border-width:4px;
        border-radius:20px;
        box-shadow:0 24px 50px rgba(43, 27, 107, .18);
    }

    .device-photo{
        height:clamp(96px, 18vh, 128px);
    }

    .photo-copy h1{
        font-size:17px;
        line-height:1.2;
    }

    .photo-copy p{
        letter-spacing:.12em;
    }

    .device-form{
        padding:14px 14px 18px;
    }

    .login-welcome h2{
        font-size:20px;
    }

    .login-brand-logo{
        width:min(150px, 68%);
    }

    .logo-box{
        width:78px;
        height:78px;
        font-size:34px;
    }

    .company-name{
        font-size:27px;
    }

    .company-subtitle{
        font-size:14px;
    }

    .form-control{
        font-size:14px;
    }

    .login-btn{
        height:44px;
        font-size:14px;
    }

    .demo-box{
        font-size:13px;
    }
}

@media(max-height:640px) and (max-width:992px){
    .login-device{
        max-height:calc(100dvh - 12px);
    }

    .device-photo{
        height:88px;
    }

    .photo-copy h1{
        font-size:16px;
    }

    .login-welcome{
        margin-bottom:8px;
    }

    .login-welcome h2{
        font-size:18px;
    }

    .login-logo-wrap{
        margin-bottom:0;
    }

    .login-brand-logo{
        width:min(130px, 62%);
    }

    .device-form{
        padding:12px 14px 14px;
    }

    .remember-row{
        margin:10px 0;
    }
}
