:root {
    --primary: #1769e0;
    --primary-dark: #0c47b7;
    --primary-soft: #eef5ff;
    --text: #0f2345;
    --muted: #65758b;
    --border: #d8e1ec;
    --danger: #e53935;
    --success: #1eaa72;
    --surface: #ffffff;
    --page: #f7faff;
    --shadow: 0 18px 55px rgba(25, 72, 125, .12);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #fbfdff 0%, #f3f8ff 100%);
}

.register-topbar {
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4.5vw;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid #e7eef7;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-lockup img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.brand-lockup strong {
    display: block;
    font-size: 24px;
    letter-spacing: .3px;
}

.brand-lockup span {
    display: block;
    margin-top: -2px;
    font-size: 10px;
    letter-spacing: 1.1px;
    color: var(--muted);
}

.top-login {
    color: var(--muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-login i {
    font-size: 16px;
    color: var(--primary);
}

.top-login a {
    margin-left: 4px;
    color: var(--primary);
    text-decoration: none;
}

.register-page {
    min-height: calc(100vh - 74px);
    padding: 34px 4.5vw 24px;
}

.register-shell {
    width: 100%;
    max-width: 1420px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(330px, 39%) minmax(0, 61%);
    gap: 38px;
    align-items: stretch;
}

.register-intro {
    position: relative;
    min-height: 720px;
    padding: 46px 26px 30px 6px;
    overflow: hidden;
}

.register-intro h1 {
    margin: 0;
    font-size: clamp(36px, 3vw, 54px);
    line-height: 1.08;
    letter-spacing: -1.5px;
}

.register-intro h1 .accent {
    display: block;
    margin-top: 8px;
    color: var(--primary);
}

.register-intro .lead {
    margin: 20px 0 28px;
    max-width: 480px;
    color: #51627c;
    font-size: 16px;
    line-height: 1.65;
}

.intro-illustration {
    position: relative;
    height: 250px;
    margin: 20px 0 30px;
    border-radius: 24px;
    background: linear-gradient(135deg, #f4f8ff 0%, #ebf3ff 100%);
    border: 1px solid #e1ecfa;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 6px rgba(255, 255, 255, .8);
}

.intro-mockup-ui {
    width: 88%;
    max-width: 380px;
    height: 155px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(23, 105, 224, .14);
    border: 1px solid #e2edf8;
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.mockup-header {
    height: 32px;
    background: #17387a;
    border-top-left-radius: 13px;
    border-top-right-radius: 13px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 6px;
}

.mockup-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5c82db;
}

.mockup-body {
    flex: 1;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.mockup-lines {
    flex: 1;
    display: grid;
    gap: 10px;
    margin-right: 25px;
}

.mockup-line {
    height: 8px;
    background: #e4edf8;
    border-radius: 4px;
    width: 100%;
}

.mockup-line.short {
    width: 55%;
}

.mockup-shield {
    position: absolute;
    right: 22px;
    bottom: 18px;
    width: 52px;
    height: 62px;
    background: linear-gradient(145deg, #2575fc, #1a4fdc);
    border-radius: 0 0 26px 26px;
    display: grid;
    place-items: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 10px 22px rgba(23, 105, 224, .35);
    border-top: 3px solid rgba(255, 255, 255, .2);
}

.benefits {
    display: grid;
    gap: 20px;
}

.benefit {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
    align-items: start;
}

.benefit-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: white;
    border: 1px solid #e3ebf6;
    box-shadow: 0 6px 18px rgba(31, 71, 116, .08);
    color: var(--primary);
    font-size: 18px;
}

.benefit strong {
    display: block;
    margin: 2px 0 3px;
    font-size: 15px;
    color: #0f2345;
}

.benefit p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.register-panel {
    padding: 34px 36px 28px;
    background: var(--surface);
    border: 1px solid #e3eaf3;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.panel-header .header-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 18px;
}

.panel-header h2 {
    margin: 0;
    font-size: 24px;
}

.panel-line {
    flex: 1;
    height: 1px;
    background: #e5ebf4;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 22px;
}

.form-group {
    margin-bottom: 18px;
}

/* Tiêu đề form thanh mảnh, không bị dày đậm */
.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 13.5px;
}

.required {
    color: var(--danger);
    margin-left: 3px;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
    pointer-events: none;
    width: 20px;
    text-align: center;
}

/* Nút con mắt hiển thị mật khẩu trong suốt, gọn gàng */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 16px;
    outline: none;
    z-index: 5;
}

.password-toggle:hover {
    color: var(--primary);
}

.form-control {
    width: 100%;
    height: 52px;
    padding: 10px 14px 10px 44px;
    color: var(--text);
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus {
    border-color: #69a5f6;
    box-shadow: 0 0 0 3px rgba(23, 105, 224, .10);
    outline: none;
}

select.form-control {
    cursor: pointer;
}

.text-danger {
    display: block;
    margin-top: 5px;
    color: var(--danger);
    font-size: 11.5px;
}

.btn-register {
    width: 100%;
    height: 52px;
    margin-top: 4px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    background: linear-gradient(90deg, #2a84f5, #163fd7);
    box-shadow: 0 10px 22px rgba(26, 85, 217, .20);
    transition: transform .15s ease, box-shadow .15s ease;
}

.btn-register:hover,
.btn-register:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 13px 28px rgba(26, 85, 217, .26);
    outline: none;
}

.form-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0 12px;
    color: #8390a3;
    font-size: 12px;
}

.form-divider:before,
.form-divider:after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e3e9f1;
}

.account-links {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: var(--muted);
    font-size: 13px;
}

.account-links a {
    color: var(--primary);
    text-decoration: none;
}

.privacy-note {
    margin-top: 18px;
    padding: 13px 16px;
    border: 1px solid #bfe8d8;
    border-radius: 10px;
    background: #effbf6;
    color: #2e6953;
    font-size: 12.5px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.privacy-note i {
    color: #1eaa72;
    font-size: 16px;
    flex-shrink: 0;
}

.register-footer {
    margin-top: 18px;
    text-align: center;
    color: #7d8ba0;
    font-size: 12px;
}

.popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 35, 69, .55);
    backdrop-filter: blur(3px);
}

.popup-content {
    width: calc(100% - 32px);
    max-width: 520px;
    padding: 26px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 55px rgba(0, 0, 0, .22);
}

.popup-content .close {
    float: right;
    opacity: 1;
    color: #7c899b;
    font-size: 26px;
    text-shadow: none;
}

#registerError {
    margin: 22px 0 0;
    border: 1px solid #f1c5c5;
    border-radius: 10px;
    background: #fff4f4;
    color: #a63333;
}

.ml-about-link-wrap {
    margin-top: 16px;
    text-align: center;
}

.ml-about-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary, #1769e0);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    /* Xóa triệt để gạch chân */
    transition: opacity 0.2s ease;
}

.ml-about-link:hover,
.ml-about-link:focus {
    text-decoration: none !important;
    /* Không gạch chân khi rê chuột */
    opacity: 0.85;
}

@media (max-width: 980px) {
    .register-shell {
        grid-template-columns: 1fr;
        max-width: 720px;
    }

    .register-intro {
        min-height: auto;
        padding: 10px 6px;
    }

    .intro-illustration,
    .benefits {
        display: none;
    }

    .register-intro .lead {
        margin-bottom: 0;
    }
}

@media (max-width: 640px) {
    .register-topbar {
        height: 64px;
        padding: 0 18px;
    }

    .brand-lockup strong {
        font-size: 20px;
    }

    .top-login span {
        display: none;
    }

    .register-page {
        padding: 18px 12px;
    }

    .register-intro h1 {
        font-size: 34px;
    }

    .register-panel {
        padding: 24px 18px;
        border-radius: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .account-links {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}