@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* ── Theme Variables (mirrors Layout.css :root) ── */
:root {
    --primary: #00BFFF;
    --primary-dark: #0077b6;
    --primary-rgb: 0,191,255;
    --bg-body: #f4f5f7;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --input-bg: #eeeeee;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    text-decoration: none;
    list-style: none;
}

body{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(90deg, var(--bg-body, #f4f5f7), rgba(var(--primary-rgb, 0,191,255), 0.15));
}

.container{
    position: relative;
    width: 850px;
    min-height: 550px;
    background: var(--bg-card, #fff);
    margin: 20px;
    border-radius: 30px;
    box-shadow: 0 0 30px rgba(0, 0, 0, .2);
    overflow: hidden;
}

    .container h1{
        font-size: 36px;
        margin: -10px 0;
    }

    .container p{
        font-size: 14.5px;
        margin: 15px 0;
    }

form{ width: 100%; }

.form-box {
    position: absolute;
    right: 0;
    width: 50%;
    height: 100%;
    background: var(--bg-card, #fff);
    display: flex;
    align-items: center;
    color: var(--primary, #00bfff);
    text-align: center;
    padding: 24px 30px;
    z-index: 1;
    transition: .6s ease-in-out 1.2s, visibility 0s 1s;
    overflow-y: auto;
}

    .container.active .form-box{ right: 50%; }

    .form-box.register{ visibility: hidden; }
        .container.active .form-box.register{ visibility: visible; }

.input-box{
    position: relative;
    margin: 18px 0;
}

    .input-box input{
        width: 100%;
        padding: 13px 50px 13px 20px;
        background: var(--input-bg, #eee);
        border-radius: 8px;
        border: none;
        outline: none;
        font-size: 16px;
        color: var(--text-primary, #333);
        font-weight: 500;
    }

        .input-box input::placeholder{
            color: var(--text-muted, #888);
            font-weight: 400;
        }
    
    .input-box i{
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 20px;
    }

.forgot-link{ margin: -8px 0 10px; }
    .forgot-link a{
        font-size: 14.5px;
        color: var(--text-primary, #333);
    }

.btn {
    width: 100%;
    height: 48px;
    background: var(--primary, #00bfff);
    box-shadow: 0 0 10px rgba(0, 0, 0, .1);
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
}

.social-icons{
    display: flex;
    justify-content: center;
}

    .social-icons a{
        display: inline-flex;
        padding: 10px;
        border: 2px solid var(--border-color, #ccc);
        border-radius: 8px;
        font-size: 24px;
        color: var(--text-primary, #333);
        margin: 0 8px;
    }

.toggle-box{
    position: absolute;
    width: 100%;
    height: 100%;
}

    .toggle-box::before{
        content: '';
        position: absolute;
        left: -250%;
        width: 300%;
        height: 100%;
        background: var(--primary, #00bfff);
        /* border: 2px solid red; */
        border-radius: 150px;
        z-index: 2;
        transition: 1.8s ease-in-out;
    }

        .container.active .toggle-box::before{ left: 50%; }

.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: .6s ease-in-out;
}

    .toggle-panel.toggle-left{ 
        left: 0;
        transition-delay: 1.2s; 
    }
        .container.active .toggle-panel.toggle-left{
            left: -50%;
            transition-delay: .6s;
        }

    .toggle-panel.toggle-right{ 
        right: -50%;
        transition-delay: .6s;
    }
        .container.active .toggle-panel.toggle-right{
            right: 0;
            transition-delay: 1.2s;
        }

    .toggle-panel p{ margin-bottom: 20px; }

    .toggle-panel .btn{
        width: 160px;
        height: 46px;
        background: transparent;
        border: 2px solid #fff;
        box-shadow: none;
    }

/* Tablet: toggle panel hidden, form takes full width */
@media screen and (max-width: 850px){
    .container {
        width: 96%;
        min-height: auto;
        height: auto;
        margin: 20px auto;
    }

    .form-box {
        position: relative;
        right: auto;
        width: 100%;
        height: auto;
        padding: 28px 24px;
    }

    .container.active .form-box {
        right: auto;
    }

    .form-box.register {
        display: none;
        visibility: hidden;
    }

    .toggle-box {
        display: none;
    }
}

/* Mobile */
@media screen and (max-width: 650px){
    body {
        background: var(--bg-card, #fff);
        align-items: flex-start;
    }

    .container {
        width: 100%;
        min-height: 100vh;
        height: auto;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        overflow-y: auto;
    }

    .container h1 {
        font-size: 24px;
        margin: 5px 0;
    }

    .form-box {
        position: relative;
        right: auto;
        width: 100%;
        height: auto;
        min-height: 100vh;
        padding: 24px 20px;
        flex-direction: column;
        justify-content: center;
        overflow-y: visible;
    }

    .container.active .form-box {
        right: auto;
        bottom: auto;
    }

    .form-box.register {
        display: none;
        visibility: hidden;
    }

    .toggle-box {
        display: none;
    }

    .input-box {
        margin: 12px 0;
    }

    .input-box input {
        padding: 13px 46px 13px 16px;
        font-size: 15px;
        border-radius: 10px;
    }

    .btn {
        height: 48px;
        font-size: 16px;
        border-radius: 10px;
        margin-top: 6px;
    }

    .forgot-link {
        margin: -4px 0 8px;
    }

    .social-icons a {
        padding: 10px;
        font-size: 22px;
        border-radius: 10px;
    }

    .company-section {
        width: 100%;
    }

    img {
        height: 72px !important;
        width: 72px !important;
    }

    /* Loading overlay card */
    .loading-card {
        padding: 24px 28px;
    }
}

/* Small phones */
@media screen and (max-width: 400px){
    .form-box {
        padding: 20px 14px;
    }

    .container h1 {
        font-size: 20px;
    }

    .input-box {
        margin: 10px 0;
    }

    .input-box input {
        font-size: 14px;
        padding: 12px 42px 12px 14px;
    }

    .btn {
        height: 46px;
        font-size: 15px;
    }

    img {
        height: 56px !important;
        width: 56px !important;
    }

    .loading-card {
        padding: 20px 22px;
    }

    .loading-card span {
        font-size: 13px;
    }
}
