:root {
    --blue: #005baa;
    --blue2: #0072bc;
    --orange: #f58220;
    --ink: #16324a;
    --muted: #60758a;
    --line: #dbe5ee;
    --bg: #f2f7fb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(145deg, #edf6fc, #f8fbfd);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.topbar {
    height: 7px;
    background: linear-gradient(90deg, var(--blue), var(--blue2), var(--orange));
}

.wrap {
    width: min(860px, calc(100% - 28px));
    margin: 28px auto 48px;
}

.card {
    background: #fff;
    border: 1px solid #e3ebf2;
    border-radius: 18px;
    box-shadow: 0 14px 38px rgba(14, 66, 108, 0.12);
    overflow: hidden;
}

.hero-wrap {
    overflow: hidden;
}

form {
    padding: 30px 34px 10px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
}

.req {
    color: #d83232;
}

input,
select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 13px;
    font-size: 15px;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: 0.2s;
    font-family: inherit;
}

input:focus,
select:focus {
    border-color: var(--blue2);
    box-shadow: 0 0 0 3px rgba(0, 114, 188, 0.12);
}

.upload {
    border: 1.5px dashed #aac3d7;
    border-radius: 12px;
    padding: 16px;
    background: #f9fcfe;
}

.upload input {
    border: 0;
    padding: 5px 0;
    min-height: auto;
    background: transparent;
}

.hint {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 7px;
}

.preview {
    display: none;
    margin-top: 12px;
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 8px;
    background: #edf2f6;
}

.consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 15px;
    border-radius: 10px;
    background: #f4f8fb;
    font-size: 13px;
    line-height: 1.5;
}

.consent input {
    width: 18px;
    min-height: 18px;
    margin-top: 1px;
    accent-color: var(--blue);
}

.consent label {
    margin-bottom: 0;
    font-weight: 400;
}

button {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(90deg, var(--blue), var(--blue2));
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 91, 170, 0.2);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button:hover {
    filter: brightness(1.04);
}

button:disabled {
    opacity: 0.65;
    cursor: wait;
}

.status {
    margin: 20px 34px 0;
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.status.ok {
    background: #eaf8ef;
    color: #156b36;
    border: 1px solid #bfe7cd;
}

.status.error {
    background: #fff0f0;
    color: #a52626;
    border: 1px solid #f0c3c3;
}

.spinner {
    display: none;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

button.loading .spinner {
    display: inline-block;
}

.contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 28px;
    align-items: center;
    margin: 0 34px 30px;
    padding: 24px 26px;
    border: 1px solid #d9e6ef;
    border-top: 4px solid var(--blue);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 9px 25px rgba(13, 67, 105, 0.09);
}

.contact-title {
    margin: 0 0 18px;
    color: var(--blue);
    font-size: 17px;
    font-weight: 700;
}

.contact-name {
    margin: 0 0 16px;
    color: var(--ink);
    font-size: 22px;
    font-weight: 700;
}

.contact-row {
    margin-top: 10px;
    padding: 10px 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    border-radius: 9px;
    background: #f4f8fb;
}

.contact-row strong {
    display: block;
    margin-bottom: 2px;
    color: #526b7e;
    font-size: 13px;
    font-weight: 600;
}

.contact a {
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.contact a:hover {
    text-decoration: underline;
}

.zalo-card {
    text-align: center;
}

.qr-crop {
    position: relative;
    width: 210px;
    height: 210px;
    margin: 0 auto;
    overflow: hidden;
    border: 8px solid #fff;
    outline: 1px solid #d4e1ea;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(13, 67, 105, 0.13);
}

.zalo-qr {
    position: absolute;
    width: 360px;
    max-width: none;
    height: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -62%);
}

.zalo-note {
    margin: 12px 0 0;
    color: var(--blue);
    font-size: 13px;
    font-weight: 600;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 650px) {
    .wrap {
        width: calc(100% - 16px);
        margin: 8px auto 28px;
    }

    .card {
        border-radius: 12px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .field.full {
        grid-column: auto;
    }

    form {
        padding: 24px 20px 10px;
    }

    .status {
        margin: 16px 20px 0;
    }

    .contact {
        grid-template-columns: 1fr;
        gap: 22px;
        margin: 0 20px 24px;
        padding: 22px 18px;
        text-align: left;
    }

    .contact-title,
    .contact-name {
        text-align: center;
    }

    .qr-crop {
        width: 230px;
        height: 230px;
    }

    .zalo-qr {
        width: 390px;
    }
}
