.form-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--blue-deep);
    color: #fff;
}

.form-hero-layer {
    position: absolute;
    inset: -20% 0 -10%;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
    background:
        radial-gradient(ellipse 80% 50% at 75% 18%, rgba(255, 196, 120, 0.38), transparent 55%),
        radial-gradient(circle at 14% 82%, rgba(212, 160, 23, 0.18), transparent 28%),
        linear-gradient(165deg, #0c2852 0%, #0a3268 52%, #061f42 100%);
    animation: form-glow 8s ease-in-out infinite alternate;
}

.form-hero-snow {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.form-hero-baubles {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.form-hero-baubles .bauble {
    width: 58px;
}

.form-hero-baubles .bauble--1 { left: 6%; }
.form-hero-baubles .bauble--4 { right: 8%; left: auto; }

@keyframes form-glow {
    from { opacity: 0.9; transform: scale(1); }
    to { opacity: 1; transform: scale(1.03); }
}

.form-hero-inner {
    position: relative;
    z-index: 3;
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
    padding: 56px 0 42px;
    animation: rise-in 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.form-hero h1 {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 3.4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.form-hero .lead {
    max-width: 38rem;
    font-size: 1.02rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.45;
    color: rgba(236, 244, 255, 0.9);
}

.form-page main {
    width: min(820px, calc(100% - 32px));
    margin: 0 auto;
    padding: 8px 0 64px;
}

.stepper {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 640px;
    margin: 28px auto 32px;
    position: relative;
}

.stepper::before {
    content: "";
    position: absolute;
    top: 17px;
    left: 16.66%;
    right: 16.66%;
    height: 2px;
    background: #c5cad3;
    z-index: 0;
}

.stepper li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.stepper li + li::before {
    content: "";
    position: absolute;
    top: 17px;
    right: 50%;
    width: 100%;
    height: 2px;
    background: transparent;
    z-index: 0;
}

.stepper button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #d7dce3;
    background: #fff;
    color: #98a2b3;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.stepper span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #98a2b3;
}

.stepper li.is-active button,
.stepper li.is-done button {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.stepper li.is-active span,
.stepper li.is-done span {
    color: var(--blue);
}

.stepper li.is-active::before,
.stepper li.is-done::before {
    background: var(--blue);
    z-index: 0;
}

.card {
    background: #fff;
    border: 1px solid #e7ebf0;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.04);
    padding: 32px 32px 28px;
}

.card h1 {
    font-size: 1.35rem;
    color: var(--blue);
    letter-spacing: -0.02em;
    margin-bottom: 22px;
}

.step {
    display: none;
}

.step.is-active {
    display: block;
}

.field {
    margin-bottom: 18px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field label,
.choice-label {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1f2937;
}

.req {
    color: #d92d20;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="date"],
.field select,
.field textarea {
    width: 100%;
    border: 1px solid #d9dee7;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 0.98rem;
    padding: 11px 12px;
    outline: none;
}

.field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235f6772' d='M1.1 1.2 6 6.1l4.9-4.9 1.1 1.1L6 8.2.1 2.3z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.field textarea {
    min-height: 120px;
    resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #9aa3af;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(10, 50, 104, 0.14);
}

.field input.is-invalid,
.field select.is-invalid,
.field textarea.is-invalid {
    border-color: #d92d20;
}

.help {
    display: block;
    margin-top: 6px;
    color: #98a2b3;
    font-size: 0.85rem;
}

.help a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: underline;
}

.counter {
    margin-top: 6px;
    text-align: right;
    color: #98a2b3;
    font-size: 0.82rem;
}

.counter.warning {
    color: #d92d20;
}

.choice {
    display: flex;
    gap: 10px;
}

.choice label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #d9dee7;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.choice input {
    accent-color: var(--blue);
}

.food-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
}

.food-list label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #d9dee7;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.food-list input {
    accent-color: var(--blue);
    margin-top: 3px;
    flex-shrink: 0;
}

.food-list .food-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.food-list .food-text strong {
    font-weight: 600;
    line-height: 1.3;
}

.food-list .food-text small {
    font-weight: 400;
    color: #667085;
    font-size: 0.82rem;
    line-height: 1.4;
}

.food-error {
    display: none;
    margin-top: 8px;
    color: #d92d20;
    font-size: 0.85rem;
}

#alimentos_group.is-invalid .food-error {
    display: block;
}

.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.field .file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    min-height: 168px;
    margin: 0;
    padding: 24px 16px;
    border: 1.5px dashed #d5dbe3;
    border-radius: 12px;
    text-align: center;
    font-weight: 400;
    color: #667085;
    cursor: pointer;
    background: #fff;
}

.field .file-upload-label strong,
.field .file-upload-label span,
.field .file-upload-label small {
    display: block;
    width: 100%;
    margin: 0;
    text-align: center;
}

.field .file-upload-label strong {
    color: #344054;
    font-size: 0.98rem;
    font-weight: 700;
}

.field .file-upload-label small,
.field .file-upload-label span {
    font-size: 0.86rem;
    font-weight: 400;
    color: #98a2b3;
}

.file-upload.dragover .file-upload-label,
.file-upload-label:hover {
    border-color: var(--blue);
    background: #f8fbff;
}

.drop-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 6px;
    color: #98a2b3;
}

.selected-files-list:not(:empty) {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.selected-file-item,
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #f8fafc;
}

.file-info,
.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-name {
    font-size: 0.92rem;
    color: #1f2937;
    word-break: break-all;
}

.file-size {
    font-size: 0.8rem;
    color: #98a2b3;
}

.remove-file,
.remove-file-btn {
    border: 0;
    background: transparent;
    color: #667085;
    cursor: pointer;
    font-size: 1rem;
}

.accept-rules label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-weight: 600;
    line-height: 1.4;
}

.accept-rules input {
    margin-top: 3px;
    accent-color: var(--blue);
}

.accept-rules a {
    color: var(--blue);
    text-decoration: underline;
}

.rules-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.45);
}

.rules-modal[hidden] {
    display: none;
}

.rules-dialog {
    width: min(560px, 100%);
    background: #fff;
    border-radius: 16px;
    padding: 28px 26px 22px;
}

.rules-dialog h2 {
    color: var(--blue);
    font-size: 1.3rem;
    margin-bottom: 14px;
}

.rules-dialog ul {
    display: grid;
    gap: 10px;
    padding-left: 1.15rem;
    color: #344054;
    margin-bottom: 20px;
}

.rules-dialog li {
    line-height: 1.45;
}

.rules-dialog .btn-next {
    width: 100%;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.btn-next,
.btn-back {
    border-radius: 8px;
    padding: 11px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.btn-next {
    background: var(--blue);
    color: #fff;
    border: 1px solid var(--blue);
}

.btn-next:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-back {
    background: #fff;
    color: #344054;
    border: 1px solid #d9dee7;
}

.banner-message {
    display: none;
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
}

#error-message {
    background: #fef3f2;
    color: #b42318;
    border: 1px solid #fecdca;
}

#success-message {
    background: #ecfdf3;
    color: #067647;
    border: 1px solid #abefc6;
}

#loadingOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 40;
}

#loader {
    display: none;
    position: fixed;
    z-index: 41;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

#loader .box {
    display: none;
}

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

.success-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: grid;
    place-items: center;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.success-modal-overlay.show {
    opacity: 1;
}

.success-modal {
    width: min(440px, calc(100% - 32px));
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
}

.success-modal h2 {
    margin: 12px 0 8px;
    color: var(--blue);
}

.success-modal p {
    color: #667085;
    margin-bottom: 8px;
}

.btn-primary {
    margin-top: 12px;
    border: 0;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font: inherit;
    font-weight: 700;
    padding: 11px 16px;
    cursor: pointer;
}

@media (max-width: 700px) {
    .card {
        padding: 22px 16px 18px;
    }

    .field-row,
    .choice,
    .food-list {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}
