@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');


/* =========================================
   GLOBAL
========================================= */

* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

    font-family: 'Montserrat', sans-serif;
}

body {

    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.45),
            rgba(0, 0, 0, 0.45)
        ),
        url('../img/background_toko.png');

    background-size: cover;

    background-position: center;

    background-repeat: no-repeat;

    background-attachment: fixed;
}


/* =========================================
   AUTH PAGE WRAPPER
========================================= */

.auth-page-wrapper {

    width: 100%;

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 20px;
}


/* =========================================
   LOGIN CONTAINER
========================================= */

.login-container {

    position: relative;

    width: 900px;

    max-width: 100%;

    min-height: 560px;

    overflow: hidden;

    border-radius: 32px;

    background: rgba(255,255,255,0.96);

    backdrop-filter: blur(10px);

    box-shadow:
        0 25px 60px rgba(0,0,0,0.35);

    animation:
        fadeIn 0.6s ease;
}


/* =========================================
   ANIMATION
========================================= */

@keyframes fadeIn {

    from {

        opacity: 0;

        transform: translateY(-20px);
    }

    to {

        opacity: 1;

        transform: translateY(0);
    }
}


/* =========================================
   FORM CONTAINER
========================================= */

.form-container {

    position: absolute;

    top: 0;

    width: 50%;

    height: 100%;

    transition: all 0.6s ease-in-out;
}


/* =========================================
   OWNER PANEL
========================================= */

.sign-in {

    left: 0;

    width: 50%;

    opacity: 1;

    visibility: visible;

    z-index: 2;
}


/* =========================================
   CASHIER PANEL
========================================= */

.sign-up {

    left: 0;

    width: 50%;

    opacity: 0;

    visibility: hidden;

    z-index: 1;
}


/* =========================================
   ACTIVE STATE
========================================= */

.login-container.active .sign-in {

    transform: translateX(100%);

    opacity: 0;

    visibility: hidden;
}

.login-container.active .sign-up {

    transform: translateX(100%);

    opacity: 1;

    visibility: visible;

    z-index: 5;
}


/* =========================================
   FORM STYLE
========================================= */

.login-container form {

    width : 100%;

    height: 100%;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    text-align: center;

    padding: 0 55px;
}


/* =========================================
   HEADING
========================================= */

.login-container h1 {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 12px;

    font-size: 2rem;

    font-weight: 800;

    color: #0f172a;

    margin-bottom: 14px;

    line-height: 1.2;
}

.login-container h1 i {

    color: #1d4ed8;
}


/* =========================================
   DESCRIPTION
========================================= */

.login-container span {

    display: block;

    font-size: 14px;

    color: #64748b;

    line-height: 1.7;

    margin-bottom: 24px;
}


/* =========================================
   INPUT
========================================= */

.login-container input {

    width: 100%;

    border: none;

    outline: none;

    padding: 15px 18px;

    margin-bottom: 14px;

    border-radius: 14px;

    background: #f1f5f9;

    font-size: 14px;

    transition: 0.25s ease;
}

.login-container input:focus {

    background: white;

    box-shadow:
        0 0 0 4px rgba(29, 78, 216, 0.12);
}


/* =========================================
   FORGOT PASSWORD
========================================= */

.forgot-link {

    margin-bottom: 18px;

    color: #4f46e5;

    font-size: 14px;

    text-decoration: none;
}

.forgot-link:hover {

    color: #1d4ed8;
}


/* =========================================
   BUTTON
========================================= */

.login-container button {

    width: 100%;

    border: none;

    outline: none;

    cursor: pointer;

    padding: 14px 20px;

    border-radius: 14px;

    background: #1d4ed8;

    color: white;

    font-size: 13px;

    font-weight: 700;

    letter-spacing: 0.5px;

    text-transform: uppercase;

    transition: 0.25s ease;
}

.login-container button:hover {

    background: #1e40af;

    transform: translateY(-2px);
}


/* =========================================
   TOGGLE CONTAINER
========================================= */

.toggle-container {

    position: absolute;

    top: 0;

    left: 50%;

    width: 50%;

    height: 100%;

    overflow: hidden;

    z-index: 1000;

    transition: all 0.6s ease-in-out;
}

.login-container.active .toggle-container {

    transform: translateX(-100%);
}


/* =========================================
   TOGGLE BACKGROUND
========================================= */

.toggle {

    position: relative;

    left: -100%;

    width: 200%;

    height: 100%;

    display: flex;

    transform: translateX(0);

    transition: all 0.6s ease-in-out;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1e3a8a
        );
}

.login-container.active .toggle {

    transform: translateX(50%);
}


/* =========================================
   TOGGLE PANEL
========================================= */

.toggle-panel {

    width: 50%;

    height: 100%;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    text-align: center;

    padding: 0 60px;

    color: white;
}

.toggle-panel h1 {

    font-size: 2.5rem;

    font-weight: 800;

    margin-bottom: 20px;

    color: white;
}

.toggle-panel p {

    font-size: 15px;

    line-height: 1.8;

    margin-bottom: 28px;
}


/* =========================================
   TOGGLE BUTTON
========================================= */

.toggle-panel .hidden {

    background: transparent;

    border: 1px solid rgba(255,255,255,0.7);
}

.toggle-panel .hidden:hover {

    background: rgba(255,255,255,0.12);
}


/* =========================================
   FLASH MESSAGE
========================================= */

.auth-flash-wrapper {

    position: fixed;

    top: 20px;

    left: 50%;

    transform: translateX(-50%);

    z-index: 9999;

    width: 100%;

    max-width: 420px;
}

.auth-flash {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 15px 18px;

    margin-bottom: 12px;

    border-radius: 18px;

    background:
        rgba(255,255,255,0.96);

    backdrop-filter: blur(10px);

    box-shadow:
        0 12px 24px rgba(0,0,0,0.12);

    animation:
        flashSlide 0.4s ease;
}

@keyframes flashSlide {

    from {

        opacity: 0;

        transform: translateY(-15px);
    }

    to {

        opacity: 1;

        transform: translateY(0);
    }
}

.auth-flash-success {

    border-left: 5px solid #16a34a;
}

.auth-flash-danger {

    border-left: 5px solid #dc2626;
}

.auth-flash-warning {

    border-left: 5px solid #f59e0b;
}

.auth-flash-info {

    border-left: 5px solid #2563eb;
}


/* =========================================
   FLASH ICON
========================================= */

.auth-flash-icon {

    font-size: 18px;
}


/* =========================================
   FLASH MESSAGE TEXT
========================================= */

.auth-flash-message {

    flex: 1;

    font-size: 14px;

    color: #111827;

    font-weight: 500;
}


/* =========================================
   FLASH CLOSE
========================================= */

.auth-flash-close {

    border: none;

    background: transparent;

    font-size: 18px;

    cursor: pointer;

    color: #9ca3af;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 768px) {

    body {

        overflow-y: auto;
    }

    .login-container {

        min-height: 760px;
    }

    .form-container {

        width: 100%;

        height: 50%;
    }

    .sign-in {

        top: 0;
    }

    .sign-up {

        top: 0;
    }

    .login-container.active .sign-in {

        transform: translateY(100%);
    }

    .login-container.active .sign-up {

        transform: translateY(100%);

        opacity: 1;

        visibility: visible;
    }

    .toggle-container {

        top: 50%;

        left: 0;

        width: 100%;

        height: 50%;
    }

    .login-container.active .toggle-container {

        transform: translateY(-100%);
    }

    .toggle {

        left: 0;

        top: -100%;

        width: 100%;

        height: 200%;
    }

    .login-container.active .toggle {

        transform: translateY(50%);
    }

    .toggle-panel {

        width: 100%;

        height: 50%;
    }

    .toggle-left {

        transform: translateY(-100%);
    }

    .toggle-right {

        bottom: 0;
    }
}

@media (max-width: 576px) {

    .login-container {

        border-radius: 24px;
    }

    .login-container form {
            
        width: 100%;

        height: 100%;

        display: flex;

        flex-direction: column;

        justify-content: center;

        align-items: center;

        text-align: center;

        padding: 0 24px;
    }

    .toggle-panel {

        padding: 0 24px;
    }

    .toggle-panel h1 {

        font-size: 2rem;
    }

    .login-container h1 {

        font-size: 1.6rem;
    }
}