/* Base Styles */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #f5f5f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Layout Container */
.login-container {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    min-height: 100vh;
}

/* 
   LEFT SIDE (Banner)
*/
.login-left {
    width: 60%;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden; /* Tránh ảnh tràn ra ngoài */
}

.login-left-content {
    width: 100%;
    max-width: 100%;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    z-index: 2;
}

.system-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.system-title {
    font-size: clamp(18px, 3.5vw, 28px);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 auto;
    line-height: 1.4;
    letter-spacing: 0.5px;
    max-width: 90%;
}

.title-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, transparent, #ffd700, transparent);
    margin: 15px auto 20px auto;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.project-title {
    font-size: clamp(24px, 4.5vw, 42px);
    font-weight: 700;
    color: #ffd700;
    margin: 0 auto;
    text-align: center;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 215, 0, 0.2);
    letter-spacing: 1px;
    max-width: 90%;
}

/* Carousel */
.carousel-wrapper {
    width: 100%;
    margin: 20px 0 40px 0;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    aspect-ratio: 24/9; /* Giữ tỷ lệ khung hình đẹp */
}

/* Large Desktop (Min width 1440px) */
@media (min-width: 2560px) {
    .carousel-wrapper {
        max-height: 500px;
    }
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

    .carousel-slide.active {
        opacity: 1;
    }

    .carousel-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Contact Info Area */
.left-contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 200px;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.contact-left-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-right-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: white;
}

.contact-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-item p {
    margin: 0;
    margin-top: 2.5px;
}

.contact-item a {
    color: white;
    text-decoration: none;
}

    .contact-item a:hover {
        text-decoration: underline;
    }

.contact-item span {
    margin-top: 2px;
}

/* 
   RIGHT SIDE (Login Form)
 */
.login-right {
    width: 40%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    min-height: 100vh; /* Đảm bảo luôn full màn hình desktop */
}

.login-card {
    width: 100%;
    max-width: 450px;
}

.login-card-header {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 42px;
}


.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

    .login-logo .logo-image {
        width: 180px;
        height: 120px;
        object-fit: contain;
        transition: transform 0.3s ease;
    }

.logo-lines {
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, transparent, #dc2626, #dc2626, transparent);
    margin: 12px auto 10px auto;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
}

.login-subtitle {
    font-size: 14px;
    color: #6b7280;
}

/* Form Elements */
.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9ca3af;
    z-index: 1;
}

.login-form .form-control {
    width: 100%;
    height: 48px;
    padding: 10px 40px 10px 40px;
    font-size: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.2s;
}

    .login-form .form-control:focus {
        border-color: #0036b0;
        outline: none;
        box-shadow: 0 0 0 3px rgba(0, 54, 176, 0.1);
    }

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: #9ca3af;
    z-index: 2;
    transition: color 0.2s;
}

    .password-toggle:hover {
        color: #0036b0;
    }

.password-label-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.forgot-password-wrapper {
    text-align: right;
    margin-bottom: 20px;
}

.forgot-link {
    font-size: 14px;
    color: #0036b0;
    text-decoration: none;
}

    .forgot-link:hover {
        text-decoration: underline;
    }

.login-submit-btn {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.1s;
}

    .login-submit-btn:hover {
        background: linear-gradient(135deg, #ffed4e 0%, #ffb84d 100%);
    }

    .login-submit-btn:active {
        transform: scale(0.98);
    }

.login-footer-copyright {
    text-align: center;
    margin-top: 140px;
    padding-top: 20px;
    /*border-top: 1px solid #eee;*/
    font-size: 12px;
    color: #888;
}


/*
   RESPONSIVE QUERIES (TABLET & MOBILE)
 */

/* Tablet & Small Desktop (Max width 1024px) */
@media (max-width: 1024px) {
    .login-left {
        flex: 1 1 50%;
        width: 50%;
        padding: 30px;
    }

    .login-right {
        flex: 1 1 50%;
        width: 50%;
        padding: 30px;
    }

    .carousel-wrapper {
        margin: 15px 0 30px 0;
        max-height: 280px;
    }

    .left-contact-info {
        flex-direction: column;
        gap: 15px;
    }

    .contact-left-column, .contact-right-column {
        flex: auto;
    }

    .login-logo .logo-image {
        width: 70px;
        height: 70px;
    }

    .logo-lines {
        width: 90px;
    }
}

/* Mobile Devices (Max width 768px) */
@media (max-width: 768px) {

    /* Phần bên trái (Banner) */
    .login-left {
        flex: 0 0 auto;
        width: 100%;
        min-height: auto;
        padding: 40px 20px;
        order: 2;
    }

    .carousel-wrapper {
        margin: 15px 0 25px 0;
        max-height: 250px;
        border-radius: 8px;
    }

    .system-title {
        margin-top: 0;
        font-size: clamp(16px, 4vw, 24px);
    }

    .title-divider {
        width: 60px;
        height: 2px;
        margin: 12px auto 16px auto;
    }

    .project-title {
        font-size: clamp(22px, 5vw, 32px);
        letter-spacing: 0.5px;
    }

    .left-contact-info {
        background: transparent;
        padding: 0;
        margin-top: 20px;
    }

    /* Phần bên phải (Form) */
    .login-right {
        flex: 0 0 auto;
        width: 100%;
        min-height: auto;
        padding: 30px 20px;
        order: 1;
        background: #fff;
        border-radius: 20px 20px 0 0;
        margin-top: -20px;
        z-index: 10;
    }

    .login-card-header {
        margin-bottom: 20px;
    }

    /* .logo-text { font-size: 24px; } */
    .project-title {
        font-size: 28px;
    }

    .login-logo .logo-image {
        width: 60px;
        height: 60px;
    }

    .logo-lines {
        width: 80px;
        height: 3px;
    }
}

/* Mobile Landscape (Xoay ngang) */
@media (max-height: 500px) {
    .login-left {
        display: none;
    }

    .login-right {
        width: 100%;
        padding: 20px;
    }

    .login-logo .logo-image {
        width: 50px;
        height: 50px;
    }

    .logo-lines {
        width: 70px;
        height: 2px;
    }
}

/* Extra Small Mobile (Max width 480px) */
@media (max-width: 480px) {
    .carousel-wrapper {
        margin: 10px 0 20px 0;
        max-height: 200px;
    }

    .login-logo .logo-image {
        width: 50px;
        height: 50px;
    }

    .logo-lines {
        width: 70px;
        height: 3px;
    }
}


.contact-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    margin: 20px -300px;
    width: calc(100% + 600px);
    max-width: none;
    box-sizing: border-box;
}
