/* --- Layout Chung --- */
.auth-page-wrapper {
    background-color: #0f0f0f;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.auth-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    min-height: 600px;
}

/* --- Cột Trái: Hình ảnh --- */
.auth-image-col {
    flex: 1;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.auth-overlay {
    background: linear-gradient(to top, rgba(62, 21, 21, 0.95), rgba(62, 21, 21, 0.4), transparent);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
    color: #fff;
}

.auth-logo {
    width: 120px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.caption-title {
    /* Đã xóa font-family riêng */
    font-size: 32px;
    color: #d4af37;
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: bold;
}

.caption-text {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

/* --- Cột Phải: Form --- */
.auth-form-col {
    flex: 1;
    background-color: #000;
    padding: 50px 40px;
    color: #fff;
    display: flex;
    flex-direction: column;
}

/* --- Tabs --- */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #333;
    margin-bottom: 30px;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    color: #666;
    font-size: 16px;
    font-weight: bold;
    padding: 15px 0;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    position: relative;
}

.auth-tab.active {
    color: #EBC58E;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #EBC58E;
}

/* --- Form Content --- */
.auth-form-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.auth-form-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-title {
    font-size: 24px;
    margin-bottom: 5px;
    color: #fff;
}

.form-subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 25px;
}

/* --- INPUT STYLES (ĐÃ FIX LỖI ĐÈ ICON) --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 15px; /* Cách lề trái 15px */
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 18px;
    z-index: 2; /* Đảm bảo icon nằm trên nền input */
    pointer-events: none; /* Để chuột click xuyên qua icon vào ô nhập */
}

.form-control {
    width: 100%;
    background-color: #2a2a2a;
    border: 1px solid #333;
    color: #fff;
    
    /* QUAN TRỌNG: Tăng padding-left lên 50px để chữ không đè lên icon */
    padding: 12px 15px 12px 50px !important; 
    
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    height: 48px; /* Cố định chiều cao cho đẹp */
}

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

.form-control:focus {
    border-color: #d4af37;
    background-color: #333;
    outline: none;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.1);
}

/* Nút mắt xem mật khẩu */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    cursor: pointer;
    z-index: 3;
    padding: 5px; /* Tăng vùng click */
}

.toggle-password:hover {
    color: #d4af37;
}

/* Options (Checkbox & Forgot Pass) */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 13px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #aaa;
}

.custom-checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1px solid #555;
    border-radius: 4px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2a2a2a;
    transition: all 0.2s;
}

.custom-checkbox input:checked + .checkmark {
    background-color: #d4af37;
    border-color: #d4af37;
    color: #000;
}

.custom-checkbox input:checked + .checkmark::after {
    content: '✔';
    font-size: 12px;
    font-weight: bold;
}

.forgot-pass {
    color: #d4af37;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-pass:hover {
    color: #fff;
    text-decoration: underline;
}

/* Button Submit */
.btn-auth-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(to right, #3e1515, #5c1e1e);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.btn-auth-submit:hover {
    background: linear-gradient(to right, #5c1e1e, #7a2b2b);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(92, 30, 30, 0.4);
}

/* Loading state cho button */
.btn-auth-submit.loading {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-auth-submit.loading:hover {
    background: #666;
    transform: none;
    box-shadow: none;
}

.btn-auth-submit.loading .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #333;
    z-index: 1;
}

.auth-divider span {
    background-color: #1a1a1a;
    padding: 0 15px;
    color: #666;
    font-size: 12px;
    position: relative;
    z-index: 2;
}

/* Social Login */
.social-login {
    display: flex;
    gap: 15px;
    justify-content: center;
}

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

.btn-social:hover {
    background-color: #d4af37;
    color: #000;
    border-color: #d4af37;
}

.btn-social.facebook:hover { background-color: #1877f2; border-color: #1877f2; color: #fff; }
.btn-social.google:hover { background-color: #db4437; border-color: #db4437; color: #fff; }

/* Responsive */
@media (max-width: 992px) {
    .auth-card {
        flex-direction: column;
        margin: 0 15px;
        min-height: auto;
        max-width: 500px; /* Giới hạn chiều rộng trên mobile */
    }

    .auth-image-col {
        height: 180px; /* Ảnh nhỏ lại trên mobile */
        flex: none;
    }
    .auth-form-col {
        padding: 30px 20px;
    }

    .form-title { font-size: 20px; }
}

@media (max-width: 768px) {
    .auth-page-wrapper {
        padding: 20px 10px;
    }

    .auth-card {
        margin: 0 auto;
        max-width: 100%;
        border-radius: 15px;
    }

    .auth-form-col {
        padding: 25px 15px;
        text-align: center;
    }

    .form-title {
        font-size: 18px;
        margin-bottom: 5px;
    }

    .form-subtitle {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .auth-tabs .auth-tab {
        font-size: 14px;
        padding: 12px 0;
    }

    .form-control {
        padding: 10px 15px 10px 45px !important;
        height: 45px;
        font-size: 14px;
    }

    .input-icon,
    .toggle-password {
        font-size: 16px;
    }

    .input-icon {
        left: 12px;
    }

    .toggle-password {
        right: 12px;
    }

    .btn-auth-submit {
        padding: 12px;
        font-size: 14px;
        margin-bottom: 10px;
    }

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

    .custom-checkbox {
        font-size: 12px;
    }

    .checkmark {
        width: 16px;
        height: 16px;
    }

    .form-options {
        margin-bottom: 20px;
    }
}
