:root {
    --reg-navy-950: #082f49;
    --reg-navy-900: #0b3b5a;
    --reg-navy-700: #155e75;
    --reg-teal-600: #0d9488;
    --reg-teal-100: #ccfbf1;
    --reg-blue-50: #f0f9ff;
    --reg-slate-950: #172033;
    --reg-slate-700: #42526b;
    --reg-slate-500: #69788f;
    --reg-slate-300: #cfd8e3;
    --reg-slate-200: #e5ebf2;
    --reg-slate-100: #f2f5f8;
    --reg-white: #ffffff;
    --reg-danger: #c24141;
    --reg-shadow: 0 22px 55px rgba(8, 47, 73, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.registration-page {
    min-width: 320px;
    margin: 0;
    color: var(--reg-slate-950);
    background:
        radial-gradient(circle at 8% 0%, rgba(13, 148, 136, 0.09), transparent 28rem),
        linear-gradient(180deg, #eef7fa 0, #f7f9fb 28rem, #f7f9fb 100%);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.registration-page .row {
    padding: 0;
}

.registration-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.registration-container {
    width: min(100% - 40px, 1120px);
    margin-inline: auto;
}

.registration-header {
    position: relative;
    z-index: 2;
    color: var(--reg-white);
    background: linear-gradient(125deg, var(--reg-navy-950), var(--reg-navy-900) 58%, #0f6670);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(8, 47, 73, 0.16);
}

.header-content {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.hospital-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hospital-logo-wrap {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 6px;
    background: var(--reg-white);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(3, 25, 40, 0.2);
}

.hospital-logo-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hospital-heading {
    min-width: 0;
}

.hospital-kicker {
    display: block;
    margin-bottom: 2px;
    color: #a7f3d0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hospital-heading h1 {
    max-width: 720px;
    overflow: hidden;
    margin: 0;
    color: var(--reg-white);
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    font-weight: 720;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.secure-label {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    color: #dffcf6;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 650;
}

.registration-main {
    flex: 1;
    padding: 36px 0 48px;
}

.welcome-panel {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 22px;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 7px;
    color: var(--reg-teal-600);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.welcome-panel h2 {
    margin: 0 0 6px;
    color: var(--reg-navy-950);
    font-size: clamp(1.65rem, 3vw, 2.3rem);
    font-weight: 760;
    letter-spacing: -0.035em;
    line-height: 1.14;
}

.welcome-panel p {
    margin: 0;
    color: var(--reg-slate-500);
    font-size: 0.95rem;
}

.privacy-message {
    max-width: 330px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    color: var(--reg-navy-700);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(21, 94, 117, 0.14);
    border-radius: 14px;
    font-size: 0.82rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.privacy-message i {
    color: var(--reg-teal-600);
}

.registration-card {
    overflow: hidden;
    background: var(--reg-white);
    border: 1px solid rgba(207, 216, 227, 0.9);
    border-radius: 24px;
    box-shadow: var(--reg-shadow);
}

.form-section {
    padding: 30px 34px 10px;
    border-bottom: 1px solid var(--reg-slate-200);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 24px;
}

.section-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    color: var(--reg-navy-700);
    background: var(--reg-blue-50);
    border: 1px solid #d8edf7;
    border-radius: 11px;
}

.section-heading h3 {
    margin: 0 0 2px;
    color: var(--reg-navy-950);
    font-size: 1.06rem;
    font-weight: 750;
    line-height: 1.35;
}

.section-heading p {
    margin: 0;
    color: var(--reg-slate-500);
    font-size: 0.83rem;
}

.form-grid {
    --bs-gutter-x: 24px;
    --bs-gutter-y: 0;
}

.registration-page .form-group {
    margin-bottom: 22px;
}

.registration-page .form-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 22px;
    margin-bottom: 7px;
    color: #293850;
    font-size: 0.86rem;
    font-weight: 680;
}

.required-mark {
    color: var(--reg-danger);
    font-weight: 800;
}

.optional-label {
    margin-left: auto;
    color: #8895a7;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.registration-page .form-control,
.registration-page .form-select {
    width: 100%;
    height: 50px;
    min-height: 50px;
    padding: 0 14px;
    color: var(--reg-slate-950);
    background-color: #fbfcfd;
    border: 1px solid var(--reg-slate-300);
    border-radius: 11px;
    box-shadow: 0 1px 2px rgba(8, 47, 73, 0.03);
    font-size: 0.94rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.registration-page .form-select {
    padding-right: 36px;
}

.registration-page .form-control::placeholder {
    color: #9aa6b6;
}

.registration-page .form-control:hover,
.registration-page .form-select:hover {
    border-color: #aebbc9;
}

.registration-page .form-control:focus,
.registration-page .form-select:focus {
    color: var(--reg-slate-950);
    background-color: var(--reg-white);
    border-color: var(--reg-teal-600);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.registration-page .form-control:disabled,
.registration-page .form-select:disabled {
    color: #7d8b9d;
    background: var(--reg-slate-100);
    cursor: not-allowed;
}

.dob-fields {
    display: grid;
    grid-template-columns: 0.82fr 1.1fr 1.1fr;
    gap: 7px;
}

.dob-fields .form-control,
.dob-fields .form-select {
    min-width: 0;
    padding-left: 10px;
    padding-right: 25px;
    font-size: 0.84rem;
}

.field-message,
.field-hint,
.field-error {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    line-height: 1.35;
}

.field-message,
.field-hint {
    color: var(--reg-slate-500);
}

.field-error {
    display: none;
    color: var(--reg-danger);
    font-weight: 550;
}

.phone-input-wrap {
    position: relative;
}

.phone-input-wrap .country-code {
    position: absolute;
    z-index: 1;
    inset: 1px auto 1px 1px;
    width: 54px;
    display: grid;
    place-items: center;
    color: var(--reg-navy-700);
    background: var(--reg-blue-50);
    border-right: 1px solid var(--reg-slate-300);
    border-radius: 10px 0 0 10px;
    font-size: 0.86rem;
    font-weight: 750;
}

.phone-input-wrap .form-control {
    padding-left: 68px;
}

.form-actions {
    padding: 26px 34px 30px;
    background: #fbfcfd;
}

.consent-card {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 0 0 22px;
    padding: 14px 16px;
    color: var(--reg-slate-700);
    background: var(--reg-white);
    border: 1px solid var(--reg-slate-200);
    border-radius: 12px;
    font-size: 0.87rem;
    line-height: 1.45;
    cursor: pointer;
}

.consent-card input {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    margin: 1px 0 0;
    accent-color: var(--reg-teal-600);
}

.consent-card a {
    color: var(--reg-navy-700);
    font-weight: 750;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.registration-page .submit-btn {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 22px;
    color: var(--reg-white) !important;
    background: linear-gradient(115deg, var(--reg-navy-700), var(--reg-teal-600)) !important;
    border: 0 !important;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(13, 148, 136, 0.2);
    font-size: 0.98rem;
    font-weight: 750;
    letter-spacing: 0.005em;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.registration-page .submit-btn:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 13px 28px rgba(13, 148, 136, 0.27);
}

.registration-page .submit-btn:focus-visible {
    outline: 3px solid rgba(13, 148, 136, 0.28);
    outline-offset: 3px;
}

.registration-page .submit-btn:disabled {
    opacity: 0.65;
    transform: none;
    cursor: wait;
}

.submit-help {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 10px 0 0;
    color: var(--reg-slate-500);
    font-size: 0.74rem;
    text-align: center;
}

.registration-footer {
    color: #dcebf0;
    background: var(--reg-navy-950);
}

.footer-content {
    min-height: 112px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: center;
    gap: 28px;
    padding-block: 24px;
}

.footer-label {
    display: block;
    margin-bottom: 4px;
    color: #84d8d2;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer-content p {
    overflow-wrap: anywhere;
    margin: 0;
    color: #e9f4f7;
    font-size: 0.82rem;
}

.footer-content .copyright {
    color: #9bb5c1;
    font-size: 0.72rem;
    text-align: right;
}

.swal2-popup.my-custom-class {
    width: min(92vw, 680px) !important;
    max-height: min(84vh, 720px);
    padding: 20px !important;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(8, 47, 73, 0.24);
}

.swal2-popup.my-custom-class .swal2-html-container {
    padding: 0 4px 0 0;
    color: var(--reg-slate-700);
}

.swal2-popup.my-custom-class .swal2-confirm {
    min-width: 110px;
    background: var(--reg-navy-700) !important;
    border-radius: 10px;
}

@media (max-width: 767.98px) {
    .registration-container {
        width: min(100% - 24px, 620px);
    }

    .header-content {
        min-height: 76px;
    }

    .hospital-logo-wrap {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        border-radius: 13px;
    }

    .registration-main {
        padding: 24px 0 32px;
    }

    .welcome-panel {
        display: block;
        margin-bottom: 17px;
    }

    .privacy-message {
        max-width: none;
        margin-top: 14px;
        padding: 10px 12px;
    }

    .registration-card {
        border-radius: 20px;
    }

    .form-section {
        padding: 24px 20px 5px;
    }

    .section-heading {
        margin-bottom: 20px;
    }

    .form-grid {
        --bs-gutter-x: 16px;
    }

    .registration-page .form-group {
        margin-bottom: 18px;
    }

    .registration-page .form-control,
    .registration-page .form-select {
        height: 52px;
        min-height: 52px;
        font-size: 16px;
    }

    .dob-fields .form-control,
    .dob-fields .form-select {
        font-size: 0.78rem;
    }

    .form-actions {
        padding: 22px 20px 24px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 18px 20px;
    }

    .footer-content .copyright {
        grid-column: 1 / -1;
        text-align: left;
    }
}

@media (max-width: 479.98px) {
    .registration-container {
        width: min(100% - 20px, 430px);
    }

    .secure-label {
        width: 38px;
        height: 38px;
        justify-content: center;
        padding: 0;
    }

    .secure-label span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .hospital-kicker {
        font-size: 0.62rem;
    }

    .hospital-heading h1 {
        font-size: 1rem;
    }

    .welcome-panel h2 {
        font-size: 1.58rem;
    }

    .welcome-panel p {
        font-size: 0.86rem;
    }

    .form-section {
        padding-inline: 15px;
    }

    .section-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .section-heading h3 {
        font-size: 1rem;
    }

    .section-heading p {
        font-size: 0.77rem;
    }

    .registration-page .form-group label {
        font-size: 0.8rem;
    }

    .optional-label {
        font-size: 0.6rem;
    }

    .dob-fields {
        gap: 5px;
    }

    .dob-fields .form-control,
    .dob-fields .form-select {
        padding-left: 7px;
        padding-right: 20px;
        font-size: 0.72rem;
    }

    .form-actions {
        padding-inline: 15px;
    }

    .consent-card {
        padding: 13px;
        font-size: 0.81rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .footer-content .copyright {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
