:root {
    --register-bg: radial-gradient(circle at 18% -8%, rgba(115, 155, 255, 0.35), transparent 55%),
        radial-gradient(circle at 86% 10%, rgba(26, 209, 185, 0.32), transparent 50%),
        linear-gradient(165deg, rgba(6, 14, 45, 0.98), rgba(2, 7, 24, 0.98));
    --register-card-bg: linear-gradient(155deg, rgba(14, 26, 64, 0.96), rgba(8, 20, 52, 0.94));
    --register-section-bg: linear-gradient(145deg, rgba(18, 36, 86, 0.65), rgba(9, 22, 60, 0.68));
    --register-border: rgba(115, 168, 255, 0.38);
    --register-shadow: 0 32px 64px rgba(4, 11, 32, 0.55);
    --register-shadow-soft: 0 18px 36px rgba(3, 8, 26, 0.4);
    --auth-label-color: rgba(214, 228, 255, 0.88);
}

.register-body,
.confirm-body {
    --auth-bg: var(--register-bg), #030a21;
    --auth-glow-primary: radial-gradient(circle at 14% 84%, rgba(40, 110, 255, 0.22), transparent 58%);
    --auth-glow-secondary: radial-gradient(circle at 88% 82%, rgba(31, 196, 169, 0.18), transparent 62%);
    --auth-badge-shadow: var(--register-shadow-soft);
}

.register-shell,
.confirm-shell {
    --auth-shell-max: 1120px;
    --auth-shell-margin: clamp(40px, 6vw, 72px);
}

.register-hero,
.confirm-hero {
    --auth-hero-span: 5;
    --auth-hero-align: start;
    --auth-hero-gap: clamp(16px, 2.8vw, 28px);
}

.register-title,
.confirm-title {
    --auth-title-size: clamp(2rem, 4.2vw, 3rem);
    --auth-title-line: 1.3;
}

.register-copy,
.confirm-copy {
    --auth-copy-color: rgba(215, 227, 255, 0.78);
}

.register-points,
.confirm-points {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: rgba(210, 226, 255, 0.82);
}

.register-points li,
.confirm-points li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.register-card,
.confirm-card {
    --auth-card-span: 7;
    --auth-card-padding: clamp(28px, 4.5vw, 42px);
    --auth-card-radius: 30px;
    --auth-card-bg: var(--register-card-bg);
    --auth-card-border: var(--register-border);
    --auth-card-shadow: var(--register-shadow);
    --auth-card-gap: clamp(22px, 4vw, 28px);
    --form-control-radius: 14px;
    --form-control-border: rgba(146, 188, 255, 0.35);
    --form-control-bg: rgba(8, 18, 52, 0.7);
    --form-control-color: #f4f8ff;
    --form-control-placeholder: rgba(186, 206, 255, 0.55);
    --form-control-focus-border: rgba(176, 220, 255, 0.72);
    --form-control-focus-bg: rgba(10, 22, 58, 0.78);
    --form-control-focus-color: #f4f8ff;
    --form-control-focus-shadow: 0 0 0 4px rgba(86, 146, 255, 0.25);
    --form-field-gap: 6px;
    --form-section-padding: clamp(18px, 3.5vw, 26px);
    --form-section-radius: 22px;
    --form-section-bg: var(--register-section-bg);
    --form-section-border: 1px solid rgba(145, 192, 255, 0.32);
    --form-section-shadow: inset 0 0 0 1px rgba(132, 180, 255, 0.12);
    --form-section-gap: clamp(16px, 3vw, 22px);
    --form-section-title-size: clamp(1.1rem, 2.4vw, 1.45rem);
    --form-grid-gap: clamp(14px, 2.8vw, 22px);
    --zip-input-gap: 16px;
    --zip-input-input-basis: 140px;
    --zip-input-input-align: left;
    --zip-input-span-min-width: 14px;
    --zip-input-span-color: rgba(214, 228, 255, 0.76);
    --zip-input-button-padding: 10px 20px;
    --zip-input-button-font-size: 0.9rem;
}

.register-card__title,
.confirm-card__title {
    --auth-card-title-size: clamp(1.4rem, 3vw, 2rem);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 800;
    color: rgba(147, 199, 255, 0.9);
    text-decoration: none;
    width: fit-content;
    transition: color 0.2s ease, transform 0.2s ease;
}

.back-link::before {
    content: "←";
}

.back-link:hover,
.back-link:focus-visible {
    color: rgba(26, 209, 185, 0.95);
    transform: translateX(-2px);
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: clamp(22px, 4vw, 30px);
}

.form-section__description {
    margin: 0;
    color: rgba(204, 219, 255, 0.72);
    font-size: 0.9rem;
    line-height: 1.6;
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    top: 35%;
    width: 80px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(160, 204, 255, 0.28);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(225, 235, 255, 0.88);
    font-size: 0.75rem;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.12);
}

.inline-error {
    margin: -6px 0 0;
    font-size: 0.82rem;
    color: #ff96a6;
    display: none;
}

.inline-error[aria-hidden="false"] {
    display: block;
}

.form-field select {
    height: 48px;
}

.gender-group {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
}

.gender-group input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gender-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45%;
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(62, 100, 205, 0.4);
    border: 1px solid rgba(143, 188, 255, 0.35);
    color: rgba(220, 230, 255, 0.9);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.gender-group input:checked + .gender-pill {
    background: rgba(255, 224, 88, 0.9);
    color: rgba(32, 32, 42, 0.95);
    border-color: rgba(255, 224, 88, 0.9);
    transform: translateY(-1px);
}

.custom-select {
    position: relative;
}

.custom-select select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 42px;
}

.custom-select::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 16px;
    width: 12px;
    height: 12px;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0.6;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23d2e0ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

.child-section {
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 3vw, 22px);
}

.child-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.child-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: rgba(224, 236, 255, 0.92);
}

.add-child-btn,
.remove-child-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 18px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.add-child-btn.primary {
    background: linear-gradient(135deg, rgba(116, 176, 255, 0.95), rgba(61, 112, 255, 0.88));
    color: #050c23;
    box-shadow: 0 16px 32px rgba(44, 112, 255, 0.35);
}

.add-child-btn.primary:hover,
.add-child-btn.primary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 20px 34px rgba(44, 112, 255, 0.45);
}

.remove-child-btn {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(225, 235, 255, 0.86);
    border: 1px solid rgba(180, 208, 255, 0.3);
    margin-top: 0px;
}

.register-card .btn-ghost,
.confirm-card .btn-ghost {
    width: auto;
    margin-top: 0;
}

.remove-child-btn:hover,
.remove-child-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 28px rgba(6, 18, 52, 0.35);
}

.remove-child-btn {
    width: 150px;
    padding: 6px 12px;
    font-size: 0.85rem;
    background: rgba(255, 112, 134, 0.16);
    border-color: rgba(255, 112, 134, 0.42);
    color: rgba(255, 210, 220, 0.92);
}

.add-child-btn {
    width: fit-content;
    align-self: flex-start;
    margin-top: 6px;
}

.children-wrapper {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 3vw, 22px);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 8px;
}

.info-card {
    grid-column: 1 / -1;
    padding: clamp(22px, 4vw, 32px);
    border-radius: 26px;
    background: rgba(10, 26, 62, 0.72);
    border: 1px solid rgba(120, 170, 255, 0.28);
    box-shadow: var(--register-shadow-soft);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: clamp(18px, 3vw, 28px);
}

.info-card__section > h3 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    color: rgba(214, 228, 255, 0.92);
}

.info-card__section p {
    margin: 0;
    color: rgba(198, 214, 255, 0.78);
    line-height: 1.7;
    font-size: 0.92rem;
}

.info-card__section a {
    color: rgba(147, 199, 255, 0.92);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.info-card__section a:hover,
.info-card__section a:focus-visible {
    color: rgba(26, 209, 185, 0.95);
}

.confirmation-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.confirmation-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(20, 42, 96, 0.58);
    border: 1px solid rgba(136, 182, 255, 0.25);
}

.confirmation-label {
    font-weight: 600;
    color: rgba(255, 210, 112, 0.92);
    min-width: 120px;
}

.confirmation-value {
    flex: 1;
    color: rgba(230, 236, 255, 0.95);
}

.children-confirmation {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 3vw, 22px);
}

.child-confirm-card {
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(12, 28, 70, 0.68);
    border: 1px solid rgba(138, 188, 255, 0.28);
    display: flex;
    flex-direction: column;
    gap: 10px;
}



.confirm-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
}

.confirm-actions > .btn,
.confirm-actions > form {
    display: flex;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
}

.confirm-actions > .btn {
    justify-content: center;
}

.confirm-actions > form {
    margin: 0;
}

.confirm-actions > form button {
    flex: 1 1 auto;
}

.contact-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-relation,
.contact-phone {
    width: 100%;
}

.relationship-select {
    width: 100%;
}

.phone-input-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

.phone-input-group .contact-phone-input {
    min-width: 110px;
    max-width: 160px;
    width: auto;
    text-align: center;
    flex: 1 1 0;
}

.phone-input-group span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14px;
    color: rgba(214, 228, 255, 0.78);
}

.child-birth-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.child-birth-row {
    display: flex;
    gap: 10px;
}

.child-birth-row .custom-select {
    flex: 1 1 0;
}

.child-gender-field {
    margin-top: -4px;
}

.child-school-other-field {
    display: none;
}

.child-school-other-field.is-visible {
    display: block;
    margin-top: 4px;
}

@media (max-width: 1024px) {
    .register-shell,
    .confirm-shell {
        grid-template-columns: repeat(6, 1fr);
    }

    .register-hero,
    .confirm-hero {
        grid-column: 1 / -1;
        text-align: center;
        align-items: center;
    }

    .register-card,
    .confirm-card {
        grid-column: 1 / -1;
    }

    .info-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .register-shell,
    .confirm-shell {
        margin: clamp(28px, 8vw, 48px) auto;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .zip-input {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .zip-input button {
        display: none;
    }

    .contact-row {
        gap: 12px;
    }

    .phone-input-group {
        gap: 8px;
    }

    .phone-input-group .contact-phone-input {
        flex: 1 1 0;
        min-width: 0;
    }

    .child-birth-row {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .add-child-btn,
    .form-actions {
        width: 100%;
    }

    .confirm-actions {
        width: 100%;
        gap: 12px;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
    }

    .confirm-actions > .btn,
    .confirm-actions > form {
        flex: 1 1 48%;
        display: flex;
    }

    .confirm-actions > .btn {
        justify-content: center;
    }

    .confirm-actions > form button {
        flex: 1 1 auto;
    }

    .form-actions {
        justify-content: center;
    }

    .btn,
    .add-child-btn {
        width: 100%;
    }

    .remove-child-btn {
        width: auto;
        align-self: flex-end;
    }

    .form-grid.form-grid--pair {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 12px;
    }

    .form-grid.form-grid--pair .form-field {
        min-width: 0;
    }

    .zip-input input {
        flex: 0 0 100px;
        max-width: 100px;
    }
}
