﻿/* Reset CSS cơ bản */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

.m-h-180 {
    min-height: 180px !important;
}

.bg-process {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
    z-index: 9999;
}

.img-loadding {
    display: block;
    margin: 0 auto;
    margin-top: 30em;
}

/* Container toàn màn hình */
.login-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #0B83BF;
    overflow: hidden;
}

/* Ảnh cầu ở phía dưới */
.bridge-img {
    position: absolute;
    bottom: 0;
    left: 0;
    width: auto;
    height: 85%;
    object-fit: cover;
}

/* Login form */
.login-form {
    width: 800px;
    margin: 40px auto;
    padding: 30px;
    background-color: #cde6f2;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 102, 204, 0.3);
    position: relative;
    z-index: 1;
    left: 20%;
    top: 15%;
    transform: translate(-20%, -15%);
}

    /* Tiêu đề */
    .login-form .form-title {
        text-align: center;
        color: #0B83BF;
        font-size: 24px;
        font-weight: 600;
        margin-bottom: 30px;
    }

/* Bố cục chia 2 cột: logo và input */
.form-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    min-height: 250px;
}

/* Logo bên trái */
.form-logo {
    display: flex;
    justify-content: center; /* căn giữa ngang */
    /*align-items: center;*/ /* căn giữa dọc */
    min-height: 250px;
}

    .form-logo img {
        width: 180px;
        height: 180px;
    }

/* Phần form bên phải */
.form-container {
    flex-direction: column;
    justify-content: center;
    width: 100% !important;
    display: flex;
    min-height: 250px;
}

.form-fields {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    width: 100% !important;
    display: flex;
    min-height: 250px;
}

/* Từng nhóm nhập liệu: hiển thị label và input cùng hàng (trên màn hình lớn) */
.form-group {
    display: flex;
    align-items: center; /* căn giữa theo chiều dọc */
    margin-bottom: 15px;
}

    .form-group label {
        min-width: 140px; /* khoảng rộng label */
        margin-right: 10px;
        font-weight: 400;
        color: #333;
        white-space: nowrap;
    }

    .form-group input {
        flex: 1; /* input sẽ chiếm phần còn lại */
        padding: 8px 10px;
        font-size: 14px;
        border: 1px solid #ccc;
        border-radius: 6px;
        outline: none;
    }

        .form-group input:focus {
            border-color: #66a3ff;
        }

/* Bọc ô password + icon */
.password-wrapper {
    position: relative;
}

    /* Khoảng trống cho icon bên phải input */
    .password-wrapper input {
        padding-right: 40px;
    }

/* Icon mắt nằm đè góc phải trên input */
.toggle-password {
    position: absolute;
    right: 10px; /* canh lề phải */
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer; /* hiển thị trỏ chuột khi hover */
    color: #ccc; /* màu icon */
    font-size: 1.1rem; /* cỡ icon */
}

    .toggle-password .fa {
        font-weight: 200 !important;
    }
    /* Nút Đăng ký */
    .btn-submit {
        width: 130px;
        padding: 5px;
        background-color: #0B83BF;
        color: white;
        border: none;
        border-radius: 6px;
        font-weight: 400;
        font-size: 16px;
        cursor: pointer;
        transition: background-color 0.2s ease;
        display: block; /* Hiển thị dưới dạng block */
        margin: 5px 0px 5px 10px; /* Tự động căn giữa theo chiều ngang */
    }

    .btn-submit:hover {
        background-color: #0B83BF;
    }

/* Link dưới form */
.login-link {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #0B83BF;
    font-weight: 400;
}

    .login-link a {
        color: #0B83BF;
        text-decoration: none;
    }

        .login-link a:hover {
            text-decoration: underline;
        }

@media (max-width: 768px) {
    .login-form {
        width: 90%;
        top: auto;
        left: auto;
        transform: unset;
    }

    .form-content {
        flex-direction: column; /* Chuyển từ 2 cột sang 1 cột */
        align-items: center;
    }

    .form-logo {
        margin-bottom: 20px;
        display: none;
    }
        /* Giảm kích thước logo cho mobile */
        .form-logo img {
            width: 120px;
            height: 120px;
        }

    .form-fields {
        width: 100%;
    }

    .toggle-password {
        transform: unset;
    }

    /* Cho label và input xếp dọc nhau */
    .form-group {
        flex-direction: column;
        align-items: flex-start;
    }

        .form-group label {
            min-width: auto;
            margin-right: 0;
            margin-bottom: 5px;
        }

        .form-group input {
            width: 100%;
        }
}

@media (max-width: 480px) {
    .login-form {
        padding: 15px;
    }

    .form-title {
        font-size: 1.1rem;
    }

    .btn-submit {
        font-size: 0.95rem;
    }
}
