body:has(.ui-dialog.add-client-dialog) .ui-widget-overlay {
    background: rgba(19, 42, 51, 0.58);
    opacity: 1;
    backdrop-filter: blur(3px);
}

.ui-dialog.add-client-dialog {
    box-sizing: border-box;
    width: min(920px, calc(100vw - 40px)) !important;
    height: min(720px, calc(100vh - 24px)) !important;
    height: min(720px, calc(100dvh - 24px)) !important;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(29, 87, 91, 0.12) !important;
    border-radius: 22px !important;
    background: #fffdf8 !important;
    box-shadow: 0 24px 70px rgba(11, 45, 52, 0.3) !important;
}

.ui-dialog.add-client-dialog > .ui-dialog-titlebar {
    display: none;
}

.ui-dialog.add-client-dialog #clientMaintenance {
    box-sizing: border-box;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    overflow: hidden;
    background: #fffdf8;
}

.add-client-focused-form {
    box-sizing: border-box;
    display: flex;
    min-height: 0;
    height: 100%;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 24px 32px 0;
    color: #243e45;
    font-size: 14px;
}

.clientMaintenanceForm.add-client-focused-form div,
.clientMaintenanceForm.add-client-focused-form p {
    margin-bottom: 0;
}

.add-client-focused-form .add-client-header {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 0 0 18px;
    border-bottom: 1px solid #dfe8e7;
}

.add-client-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-client-help {
    display: inline-flex;
    width: 40px;
    height: 40px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #c7d9d7;
    border-radius: 10px;
    background: rgba(255, 255, 255, .86);
    color: #31575d;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.add-client-help > img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.add-client-help:hover,
.add-client-help:focus-visible {
    border-color: #83c7c2;
    background: #e8f7f5;
    color: #007f7c;
}

.update-client-focused-form .add-client-header {
    grid-template-columns: 54px minmax(0, 1fr) auto;
}

.update-client-header-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.update-client-focused-form .update-client-more-actions {
    align-self: center;
    margin-left: 0;
}

.update-client-focused-form .update-client-more-button {
    min-height: 38px;
    padding: 7px 11px;
    border-color: #c7d7d5;
    border-radius: 9px;
    color: #31565b;
    font-size: 11px;
}

.add-client-focused-form .add-client-header-icon {
    width: 54px;
    height: 54px;
}

.add-client-focused-form .add-client-header-icon svg {
    display: block;
    width: 54px;
    height: 54px;
    fill: #e8f8f6;
    stroke: #008f8c;
    stroke-width: 2;
}

.add-client-focused-form .add-client-header-icon .add-client-icon-badge {
    fill: #e73352;
    stroke: #fffdf8;
}

.add-client-focused-form .add-client-header-icon .add-client-icon-plus {
    fill: none;
    stroke: #fff;
    stroke-width: 2.5;
}

.add-client-focused-form .add-client-header-copy h1 {
    margin: 0 0 3px;
    color: #153f47;
    font-size: 25px;
    line-height: 1.15;
}

.add-client-focused-form .add-client-header-copy p {
    color: #64787c;
    font-size: 13px;
}

.add-client-focused-form .add-client-close {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #edf4f3;
    color: #315158;
    font: 400 27px/1 sans-serif;
    cursor: pointer;
}

.add-client-focused-form .add-client-close:hover,
.add-client-focused-form .add-client-close:focus-visible {
    background: #dff2f0;
    outline: 3px solid rgba(0, 177, 173, 0.25);
}

.add-client-focused-form #saveclienterrorpara {
    min-height: 18px;
    margin: 5px 0 0;
    color: #b5223d;
    font-size: 12px;
    visibility: hidden;
}

.add-client-focused-form #updateclienterrorpara {
    min-height: 18px;
    margin: 5px 0 0;
    color: #b5223d;
    font-size: 12px;
    visibility: hidden;
}

.add-client-focused-form .add-client-details-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}

.add-client-focused-form .add-client-details-heading h2 {
    margin: 0;
    color: #174e55;
    font-size: 17px;
}

.add-client-focused-form .add-client-details-heading > span {
    color: #718387;
    font-size: 11px;
}

.add-client-focused-form .add-client-required,
.add-client-focused-form .add-client-details-heading b,
.add-client-focused-form .add-client-actions > p span {
    color: #e73352;
}

.add-client-focused-form .add-client-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 22px;
}

.add-client-focused-form .add-client-field,
.add-client-focused-form .add-client-gender {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.add-client-focused-form .add-client-field > label,
.add-client-focused-form .add-client-gender legend,
.add-client-focused-form .add-client-disclosure-content > label {
    display: block;
    margin: 0 0 6px;
    color: #284a50;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.add-client-focused-form .add-client-optional {
    color: #7b8d90;
    font-size: 11px;
    font-style: normal;
    font-weight: 400;
}

.add-client-focused-form input[type="text"],
.add-client-focused-form select,
.add-client-focused-form textarea {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid #bdcecc;
    border-radius: 9px;
    background: #fff;
    color: #203f45;
    font: inherit;
}

.add-client-focused-form input[type="text"],
.add-client-focused-form select {
    height: 44px;
    padding: 0 12px;
}

.add-client-focused-form textarea {
    min-height: 82px;
    padding: 10px 12px;
    resize: vertical;
}

.add-client-focused-form input:focus,
.add-client-focused-form select:focus,
.add-client-focused-form textarea:focus {
    border-color: #00b1ad;
    outline: 3px solid rgba(0, 177, 173, 0.16);
}

.add-client-focused-form .add-client-date-input {
    position: relative;
    display: block;
}

.add-client-focused-form .add-client-date-input svg {
    position: absolute;
    z-index: 1;
    top: 12px;
    right: 12px;
    fill: none;
    stroke: #4c7478;
    stroke-width: 1.7;
    pointer-events: none;
}

.add-client-focused-form .add-client-date-input input {
    padding-right: 42px;
}

.add-client-focused-form .add-client-field small {
    display: block;
    margin-top: 4px;
    color: #75878b;
    font-size: 10px;
}

.add-client-focused-form #cohortExplanation {
    min-height: 25px;
    margin-top: 4px;
    color: #667d81;
    font-size: 10px;
    line-height: 1.3;
}

.add-client-focused-form #cohortExplanation.is-school-year-override {
    color: #8b5d13;
}

.clientMaintenanceForm.add-client-form.add-client-focused-form .add-client-gender-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    box-sizing: border-box;
    width: 100%;
    height: 52px;
    padding: 4px;
    gap: 3px;
    border: 1px solid #bdcecc;
    border-radius: 12px;
    background: #eef3f2;
}

.clientMaintenanceForm.add-client-form.add-client-focused-form .add-client-gender-options input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.clientMaintenanceForm.add-client-form.add-client-focused-form .add-client-gender-options label {
    display: flex;
    min-width: 0;
    min-height: 0;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #526c71;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.clientMaintenanceForm.add-client-form.add-client-focused-form .add-client-gender-options label:hover {
    background: rgba(255, 255, 255, 0.7);
    color: #214f55;
}

.clientMaintenanceForm.add-client-form.add-client-focused-form .add-client-gender-options #male:checked + label,
.clientMaintenanceForm.add-client-form.add-client-focused-form .add-client-gender-options #female:checked + label,
.clientMaintenanceForm.add-client-form.add-client-focused-form .add-client-gender-options #other:checked + label {
    background: #00b1ad;
    box-shadow: 0 1px 3px rgba(0, 88, 86, 0.2);
    color: #fff;
    font-weight: 700;
}

.clientMaintenanceForm.add-client-form.add-client-focused-form .add-client-gender-options input:focus-visible + label {
    outline: 3px solid rgba(0, 177, 173, 0.25);
    outline-offset: 1px;
}

.add-client-focused-form .add-client-disclosures {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.add-client-focused-form .add-client-disclosure {
    overflow: hidden;
    border: 1px solid #d8e4e2;
    border-radius: 11px;
    background: #f9fbfa;
}

.add-client-focused-form .add-client-disclosure summary {
    display: grid;
    grid-template-columns: 34px minmax(150px, 1fr) auto 24px;
    align-items: center;
    gap: 11px;
    min-height: 58px;
    padding: 8px 14px;
    list-style: none;
    cursor: pointer;
}

.add-client-focused-form .add-client-disclosure summary::-webkit-details-marker {
    display: none;
}

.add-client-focused-form .add-client-disclosure-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: #e2f7f4;
}

.add-client-focused-form .add-client-disclosure-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #008f8c;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.add-client-focused-form .add-client-disclosure-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    font-style: normal;
}

.add-client-focused-form .add-client-disclosure-copy strong {
    color: #25464c;
    font-size: 12px;
}

.add-client-focused-form .add-client-disclosure-copy small {
    color: #75878b;
    font-size: 10px;
}

.add-client-focused-form .add-client-disclosure-chevron {
    color: #60777b;
    font-size: 21px;
    font-style: normal;
    transition: transform 160ms ease;
}

.add-client-focused-form .add-client-disclosure[open] .add-client-disclosure-chevron {
    transform: rotate(180deg);
}

.add-client-focused-form .add-client-selected-category-summary {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    min-width: 0;
}

.add-client-focused-form .add-client-selected-category-summary span {
    padding: 3px 7px;
    border-radius: 999px;
    background: #e5f5f3;
    color: #1f6468;
    font-size: 9px;
    font-style: normal;
    white-space: nowrap;
}

.add-client-focused-form .update-client-disclosure-summary {
    color: #3e7477;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    white-space: nowrap;
}

.add-client-focused-form .add-client-disclosure-content {
    padding: 12px 14px 14px;
    border-top: 1px solid #e1e9e8;
    background: #fff;
}

.add-client-focused-form .add-client-category-content-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.add-client-focused-form .add-client-category-content-heading p,
.add-client-focused-form .add-client-category-hint {
    color: #63797d;
    font-size: 10px;
}

.add-client-focused-form .add-client-manage-categories,
.add-client-focused-form .add-client-create-category {
    border: 0;
    background: transparent;
    color: #007c7a;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.add-client-focused-form #tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.add-client-focused-form #tags > .client-tag {
    margin: 0;
    padding: 7px 11px;
    border: 1px solid #c8d8d6;
    border-radius: 999px;
    background: #fff;
    color: #3f6065;
    font-size: 11px;
    cursor: pointer;
}

.add-client-focused-form #tags > .client-tag.active {
    border-color: #00b1ad;
    background: #e4f7f5;
    color: #006d6a;
}

.add-client-focused-form .add-client-new-tag:not([hidden]) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.add-client-focused-form .add-client-new-tag input {
    width: 180px;
    height: 34px;
}

.add-client-focused-form .add-client-new-tag button {
    min-height: 34px;
    padding: 0 13px;
}

.add-client-focused-form .add-client-category-hint {
    margin-top: 10px;
}

.add-client-focused-form .add-client-actions {
    position: sticky;
    bottom: 0;
    display: flex;
    width: auto;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 20px -32px 0;
    padding: 12px 32px;
    border-top: 1px solid #dde7e5;
    background: rgba(255, 253, 248, 0.97);
    box-shadow: 0 -8px 18px rgba(36, 71, 76, 0.04);
}

.add-client-focused-form .add-client-actions > p {
    color: #738689;
    font-size: 10px;
}

.add-client-focused-form .add-client-action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.add-client-focused-form .add-client-actions button {
    min-width: 112px;
    min-height: 42px;
    margin: 0;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
}

.add-client-focused-form .add-client-cancel {
    border: 1px solid #b9cdca;
    background: #fff;
    color: #31565b;
}

.add-client-focused-form .add-client-save {
    border: 1px solid #00a19d;
    background: #00b1ad;
    color: #fff;
}

.add-client-focused-form .add-client-save:disabled {
    border-color: #cbd8d6;
    background: #dce5e3;
    color: #81918f;
    cursor: not-allowed;
}

@media (max-width: 700px) {
    .ui-dialog.add-client-dialog {
        width: calc(100vw - 20px) !important;
        height: calc(100vh - 20px) !important;
        height: calc(100dvh - 20px) !important;
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
    }

    .ui-dialog.add-client-dialog #clientMaintenance {
        height: 100% !important;
        max-height: none !important;
    }

    .add-client-focused-form {
        padding: 18px 18px 0;
    }

    .add-client-focused-form .add-client-grid {
        grid-template-columns: 1fr;
    }

    .add-client-focused-form .add-client-selected-category-summary {
        display: none;
    }

    .update-client-focused-form .add-client-header {
        grid-template-columns: 46px minmax(0, 1fr) auto;
    }

    .update-client-focused-form .update-client-more-button {
        width: 38px;
        padding: 0;
        justify-content: center;
        font-size: 0;
    }

    .update-client-focused-form .update-client-more-button > span {
        font-size: 13px;
    }

    .update-client-focused-form .update-client-disclosure-summary {
        display: none;
    }

    .add-client-focused-form .add-client-disclosure summary {
        grid-template-columns: 34px minmax(0, 1fr) 24px;
    }

    .add-client-focused-form .add-client-actions {
        margin-right: -18px;
        margin-left: -18px;
        padding-right: 18px;
        padding-left: 18px;
    }

    .add-client-focused-form .add-client-actions > p {
        display: none;
    }

    .add-client-focused-form .add-client-action-buttons {
        width: 100%;
    }

    .add-client-focused-form .add-client-actions button {
        flex: 1;
    }
}

/* Add and Edit child use the same calm, welcoming visual language as the
   Children directory. */
:is(#addstudent, #updatestudent).add-client-focused-form {
    padding: 24px 28px 0;
    background: #fffdf8;
    color: #263b4d;
}

:is(#addstudent, #updatestudent) .add-client-header {
    position: relative;
    min-height: 68px;
    overflow: visible;
    padding: 11px 14px;
    border: 1px solid rgba(190, 225, 222, 0.66);
    border-radius: 18px;
    background:
        radial-gradient(circle at calc(100% - 153px) -2px, rgba(143, 218, 212, 0.17) 0 70px, transparent 71px),
        radial-gradient(circle at calc(100% + 23px) 78px, rgba(255, 215, 112, 0.19) 0 48px, transparent 49px),
        linear-gradient(105deg, rgba(231, 247, 245, 0.94), rgba(255, 251, 239, 0.8));
}

:is(#addstudent, #updatestudent) .add-client-header::before,
:is(#addstudent, #updatestudent) .add-client-header::after {
    display: none;
}

:is(#addstudent, #updatestudent) .add-client-header > * {
    position: relative;
    z-index: 1;
}

:is(#addstudent, #updatestudent) .add-client-header-icon {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border-radius: 50%;
    background: #e5f6f4;
    box-shadow: 0 0 0 5px rgba(0, 177, 173, 0.07);
}

:is(#addstudent, #updatestudent) .add-client-header-icon svg {
    width: 50px;
    height: 50px;
}

:is(#addstudent, #updatestudent) .add-client-header-icon .add-client-icon-badge {
    fill: #f4c84e;
    stroke: #fffdf8;
}

:is(#addstudent, #updatestudent) .add-client-header-icon .add-client-icon-plus {
    stroke: #675317;
}

:is(#addstudent, #updatestudent) .add-client-header-copy h1 {
    color: #24364f;
    font-size: 27px;
    letter-spacing: -0.02em;
}

:is(#addstudent, #updatestudent) .add-client-header-copy p {
    color: #5b7180;
}

:is(#addstudent, #updatestudent) .add-client-close {
    border: 1px solid #d0e1df;
    background: rgba(255, 255, 255, 0.82);
    color: #405d69;
}

#addstudent #saveclienterrorpara,
#updatestudent #updateclienterrorpara {
    margin-top: 4px;
}

:is(#addstudent, #updatestudent) .add-client-details {
    padding: 16px 18px 18px;
    border: 1px solid #d7e8e6;
    border-radius: 17px;
    background: #f0f8f7;
}

:is(#addstudent, #updatestudent) .add-client-details-heading h2 {
    color: #243f50;
}

:is(#addstudent, #updatestudent) .add-client-field > label,
:is(#addstudent, #updatestudent) .add-client-gender legend,
:is(#addstudent, #updatestudent) .add-client-disclosure-content > label {
    color: #415d6d;
}

:is(#addstudent, #updatestudent) input[type="text"],
:is(#addstudent, #updatestudent) select,
:is(#addstudent, #updatestudent) textarea,
:is(#addstudent, #updatestudent) .add-client-gender-options {
    border-color: #c5d8d7;
    border-radius: 11px;
}

:is(#addstudent, #updatestudent) input[type="text"],
:is(#addstudent, #updatestudent) select {
    height: 42px;
}

:is(#addstudent, #updatestudent) .add-client-disclosures {
    gap: 10px;
    margin-top: 15px;
}

:is(#addstudent, #updatestudent) .add-client-disclosure {
    border-color: #dce7e6;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(38, 65, 73, 0.07);
}

:is(#addstudent, #updatestudent) .add-client-disclosure summary {
    min-height: 60px;
    padding: 9px 14px;
}

:is(#addstudent, #updatestudent) .add-client-disclosure:first-child .add-client-disclosure-icon {
    background: #f0edf9;
}

:is(#addstudent, #updatestudent) .add-client-disclosure:first-child .add-client-disclosure-icon svg {
    stroke: #655d8e;
}

:is(#addstudent, #updatestudent) .add-client-disclosure:nth-child(2) .add-client-disclosure-icon {
    background: #fff5d9;
}

:is(#addstudent, #updatestudent) .add-client-disclosure:nth-child(2) .add-client-disclosure-icon svg {
    stroke: #866b25;
}

:is(#addstudent, #updatestudent) .add-client-disclosure-copy strong {
    color: #2b4656;
    font-size: 13px;
}

:is(#addstudent, #updatestudent) .add-client-actions {
    flex-direction: row;
    margin-top: auto;
    margin-right: -28px;
    margin-left: -28px;
    padding-right: 28px;
    padding-left: 28px;
    border-top-color: #d7e5e3;
    background: rgba(255, 253, 248, 0.98);
}

:is(#addstudent, #updatestudent) .add-client-actions button {
    min-height: 42px;
    border-radius: 12px;
}

:is(#addstudent, #updatestudent) .add-client-save:not(:disabled) {
    box-shadow: 0 4px 10px rgba(0, 123, 120, 0.18);
}

@media (max-width: 700px) {
    :is(#addstudent, #updatestudent).add-client-focused-form {
        padding: 16px 16px 0;
    }

    :is(#addstudent, #updatestudent) .add-client-header {
        grid-template-columns: 46px minmax(0, 1fr) auto;
        padding: 10px;
    }

    :is(#addstudent, #updatestudent) .add-client-help {
        width: 36px;
        height: 36px;
        min-height: 36px;
        justify-content: center;
        padding: 0;
        overflow: hidden;
        font-size: 0;
    }

    :is(#addstudent, #updatestudent) .add-client-help > img { width: 34px; height: 34px; }

    :is(#addstudent, #updatestudent) .add-client-header-icon,
    :is(#addstudent, #updatestudent) .add-client-header-icon svg {
        width: 44px;
        height: 44px;
    }

    :is(#addstudent, #updatestudent) .add-client-header-copy h1 {
        font-size: 23px;
    }

    :is(#addstudent, #updatestudent) .add-client-details {
        padding: 14px;
    }

    :is(#addstudent, #updatestudent) .add-client-actions {
        flex-direction: row;
        margin-right: -16px;
        margin-left: -16px;
        padding-right: 16px;
        padding-left: 16px;
    }
}

@media (max-width: 380px) {
    #updatestudent .add-client-header {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    #updatestudent .add-client-header-icon,
    #updatestudent .add-client-header-copy p {
        display: none;
    }

    #updatestudent .update-client-header-actions {
        gap: 4px;
    }

    #updatestudent .update-client-actions-menu {
        right: -42px;
        width: min(275px, calc(100vw - 52px));
    }
}
