﻿/* Khởi tạo biến màu và reset */
:root {
    --primary-color: #b30000;
    --primary-hover: #8a0000;
    --dark-bg: #1e1e2f;
    --text-main: #2d3748;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --focus-ring: rgba(179, 0, 0, 0.2);
    --font-family: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: #f7fafc;
    color: var(--text-main);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Container chia layout 2 khối lớn */
.login-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
}

/* ================= KHỐI SIDEBAR TRÁI ================= */
.login-sidebar {
    flex: 1.2;
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1516937941344-00b4e0337589?q=80&w=1200'); /* Ảnh nền công nghiệp hàng hải đường thủy */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(29, 29, 47, 0.95), rgba(179, 0, 0, 0.85));
    z-index: 1;
}

.sidebar-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
    max-width: 500px;
}

.brand-logo {
    width: 70px;
    height: 70px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(5px);
}

.sidebar-content h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.brand-sub {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 300;
}

.sidebar-footer {
    position: absolute;
    bottom: -100px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* ================= KHỐI FORM PHẢI ================= */
.login-form-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background-color: #ffffff;
}

.form-wrapper {
    width: 100%;
    max-width: 420px;
}

.mobile-logo {
    display: none;
    height: 55px;
    margin: 0 auto 20px auto;
}

.form-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.form-header p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 35px;
}

/* Input group styling */
.input-group {
    margin-bottom: 22px;
}

    .input-group label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 8px;
        color: #4a5568;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #a0aec0;
    font-size: 16px;
    transition: color 0.2s;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: #f8fafc;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease-in-out;
}

    .input-wrapper input:focus {
        border-color: var(--primary-color);
        background-color: #ffffff;
        box-shadow: 0 0 0 4px var(--focus-ring);
    }

        .input-wrapper input:focus + .input-icon {
            color: var(--primary-color);
        }

/* Ẩn hiện mật khẩu */
.toggle-password {
    position: absolute;
    right: 16px;
    color: #a0aec0;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
}

    .toggle-password:hover {
        color: var(--text-main);
    }

/* Box ghi chú */
.form-notes {
    background-color: #fffaf0;
    border-left: 4px solid #dd6b20;
    padding: 12px 15px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 30px;
}

    .form-notes p {
        font-size: 12.5px;
        color: #7b341e;
        line-height: 1.5;
    }

/* Nút Đăng nhập đột phá */
.btn-login {
    width: 100%;
    padding: 16px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(179, 0, 0, 0.25);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-login:hover {
        background-color: var(--primary-hover);
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(179, 0, 0, 0.35);
    }

    .btn-login:active {
        transform: translateY(1px);
    }

.hidden {
    display: none;
}

/* Footer định vị */
.form-footer {
    margin-top: 40px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
}

    .form-footer p {
        font-size: 13px;
        color: var(--text-muted);
        line-height: 1.6;
    }

    .form-footer .copy {
        margin-top: 15px;
        font-size: 11px;
        color: #cbd5e0;
    }

/* ================= RESPONSIVE OPTIMIZATION (BREAKPOINTS) ================= */
@media (max-width: 1024px) {
    .login-sidebar {
        padding: 40px;
    }

    .sidebar-content h2 {
        font-size: 24px;
    }
}

@media (max-width: 850px) {
    /* Ẩn khối ảnh bên trái khi màn hình nhỏ (Tablet dọc và Mobile) */
    .login-sidebar {
        display: none;
    }

    .login-form-area {
        flex: 1;
        padding: 30px 20px;
    }

    .mobile-logo {
        display: block;
    }

    .form-header {
        text-align: center;
    }
}
