* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --dark: #0b1735;
    --text: #111827;
    --gray: #64748b;
    --white: #ffffff;
    --border: #dbe5f1;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f1f6fd;
    color: var(--text);
    min-height: 100vh;
}

a {
    text-decoration: none;
}

/* ==============================
   KHUNG TRANG ĐĂNG NHẬP - FLEXBOX
============================== */
.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 45px 30px;
    background:
        radial-gradient(circle at top left, #dbeafe 0, transparent 30%),
        #f1f6fd;
}

.login-container {
    width: 100%;
    max-width: 1150px;
    min-height: 680px;
    display: flex;
    flex-direction: row;
    background: var(--white);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(15, 40, 90, 0.12);
}

/* Hai cột chia đều trên desktop */
.login-banner,
.login-form-section {
    flex: 1 1 50%;
    min-width: 0;
}

/* ==============================
   BÊN TRÁI: BANNER
============================== */
.login-banner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 35px;
    color: var(--white);
    overflow: hidden;
    background:
        linear-gradient(
            135deg,
            rgba(5, 18, 48, 0.96),
            rgba(29, 78, 216, 0.78)
        ),
        url("images/login-banner.jpg");
    background-size: cover;
    background-position: center;
}

/* Ánh sáng trang trí */
.login-banner::before {
    content: "";
    position: absolute;
    width: 350px;
    height: 350px;
    right: -120px;
    top: 120px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.2);
    filter: blur(10px);
    pointer-events: none;
}

.login-banner::after {
    content: "";
    position: absolute;
    width: 250px;
    height: 250px;
    left: -120px;
    bottom: 20px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.2);
    filter: blur(10px);
    pointer-events: none;
}

/* ==============================
   LOGO KAIDO
============================== */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    max-width: 100%;
    color: var(--white);
    position: relative;
    z-index: 1;
}

.brand-icon,
.form-logo {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #4e94e5, #154fcb);
    color: white;
    font-size: 30px;
    font-weight: 900;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.25);
    overflow: hidden;
}

.brand-icon img,
.form-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    min-width: 0;
}

.brand-text h1 {
    font-size: 27px;
    letter-spacing: 2px;
}

.brand-text p {
    margin-top: 4px;
    color: #dbeafe;
    font-size: 12px;
}

/* Chỉnh cả 2 logo trên desktop */
@media (min-width: 901px) {
    /* Logo góc trái */
    .brand .brand-icon {
        width: 70px !important;
        height: 70px !important;
        flex: 0 0 70px;
        padding: 0;
        overflow: hidden;
    }

    .brand .brand-icon img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
        display: block;
    }

    /* Logo phía trên form */
    .form-heading .form-logo {
        width: 80px !important;
        height: 80px !important;
        flex: 0 0 80px;
        margin: 0 auto 12px;
        padding: 0;
        overflow: hidden;
    }

    .form-heading .form-logo img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
        display: block;
    }
}

/* ==============================
   NỘI DUNG GIỚI THIỆU
============================== */
.banner-content {
    position: relative;
    z-index: 1;
    margin: auto 0;
    padding: 50px 0;
}

.banner-label {
    display: inline-block;
    padding: 8px 13px;
    border-radius: 30px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(147, 197, 253, 0.35);
    color: #bfdbfe;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 22px;
}

.banner-content h2 {
    font-size: clamp(28px, 3vw, 43px);
    line-height: 1.25;
    font-weight: 900;
    margin-bottom: 18px;
}

.banner-content > p {
    max-width: 400px;
    color: #dbeafe;
    line-height: 1.8;
    font-size: 14px;
}

/* ==============================
   DANH SÁCH LỢI ÍCH
============================== */
.benefit-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 30px;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.benefit-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 18px;
}

/* ==============================
   CHÂN BANNER
============================== */
.banner-footer {
    position: relative;
    z-index: 1;
    color: #bfdbfe;
    font-size: 11px;
    letter-spacing: 2px;
}

/* ==============================
   BÊN PHẢI: FORM
============================== */
.login-form-section {
    padding: 35px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.back-home {
    align-self: flex-end;
    color: var(--gray);
    font-size: 13px;
    margin-bottom: 25px;
    transition: color 0.2s;
}

.back-home:hover {
    color: var(--primary);
}

/* ==============================
   TIÊU ĐỀ FORM
============================== */
.form-heading {
    text-align: center;
    margin-bottom: 30px;
}

.form-logo {
    margin: 0 auto 17px;
    width: 55px;
    height: 55px;
    flex-basis: 55px;
    font-size: 34px;
}

.form-heading h2 {
    font-size: 26px;
    margin-bottom: 10px;
    color: var(--dark);
}

.form-heading p {
    color: var(--gray);
    font-size: 13px;
    line-height: 1.6;
}

/* ==============================
   NHÓM INPUT
============================== */
.form-group {
    margin-bottom: 21px;
}

.form-group > label,
.label-row > label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #27364b;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.label-row a {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 10px;
}

.label-row a:hover {
    text-decoration: underline;
}

/* ==============================
   Ô NHẬP LIỆU
============================== */
.input-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 49px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.input-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.input-box input {
    width: 100%;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: var(--text);
}

.input-box input::placeholder {
    color: #94a3b8;
}

/* ==============================
   NÚT HIỆN MẬT KHẨU
============================== */
.toggle-password {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 12px;
    cursor: pointer;
    padding: 5px;
}

/* ==============================
   GHI NHỚ ĐĂNG NHẬP
============================== */
.form-options {
    margin: 4px 0 15px;
}

.remember-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gray);
    cursor: pointer;
}

.remember-option input {
    accent-color: var(--primary);
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
}

/* ==============================
   THÔNG BÁO
============================== */
.form-message {
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 10px;
    color: var(--gray);
}

.form-message.error {
    color: #dc2626;
}

.form-message.success {
    color: #047857;
    background: #ecfdf5;
    padding: 10px;
    border-radius: 8px;
}

/* ==============================
   NÚT ĐĂNG NHẬP
============================== */
.login-submit {
    width: 100%;
    min-height: 49px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: var(--white);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 7px 15px rgba(37, 99, 235, 0.18);
    transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}

.login-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.login-submit span {
    font-size: 18px;
}

/* ==============================
   LIÊN KẾT ĐĂNG KÝ
============================== */
.register-link {
    text-align: center;
    margin-top: 25px;
    font-size: 12px;
    color: var(--gray);
}

.register-link a {
    color: var(--primary);
    font-weight: bold;
    margin-left: 4px;
}

.register-link a:hover {
    text-decoration: underline;
}

/* ==============================
   PHÂN CÁCH
============================== */
.form-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 27px 0 20px;
    color: #94a3b8;
    font-size: 10px;
    letter-spacing: 1px;
    white-space: nowrap;
}

.form-divider::before,
.form-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e2e8f0;
}

/* ==============================
   NÚT KHÁM PHÁ
============================== */
.explore-button {
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: bold;
    transition: background 0.25s, border-color 0.25s;
}

.explore-button:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

/* ==============================
   CHÂN TRANG
============================== */
.login-footer {
    text-align: center;
    margin-top: 30px;
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.8;
}

/* ==============================
   RESPONSIVE: TABLET
============================== */
@media (max-width: 900px) {
    .login-page {
        align-items: flex-start;
        padding: 25px 18px;
    }

    .login-container {
        max-width: 650px;
        min-height: 0;
        flex-direction: column;
    }

    .login-banner,
    .login-form-section {
        width: 100%;
        min-width: 0;
        flex: 0 0 auto;
    }

    .login-banner {
        min-height: 400px;
        padding: 30px;
    }

    .banner-content {
        padding: 40px 0;
    }

    .login-form-section {
        padding: 35px 45px;
    }
}

/* ==============================
   RESPONSIVE: ĐIỆN THOẠI
============================== */
@media (max-width: 480px) {
    .login-page {
        padding: 12px;
    }

    .login-container {
        border-radius: 15px;
    }

    .login-banner {
        min-height: 350px;
        padding: 23px;
    }

    .brand {
        gap: 10px;
    }

    .brand-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        font-size: 25px;
    }

    .brand-text h1 {
        font-size: 23px;
    }

    .brand-text p {
        font-size: 11px;
    }

    .banner-content {
        padding: 30px 0;
    }

    .banner-content h2 {
        font-size: 29px;
    }

    .banner-content > p {
        font-size: 13px;
    }

    .benefit-list {
        gap: 13px;
        margin-top: 22px;
    }

    .benefit {
        font-size: 13px;
    }

    .benefit-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        font-size: 16px;
    }

    .login-form-section {
        padding: 25px 22px;
    }

    .form-heading {
        margin-bottom: 25px;
    }

    .form-heading h2 {
        font-size: 23px;
    }

    .form-logo {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
        font-size: 30px;
    }

    .form-divider {
        margin: 22px 0 17px;
    }

    .login-footer {
        margin-top: 24px;
    }
}
