*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Be Vietnam Pro', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: #1a1f36;
    background: #f4f1ff;
    min-height: 100vh;
}

.page {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 16px;
}

/* ------------- Hero / header ------------- */
.hero {
    background: #fff;
    border-radius: 18px;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 8px 24px rgba(59, 91, 219, 0.08);
}

.hero__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.logo-img {
    height: 56px;
    width: auto;
    display: block;
}

.hero__title {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    position: relative;
}

.hero__icon-calendar,
.hero__icon-clock {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.hero__icon-calendar svg,
.hero__icon-clock svg {
    width: 100%;
    height: 100%;
}

.hero h1 {
    margin: 0;
    text-align: center;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.title-line1 {
    display: block;
    font-size: clamp(22px, 3.4vw, 38px);
    color: #1a3aa3;
}

.title-line2 {
    display: block;
    font-size: clamp(22px, 3.4vw, 38px);
    color: #1a3aa3;
}

.title-line2 .orange {
    color: #ff7a00;
}

/* ------------- Main content ------------- */
.content {
    margin-top: 22px;
    background: linear-gradient(135deg, #4b3ad6 0%, #6f3fd7 60%, #7a3fce 100%) center/cover no-repeat;
    background-image: url('https://static.edupiaclass.vn/images/home/banner-th-1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 22px;
    padding: 48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
    position: relative;
    overflow: hidden;
    min-height: 520px;
}

/* ------------- Form card ------------- */
.form-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    padding: 36px 32px;
    box-shadow: 0 18px 40px rgba(20, 8, 80, 0.25);
    position: relative;
    z-index: 2;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-weight: 700;
    font-size: 15px;
    color: #1a1f36;
    margin-bottom: 8px;
}

.required {
    color: #ff3b30;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.input-icon svg {
    width: 100%;
    height: 100%;
}

.input-wrap input {
    width: 100%;
    border: 1.5px solid #e1e3ed;
    background: #f6f7fb;
    border-radius: 12px;
    padding: 14px 14px 14px 44px;
    font-size: 15px;
    font-family: inherit;
    color: #1a1f36;
    outline: none;
    transition: border-color .15s, background .15s, box-shadow .15s;
}

.input-wrap input::placeholder {
    color: #9aa3b2;
}

.input-wrap input:focus {
    border-color: #4b3ad6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(75, 58, 214, 0.12);
}

.input-wrap.invalid input {
    border-color: #ff3b30;
    background: #fff5f5;
}

.hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: #6b7280;
}

.hint.error {
    color: #ff3b30;
}

/* ------------- Submit button ------------- */
.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    border: none;
    cursor: pointer;
    padding: 16px 20px;
    border-radius: 12px;
    margin-top: 10px;
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.6px;
    background: linear-gradient(90deg, #4b3ad6 0%, #ff5e3a 100%);
    box-shadow: 0 10px 24px rgba(255, 94, 58, 0.3);
    transition: transform .15s, box-shadow .15s, opacity .15s;
    font-family: inherit;
}

.submit-btn svg {
    width: 22px;
    height: 22px;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(255, 94, 58, 0.36);
}

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

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ------------- Privacy ------------- */
.privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 18px 0 0;
    font-size: 13px;
    color: #6b7280;
}

.privacy svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ------------- Visual / right side ------------- */
.visual {
    position: relative;
    height: 100%;
    min-height: 480px;
}

/* ------------- Toast ------------- */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1f36;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    z-index: 100;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: #16a34a;
}

.toast.error {
    background: #dc2626;
}

/* ------------- Success modal ------------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal[hidden] {
    display: none;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 8, 80, 0.55);
    backdrop-filter: blur(2px);
    animation: modalFadeIn .25s ease;
}

.modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 40px 32px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 60px rgba(20, 8, 80, 0.35);
    animation: modalPop .35s cubic-bezier(.2, 1.2, .3, 1);
}

.modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f4f1ff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.modal__close:hover {
    background: #e7e1ff;
}

.modal__close svg {
    width: 18px;
    height: 18px;
}

.modal__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    animation: iconPop .5s cubic-bezier(.2, 1.4, .3, 1);
}

.modal__icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 16px rgba(22, 163, 74, 0.35));
}

.modal__title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 800;
    color: #1a1f36;
}

.modal__desc {
    margin: 0 0 24px;
    font-size: 15px;
    color: #6b7280;
    line-height: 1.5;
}

.modal__btn {
    border: none;
    cursor: pointer;
    padding: 12px 32px;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    background: linear-gradient(90deg, #4b3ad6 0%, #ff5e3a 100%);
    box-shadow: 0 8px 18px rgba(255, 94, 58, 0.3);
    transition: transform .15s, box-shadow .15s;
    font-family: inherit;
}

.modal__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(255, 94, 58, 0.36);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalPop {
    from { opacity: 0; transform: translateY(20px) scale(.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes iconPop {
    0% { transform: scale(0); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* ------------- Responsive ------------- */

/* Tablet ngang (≤1100px): rút gọn padding, gap */
@media (max-width: 1100px) {
    .content {
        padding: 36px;
        gap: 24px;
        min-height: 460px;
    }

    .form-card {
        padding: 30px 26px;
    }
}

/* Tablet (≤900px): chuyển 1 cột, banner hiển thị phía trên */
@media (max-width: 900px) {
    .page {
        margin: 16px auto;
    }

    .content {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 0;
        background-image: none;
        background: linear-gradient(135deg, #4b3ad6 0%, #6f3fd7 60%, #7a3fce 100%);
        min-height: auto;
    }

    .visual {
        order: -1;
        min-height: 0;
        height: auto;
        aspect-ratio: 16 / 9;
        background-image: url('https://static.edupiaclass.vn/images/home/banner-th-1.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    .form-card {
        margin: 24px;
        padding: 28px 24px;
    }

    .hero {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 18px;
    }

    .hero__title {
        flex-direction: row;
        gap: 16px;
    }

    .hero__icon-calendar,
    .hero__icon-clock {
        width: 56px;
        height: 56px;
    }
}

/* Mobile (≤640px) */
@media (max-width: 640px) {
    .page {
        padding: 0 12px;
    }

    .hero {
        padding: 14px 16px;
        border-radius: 14px;
    }

    .logo-img {
        height: 44px;
    }

    .hero__icon-calendar,
    .hero__icon-clock {
        width: 44px;
        height: 44px;
    }

    .hero__title {
        gap: 10px;
    }

    .visual {
        aspect-ratio: 4 / 3;
    }

    .form-card {
        margin: 18px;
        padding: 24px 18px;
        border-radius: 14px;
    }

    .field {
        margin-bottom: 14px;
    }

    .field label {
        font-size: 14px;
    }

    .input-wrap input {
        padding: 12px 12px 12px 40px;
        font-size: 14px;
    }

    .submit-btn {
        padding: 14px 16px;
        font-size: 15px;
    }

    .modal__dialog {
        padding: 32px 22px 24px;
    }

    .modal__icon {
        width: 64px;
        height: 64px;
    }

    .modal__title {
        font-size: 20px;
    }

    .modal__desc {
        font-size: 14px;
    }
}

/* Small mobile (≤420px) */
@media (max-width: 420px) {
    .title-line1,
    .title-line2 {
        font-size: 18px;
    }

    .hero__icon-calendar,
    .hero__icon-clock {
        width: 36px;
        height: 36px;
    }

    .hero__title {
        gap: 8px;
    }

    .privacy {
        font-size: 12px;
    }
}

/* Very small (≤360px): xếp dọc nội dung hero */
@media (max-width: 360px) {
    .hero__title {
        flex-direction: column;
        gap: 8px;
    }
}
