:root {
    --blue-950: #021a3d;
    --blue-900: #05265b;
    --blue-800: #063878;
    --blue-700: #0a4ca1;
    --blue-100: #eaf1fb;
    --yellow: #ffc400;
    --white: #ffffff;
    --surface: #f5f7fb;
    --text: #122b55;
    --muted: #6c7687;
    --border: #dce3ed;
    --success: #137333;
    --danger: #a61b1b;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    color: var(--text);
    background: var(--surface);
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.registration-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(470px, .88fr) minmax(570px, 1.12fr);
}

.institutional-panel {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    color: var(--white);
    background:
        url("../../assets/hero-school.jpg")
        center / cover
        no-repeat;
}

.institutional-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            145deg,
            rgba(2, 26, 61, .98),
            rgba(5, 49, 109, .91) 56%,
            rgba(5, 49, 109, .58)
        );
}

.institutional-content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    padding: 52px clamp(40px, 5vw, 70px) 42px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    width: fit-content;
}

.brand img {
    width: min(380px, 74%);
    height: auto;
}

.institutional-message {
    max-width: 590px;
    margin: 64px 0 38px;
}

.yellow-line {
    display: block;
    width: 76px;
    height: 5px;
    margin-bottom: 22px;
    border-radius: 999px;
    background: var(--yellow);
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--yellow);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .15em;
}

.institutional-message h1 {
    margin: 0;
    font-size: clamp(3rem, 5vw, 5.25rem);
    line-height: 1;
    letter-spacing: -.055em;
}

.institutional-message h1 strong {
    display: block;
    margin-top: 10px;
    font-size: .69em;
}

.description {
    max-width: 510px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, .88);
    font-size: .96rem;
    line-height: 1.75;
}

.benefits {
    margin-top: 36px;
    padding-top: 26px;
    border-top: 1px solid rgba(255, 255, 255, .21);
    display: grid;
    gap: 17px;
}

.benefit {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.benefit > i {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    border: 1px solid rgba(255, 196, 0, .32);
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--yellow);
    background: rgba(255, 196, 0, .08);
}

.benefit div {
    display: grid;
    gap: 4px;
}

.benefit strong {
    font-size: .78rem;
}

.benefit small {
    color: rgba(255, 255, 255, .68);
    font-size: .66rem;
    line-height: 1.5;
}

.return-link {
    width: fit-content;
    padding: 15px 18px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(2, 26, 61, .35);
}

.return-link > i {
    color: var(--yellow);
}

.return-link span {
    display: grid;
    gap: 3px;
    font-size: .7rem;
}

.return-link strong {
    color: var(--yellow);
}

.form-panel {
    min-height: 100vh;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(
            circle at top right,
            rgba(10, 76, 161, .1),
            transparent 30%
        ),
        var(--white);
}

.registration-card {
    width: min(100%, 710px);
}

.mobile-brand {
    display: none;
}

.form-heading {
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 17px;
}

.heading-icon {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border: 1px solid #dce7f7;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--blue-700);
    background: #f0f5fc;
    font-size: 1.45rem;
}

.form-heading p {
    margin: 0 0 7px;
    color: var(--blue-700);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .13em;
}

.form-heading h2 {
    margin: 0;
    color: var(--blue-900);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.04;
    letter-spacing: -.045em;
}

.form-heading div > span {
    display: block;
    margin-top: 9px;
    color: var(--muted);
    font-size: .79rem;
    line-height: 1.55;
}

.steps {
    margin-bottom: 24px;
    padding: 14px 16px;
    border: 1px solid #e2e8f1;
    border-radius: 14px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #f8fafc;
}

.step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 6px;
    color: var(--muted);
}

.step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 15px;
    left: calc(50% + 22px);
    width: calc(100% - 44px);
    height: 2px;
    background: #d6dfeb;
}

.step span {
    position: relative;
    z-index: 2;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--white);
    background: var(--blue-700);
    font-size: .68rem;
    font-weight: 800;
}

.step small {
    font-size: .62rem;
    font-weight: 700;
}

.alert {
    margin-bottom: 22px;
    padding: 14px 16px;
    border-radius: 11px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .77rem;
    line-height: 1.5;
}

.alert-error {
    border: 1px solid #f0bebe;
    color: var(--danger);
    background: #fff2f2;
}

.registration-form {
    display: grid;
    gap: 23px;
}

.form-section {
    display: grid;
    gap: 18px;
    padding-bottom: 23px;
    border-bottom: 1px solid var(--border);
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 11px;
}

.section-heading > i {
    width: 37px;
    height: 37px;
    flex: 0 0 37px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--blue-700);
    background: var(--blue-100);
}

.section-heading div {
    display: grid;
    gap: 3px;
}

.section-heading strong {
    color: var(--blue-800);
    font-size: .85rem;
}

.section-heading small {
    color: var(--muted);
    font-size: .65rem;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    color: var(--blue-900);
    font-size: .78rem;
    font-weight: 700;
}

.form-group > small {
    min-height: 1em;
    color: var(--muted);
    font-size: .65rem;
    line-height: 1.45;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 17px;
    transform: translateY(-50%);
    color: #8793a5;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    min-height: 55px;
    padding: 0 50px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    color: var(--text);
    background: #fbfcfe;
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background-color .18s ease;
}

.input-wrapper input:focus {
    border-color: var(--blue-700);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(10, 76, 161, .1);
}

.password-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
}

.password-wrapper input {
    padding-right: 58px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    width: 41px;
    height: 41px;
    border: 0;
    border-radius: 9px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    color: var(--blue-700);
    background: transparent;
    cursor: pointer;
}

.password-toggle:hover {
    background: var(--blue-100);
}

.strength-track {
    height: 5px;
    overflow: hidden;
    border-radius: 99px;
    background: #e7ecf3;
}

.strength-track span {
    display: block;
    width: 0;
    height: 100%;
}

.strength-track span[data-strength="1"] {
    width: 25%;
    background: #b72828;
}

.strength-track span[data-strength="2"] {
    width: 50%;
    background: #d98f1f;
}

.strength-track span[data-strength="3"] {
    width: 75%;
    background: #6f9938;
}

.strength-track span[data-strength="4"] {
    width: 100%;
    background: var(--success);
}

.match {
    color: var(--success) !important;
}

.not-match {
    color: var(--danger) !important;
}

.email-notice {
    padding: 16px 17px;
    border: 1px solid #d9e6f7;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    color: var(--blue-900);
    background: #f3f7fd;
}

.email-notice > i {
    margin-top: 3px;
    color: var(--blue-700);
}

.email-notice div {
    display: grid;
    gap: 5px;
}

.email-notice strong {
    font-size: .77rem;
}

.email-notice p {
    margin: 0;
    color: var(--muted);
    font-size: .67rem;
    line-height: 1.55;
}

.privacy-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted);
    font-size: .7rem;
    line-height: 1.55;
    cursor: pointer;
}

.privacy-option input {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    margin: 2px 0 0;
    accent-color: var(--blue-700);
}

.form-actions {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 13px;
}

.primary-button,
.secondary-button {
    min-height: 55px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.primary-button {
    border: 0;
    color: var(--white);
    background:
        linear-gradient(
            135deg,
            var(--blue-700),
            var(--blue-950)
        );
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(5, 38, 91, .21);
}

.secondary-button {
    padding: 0 18px;
    color: var(--blue-700);
}

@media (max-width: 1040px) {
    .registration-page {
        grid-template-columns: 1fr;
    }

    .institutional-panel {
        min-height: 390px;
    }

    .institutional-content {
        min-height: 390px;
        padding: 37px 34px;
    }

    .institutional-message {
        margin: 46px 0 10px;
    }

    .benefits,
    .return-link {
        display: none;
    }

    .form-panel {
        min-height: auto;
        padding: 56px 28px;
    }
}

@media (max-width: 680px) {
    .institutional-panel {
        display: none;
    }

    .form-panel {
        min-height: 100vh;
        padding: 30px 19px;
        align-items: flex-start;
    }

    .mobile-brand {
        display: flex;
        justify-content: center;
        margin-bottom: 34px;
    }

    .mobile-brand img {
        width: min(280px, 80%);
    }

    .password-grid,
    .form-actions {
        grid-template-columns: 1fr;
    }

    .secondary-button {
        order: 2;
    }

    .steps {
        padding-inline: 8px;
    }

    .step small {
        font-size: .56rem;
    }
}

@media (max-width: 430px) {
    .form-heading {
        align-items: flex-start;
    }

    .heading-icon {
        width: 51px;
        height: 51px;
        flex-basis: 51px;
        font-size: 1.15rem;
    }

    .form-heading h2 {
        font-size: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
