/**
 * ===== LOGIN.CSS - FLOATING CARD DESIGN (RIGHT ALIGNED) =====
 * Version: 6.4.2 - DTD Agency Chatbot AI
 * login.css . cấu hình login giao diện login.php
 * =============================================
 */

/* ===== RESET & GLOBAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* ===== BACKGROUND FULL SCREEN ===== */
.background-full {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    animation: zoomIn 30s infinite alternate;
}

@keyframes zoomIn {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

/* ===== LOGIN WRAPPER - POSITIONED RIGHT ===== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Start from left to position at 2/3 */
    padding: 40px 20px;
    position: relative;
}

/* ===== LOGIN CARD - FLOATING AT 2/3 POSITION ===== */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 460px;
    animation: slideInRight 1s cubic-bezier(0.16, 1, 0.3, 1); /* Smooth easing */
    position: relative;
    margin-left: 66.666%; /* Position at 2/3 from left */
    transform: translateX(-50%); /* Center the card at 2/3 position */
    will-change: transform, opacity; /* Hardware acceleration */
    backface-visibility: hidden; /* Prevent flickering */
    -webkit-font-smoothing: antialiased; /* Smooth text rendering */
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(calc(-50% + 100px)); /* Smooth slide from right */
    }
    100% {
        opacity: 1;
        transform: translateX(-50%);
    }
}

/* ===== LOGIN HEADER ===== */
.login-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
    border-radius: 25px 25px 0 0;
    position: relative;
}

.logo-small {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.6);
    }
}

.login-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.login-header p {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    opacity: 0.95;
}

.version-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

/* ===== LOGIN BODY ===== */
.login-body {
    padding: 2rem 1.5rem;
}

/* ===== FORM CONTROLS ===== */
.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

/* ===== BUTTONS ===== */
.btn-login {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    color: white;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.btn-login:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
    color: white;
}

.btn-outline-primary {
    border-color: #3498db;
    color: #3498db;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #3498db;
    color: white;
    transform: translateY(-1px);
}

.btn-outline-secondary {
    border-color: #95a5a6;
    color: #95a5a6;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: #95a5a6;
    color: white;
    transform: translateY(-1px);
}

/* ===== DIVIDER ===== */
.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #ddd, transparent);
    margin: 1.5rem 0;
}

/* ===== ALERTS ===== */
.alert {
    border-radius: 12px;
    border: none;
    padding: 12px 16px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

/* ===== FOOTER LINKS ===== */
.footer-links {
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.footer-links a {
    color: #3498db;
    text-decoration: none;
    margin: 0 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #2980b9;
    transform: translateY(-2px);
}

/* ===== HIDE DEMO CONTROLS & IMAGE UPLOADER ===== */
.image-uploader-demo,
#demoControls {
    display: none !important;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Desktop Large (>1200px) */
@media (min-width: 1200px) {
    .login-wrapper {
        padding: 60px 40px;
    }
    
    .login-card {
        max-width: 480px;
    }
}

/* Tablet (768px - 992px) */
@media (max-width: 992px) {
    .login-card {
        max-width: 420px;
        margin-left: 50%; /* Center on tablet */
    }
}

/* Mobile (max-width: 767px) - Centered on mobile */
@media (max-width: 767px) {
    .login-wrapper {
        padding: 20px 15px;
        justify-content: center;
    }
    
    .login-card {
        max-width: 100%;
        margin-left: 0;
        transform: none;
        animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        will-change: opacity;
    }
    
    .login-header {
        padding: 1.5rem 1rem;
    }
    
    .login-header h3 {
        font-size: 1.3rem;
    }
    
    .login-body {
        padding: 1.5rem 1rem;
    }
    
    .footer-links {
        padding: 1rem;
    }
    
    .footer-links a {
        display: block;
        margin: 5px 0;
    }
}

/* ===== MODAL STYLING ===== */
.modal-content {
    border-radius: 20px;
    border: none;
}

.modal-header {
    border-bottom: none;
    border-radius: 20px 20px 0 0;
}

.modal-body {
    padding: 2rem;
}

/* ===== FORM TEXT ===== */
.form-text {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* ===== POSITION UTILITIES ===== */
.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

.top-50 {
    top: 50%;
}

.end-0 {
    right: 0;
}

.translate-middle-y {
    transform: translateY(-50%);
}

.me-3 {
    margin-right: 1rem;
}

/* ===== ANIMATION UTILITIES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* ===== FORGOT PASSWORD LINK ===== */
.forgot-password-link {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    transition: all 0.3s ease;
}

.forgot-password-link:hover {
    color: #2980b9;
    transform: translateX(3px);
}

.forgot-password-link i {
    margin-right: 4px;
}