/* ========================================= */
/* AUTH.CSS - Combined Login & Signup Page  */
/* Sliding Animation with Responsive Design */
/* ========================================= */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* ================================
   MAIN CONTAINER
   ================================ */
.main-container {
    display: flex;
    flex-direction: column;
    padding: 40px;
    max-width: 1400px;
    margin: 80px auto 0;
    min-height: calc(100vh - 80px);
}

/* ================================
   BACK TO HOME LINK
   ================================ */
.back-to-home-wrapper {
    margin-bottom: 20px;
}

.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2c7a94;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
}

.back-to-home:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #1a5a6e;
    transform: translateX(-5px);
}

.back-to-home i {
    font-size: 18px;
    transition: transform 0.3s;
}

.back-to-home:hover i {
    transform: translateX(-3px);
}

/* ================================
   AUTH CONTAINER (Main Card)
   ================================ */
.auth-container {
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 1200px;
    min-height: 900px;
    margin: 0 auto;
    z-index: 1;
}

/* ================================
   FORM CONTAINERS (Login & Signup)
   ================================ */
.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.form-container.login {
    left: 0;
    width: 50%;
    z-index: 2;
}

.form-container.sign-up {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

/* Active State - Show Signup */
.auth-container.active .login {
    transform: translateX(100%);
}

.auth-container.active .sign-up {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: move 0.6s;
}

@keyframes move {
    0%, 49.99% {
        opacity: 0;
        z-index: 1;
    }
    50%, 100% {
        opacity: 1;
        z-index: 5;
    }
}

/* ================================
   FORM STYLING
   ================================ */
.auth-container form {
    background: #fff;
    display: flex;
    flex-direction: column;
    padding: 0 50px;
    height: 100%;
    justify-content: center;
    align-items: center;
}

.auth-container form h2 {
    color: #2c5f7f;
    font-size: 32px;
    margin-bottom: 20px;
    text-align: center;
}

/* ================================
   SOCIAL LOGIN BUTTONS
   ================================ */
.social-login {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.social-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #ffffff;
    font-size: 18px;
    color: #666;
}

.social-btn:hover {
    border-color: #2c5f7f;
    color: #2c5f7f;
    transform: translateY(-3px);
}

/* ================================
   DIVIDER
   ================================ */
.divider {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin: 15px 0;
}

/* ================================
   FORM GROUPS & INPUTS
   ================================ */
.form-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.form-group {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    background: #f9f9f9;
    color: #333;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2c7a94;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(44, 122, 148, 0.1);
}

/* ================================
   PASSWORD GROUP WITH TOGGLE
   ================================ */
.password-group {
    position: relative;
}

.password-group input {
    width: 100%;
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 16px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #2c7a94;
}

/* ================================
   FORGOT PASSWORD LINK
   ================================ */
.forgot-link {
    width: 100%;
    text-align: right;
    margin-bottom: 15px;
    margin-top: -5px;
}

.forgot-link a {
    color: #2c7a94;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.forgot-link a:hover {
    color: #1a5a6e;
    text-decoration: underline;
}

/* ================================
   SUBMIT BUTTON
   ================================ */
.submit-btn {
    width: 100%;
    padding: 14px 45px;
    background: linear-gradient(135deg, #2c7a94 0%, #2c5f7f 100%);
    color: #ffffff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #2c5f7f 0%, #1a4a5e 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(44, 122, 148, 0.3);
}

/* ================================
   ALERT MESSAGES
   ================================ */
.alert {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 13px;
    text-align: center;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ================================
   TOGGLE CONTAINER (Sliding Panel)
   ================================ */
.toggle-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
    z-index: 1000;
}

.auth-container.active .toggle-container {
    transform: translateX(-100%);
}

.toggle {
    background: linear-gradient(135deg, #4a9aba 0%, #2c7a94 50%, #1a5a6e 100%);
    height: 100%;
    color: #fff;
    position: relative;
    left: -100%;
    width: 200%;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.auth-container.active .toggle {
    transform: translateX(50%);
}

/* ================================
   TOGGLE PANELS (Welcome Messages)
   ================================ */
.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    text-align: center;
    top: 0;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.toggle-left {
    transform: translateX(-200%);
}

.auth-container.active .toggle-left {
    transform: translateX(0);
}

.toggle-right {
    right: 0;
    transform: translateX(0);
}

.auth-container.active .toggle-right {
    transform: translateX(200%);
}

.toggle-panel h1 {
    font-size: 42px;
    margin-bottom: 20px;
    font-weight: 700;
}

.toggle-panel p {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 350px;
}

.toggle-btn {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    padding: 14px 45px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: #fff;
    color: #2c7a94;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* ============================================ */
/* RESPONSIVE - TABLET (max-width: 1024px)     */
/* ============================================ */
@media screen and (max-width: 1024px) {
    .main-container {
        padding: 20px;
        margin-top: 70px;
        min-height: auto;
    }

    .auth-container {
        min-height: auto;
        border-radius: 20px;
    }

    /* Stack layout on tablet */
    .form-container.login,
    .form-container.sign-up {
        position: relative;
        width: 100%;
        height: auto;
        left: 0;
        transform: none !important;
        opacity: 1;
    }

    .form-container.sign-up {
        display: none;
    }

    .auth-container.active .form-container.login {
        display: none;
    }

    .auth-container.active .form-container.sign-up {
        display: block;
    }

    .auth-container form {
        padding: 40px 30px;
        height: auto;
    }

    .auth-container form h2 {
        font-size: 28px;
        margin-bottom: 18px;
    }

    /* Toggle container becomes top banner */
    .toggle-container {
        position: relative;
        left: 0;
        width: 100%;
        height: auto;
        transform: none !important;
    }

    .toggle {
        left: 0;
        width: 100%;
        transform: none !important;
    }

    .toggle-panel {
        position: relative;
        width: 100%;
        height: auto;
        padding: 40px 30px;
        transform: none !important;
    }

    .toggle-left {
        display: none;
    }

    .toggle-right {
        display: flex;
    }

    .auth-container.active .toggle-left {
        display: flex;
    }

    .auth-container.active .toggle-right {
        display: none;
    }

    .toggle-panel h1 {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .toggle-panel p {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .toggle-btn {
        padding: 12px 35px;
        font-size: 14px;
    }
}

/* ============================================ */
/* RESPONSIVE - MOBILE (max-width: 768px)      */
/* ============================================ */
@media screen and (max-width: 768px) {
    .main-container {
        padding: 15px;
        margin-top: 65px;
    }

    .back-to-home-wrapper {
        margin-bottom: 15px;
    }

    .back-to-home {
        font-size: 13px;
        padding: 6px 12px;
    }

    .auth-container {
        border-radius: 16px;
        box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    }

    .auth-container form {
        padding: 35px 25px;
    }

    .auth-container form h2 {
        font-size: 24px;
    }

    .social-login {
        gap: 12px;
    }

    .social-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .divider {
        font-size: 12px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-group label {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .form-group input,
    .form-group select {
        padding: 12px 14px;
        font-size: 14px;
        border-radius: 8px;
    }

    .submit-btn {
        padding: 14px 30px;
        font-size: 13px;
    }

    .toggle-panel {
        padding: 35px 25px;
    }

    .toggle-panel h1 {
        font-size: 28px;
    }

    .toggle-panel p {
        font-size: 13px;
        line-height: 1.6;
        margin-bottom: 20px;
    }

    .toggle-btn {
        padding: 11px 30px;
        font-size: 13px;
    }
}

/* ============================================ */
/* RESPONSIVE - SMALL MOBILE (max-width: 480px) */
/* ============================================ */
@media screen and (max-width: 480px) {
    .main-container {
        padding: 10px;
        margin-top: 60px;
    }

    .back-to-home {
        padding: 5px 10px;
        font-size: 12px;
    }

    .auth-container {
        border-radius: 14px;
    }

    .auth-container form {
        padding: 30px 20px;
    }

    .auth-container form h2 {
        font-size: 22px;
    }

    .social-btn {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    .form-group input,
    .form-group select {
        padding: 11px 12px;
        font-size: 13px;
    }

    .submit-btn {
        padding: 13px 25px;
        font-size: 12px;
    }

    .alert {
        padding: 10px 14px;
        font-size: 12px;
    }

    .toggle-panel {
        padding: 30px 20px;
    }

    .toggle-panel h1 {
        font-size: 24px;
    }

    .toggle-panel p {
        font-size: 12px;
        margin-bottom: 18px;
    }

    .toggle-btn {
        padding: 10px 28px;
        font-size: 12px;
    }
}

/* ============================================ */
/* RESPONSIVE - VERY SMALL (max-width: 350px)  */
/* ============================================ */
@media screen and (max-width: 350px) {
    .main-container {
        padding: 8px;
    }

    .auth-container form {
        padding: 25px 15px;
    }

    .auth-container form h2 {
        font-size: 20px;
    }

    .social-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .toggle-panel {
        padding: 25px 15px;
    }

    .toggle-panel h1 {
        font-size: 22px;
    }

    .toggle-panel p {
        font-size: 11px;
    }
}