/* auth.css - HANCOS Authentication Styles - Optimized */

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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background: linear-gradient(to right, #e2e2e2, #c9d6ff);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100vh;
}

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to right, #e2e2e2, #c9d6ff);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.back-home {
    position: absolute;
    top: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #512da8;
    text-decoration: none;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 14px;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease-in-out;
    z-index: 1100;
}

.back-home:hover {
    color: #673ab7;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.login-container {
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    width: 1000px;
    max-width: 95%;
    min-height: 650px;
}

/* Form Containers */
.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in {
    left: 0;
    width: 50%;
    z-index: 2;
}

.login-container.active .sign-in {
    transform: translateX(100%);
}

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

.login-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;
    }
}

/* Forms */
form {
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 60px;
    height: 100%;
    overflow-y: auto;
}

.login-title {
    font-size: 32px;
    font-weight: 700;
    margin: 20px 0 15px;
    color: #512da8;
}

/* Social Icons */
.social-login {
    margin: 18px 0;
    display: flex;
    gap: 18px;
}

.social-btn {
    border: 1px solid #ccc;
    border-radius: 20%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    color: #333;
    font-size: 18px;
}

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

.divider {
    margin: 18px 0;
    font-size: 14px;
    color: #333;
}

/* Input Groups */
.input-group {
    background-color: #eee;
    border: none;
    margin: 8px 0;
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 8px;
    width: 100%;
    outline: none;
    display: flex;
    align-items: center;
}

.input-group-text {
    background-color: transparent;
    border: none;
    color: #999;
    padding-right: 12px;
    font-size: 16px;
}

.form-control {
    background-color: transparent;
    border: none;
    padding: 0;
    font-size: 14px;
    width: 100%;
    outline: none;
}

.form-control::placeholder {
    color: #aaa;
}

/* Buttons */
.btn-login {
    background-color: #512da8;
    color: #fff;
    font-size: 14px;
    padding: 14px 55px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 12px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background-color: #673ab7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(81, 45, 168, 0.4);
}

.btn-login.hidden {
    background-color: transparent;
    border-color: #fff;
}

.btn-login.hidden:hover {
    background-color: #fff;
    color: #512da8;
}

/* Toggle Container */
.toggle-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
    border-radius: 150px 0 0 100px;
    z-index: 1000;
}

.login-container.active .toggle-container {
    transform: translateX(-100%);
    border-radius: 0 150px 100px 0;
}

.toggle {
    background-color: #512da8;
    height: 100%;
    background: linear-gradient(to right, #5c6bc0, #512da8);
    color: #fff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

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

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

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

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

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

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

.welcome-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.welcome-text {
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.3px;
    margin: 25px 0;
}

.btn-signin {
    background-color: transparent;
    border: 1px solid #fff;
    color: #fff;
    font-size: 14px;
    padding: 14px 55px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-signin:hover {
    background: #fff;
    color: #512da8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Logo */
.logo {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #512da8;
}

.logo i {
    font-size: 28px;
}

/* Forgot Password */
.forgot-password {
    margin: 18px 0;
}

.forgot-password a {
    color: #512da8;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.forgot-password a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-size: 13px;
    width: 100%;
}

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

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

/* Hidden Elements */
.form-label {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        min-height: 550px;
    }
    
    .form-container {
        width: 100%;
    }
    
    .sign-in,
    .sign-up {
        width: 100%;
    }
    
    .toggle-container {
        display: none;
    }
    
    form {
        padding: 0 20px;
    }
}

/* Performance Optimization */
* {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}