/* Import font chữ hiện đại */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --error: #ef4444;
    --success: #10b981;
    --radius: 12px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.5;
}

/* Container chính */
.reg-card {
    display: flex;
    max-width: 900px;
    width: 100%;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    min-height: 600px;
}

/* Cột trái: Hình minh họa/Chào mừng */
.reg-illustration {
    flex: 1;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    position: relative;
    overflow: hidden;
}

/* Tạo hiệu ứng mờ ảo phía sau chữ */
.reg-illustration::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.reg-illustration h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    z-index: 1;
}

.reg-illustration p {
    font-size: 1.1rem;
    opacity: 0.9;
    z-index: 1;
}

/* Cột phải: Nội dung Form */
.reg-content {
    flex: 1.2;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.reg-inner {
    width: 100%;
    max-width: 360px;
}

.reg-header {
    margin-bottom: 32px;
}

.reg-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

/* Thiết kế Field */
.field {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.field label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.field input[type="text"],
.field input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    transition: all 0.2s ease;
    background-color: #fcfcfd;
}

.field input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* reCAPTCHA căn chỉnh */
.g-recaptcha {
    margin: 10px 0;
    transform: scale(0.9);
    transform-origin: 0 0;
}

/* Ghi nhớ đăng nhập */
.remember {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: var(--text-muted);
}

.remember input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Nút bấm Đăng nhập */
.btn {
    width: 100%;
    padding: 14px;
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn:active {
    transform: translateY(0);
}

/* Thông báo lỗi/thành công */
.msg {
    min-height: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    margin-top: 16px;
    padding: 10px;
    border-radius: 8px;
    display: none; /* Sẽ hiện khi có class error/success */
}

.msg:not(:empty) {
    display: block;
}

.msg.error {
    background-color: #fef2f2;
    color: var(--error);
    border: 1px solid #fee2e2;
}

.msg.success {
    background-color: #f0fdf4;
    color: var(--success);
    border: 1px solid #dcfce7;
}

/* Footer links */
.reg-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.reg-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.reg-footer a:hover {
    text-decoration: underline;
}

#forgotPassLink {
    display: inline-block;
    margin-top: 8px;
    color: var(--text-muted);
    font-weight: 400;
    font-size: 13px;
}

/* ===================================================
   PHẦN RESPONSIVE (DÀNH CHO ĐIỆN THOẠI)
   =================================================== */

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .reg-card {
        flex-direction: column; /* Xếp chồng cột */
        max-width: 450px;
        min-height: auto;
    }

    .reg-illustration {
        padding: 30px;
        text-align: center;
        align-items: center;
    }

    .reg-illustration h2 {
        font-size: 1.5rem;
    }

    .reg-illustration::before {
        display: none;
    }

    .reg-content {
        padding: 30px 20px;
    }
    
    .g-recaptcha {
        transform: scale(0.85); /* Thu nhỏ captcha trên mobile */
    }
}