﻿* {
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    margin: 0;
    padding: 16px;
    background: linear-gradient(135deg, #0a3d62, #084688);
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}

.login-wrapper {
    background-color: #ffffff;
    padding: 32px 24px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.app-logo {
    width: 50px;
    height: 50px;
    background: #e7f1ff;
    color: #084688;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 12px auto;
}

.login-wrapper h2 {
    color: #084688;
    margin: 0 0 4px 0;
    font-size: 22px;
    font-weight: 700;
}

.sub-title {
    color: #6c757d;
    font-size: 13px;
    margin: 0;
}

.form-group {
    margin-bottom: 18px;
}

label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    color: #444;
    font-size: 13px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ced4da;
    border-radius: 10px;
    font-size: 15px;
    background: #f8f9fa;
    transition: all 0.2s;
}

    input[type="text"]:focus,
    input[type="password"]:focus {
        border-color: #084688;
        background: #fff;
        outline: none;
        box-shadow: 0 0 0 3px rgba(8, 70, 136, 0.12);
    }

/* Xử lý khung chứa mật khẩu và icon ẩn/hiện chuẩn xác không bị lệch */
.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

    .password-container input {
        padding-right: 42px;
    }

.toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
    padding: 4px;
}

/* Checkbox ghi nhớ */
.form-remember {
    display: flex;
    align-items: center;
    margin-bottom: 22px;
}

    .form-remember input[type="checkbox"] {
        margin-right: 8px;
        cursor: pointer;
        width: 18px;
        height: 18px;
        accent-color: #084688;
    }

    .form-remember label {
        margin-bottom: 0;
        font-weight: 400;
        font-size: 14px;
        color: #495057;
        cursor: pointer;
        user-select: none;
    }

/* Nút đăng nhập */
.login-btn {
    width: 100%;
    background-color: #084688;
    color: white;
    padding: 12px;
    border: none;
    font-size: 16px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-shadow: 0 4px 12px rgba(8, 70, 136, 0.25);
}

    .login-btn:active {
        transform: scale(0.98);
    }

    .login-btn:hover {
        background-color: #063568;
    }

.footer-text {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #adb5bd;
}

/* Tối ưu riêng cho màn hình cực nhỏ (iPhone SE, các dòng máy hẹp) */
@media (max-width: 380px) {
    .login-wrapper {
        padding: 24px 16px;
    }
}
