﻿@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --brand-primary: #e60023;
    --brand-secondary: #0fa3a6;
    --brand-secondary-light: #0ab9bd;
    /* ========================
     TEXT SYSTEM
     ======================== */
    --color-text-primary: #1F2D3D;
    --color-text-secondary: #3b4755;
    --color-text-muted: #9AA5B1;
    --color-text-inverse: #FFFFFF;
    /* Background colors */
    --background-light: #f7f9fc;
    --background-color: #ffffff;
    --white: #ffffff;
    /* Default size 1rem = 10px */
    font-size: 62.5%;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem; /* 14px base */
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    overflow: hidden; /* Prevent scrolling if full-page */
}

    body form {
        width: 100%;
        height: 100%;
        margin: 0px;
        padding: 0px;
    }

.main-container-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    /*    background: linear-gradient(90deg, rgb(221 231 247) 30%, rgb(236 239 243) 45%, rgb(228 237 247) 65%, rgb(229 238 248) 80%);*/
}

    /* Left background */
    .main-container-wrapper::before {
        content: "";
        position: absolute;
        padding: 0px;
        inset: 0; /* covers entire container */
        background-color: #a5c5f7;
        background-image: url('/assets/img/left.png');
        background-repeat: no-repeat;
        background-attachment: fixed;
        background-position: left bottom;
        background-size: auto 100vh;
        z-index: -1;
        pointer-events: none;
    }

    /* Right background */
    .main-container-wrapper::after {
        content: "";
        position: absolute;
        padding: 0px;
        inset: 0;
        background-image: url('/assets/img/right.png');
        background-repeat: no-repeat;
        background-position: right top;
        background-size: auto 40vh;
        z-index: -1;
        pointer-events: none;
        filter: opacity(0.75);
    }

.main-container {
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: transparent;
}

    .main-container::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 0;
        background: radial-gradient(circle at 50% 30%, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 30%, transparent 70%), radial-gradient(circle at 50% 60%, rgba(255,255,255,0.6) 0%, transparent 75%), radial-gradient(circle at 50% 85%, rgba(255,255,255,0.5) 0%, transparent 80%);
        /* centered mask */
        -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 45%, transparent 85%);
        mask-image: radial-gradient(ellipse at 50% 0%, black 45%, transparent 85%);
        filter: blur(40px);
        opacity: 0.8;
    }

/* Content Area */
.content-area {
    display: flex;
    flex: 1;
    padding: 0px;
    position: relative;
}

/* Left Side Content */
.left-content {
    position: relative;
    padding-right: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    z-index: 10;
    /*width: 60%;*/
}

/* Right Side Login Form */
.right-content {
    /*width: 40%;*/
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
  /*  padding-left: 40px;
    padding-right: 40px;*/
}

    .right-content > div {
        width: 100%;
    }

.heading-wrapper {
    width: 380px;
}

.left-content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 500px;
    gap: 12px;
    /*margin-right: 80px;*/
}

.logo-header {
    text-align: center;
    margin-bottom: 12px;
}

    .logo-header img {
        width: 120px; /* Reduced for layout */
        height: auto;
    }

.title-group {
    text-align: center;
    /*margin-bottom: 12px;*/
}

.main-title {
    color: var(--color-text-primary);
    font-size: 3rem; /* 32px */
    letter-spacing: 0.02em;
    font-weight: 600;
    margin: 0;
}

    .main-title .main-title-accent {
        color: var(--brand-primary);
    }

.subtitle {
    color: var(--brand-blue-light);
    font-size: 1.5rem;
    font-weight: 550;
}

.description {
    color: var(--color-text-secondary);
    line-height: 1.4;
    margin-bottom: 12px;
    font-size: 1.4rem;
    text-align: center;
}

.feature-cards {
    display: flex;
    align-items: center;
    width: 100%;
    background: var(--white);
    border-radius: 1rem;
    border: 1px solid #eaeaea;
    box-shadow: 0px 0px 10px 3px rgba(0, 0, 0, 0.1);
}

.feature-card {
    padding: 1.2rem 0.8rem;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.feature-icon-wrapper {
    color: var(--brand-primary);
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background-color: color-mix(in srgb, var(--brand-primary) 10%, white 90%);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .feature-icon-wrapper .fa {
        font-size: 1.8em;
    }

.feature-card:last-child .feature-icon-wrapper .fa {
    font-size: 1.4em;
}

.feature-title {
    color: var(--color-text-primary);
    font-weight: bold;
    font-size: 0.9em;
}

.feature-text {
    color: var(--color-text-secondary);
    font-size: 0.8em;
}

.feature-separator {
    flex: 0 0 2px;
    background: #c1c1c175;
    height: 80%;
}

.login-wrapper {
    width: 350px;
    position: relative;
}
    /* top background layer */
    .login-wrapper::before {
        content: "";
        position: absolute;
        top: -5px; /* move upward */
        left: 2px;
        right: 2px;
        width: calc(100% - 4px);
        height: 50px;
        background: var(--brand-secondary);
        border-radius: 1.5rem;
        z-index: 0;
    }

.login-card {
    background: var(--white);
    padding: 2rem 3rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    text-align: center;
    font-size: 0.9em;
    position: relative;
    z-index: 2;
}

.login-title {
    color: var(--color-text-primary);
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.login-subtitle {
    color: var(--color-text-primary);
    font-size: 1em;
    margin-bottom: 2rem;
}

.input-field-wrapper {
    position: relative;
    margin-bottom: 20px;
}

    .input-field-wrapper .icon {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--color-text-secondary);
    }

    .input-field-wrapper .password-toggle {
        color: var(--color-text-secondary);
    }

.input-field {
    width: 100%;
    padding: 10px 12px 10px 32px;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    font-size: 1em;
    color: var(--color-text-primary);
    box-sizing: border-box;
}

    .input-field::placeholder {
        color: var(--color-text-muted);
    }

    .input-field:focus {
        border-color: var(--brand-blue-light);
        box-shadow: 0 0 0 2px rgba(47, 95, 167, 0.1);
    }

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    cursor: pointer;
}

.remember-forgot-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.9em;
    color: var(--color-text-primary);
    margin-bottom: 30px;
}

    .remember-forgot-wrapper input[type="checkbox"] {
        accent-color: var(--brand-blue-light);
    }

.forgot-password-link {
    color: var(--color-text-primary);
    text-decoration: none;
    /*font-weight: 400;*/
}

.div-login-message {
    text-align: left;
    font-size: 1em;
    padding: 0.6rem 3rem 0.6rem 1.2rem;
    margin-bottom: 1rem;
    border-radius: 0.6rem;
    display: flex;
    gap: 12px;
    align-items: center;
    position: relative;
}

    .div-login-message.hidden {
        display: none;
    }

    .div-login-message.error {
        display: flex;
        border: 1px solid #ffbfbd;
        background-color: #ffd6d5;
        color: #8b0804;
    }

    .div-login-message.success {
        display: flex;
        border: 1px solid #037613;
        background-color: #76ff8a;
        color: #012e07;
    }

    .div-login-message .icon {
        height: 32px;
        width: 32px;
        font-size: 32px;
        color: #ff4944;
    }

    .div-login-message .close {
        font-size: 16px;
        position: absolute;
        right: 12px;
        top: 15px;
        color: #ff4944;
        cursor: pointer;
    }

        .div-login-message .close:hover {
            color: #ff0000;
        }

.div-otp table tbody > tr {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    gap: 8px;
}

.div-otp .otp-box {
    width: 32px;
    height: 32px;
    text-align: center;
    font-size: 1em;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.div-otp .otp-enter-msg {
    font-size: 1em;
    color: var(--primary-color);
    margin-bottom: 4px;
    text-align: left;
    padding: 4px 0px;
}

.div-otp .resend-otp-message {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    margin-bottom: 6px;
}

.login-btn {
    display: block;
    background: var(--brand-secondary);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 15px;
    text-decoration: none;
}

    .login-btn:hover {
        background: var(--brand-secondary-light);
    }

    .login-btn .fa-solid.icon {
        margin-right: 8px;
        font-size: 0.8em;
    }

    .login-btn.loading {
        background: var(--brand-secondary-light);
        cursor: not-allowed;
    }

    .login-btn .fa-spin {
        visibility: hidden;
    }

    .login-btn.loading .fa-spin {
        visibility: visible;
    }


.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #888;
    margin-bottom: 15px;
}

    .divider::before, .divider::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid #ccc;
    }

    .divider:not(:empty)::before {
        margin-right: .25em;
    }

    .divider:not(:empty)::after {
        margin-left: .25em;
    }

.security-info {
    font-size: 1em;
    color: var(--color-text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

    .security-info .text {
        font-size: 1em;
    }

    .security-info .icon {
        font-size: 1.25em;
        color: var(--color-text-primary);
    }

/* Footer */
.footer {
    background-color: var(--brand-secondary);
    color: var(--white);
    padding: 15px 60px;
    font-size: 0.9em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    z-index: 3;
}

    .footer .footer-left {
        display: flex;
        align-items: center;
        /*gap: 10px;*/
    }

.footer-left .footer-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .footer-left .footer-item::after {
        content: "|";
        font-size: 1.2em;
        margin-left: 2px;
        margin-right: 12px;
        margin-top: -4px;
    }

    .footer-left .footer-item:last-child::after {
        content: "";
        display: none;
    }

.footer-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .footer-right p {
        padding: 0px 12px;
        margin: 0px;
    }

@media (max-width: 576px) {
    /* Styles for phones and small screens */

    .content-area {
        flex-direction: column;
    }

    .left-content {
        width: 100%;
        padding: 12px;
    }

    .right-content {
        width: 100%;
        padding: 12px;
    }

    .footer {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 8px;
        font-size: 1em;
    }

    .logo-header img {
        width: 100px;
    }

    .left-content::before {
        background-image: unset;
    }

    .left-content .left-content-wrapper {
        width: 100%;
        padding: 12px;
    }

    .left-content .left-content-wrapper {
        margin-right: 0px;
    }

    .left-content-wrapper .description,
    .left-content-wrapper .feature-cards {
        display: none;
    }

    .left-content-wrapper .heading-wrapper {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .left-content .left-content-wrapper .heading-wrapper {
    }

    .heading-wrapper {
        flex-direction: column;
    }

        .heading-wrapper .title-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

    .title-group .main-title {
        font-size: 2rem;
    }

    .main-title .main-title-accent {
        /*color: var(--text-color-dark);*/
    }

    .title-group .subtitle {
        font-size: 1.3rem;
    }

    .right-content > div {
        padding: 0px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .right-content .login-card {
        padding: 24px;
        width: 100%;
        margin: 0px;
    }

    .footer .footer-left {
        align-items: normal;
        gap: 8px;
        flex-wrap: wrap;
        padding: 8px 10px 6px;
    }

    .footer-left .footer-item::after {
        content: unset;
        font-size: 1em;
    }

    .footer .footer-left .footer-item.address {
        flex: 0 1 100%;
    }

    .footer .footer-right {
        flex-direction: row;
        margin-bottom: 12px;
    }

        .footer .footer-right p:first-child {
            flex: 1 1 50%;
            text-align: left;
        }

        .footer .footer-right p:last-child {
            flex: 1 1 50%;
            text-align: left;
        }
}

@media (min-width: 577px) and (max-width: 768px) {
    /* Styles for tablets and medium screen */
    .content-area {
        
    }
}

@media (min-width: 767px) and (max-width: 1366px) {
    /* Styles for laptops and large screen */
    
}

@media (min-width: 1367px) {
    /* Styles for extra-large */
    .content-area {
    }

    .login-wrapper {
        width: 360px;
    }

    .footer {
        padding: 18px 100px;
    }
}

@media (min-width: 767px) {
    .content-area {
        align-items: flex-end;
        padding-bottom: calc((100vh - 535px) / 2);
        gap: 6vw;
    }
}
